While sometimes we've to write short/long/etc methods(while sometimes method length just doesn't matter at all) and whether a method's considered to be short/long can sometimes be relative to the underlying context and/or script developers' own judgments(based on their own experiences and observations), most of us still have a general feeling/rule(applied on most but some special cases we've already dealt with) on whether a method's short/long(at least for ourselves) and many of us have some preferences on the method length(Some may prefer short methods while some may prefer long ones).
While the below is just an example demonstrating the first 5 choices in the poll under my own subjective interpretations, I still think it can help you have a vague idea on those choices(all modified from the possibly upcoming DoubleX RMVXA CTB Addon to YSA Battle System: Classical AT😎:
As short as possible -
Just short enough -
Not short nor long -
Just long enough -
As long as possible -
I don't want you to be restricted to the above example, as I want you to make your own choices based on your own judgments under your own experiences and observations instead.
While the below is just an example demonstrating the first 5 choices in the poll under my own subjective interpretations, I still think it can help you have a vague idea on those choices(all modified from the possibly upcoming DoubleX RMVXA CTB Addon to YSA Battle System: Classical AT😎:
As short as possible -
def process_catb # Rewrite; Hotspot # Rewritten to update all battlers' atb types until player can input actions process_catb_windows process_catb_loop if process_catb? # end # process_catb def process_catb_windows # New; Hotspot update_catb_windows if @status_window.index >= 0 return unless BattleManager.action_list🙂actor).empty? @party_command_window.deactivate.close end # process_catb_windows def update_catb_windows # New; Hotspot mem = $game_party.members[@status_window.index] reset_catb_actor(mem) if reset_catb_actor?(mem) end # update_catb_windows def reset_catb_actor(mem) # New; Hotspot mem.clear_catb if $game_party.members[@status_window.index] toogle_catb_windows end # reset_catb_actor def reset_catb_actor?(mem) # New; Hotspot !mem || mem.dead? || !BattleManager.action_list🙂actor).include?(mem) end # reset_catb_actor? def toogle_catb_windows # New; Hotspot toogle_catb_selection_windows toogle_catb_status_window if toogle_catb_status_window? end # toogle_catb_windows def toogle_catb_status_window # New; Hotspot @status_window.open.show @status_aid_window.hide end # toogle_catb_status_window def toogle_catb_status_window? # New; Hotspot return true if @skill_window.visible || @item_window.visible @actor_window.visible || @enemy_window.visible end # toogle_catb_status_window? def toogle_catb_selection_windows # New; Hotspot @actor_window.hide.deactivate @enemy_window.hide.deactivate toogle_catb_selection_windows_2 end # toogle_catb_selection_windows def toogle_catb_selection_windows_2 # New; Hotspot @actor_command_window.deactivate.close @skill_window.hide.deactivate toogle_catb_selection_windows_3 end # toogle_catb_selection_windows_2 def toogle_catb_selection_windows_3 # New; Hotspot @item_window.hide.deactivate @status_window.unselect end # toogle_catb_selection_windows_3 def process_catb? # New; Hotspot return false unless can_process_catb? return false unless BattleManager.btype?🙂catb) && BattleManager.phase !$game_party.all_dead? && !$game_troop.all_dead? end # process_catb? def can_process_catb? # New; Hotspot SceneManager.scene_is?(Scene_Battle) && !scene_changing? && !catb_pause? end # can_process_catb? def process_catb_loop # New; Hotspot pre_process_catb_loop post_process_catb end # process_catb def pre_process_catb_loop # New; Hotspot begin process_catb_ctb end until catb_ctb_break? end # pre_process_catb_loop def process_catb_ctb # New; Hotspot process_catb_update process_catb_turn_type post_process_catb_ctb end # process_catb_ctb def post_process_catb_ctb # New; Hotspot @status_window.refresh_catb setup_catb_actor(find_catb_actor) if setup_catb_actor?(f_actor) process_catb_act end # post_process_catb_ctb def process_catb_update # New; Hotspot pre_catb_update process_catb_updates BattleManager.action_list🙂actor).each { |a| a.clear_catb unless a.index } end # process_catb_update def pre_catb_update # New; Hotspot return unless $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛RE_ATB_UPDATE) end # pre_catb_update def process_catb_updates # New; Hotspot ($game_party.battle_members + $game_troop.members).each { |mem| update_catb_act(mem) } end # process_catb_updates def update_catb_act(mem) # New; Hotspot make_catb_act(mem) make_catb_updates(mem) end # update_catb_act def make_catb_act(mem) # New; Hotspot mem.clear_actions if mem.catb_value == 0 mem.make_catb_update mem.make_catb_action end # make_catb_act def make_catb_updates(mem) # New; Hotspot mem.make_ct_catb_update update_catb_addons(mem) end # make_catb_updates def update_catb_addons(mem) # New; Hotspot update_catb_speed(mem) update_catb_countdown(mem) update_catb_cooldown(mem) end # update_catb_addons def update_catb_speed(mem) # New; Hotspot return unless $imported["DoubleX RMVXA Speed Addon to YSA-CATB"] mem.make_speed_catb_update end # update_catb_speed def update_catb_countdown(mem) # New; Hotspot return unless $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] mem.update_state_catb_countdown end # update_catb_countdown def update_catb_cooldown(mem) # New; Hotspot return unless $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] mem.make_cd_catb_update end # update_catb_cooldown def update_catb_speed(mem) # New; Hotspot return unless $imported["DoubleX RMVXA Speed Addon to YSA-CATB"] mem.make_speed_catb_update end # update_catb_speed def process_catb_turn_type # New; Hotspot process_catb_turn_tick if $game_system.catb_turn_type == :tick process_catb_turn_battler if process_catb_turn_battler? end # process_catb_turn_type def process_catb_turn_tick # New; Hotspot process_catb_turn🙂catb_tick_count) end # process_catb_turn_tick def process_catb_turn_battler # New; Hotspot process_catb_turn🙂catb_battler_count) end # process_catb_turn_battler def process_catb_turn_battler? # New; Hotspot return false unless $imported["DoubleX RMVXA Turn Addon to YSA-CATB"] $game_system.catb_turn_type == :battler end # process_catb_turn_battler def process_catb_turn(max) # New; Hotspot return if ((@tick_clock ||= 0) += 1) < $game_system.send(max) @tick_clock = 0 process_catb_turn_2 end # process_catb_turn def process_catb_turn_2 # New; Hotspot BattleManager.turn_end process_catb_turn_compatibility process_catb_turn_3 end # process_catb_turn_2 def process_catb_turn_compatibility # New; Hotspot process_catb_turn_compatibility_2 if $imported["YEA-LunaticStates"] process_catb_turn_compatibility_3 end # process_catb_turn_compatibility def process_catb_turn_compatibility_2 # New; Hotspot all_battle_members.each { |mem| mem.run_lunatic_states🙂begin) } end # process_catb_turn_compatibility_2 def process_catb_turn_compatibility_3 # New; Hotspot return unless $imported["YEA-SkillRestrictions"] $game_party.update_restrictions $game_troop.update_restrictions end # process_catb_turn_compatibility_2 def process_catb_turn_end # New; Hotspot ($game_party.battle_members + $game_troop.members).each { |mem| process_catb_turn_end_loop(mem) } end # process_catb_turn_end def process_catb_turn_end_loop(mem) # New; Hotspot mem.on_turn_end mem.perform_collapse_effect if mem.enemy? && mem.can_collapse? end # process_catb_turn_end_loop def process_catb_turn_3 # New; Hotspot process_catb_turn_end @status_window.refresh $game_troop.increase_turn end # process_catb_turn_3 def find_catb_actor # New; Hotspot init_catb_actor_index find_catb_actor_loop end # find_catb_actor def init_catb_actor_index # New; Hotspot @f_actor_index = 0 unless @f_actor_index && @f_actor_index >= 0 return if @f_actor_index + 1 <= BattleManager.action_list🙂actor).size @f_actor_index = 0 end # init_catb_actor_index def find_catb_actor_loop # New; Hotspot f_actor = BattleManager.action_list🙂actor)[@f_actor_index] f_actor_count = 0 catb_actor(f_actor_count) until found_catb_actor?(f_actor, f_actor_count) end # find_catb_actor_loop def found_catb_actor?(f_actor, f_actor_count) # New; Hotspot return true if f_actor_count >= BattleManager.action_list🙂actor).size return true unless f_actor found_valid catb_actor?(f_actor) end # found_catb_actor? def found_valid catb_actor?(f_actor) # New; Hotspot return false if f_actor.input && f_actor.input.item && f_actor.input.confirm return false if f_actor.auto_battle? || f_actor.confusion? found_actable catb_actor?(f_actor) end # found_valid catb_actor? def found_actable catb_actor?(f_actor) # New; Hotspot return false unless f_actor.max_catb_value? && f_actor.ct_catb_value <= 0 !catb_cooldown?(f_actor) end # found_actable catb_actor? def catb_actor(f_actor_count) # New; Hotspot f_actor_count += 1 update_catb_actor_index f_actor = BattleManager.action_list🙂actor)[@f_actor_index] end # catb_actor def update_catb_actor_index # New; Hotspot return @f_actor_index += 1 if @f_actor_index + 1 < BattleManager.action_list🙂actor).size @f_actor_index = 0 end # update_catb_actor_index def setup_catb_actor(f_actor) # New; Hotspot BattleManager.set_actor(f_actor.index) @status_window.select(BattleManager.actor.index) setup_catb_actor_window end # setup_catb_actor def setup_catb_actor_window # New; Hotspot @actor_command_window.show.setup(BattleManager.actor) @hotkeys_bar_window.setup(BattleManager.actor) if $imported['RIFF_HOTKEYS'] end # setup_catb_actor_window def setup_catb_actor?(f_actor) # New; Hotspot return false unless f_actor && f_actor.input && !f_actor.input.confirm setup_new_catb_actor?(f_actor) end # setup_catb_actor? def setup_new_catb_actor?(f_actor) # New; Hotspot actor = BattleManager.actor return false if actor && @status_window.index == actor.index !@actor_command_window.active && !@party_command_window.active end # setup_new_catb_actor? def process_catb_act BattleManager.action_list.each { |battler| make_catb_act(battler) } return unless $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛OST_ATB_UPDATE) end # process_catb_act def make_catb_act(battler) battler.make_actions if make_catb_act?(battler) perform_catb_action(battler) unless @subject end # make_catb_act def make_catb_act?(battler) return false unless (battler.enemy? || battler.input.confirm) return false unless battler.max_catb_value? && battler.ct_catb_value <= 0 !catb_cooldown? end # make_catb_act? def catb_cooldown?(battler) return false unless $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] battler.cd_catb_value > 0 end # catb_cooldown? def post_process_catb # New; Hotspot process_catb_countdown process_catb_tick if $imported["DoubleX RMVXA Tick Addon to YSA-CATB"] end # post_process_catb def process_catb_countdown return unless $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] all_battle_members.each { |battler| update_catb_countdown(battler) } end # process_catb_countdown def update_catb_countdown(battler) update_catb_actor_countdown(actor) if battler.actor_countdown battler.perform_collapse_effect if battler.enemy? && battler.can_collapse? end # update_catb_countdown def update_catb_actor_countdown(actor) @status_window.draw_item(actor.index) actor.actor_countdown = false end # update_catb_actor_countdown def process_catb_tick update_catb_tick_count(["tick", "clock"]) update_catb_tick_count(["battler", "battler"]) end # process_catb_countdown_tick
def process_catb # Rewrite; Hotspot # Rewritten to update all battlers' atb types until player can input actions process_catb_windows return unless process_catb? begin process_catb_ctb end until catb_ctb_break? process_catb_countdown process_catb_tick if $imported["DoubleX RMVXA Tick Addon to YSA-CATB"] # end # process_catb def process_catb_windows # New; Hotspot update_catb_windows if @status_window.index >= 0 return unless BattleManager.action_list🙂actor).empty? @party_command_window.deactivate.close end # process_catb_windows def update_catb_windows # New; Hotspot mem = $game_party.members[@status_window.index] if !mem || mem.dead? || !BattleManager.action_list🙂actor).include?(mem) mem.clear_catb if $game_party.members[@status_window.index] toogle_catb_windows end end # update_catb_windows def toogle_catb_windows # New; Hotspot toogle_catb_selection_windows return unless @skill_window.visible || @item_window.visible || @actor_window.visible || @enemy_window.visible @status_window.open.show @status_aid_window.hide end # toogle_catb_windows def toogle_catb_selection_windows # New; Hotspot @actor_window.hide.deactivate @enemy_window.hide.deactivate @actor_command_window.deactivate.close @skill_window.hide.deactivate @item_window.hide.deactivate @status_window.unselect end # toogle_catb_selection_windows def process_catb? # New; Hotspot return false unless SceneManager.scene_is?(Scene_Battle) return false if scene_changing? || catb_pause? return false unless BattleManager.btype?🙂catb) && BattleManager.phase !$game_party.all_dead? && !$game_troop.all_dead? end # process_catb? def process_catb_ctb # New; Hotspot process_catb_update process_catb_turn_type @status_window.refresh_catb setup_catb_actor(find_catb_actor) if setup_catb_actor?(f_actor) process_catb_act end # process_catb_ctb def process_catb_update # New; Hotspot if $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛RE_ATB_UPDATE) end ($game_party.battle_members + $game_troop.members).each { |mem| update_catb_act(mem) } BattleManager.action_list🙂actor).each { |a| a.clear_catb unless a.index } end # process_catb_update def update_catb_act(mem) # New; Hotspot mem.clear_actions if mem.catb_value == 0 mem.make_catb_update mem.make_catb_action make_catb_updates(mem) end # update_catb_act def make_catb_updates(mem) # New; Hotspot mem.make_ct_catb_update if $imported["DoubleX RMVXA Speed Addon to YSA-CATB"] mem.make_speed_catb_update end if $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] mem.update_state_catb_countdown end return unless $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] mem.make_cd_catb_update end # make_catb_updates def process_catb_turn_type # New; Hotspot if $game_system.catb_turn_type == :tick process_catb_turn🙂catb_tick_count) elsif $imported["DoubleX RMVXA Turn Addon to YSA-CATB"] && $game_system.catb_turn_type == :battler process_catb_turn🙂catb_battler_count) end end # process_catb_turn_type def process_catb_turn(max) # New; Hotspot return if ((@tick_clock ||= 0) += 1) < $game_system.send(max) @tick_clock = 0 BattleManager.turn_end process_catb_turn_compatibility process_catb_turn_end @status_window.refresh $game_troop.increase_turn end # process_catb_turn def process_catb_turn_compatibility # New; Hotspot if $imported["YEA-LunaticStates"] all_battle_members.each { |mem| mem.run_lunatic_states🙂begin) } end return unless $imported["YEA-SkillRestrictions"] $game_party.update_restrictions $game_troop.update_restrictions end # process_catb_turn_compatibility def process_catb_turn_end # New; Hotspot ($game_party.battle_members + $game_troop.members).each { |mem| mem.on_turn_end mem.perform_collapse_effect if mem.enemy? && mem.can_collapse? } end # process_catb_turn_end def find_catb_actor # New; Hotspot @f_actor_index = 0 unless @f_actor_index && @f_actor_index >= 0 if @f_actor_index + 1 > BattleManager.action_list🙂actor).size @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] f_actor_count = 0 catb_actor(f_actor_count) until found_catb_actor?(f_actor, f_actor_count) end # find_catb_actor def found_catb_actor?(f_actor, f_actor_count) # New; Hotspot return true if f_actor_count >= BattleManager.action_list🙂actor).size return true unless f_actor return false if f_actor.input && f_actor.input.item && f_actor.input.confirm return false if f_actor.auto_battle? || f_actor.confusion? return false unless f_actor.max_catb_value? && f_actor.ct_catb_value <= 0 return true unless $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] f_actor.cd_catb_value <= 0 end # found_catb_actor? def catb_actor(f_actor_count) # New; Hotspot f_actor_count += 1 if @f_actor_index + 1 < BattleManager.action_list🙂actor).size @f_actor_index += 1 else @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] end # catb_actor def setup_catb_actor(f_actor) # New; Hotspot BattleManager.set_actor(f_actor.index) @status_window.select(BattleManager.actor.index) @actor_command_window.show.setup(BattleManager.actor) @hotkeys_bar_window.setup(BattleManager.actor) if $imported['RIFF_HOTKEYS'] end # setup_catb_actor def setup_catb_actor?(f_actor) # New; Hotspot return false unless f_actor && f_actor.input return false if f_actor.input.confirm actor = BattleManager.actor return false if actor && @status_window.index == actor.index !@actor_command_window.active && !@party_command_window.active end # setup_catb_actor? def process_catb_act BattleManager.action_list.each { |battler| make_catb_act(battler) } return unless $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛OST_ATB_UPDATE) end # process_catb_act def make_catb_act(battler) battler.make_actions if (battler.enemy? || battler.input.confirm) && battler.max_catb_value? && battler.ct_catb_value <= 0 && (!$imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] || battler.cd_catb_value <= 0) perform_catb_action(battler) unless @subject end # make_catb_act def process_catb_countdown return unless $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] all_battle_members.each { |battler| update_catb_countdown(battler) } end # process_catb_countdown def update_catb_countdown(battler) if battler.actor_countdown @status_window.draw_item(battler.index) battler.actor_countdown = false end battler.perform_collapse_effect if battler.enemy? && battler.can_collapse? end # update_catb_countdown def process_catb_tick update_catb_tick_count(["tick", "clock"]) update_catb_tick_count(["battler", "battler"]) end # process_catb_countdown_tick
def process_catb # Rewrite; Hotspot # Rewritten to update all battlers' atb types until player can input actions process_catb_windows return unless SceneManager.scene_is?(Scene_Battle) return if scene_changing? || !BattleManager.btype?🙂catb) || catb_pause? return unless BattleManager.phase return if $game_party.all_dead? || $game_troop.all_dead? begin process_catb_ctb end until catb_ctb_break? process_catb_countdown process_catb_tick if $imported["DoubleX RMVXA Tick Addon to YSA-CATB"] # end # process_catb def process_catb_windows # New; Hotspot if @status_window.index >= 0 mem = $game_party.members[@status_window.index] if !mem || mem.dead? || !BattleManager.action_list🙂actor).include?(mem) mem.clear_catb if $game_party.members[@status_window.index] toogle_catb_windows end end return unless BattleManager.action_list🙂actor).empty? @party_command_window.deactivate.close end # process_catb_windows def toogle_catb_windows # New; Hotspot @actor_window.hide.deactivate @enemy_window.hide.deactivate @actor_command_window.deactivate.close @skill_window.hide.deactivate @item_window.hide.deactivate @status_window.unselect return unless @skill_window.visible || @item_window.visible || @actor_window.visible || @enemy_window.visible @status_window.open.show @status_aid_window.hide end # toogle_catb_windows def process_catb_ctb # New; Hotspot process_catb_update if $game_system.catb_turn_type == :tick process_catb_turn🙂catb_tick_count) elsif $imported["DoubleX RMVXA Turn Addon to YSA-CATB"] && $game_system.catb_turn_type == :battler process_catb_turn🙂catb_battler_count) end @status_window.refresh_catb setup_catb_actor(find_catb_actor) process_catb_act end # process_catb_ctb def process_catb_update # New; Hotspot if $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛RE_ATB_UPDATE) end ($game_party.battle_members + $game_troop.members).each { |mem| mem.clear_actions if mem.catb_value == 0 mem.make_catb_update mem.make_catb_action make_catb_updates(mem) } BattleManager.action_list🙂actor).each { |a| a.clear_catb unless a.index } end # process_catb_update def make_catb_updates(mem) # New; Hotspot mem.make_ct_catb_update if $imported["DoubleX RMVXA Speed Addon to YSA-CATB"] mem.make_speed_catb_update end if $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] mem.update_state_catb_countdown end return unless $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] mem.make_cd_catb_update end # make_catb_updates def process_catb_turn(max) # New; Hotspot return if ((@tick_clock ||= 0) += 1) < $game_system.send(max) @tick_clock = 0 BattleManager.turn_end process_catb_turn_compatibility ($game_party.battle_members + $game_troop.members).each { |mem| mem.on_turn_end mem.perform_collapse_effect if mem.enemy? && mem.can_collapse? } @status_window.refresh $game_troop.increase_turn end # process_catb_turn def process_catb_turn_compatibility # New; Hotspot if $imported["YEA-LunaticStates"] all_battle_members.each { |mem| mem.run_lunatic_states🙂begin) } end return unless $imported["YEA-SkillRestrictions"] $game_party.update_restrictions $game_troop.update_restrictions end # process_catb_turn_compatibility def find_catb_actor # New; Hotspot @f_actor_index = 0 unless @f_actor_index && @f_actor_index >= 0 if @f_actor_index + 1 > BattleManager.action_list🙂actor).size @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] f_actor_count = 0 find_catb_actor_loop until found_catb_actor?(f_actor, f_actor_count) end # find_catb_actor def found_catb_actor?(f_actor, f_actor_count) # New; Hotspot return true if f_actor_count >= BattleManager.action_list🙂actor).size return true unless f_actor return false if f_actor.input && f_actor.input.item && f_actor.input.confirm return false if f_actor.auto_battle? || f_actor.confusion? return false unless f_actor.max_catb_value? && f_actor.ct_catb_value <= 0 return true unless $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] f_actor.cd_catb_value <= 0 end # found_catb_actor? def find_catb_actor_loop # New; Hotspot f_actor_count += 1 if @f_actor_index + 1 < BattleManager.action_list🙂actor).size @f_actor_index += 1 else @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] end # find_catb_actor_loop def setup_catb_actor(f_actor) # New; Hotspot return unless f_actor && f_actor.input && !f_actor.input.confirm && (!BattleManager.actor || @status_window.index != BattleManager.actor.index) && !@actor_command_window.active && !@party_command_window.active BattleManager.set_actor(f_actor.index) @status_window.select(BattleManager.actor.index) @actor_command_window.show.setup(BattleManager.actor) @hotkeys_bar_window.setup(BattleManager.actor) if $imported['RIFF_HOTKEYS'] end # setup_catb_actor def process_catb_act BattleManager.action_list.each { |battler| battler.make_actions if (battler.enemy? || battler.input.confirm) && battler.max_catb_value? && battler.ct_catb_value <= 0 && (!$imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] || battler.cd_catb_value <= 0) perform_catb_action(battler) unless @subject } return unless $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛OST_ATB_UPDATE) end # process_catb_act def process_catb_countdown return unless $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] all_battle_members.each { |battler| if battler.actor_countdown @status_window.draw_item(battler.index) battler.actor_countdown = false end battler.perform_collapse_effect if battler.enemy? && battler.can_collapse? } end # process_catb_countdown def process_catb_tick update_catb_tick_count(["tick", "clock"]) update_catb_tick_count(["battler", "battler"]) end # process_catb_countdown_tick
def process_catb # Rewrite; Hotspot # Rewritten to update all battlers' atb types until player can input actions process_catb_windows return unless SceneManager.scene_is?(Scene_Battle) return if scene_changing? || !BattleManager.btype?🙂catb) || catb_pause? return unless BattleManager.phase return if $game_party.all_dead? || $game_troop.all_dead? begin process_catb_update if $game_system.catb_turn_type == :tick process_catb_turn🙂catb_tick_count) elsif $imported["DoubleX RMVXA Turn Addon to YSA-CATB"] && $game_system.catb_turn_type == :battler process_catb_turn🙂catb_battler_count) end @status_window.refresh_catb setup_catb_actor(find_catb_actor) process_catb_act end until catb_ctb_break? process_catb_countdown_tick # end # process_catb def process_catb_windows # New; Hotspot if @status_window.index >= 0 mem = $game_party.members[@status_window.index] if !mem || mem.dead? || !BattleManager.action_list🙂actor).include?(mem) mem.clear_catb if $game_party.members[@status_window.index] if @skill_window.visible || @item_window.visible || @actor_window.visible || @enemy_window.visible @status_window.open.show @status_aid_window.hide end @actor_window.hide.deactivate @enemy_window.hide.deactivate @actor_command_window.deactivate.close @skill_window.hide.deactivate @item_window.hide.deactivate @status_window.unselect end end return unless BattleManager.action_list🙂actor).empty? @party_command_window.deactivate.close end # process_catb_windows def process_catb_update # New; Hotspot if $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛RE_ATB_UPDATE) end ($game_party.battle_members + $game_troop.members).each { |mem| mem.clear_actions if mem.catb_value == 0 mem.make_catb_update mem.make_catb_action mem.make_ct_catb_update if $imported["DoubleX RMVXA Speed Addon to YSA-CATB"] mem.make_speed_catb_update end if $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] mem.update_state_catb_countdown end if $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] mem.make_cd_catb_update end } BattleManager.action_list🙂actor).each { |a| a.clear_catb unless a.index } end # process_catb_update def process_catb_turn(max) # New; Hotspot @tick_clock ||= 0 return if (@tick_clock += 1) < $game_system.send(max) @tick_clock = 0 BattleManager.turn_end if $imported["YEA-LunaticStates"] all_battle_members.each { |mem| mem.run_lunatic_states🙂begin) } end if $imported["YEA-SkillRestrictions"] $game_party.update_restrictions $game_troop.update_restrictions end ($game_party.battle_members + $game_troop.members).each { |mem| mem.on_turn_end mem.perform_collapse_effect if mem.enemy? && mem.can_collapse? } @status_window.refresh $game_troop.increase_turn end # process_catb_turn def find_catb_actor # New; Hotspot @f_actor_index = 0 unless @f_actor_index && @f_actor_index >= 0 if @f_actor_index + 1 > BattleManager.action_list🙂actor).size @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] f_actor_count = 0 while f_actor_count < BattleManager.action_list🙂actor).size && f_actor && (f_actor.input && f_actor.input.item && f_actor.input.confirm || f_actor.auto_battle? || f_actor.confusion? || !f_actor.max_catb_value? || f_actor.ct_catb_value > 0 || $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] && f_actor.cd_catb_value > 0) f_actor_count += 1 if @f_actor_index + 1 < BattleManager.action_list🙂actor).size @f_actor_index += 1 else @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] end end # find_catb_actor def setup_catb_actor(f_actor) # New; Hotspot return unless f_actor && f_actor.input && !f_actor.input.confirm && (!BattleManager.actor || @status_window.index != BattleManager.actor.index) && !@actor_command_window.active && !@party_command_window.active BattleManager.set_actor(f_actor.index) @status_window.select(BattleManager.actor.index) @actor_command_window.show.setup(BattleManager.actor) @hotkeys_bar_window.setup(BattleManager.actor) if $imported['RIFF_HOTKEYS'] end # setup_catb_actor def process_catb_act BattleManager.action_list.each { |battler| battler.make_actions if (battler.enemy? || battler.input.confirm) && battler.max_catb_value? && battler.ct_catb_value <= 0 && (!$imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] || battler.cd_catb_value <= 0) perform_catb_action(battler) unless @subject } return unless $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛OST_ATB_UPDATE) end # process_catb_act def process_catb_countdown_tick if $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] all_battle_members.each { |battler| if battler.actor_countdown @status_window.draw_item(battler.index) battler.actor_countdown = false end next unless battler.enemy? && battler.can_collapse? battler.perform_collapse_effect } end return unless $imported["DoubleX RMVXA Tick Addon to YSA-CATB"] update_catb_tick_count(["tick", "clock"]) update_catb_tick_count(["battler", "battler"]) end # process_catb_countdown_tick
def process_catb # Rewrite; Hotspot if @status_window.index >= 0 mem = $game_party.members[@status_window.index] if !mem || mem.dead? || !BattleManager.action_list🙂actor).include?(mem) mem.clear_catb if $game_party.members[@status_window.index] if @skill_window.visible || @item_window.visible || @actor_window.visible || @enemy_window.visible @status_window.open.show @status_aid_window.hide end @actor_window.hide.deactivate @enemy_window.hide.deactivate @actor_command_window.deactivate.close @skill_window.hide.deactivate @item_window.hide.deactivate @status_window.unselect end end if BattleManager.action_list🙂actor).empty? @party_command_window.deactivate.close end return unless SceneManager.scene_is?(Scene_Battle) return if scene_changing? || !BattleManager.btype?🙂catb) || catb_pause? # Rewritten to update all battlers' atb types until player can input actions return unless BattleManager.phase return if $game_party.all_dead? || $game_troop.all_dead? begin if $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛RE_ATB_UPDATE) end ($game_party.battle_members + $game_troop.members).each { |mem| mem.clear_actions if mem.catb_value == 0 mem.make_catb_update mem.make_catb_action mem.make_ct_catb_update if $imported["DoubleX RMVXA Speed Addon to YSA-CATB"] mem.make_speed_catb_update end if $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] mem.update_state_catb_countdown end if $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] mem.make_cd_catb_update end } BattleManager.action_list🙂actor).each { |a| a.clear_catb unless a.index } if $game_system.catb_turn_type == :tick @tick_clock ||= 0 if (@tick_clock += 1) >= $game_system.catb_tick_count @tick_clock = 0 BattleManager.turn_end if $imported["YEA-LunaticStates"] all_battle_members.each { |mem| mem.run_lunatic_states🙂begin) } end if $imported["YEA-SkillRestrictions"] $game_party.update_restrictions $game_troop.update_restrictions end ($game_party.battle_members + $game_troop.members).each { |mem| mem.on_turn_end next unless mem.enemy? && mem.can_collapse? mem.perform_collapse_effect } @status_window.refresh $game_troop.increase_turn end elsif $imported["DoubleX RMVXA Turn Addon to YSA-CATB"] && $game_system.catb_turn_type == :battler @tick_battler ||= 0 if (@tick_battler += 1) >= $game_system.catb_battler_count @tick_battler = 0 BattleManager.turn_end if $imported["YEA-LunaticStates"] all_battle_members.each { |mem| mem.run_lunatic_states🙂begin) } end if $imported["YEA-SkillRestrictions"] $game_party.update_restrictions $game_troop.update_restrictions end all_battle_members.each { |battler| battler.on_turn_end next unless battler.enemy? && battler.can_collapse? battler.perform_collapse_effect } @status_window.refresh $game_troop.increase_turn end end @status_window.refresh_catb @f_actor_index = 0 unless @f_actor_index && @f_actor_index >= 0 if @f_actor_index + 1 > BattleManager.action_list🙂actor).size @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] f_actor_count = 0 while f_actor_count < BattleManager.action_list🙂actor).size && f_actor && (f_actor.input && f_actor.input.item && f_actor.input.confirm || f_actor.auto_battle? || f_actor.confusion? || !f_actor.max_catb_value? || f_actor.ct_catb_value > 0 || $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] && f_actor.cd_catb_value > 0) f_actor_count += 1 if @f_actor_index + 1 < BattleManager.action_list🙂actor).size @f_actor_index += 1 else @f_actor_index = 0 end f_actor = BattleManager.action_list🙂actor)[@f_actor_index] end if f_actor && f_actor.input && !f_actor.input.confirm && (!BattleManager.actor || @status_window.index != BattleManager.actor.index) && !@actor_command_window.active && !@party_command_window.active BattleManager.set_actor(f_actor.index) @status_window.select(BattleManager.actor.index) @actor_command_window.show.setup(BattleManager.actor) if $imported['RIFF_HOTKEYS'] @hotkeys_bar_window.setup(BattleManager.actor) end end BattleManager.action_list.each { |battler| battler.make_actions if (battler.enemy? || battler.input.confirm) && battler.max_catb_value? && battler.ct_catb_value <= 0 && (!$imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] || battler.cd_catb_value <= 0) perform_catb_action(battler) unless @subject } if $imported["DoubleX RMVXA Update Addon to YSA-CATB"] eval(DoubleX_RMVXA::YSA_CATB_Update_Addon:😛OST_ATB_UPDATE) end end until catb_ctb_break? if $imported["DoubleX RMVXA Countdown Addon to YSA-CATB"] all_battle_members.each { |battler| if battler.actor_countdown @status_window.draw_item(battler.index) battler.actor_countdown = false end next unless battler.enemy? && battler.can_collapse? battler.perform_collapse_effect } end return unless $imported["DoubleX RMVXA Tick Addon to YSA-CATB"] update_catb_tick_count(["tick", "clock"]) update_catb_tick_count(["battler", "battler"]) # end # process_catb