- Joined
- Jun 6, 2014
- Messages
- 1,643
- Reaction score
- 420
- First Language
- Portuguese
- Primarily Uses
- RMMV
I'm trying to remake in VX Ace something I had made in XP, which on it's turn is something I saw in a game.
To be more exact, Breath of Fire 3.
The idea is that, when the turn is over, before even status damage/healing happens, there is a second turn, in which no troop events happen, no enemies attack, and that don't count in the total turn number. This turn is exclusive for characters whose agility is at least double the faster of the enemy troop.
I know the variable is being changed because I tested it with a message box, and also I was able to make the party command window not appear during the extra turn, but everything else seems to ignore the variable for some reason
This is all I was able to do until now:
class Game_Troop < Game_Unit def agi_max members.each do |enemy| next unless enemy.alive? agi = enemy.agi if (enemy.agi >= agi) end return agi endendmodule BattleManager def self.next_command begin if !actor || !actor.next_command @actor_index += 1 return false if @actor_index >= $game_party.members.size end end until actor.inputable? && (!@extra_turn || actor.agi >= Game_Troop.agi_max*2) return true end def self.prior_command begin if !actor || !actor.prior_command @actor_index -= 1 return false if @actor_index < 0 end end until actor.inputable? && (!@extra_turn || actor.agi >= Game_Troop.agi_max*2) return true unless @extra_turn next_command end def self.input_start if @phase != :input @phase = :input $game_party.make_actions $game_troop.make_actions unless @extra_turn clear_actor end return !@surprise && $game_party.inputable? end def self.turn_start @phase = :turn clear_actor $game_troop.increase_turn unless @extra_turn make_action_orders end def self.make_action_orders @action_battlers = [] unless @extra_turn @action_battlers += $game_party.members unless @surprise @action_battlers += $game_troop.members unless (@preemptive) else @action_battlers += $game_party.all_members[0, max_battle_members].select {|actor| actor.exist? && actor.agi >= Game_Troop.agi_max*2} end @action_battlers.each {|battler| battler.make_speed } @action_battlers.sort! {|a,b| b.speed - a.speed } endendclass Scene_Battle < Scene_Base attr_accessor :extra_turn alias extra_turn_start start def start @extra_turn = false extra_turn_start end def start_party_command_selection unless scene_changing? refresh_status @status_window.unselect @status_window.open if BattleManager.input_start unless @extra_turn @actor_command_window.close @party_command_window.setup else next_command end else @party_command_window.deactivate turn_start end end end def turn_end all_battle_members.each do |battler| battler.on_turn_end refresh_status @log_window.display_auto_affected_status(battler) @log_window.wait_and_clear end BattleManager.turn_end process_event @extra_turn ? @extra_turn = false : @extra_turn = true start_party_command_selection endendAny help would be apreciated. I'd like explaining instead of a complete script though, I'd like to learn from the experience...
To be more exact, Breath of Fire 3.
The idea is that, when the turn is over, before even status damage/healing happens, there is a second turn, in which no troop events happen, no enemies attack, and that don't count in the total turn number. This turn is exclusive for characters whose agility is at least double the faster of the enemy troop.
I know the variable is being changed because I tested it with a message box, and also I was able to make the party command window not appear during the extra turn, but everything else seems to ignore the variable for some reason
This is all I was able to do until now:
class Game_Troop < Game_Unit def agi_max members.each do |enemy| next unless enemy.alive? agi = enemy.agi if (enemy.agi >= agi) end return agi endendmodule BattleManager def self.next_command begin if !actor || !actor.next_command @actor_index += 1 return false if @actor_index >= $game_party.members.size end end until actor.inputable? && (!@extra_turn || actor.agi >= Game_Troop.agi_max*2) return true end def self.prior_command begin if !actor || !actor.prior_command @actor_index -= 1 return false if @actor_index < 0 end end until actor.inputable? && (!@extra_turn || actor.agi >= Game_Troop.agi_max*2) return true unless @extra_turn next_command end def self.input_start if @phase != :input @phase = :input $game_party.make_actions $game_troop.make_actions unless @extra_turn clear_actor end return !@surprise && $game_party.inputable? end def self.turn_start @phase = :turn clear_actor $game_troop.increase_turn unless @extra_turn make_action_orders end def self.make_action_orders @action_battlers = [] unless @extra_turn @action_battlers += $game_party.members unless @surprise @action_battlers += $game_troop.members unless (@preemptive) else @action_battlers += $game_party.all_members[0, max_battle_members].select {|actor| actor.exist? && actor.agi >= Game_Troop.agi_max*2} end @action_battlers.each {|battler| battler.make_speed } @action_battlers.sort! {|a,b| b.speed - a.speed } endendclass Scene_Battle < Scene_Base attr_accessor :extra_turn alias extra_turn_start start def start @extra_turn = false extra_turn_start end def start_party_command_selection unless scene_changing? refresh_status @status_window.unselect @status_window.open if BattleManager.input_start unless @extra_turn @actor_command_window.close @party_command_window.setup else next_command end else @party_command_window.deactivate turn_start end end end def turn_end all_battle_members.each do |battler| battler.on_turn_end refresh_status @log_window.display_auto_affected_status(battler) @log_window.wait_and_clear end BattleManager.turn_end process_event @extra_turn ? @extra_turn = false : @extra_turn = true start_party_command_selection endendAny help would be apreciated. I'd like explaining instead of a complete script though, I'd like to learn from the experience...
Last edited by a moderator:
