Yami's been inactive on his blog and his dropbox links are down. I was wanting one of these for a side project.
[ACE] Does anyone have Yami's Predicted Charge Turn or Charge Turn Battle?
RGSSx Script SupportMy copy of the Predicted Charge Turn Battle:
Unfortunately, I got that from somewhere else, and the code spacings are all messed up 🙂
#==============================================================================# # ▼ YSA Battle System: Predicted Charge Turn Battle# -- Last Updated: 2012.03.17# -- Level: Easy, Normal# -- Requires: n/a# #==============================================================================$imported = {} if $imported.nil?$imported["YSA-PCTB"] = true#==============================================================================# ▼ Updates# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 2012.03.17 - Compatible Issue: YEA - Battle Engine Ace.# - Stand Alone fixed.# 2012.02.20 - Reduced lag a little.# 2012.02.19 - Fixed: Press Left/Right when choose action for actor.# - Script now can work alone, without YEA - Battle Engine Ace.# 2012.02.16 - Finished Script.# 2012.02.07 - Started Script.# #==============================================================================# ▼ Introduction# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Battle Type: Predicted CTB.# #==============================================================================# ▼ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# To install this script, open up your script editor and copy/paste this script# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.## To get this work with YEA - Ace Battle Engine, set the default battle system # for your game to be 😛ctb by either going to the Ace Battle Engine script and # setting DEFAULT_BATTLE_SYSTEM as 😛ctb or by using the following script call: # # $game_system:set_battle_system🙂pctb)## -----------------------------------------------------------------------------# Skill and Item Database# -----------------------------------------------------------------------------# SPEED FIX# ~ When set SPEED FIX to a number larger than 0, battler's Speed will be reseted# by value, equal to SPEED_FIX * :speed_rate.# ~ When set SPEED FIX to a number smaller than 0, battler's Speed will be# reduced by value, equal to SPEED_FIX * :speed_rate. This Skill/Item will be# counted as a charging skill/item.## -----------------------------------------------------------------------------# Skill and Item Notetags# -----------------------------------------------------------------------------# <charge rate: x%># Change battler's speed rate when charging a skill or item.## <ctb cost: x%> or <ctb cost: x># Decide how much Speed will be reduced after an action.# If it's a percent, Battler's Speed will be reduced x percents of Max Threshold.# If it's a normal value, Battler's Speed will be reduced by x.# Default: CTB COST 100% in percent and 0 in value## <ctb change: +x%> or <ctb change: +x># <ctb change: -x%> or <ctb change: -x># Change target's Speed when use this skill/item.# If it's a percent, Battler's Speed will be increase or decrease x percents of # Max Threshold.# If it's a normal value, Battler's Speed will be increase or decrease by x.##==============================================================================# ▼ Compatibility# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that# it will run with RPG Maker VX without adjusting.# # This script is compatible with Yanfly Engine Ace - Ace Battle Engine v1.15+ # and the script must be placed under Ace Battle Engine in the script listing.# #==============================================================================#==============================================================================# ▼ Configuration#==============================================================================module YSAmodule PCTB#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-# - Mechanic Configuration -#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-CTB_MECHANIC = { # Start:dyn_threshold => true,# Threshold Offset. If Dynamic Threshold is set to false, this will be# threshold:threshold_offset => 400,# For Dynamic Threshold:threshold_min => 800,:threshold_rate => 4.0,# Ticks per turn:turn_ctr => 32,:wait_after_turn => 5, # Frames# Predict Type# Type 0: Show Battlers Order only.# Type 1: Show Battlers Order and Re-order when active battler chooses# an action.# Type 2: Show Battlers Order in X Turns (FFX Style).😛redict => 2,😛re_turns => 22,} # Do not remove this.#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-# - Battler Configuration -#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-BATTLER_RULES = { # Start# Speed offset when reset, multiply with Skill/Item speed:speed_rate => 16.0,:speed_limit => 0.75, # Set to 0 to disable limit.# Initialize speed:initial => 0.10,:surprise => 0.75,:random_rate => 8.0, # Multiply with AGI.# Charging Term:charge_text => "%s is charging %s!",:charge_text_dur => 4,# Can't take action Term:cant_text => "%s cannot take an action!",:cant_text_dur => 4,:show_cant_text => true,} # Do not remove this.#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-# - Event Configuration -#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-CTB_COMMON_EVENT = { # Start# Set to 0 to disable this.:turn_update => 0, # Run common event whenever turn updates.:end_action => 0, # Run common event whenever an action finishes.} # Do not remove this.endend#==============================================================================# ▼ Editting anything past this point may potentially result in causing# computer damage, incontinence, explosion of user's head, coma, death, and/or# halitosis so edit at your own risk.#==============================================================================module YSAmodule REGEXPmodule USABLEITEMCHARGE_RATE = /<(?:CHARGE_RATE|charge rate):[ ](\d+)?([%%])>/iCTB_COST_PER = /<(?:CTB_COST|ctb cost):[ ](\d+)?([%%])>/iCTB_COST_VAL = /<(?:CTB_COST|ctb cost):[ ](\d+)?>/iCHANGE_CTB_PER = /<(?:CTB_CHANGE|ctb change):[ ]([\+\-]\d+)([%%])?>/iCHANGE_CTB_VAL = /<(?:CTB_CHANGE|ctb change):[ ]([\+\-]\d+)?>/iend # USABLEITEMend # REGEXPend # YSA#==============================================================================# ■ DataManager#==============================================================================module DataManager#--------------------------------------------------------------------------# alias method: load_database#--------------------------------------------------------------------------class <<self; alias load_database_pctb load_database; enddef self.load_databaseload_database_pctbload_notetags_pctbend#--------------------------------------------------------------------------# new method: load_notetags_pctb#--------------------------------------------------------------------------def self.load_notetags_pctbgroups = [$data_skills, $data_items]for group in groupsfor obj in groupnext if obj.nil?obj.load_notetags_pctbendendendend # DataManager#==============================================================================# ■ RPG::UsableItem#==============================================================================class RPG::UsableItem < RPG::BaseItem#--------------------------------------------------------------------------# public instance variables#--------------------------------------------------------------------------attr_accessor :charge_rateattr_accessor :ctb_costattr_accessor :ctb_cost_valattr_accessor :ctb_changeattr_accessor :ctb_change_val#--------------------------------------------------------------------------# common cache: load_notetags_pctb#--------------------------------------------------------------------------def load_notetags_pctb@charge_rate = 100@ctb_cost = 100@ctb_cost_val = 0@ctb_change = 0@ctb_change_val = 0#---self.note.split(/[\r\n]+/).each { |line|case line#---when YSA::REGEXP::USABLEITEM::CHARGE_RATE@charge_rate = $1.to_iwhen YSA::REGEXP::USABLEITEM::CTB_COST_PER@ctb_cost = $1.to_iwhen YSA::REGEXP::USABLEITEM::CTB_COST_VAL@ctb_cost_val = $1.to_iwhen YSA::REGEXP::USABLEITEM::CHANGE_CTB_PER@ctb_change = $1.to_iwhen YSA::REGEXP::USABLEITEM::CHANGE_CTB_VAL@ctb_change_val = $1.to_i#---end} # self.note.split#---@charge_rate = 100 if @charge_rate <= 0@ctb_cost = 100 if @ctb_cost > 100endend # RPG::UsableItem#==============================================================================# ■ BattleManager#==============================================================================module BattleManager#--------------------------------------------------------------------------# alias method:# - make_action_orders# - prior_command# - next_command# - in_turn?# - battle_start#--------------------------------------------------------------------------class <<selfalias pctb_make_action_orders make_action_ordersalias pctb_prior_command prior_commandalias pctb_next_command next_commandalias pctb_next_subject next_subjectalias pctb_battle_start battle_startalias pctb_input_start input_startalias pctb_turn_start turn_startend#--------------------------------------------------------------------------# battle_start#--------------------------------------------------------------------------def self.battle_startpctb_battle_startif btype?🙂pctb)make_pctb_action_orders make_pctb_thresholdmake_pctb_first_speedendend#--------------------------------------------------------------------------# make_action_orders#--------------------------------------------------------------------------def self.make_action_ordersreturn if btype?🙂pctb)pctb_make_action_orders unless btype?🙂pctb)end#--------------------------------------------------------------------------# next_command#--------------------------------------------------------------------------def self.next_commandreturn false if btype?🙂pctb)pctb_next_commandend#--------------------------------------------------------------------------# prior_command#--------------------------------------------------------------------------def self.prior_commandreturn false if btype?🙂pctb)pctb_prior_commandend#--------------------------------------------------------------------------# new method: make_pctb_action_orders#--------------------------------------------------------------------------def self.make_pctb_action_orders@action_battlers = []end#--------------------------------------------------------------------------# new method: make_pctb_threshold#--------------------------------------------------------------------------def self.make_pctb_threshold@threshold = YSA:😛CTB::CTB_MECHANIC[:threshold_offset]return unless YSA:😛CTB::CTB_MECHANIC[:dyn_threshold]offset = 0battlers = $game_party.members + $game_troop.membersbattlers.each { |battler| offset += battler.agi}@threshold += offset * YSA:😛CTB::CTB_MECHANIC[:threshold_rate]@threshold = @threshold >= YSA:😛CTB::CTB_MECHANIC[:threshold_min] ? @threshold : YSA:😛CTB::CTB_MECHANIC[:threshold_min]end#--------------------------------------------------------------------------# new method: make_pctb_first_speed#--------------------------------------------------------------------------def self.make_pctb_first_speedinit_value = YSA:😛CTB::BATTLER_RULES[:initial] * pctb_thresholdsurprise_value = YSA:😛CTB::BATTLER_RULES[:surprise] * pctb_thresholdbattlers = $game_party.members + $game_troop.membersbattlers.each { |battler|check = (battler.actor? && @preemptive) || (battler.enemy? && @surprise)battler.pctb_speed = init_valuebattler.pctb_speed = surprise_value if checkrandom = YSA:😛CTB::BATTLER_RULES[:random_rate] * battler.agi + 1battler.pctb_speed += rand(random)}end#--------------------------------------------------------------------------# new method: pctb_threshold#--------------------------------------------------------------------------def self.pctb_thresholdreturn @thresholdend#--------------------------------------------------------------------------# new method: set_actor#--------------------------------------------------------------------------def self.set_actor(actor_index)@actor_index = actor_indexend#--------------------------------------------------------------------------# new method: action_list_ctb#--------------------------------------------------------------------------def self.action_list_ctbreturn @action_battlersend#--------------------------------------------------------------------------# alias method: next_subject#--------------------------------------------------------------------------def self.next_subjectreturn pctb_next_subject unless btype?🙂pctb)loop dobattler = @action_battlers[0]return nil unless battlerunless battler.index && battler.alive?@action_battlers.shiftnextendreturn battlerendend#--------------------------------------------------------------------------# alias method: input_start#--------------------------------------------------------------------------def self.input_startreturn pctb_input_start unless btype?🙂pctb)@phase = :inputreturn falseend#--------------------------------------------------------------------------# alias method: turn_start#--------------------------------------------------------------------------def self.turn_startreturn pctb_turn_start unless btype?🙂pctb)@phase = :turnclear_actorend#--------------------------------------------------------------------------# alias method: turn_start#--------------------------------------------------------------------------def self.sort_battlers(cache = false)if btype?🙂pctb)battlers = []for battler in ($game_party.members + $game_troop.members)next if battler.dead?battlers.push(battler)endbattlers.sort! { |a,b|if a.pctb_ctr(cache) != b.pctb_ctr(cache)a.pctb_ctr(cache) <=> b.pctb_ctr(cache)elsif a.pctb_prediction != b.pctb_predictionb.pctb_prediction <=> a.pctb_predictionelsif a.agi != b.agib.agi <=> a.agielsif a.screen_x != b.screen_xa.screen_x <=> b.screen_xelsea.name <=> b.nameend}return battlersendend#--------------------------------------------------------------------------# new method: btype?#--------------------------------------------------------------------------unless $imported["YEA-BattleEngine"]def self.btype?(btype)return true if btype == 😛ctbendendend # BattleManager#==============================================================================# ■ Game_System#==============================================================================class Game_Systemif $imported["YEA-BattleEngine"]#--------------------------------------------------------------------------# alias method: set_battle_system#--------------------------------------------------------------------------alias pctb_set_battle_system set_battle_systemdef set_battle_system(type)case typewhen 😛ctb; @battle_system = 😛ctbelse; pctb_set_battle_system(type)endend#--------------------------------------------------------------------------# alias method: battle_system_corrected#--------------------------------------------------------------------------alias pctb_battle_system_corrected battle_system_correcteddef battle_system_corrected(type)case typewhen 😛ctb; return 😛ctbelse; return pctb_battle_system_corrected(type)endendendend # Game_System#==============================================================================# ■ Game_Battler#==============================================================================class Game_Battler < Game_BattlerBase#--------------------------------------------------------------------------# public instance variables#--------------------------------------------------------------------------attr_accessor 😛ctb_speedattr_accessor 😛ctb_predictionattr_accessor :last_objattr_accessor 😛ctb_forcedattr_accessor 😛ctb_speed_cache#--------------------------------------------------------------------------# alias method: initialize#--------------------------------------------------------------------------alias pctb_initialize initializedef initializepctb_initialize@pctb_speed = 0@pctb_prediction = 0@pctb_speed_cache = 0end#--------------------------------------------------------------------------# new method: base_gain_pctb#--------------------------------------------------------------------------def base_gain_pctbreturn self.agiend#--------------------------------------------------------------------------# new method: real_gain_pctb#--------------------------------------------------------------------------def real_gain_pctbobj = current_action.item if current_actionvalue = base_gain_pctbvalue = value * obj.charge_rate / 100 if obj && @charging_pctbreturn valueend#--------------------------------------------------------------------------# new method: pctb_ctr#--------------------------------------------------------------------------def pctb_ctr(cache = false)@pctb_prediction = @pctb_speed unless cache@pctb_prediction = @pctb_speed_cache if cachereturn 0 if @pctb_prediction >= BattleManager.pctb_thresholdvalue = (BattleManager.pctb_threshold.to_f - @pctb_prediction.to_f) / real_gain_pctb.to_fvalue = value.ceil@pctb_prediction += value * real_gain_pctbreturn valueend#--------------------------------------------------------------------------# new method: reset_pctb_speed#--------------------------------------------------------------------------def reset_pctb_speed(cache = false)return @pctb_forced = false if @pctb_forcedif actor?obj = input ? input.item : @last_objelseobj = @last_objendreal_cache = @pctb_speedif objlimit_rate = YSA:😛CTB::BATTLER_RULES[:speed_limit]limit = BattleManager.pctb_threshold * limit_ratereal_cache -= obj.ctb_cost * BattleManager.pctb_threshold / 100real_cache -= obj.ctb_cost_valvalue = YSA:😛CTB::BATTLER_RULES[:speed_rate] * obj.speedvalue = [value, 0].maxvalue = [value, limit].min if limit > 0real_cache += valueelsereal_cache -= BattleManager.pctb_thresholdendreal_cache = [real_cache, 0].max@pctb_speed = real_cache if cache == false@pctb_speed_cache = real_cache if cache@charging_pctb = false unless cache@last_obj = nil unless cacheend#--------------------------------------------------------------------------# new method: charging_start#--------------------------------------------------------------------------def charging_startreturn false unless BattleManager.btype?🙂pctb)return false if @charging_pctbreturn false unless current_actionobj = current_action.itemreturn false unless objreturn false if obj.speed >= 0value = obj.speed * YSA:😛CTB::BATTLER_RULES[:speed_rate]@pctb_speed += value@pctb_speed = [@pctb_speed, 0].maxBattleManager.action_list_ctb.shift@charging_pctb = trueSceneManager.scene.charging_start(self)SceneManager.scene.update_pctb_speedreturn trueend#--------------------------------------------------------------------------# new method: pctb_active?#--------------------------------------------------------------------------def pctb_active?return @pctb_speed >= BattleManager.pctb_threshold && movable?end#--------------------------------------------------------------------------# new method: storage_speed#--------------------------------------------------------------------------def storage_speedreturn if @cache_speed@cache_speed = @pctb_speedend#--------------------------------------------------------------------------# new method: restore_speed#--------------------------------------------------------------------------def restore_speedreturn unless @cache_speed@pctb_speed = @cache_speed@cache_speed = nilend#--------------------------------------------------------------------------# alias method: update_state_turns#--------------------------------------------------------------------------alias pctb_update_state_turns update_state_turnsdef update_state_turnsif BattleManager.btype?🙂pctb)states.each do |state|@state_turns[state.id] -= 1 if @state_turns[state.id] > 0 && state.auto_removal_timing == 2endelsepctb_update_state_turnsendend#--------------------------------------------------------------------------# new method: update_state_actions#--------------------------------------------------------------------------def update_state_actionsreturn unless BattleManager.btype?🙂pctb)states.each do |state|@state_turns[state.id] -= 1 if @state_turns[state.id] > 0 && state.auto_removal_timing == 1endend#--------------------------------------------------------------------------# alias method: on_action_end#--------------------------------------------------------------------------alias pctb_on_action_end on_action_enddef on_action_endpctb_on_action_endupdate_state_actionsend#--------------------------------------------------------------------------# alias method: force_action#--------------------------------------------------------------------------alias pctb_force_action force_actiondef force_action(skill_id, target_index)if BattleManager.btype?🙂pctb)action = Game_Action.new(self, true)action.set_skill(skill_id)if target_index == -2action.target_index = last_target_indexelsif target_index == -1action.decide_random_targetelseaction.target_index = target_indexend@actions = [action] + @actions@pctb_forced = trueendpctb_force_action(skill_id, target_index) unless BattleManager.btype?🙂pctb)end#--------------------------------------------------------------------------# alias method: make_action_times#--------------------------------------------------------------------------alias pctb_make_action_times make_action_timesdef make_action_timesBattleManager.btype?🙂pctb) ? 1 : pctb_make_action_timesendend # Game_Battler#==============================================================================# ■ Game_Actor#==============================================================================class Game_Actor < Game_Battler#--------------------------------------------------------------------------# overwrite method: input#--------------------------------------------------------------------------if $imported["YEA-BattleEngine"]def inputgame_actor_input_abeendend#--------------------------------------------------------------------------# new method: screen_x | screen_y#--------------------------------------------------------------------------unless $imported["YEA-BattleEngine"]def screen_x0enddef screen_y0endendend # Game_Actor#==============================================================================# ■ Scene_Battle#==============================================================================class Scene_Battle < Scene_Base#--------------------------------------------------------------------------# new method: battle_start#--------------------------------------------------------------------------alias pctb_battle_start battle_startdef battle_startpctb_battle_startupdate_pctb_speed if BattleManager.btype?🙂pctb)end#--------------------------------------------------------------------------# new method: charging_start#--------------------------------------------------------------------------def charging_start(battler)@status_window.show@status_window.openif $imported["YEA-BattleEngine"]redraw_current_status@status_aid_window.hideelserefresh_statusend@actor_command_window.showstring = YSA:😛CTB::BATTLER_RULES[:charge_text]skill = battler.current_action.itemskill_text = sprintf("\\i[%d]%s", skill.icon_index, skill.name)text = sprintf(string, battler.name, skill_text)@log_window.add_text(text)YSA:😛CTB::BATTLER_RULES[:charge_text_dur].times do @log_window.wait end@log_window.back_oneend#--------------------------------------------------------------------------# new method: update_pctb_speed#--------------------------------------------------------------------------def update_pctb_speedreturn if scene_changing?@clocktick = 0 if @clocktick.nil?ctr = YSA:😛CTB::CTB_MECHANIC[:turn_ctr]#---battlers = BattleManager.sort_battlersfirst_battler = battlers[0]tick = first_battler.pctb_ctr#---battlers.each { |battler|battler.pctb_speed += tick * battler.real_gain_pctb}#---@clocktick = @clocktick + tickpass_turn = @clocktick / ctrpass_turn = pass_turn.floor.to_ipass_turn.times {$game_temp.reserve_common_event(YSA:😛CTB::CTB_COMMON_EVENT[:turn_update]) if YSA:😛CTB::CTB_COMMON_EVENT[:turn_update] > 0 && $data_common_events[YSA:😛CTB::CTB_COMMON_EVENT[:turn_update]]process_event$game_troop.increase_turnturn_endwait(YSA:😛CTB::CTB_MECHANIC[:wait_after_turn])}@clocktick = @clocktick % ctr#---if first_battler.movable?BattleManager.action_list_ctb.push(first_battler)elsestring = YSA:😛CTB::BATTLER_RULES[:cant_text]text = sprintf(string, first_battler.name)@log_window.add_text(text)YSA:😛CTB::BATTLER_RULES[:cant_text_dur].times do @log_window.wait end@log_window.back_onefirst_battler.clear_actionsfirst_battler.reset_pctb_speedreturn update_pctb_speed && update_order_gaugeend#---update_order_gauge#---start_pctb_actionend#--------------------------------------------------------------------------# new method: start_pctb_action#--------------------------------------------------------------------------def start_pctb_actionbattler = BattleManager.action_list_ctb[0]battler.make_actions if battler.actions.size == 0return if battler.charging_start && battler.enemy?if battler.actor? && battler.input && battler.input.item.nil?BattleManager.input_startBattleManager.set_actor(battler.index) start_actor_command_selectionif $imported["YEA-BattleEngine"]redraw_current_status@status_aid_window.hideelserefresh_statusend@status_window.show@status_window.openendturn_start if battler.enemy?turn_start if battler.actor? && battler.input && battler.input.itemend#--------------------------------------------------------------------------# new method: update_order_gauge#--------------------------------------------------------------------------def update_order_gaugebattler = BattleManager.action_list_ctb[0]return unless $imported["YSA-OrderBattler"]BattleManager.make_ctb_battler_order@active_order_sprite.battler = battler if @active_order_spritefor order in @spriteset_orderorder.make_destinationendend#--------------------------------------------------------------------------# alias method: execute_action#--------------------------------------------------------------------------alias scene_battle_execute_action_pctb execute_actiondef execute_actionscene_battle_execute_action_pctbunless [email protected]_obj = @subject.current_action.item unless @subject.last_obj endend#--------------------------------------------------------------------------# alias method: execute_action#--------------------------------------------------------------------------alias scene_battle_invoke_item_pctb invoke_itemdef invoke_item(target, item)scene_battle_invoke_item_pctb(target, item)#---change_per = item.ctb_change * BattleManager.pctb_threshold / 100change_val = item.ctb_change_valtarget.pctb_speed += change_pertarget.pctb_speed = 0 if target.pctb_speed < 0target.pctb_speed += change_valtarget.pctb_speed = 0 if target.pctb_speed < 0#---end#--------------------------------------------------------------------------# alias method: process_action_end#--------------------------------------------------------------------------alias scene_battle_process_action_end_pctb process_action_enddef process_action_endscene_battle_process_action_end_pctbunless BattleManager.action_forced?$game_temp.reserve_common_event(YSA:😛CTB::CTB_COMMON_EVENT[:end_action]) if YSA:😛CTB::CTB_COMMON_EVENT[:end_action] > 0 && $data_common_events[YSA:😛CTB::CTB_COMMON_EVENT[:end_action]][email hidden][email hidden]_pctb_speedreturn start_pctb_action if @subject.pctb_active?BattleManager.action_list_ctb.shiftupdate_pctb_speedendend#--------------------------------------------------------------------------# alias method: next_command#--------------------------------------------------------------------------alias pctb_next_command next_commanddef next_commandif BattleManager.actorif BattleManager.actor != BattleManager.action_list_ctb[0]BattleManager.action_list_ctb[0].make_actionsstart_pctb_actionreturnendendreturn @subject = nil if BattleManager.actor && BattleManager.actor.charging_startpctb_next_commandend#--------------------------------------------------------------------------# alias method: create_actor_command_window#--------------------------------------------------------------------------alias yctb_create_actor_command_window create_actor_command_windowdef create_actor_command_windowyctb_create_actor_command_window@actor_command_window.set_handler🙂cancel, method🙂ctb_prior_actor))@actor_command_window.set_handler🙂dir4, method🙂ctb_prior_actor))@actor_command_window.set_handler🙂dir6, method🙂ctb_next_command))end#--------------------------------------------------------------------------# new method: ctb_prior_actor#--------------------------------------------------------------------------def ctb_prior_actorBattleManager.actor.make_actionslast_index = BattleManager.actor.indexprior_index = last_index - 1if prior_index < 0@actor_command_window.close@party_command_window.setupelsereturn ctb_prior_actor if !$game_party.members[prior_index].movable?$game_party.members[prior_index].make_actionsBattleManager.input_startBattleManager.set_actor(prior_index) start_actor_command_selectionif $imported["YEA-BattleEngine"]redraw_current_status@status_aid_window.hideelserefresh_statusend@status_window.show@status_window.openendend#--------------------------------------------------------------------------# new method: ctb_next_command#--------------------------------------------------------------------------def ctb_next_commandBattleManager.actor.make_actionslast_index = BattleManager.actor.indexnext_index = last_index + 1if next_index > ($game_party.members.size - 1)return start_confirm_command_selection if $imported["YEA-BattleCommandList"] && YEA::BATTLE_COMMANDS::USE_CONFIRM_WINDOWBattleManager.action_list_ctb[0].make_actionsstart_pctb_actionelsereturn ctb_next_command if !$game_party.members[next_index].movable?$game_party.members[next_index].make_actionsBattleManager.input_startBattleManager.set_actor(next_index) start_actor_command_selectionif $imported["YEA-BattleEngine"]redraw_current_status@status_aid_window.hideelserefresh_statusend@status_window.show@status_window.openendend#--------------------------------------------------------------------------# alias method: command_fight#--------------------------------------------------------------------------alias command_fight_pctb command_fightdef command_fightreturn command_fight_pctb unless BattleManager.btype?🙂pctb)if BattleManager.action_list_ctb[0].nil? update_pctb_speed elseBattleManager.action_list_ctb[0].make_actionsstart_pctb_actionendend#--------------------------------------------------------------------------# alias method: turn_start#--------------------------------------------------------------------------alias pctb_turn_start turn_startdef turn_startlast_subject = @subject if BattleManager.btype?🙂pctb)pctb_turn_start@subject = last_subject if BattleManager.btype?🙂pctb)endend # Scene_Battle#==============================================================================# # ▼ End of File# #==============================================================================
Thank you 🤘
Original thread: https://forums.rpgmakerweb.com/threads/ace-does-anyone-have-yamis-predicted-charge-turn-or-charge-turn-battle.36473/