设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 131|回复: 0

[转载发布] DoubleX RMVXA Bug Fixes to YSA Battle System: Classical ATB

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-7-31 19:41:12 | 显示全部楼层 |阅读模式

            DoubleX RMVXA Bug Fixes v1.05b to YSA Battle System: Classical ATB



            by DoubleX





    Note


            v1.03a+ disables party escape while at least 1 battler is executing actions


    Compatibility Fix


    http://www.rpgmakervxace.net/topic/21113-doublex-rmvxa-compatibility-fixes-to-ysa-battle-system-classical-atb/?p=145964


    Prerequisites


    YSA Battle System: Classical ATB(Created by Yami)


    Introduction


            Tries to fix bugs I've found in YSA Battle System: Classical ATB
            Fixing compatibility issues isn't this script's aim

    Spoiler 



                            Advices


                            - Fix some issues by following the ordering of YEA scripts:


                              Check http://yanflychannel.wordpress.com/rmvxa/ and follow the ordering


                            - Fix bugs when preemptives or susprises occur in the catb battle system:


                              Give numbers to PREEMTIVE_ATB_ACTOR, PREEMTIVE_ATB_ENEMY, SURPRISE_ATB_ACTOR and SURPRISE_ATB_ENEMY


                            - Fix some compatibility issues with other scripts:


                              Put this script below YSA Battle System: Classical ATB, which should be put below Yanfly Engine Ace - Ace Battle Engine


                              They should be placed as nearby each other as possible


                            Bugs tried to fix:


                            - (v1.05a)Buff/Debuff removal bug
                              Buffs and debuffs won't be removed even when their remaining turns reaches 0


                            - (v1.04a+)Victory defeat bug:


                              Windows that are supposed to be closed don't close if they are shown right before victory or defeat


                            - (v1.03a+)Battler escape bug:
                              Various crashes may occur when any battler escapes


                            - (v1.02a+)Collapse check bug:


                              Enemy sprite won't collapse when they die because of slip damage per turn


                              Causes:



                                     



                                              Consider the following parts of method process_catb and perform_catb_action under class Scene_Battle respectively(YSA Battle System: Classical AT
    :




    if $game_system.catb_turn_type == :tick  @tick_clock =  if !@tick_clock  @tick_clock += 1  if @tick_clock >= $game_system.catb_tick_count    @tick_clock =     all_battle_members.each { |battler|      battler.on_turn_end    }    @status_window.refresh    $game_troop.increase_turn  endend

                    Code:       
    1. if $game_system.catb_turn_type == :action  @tick_action =  if !@tick_action  @tick_action += 1 if !forced || (forced && YSA::CATB::FORCE_ACTION_COUNT)  if @tick_action >= $game_system.catb_after_action    @tick_action =     all_battle_members.each { |battler|      battler.on_turn_end    }    @status_window.refresh    $game_troop.increase_turn  endend
    复制代码



                                              As the collapse effect due to slip damage KO is checked per turn end and of the whole battle and YSA Battle System: Classical ATB simply get rid of the latter, the collapse check bug occurs as the above 2 parts didn't check the collapse effect when they're the only appropriate parts to do so.










                            - (v1.01a+)On turn end bug:


                              The whole "on turn end thing" of the whole battle simply won't be triggered at all in catb battle system


                              Causes:

    Spoiler 



                                              Consider the following parts of method process_catb and perform_catb_action under class Scene_Battle respectively(YSA Battle System: Classical AT
    :




    if $game_system.catb_turn_type == :tick  @tick_clock =  if !@tick_clock  @tick_clock += 1  if @tick_clock >= $game_system.catb_tick_count    @tick_clock =     all_battle_members.each { |battler|      battler.on_turn_end    }    @status_window.refresh    $game_troop.increase_turn  endend

                    Code:       
    1. if $game_system.catb_turn_type == :action  @tick_action =  if !@tick_action  @tick_action += 1 if !forced || (forced && YSA::CATB::FORCE_ACTION_COUNT)  if @tick_action >= $game_system.catb_after_action    @tick_action =     all_battle_members.each { |battler|      battler.on_turn_end    }    @status_window.refresh    $game_troop.increase_turn  endend
    复制代码



                                              They're the ways to set how turns work under DEFAULT_TURN = :tick && :action respectively, so "on turn end" of the whole battle should be triggered here. But in fact they just trigger on turn end for all battlers only but not the whole battle also, causing things triggered at "on turn end" of the whole battle won't be triggered at all.










                            - Autobattle flag and confusion bug:


                              Battlers simply won't make actions automatically under the above conditions.


                              Causes:

    Spoiler 



                                              Consider the following part of method process_catb under class Scene_Battle(YSA Battle System: Classical AT
    :




    BattleManager.action_list.each { |battler|  battler.make_actions if battler.enemy?  perform_catb_action(battler) if !@subject}


                                              battler.make_actions causes battlers to make actions automatically. As it triggers only if battlers are enemies and actors aren't, actors won't make actions automatically.


                                              Consider the attempted fix by Yami to this problem:




    BattleManager.action_list
    actor).each { |battler|  battler.make_actions if (battler.actor? && !battler.input)}


                                              battler.input is initially nil, but after battler.make_actions it's not nil anymore, even after the action is executed. Battler.input remains not nil at the second and later times the battler attempts to make actions, causing failure to make actions. This explains why autobattle or confusion actions only take place once.








                            - Left arrow output bug:


                              The left arrow output should be going left in the list of living members, but is in fact the same as that of ESC.


                              Causes:

    Spoiler 



                                              Consider the following part of method process_dir4 under class Window_ActorCommand(Yanfly Engine Ace - Ace Battle Engine):




    call_handler
    cancel)


                                              This causes left arrow(dir4) output to be cancel, being the same as that of ESC.










                            - Guard command bug:


                              Game crashes when the battle system isn't catb and the rightmost living member guards.


                              Causes:

    Spoiler 



                                              Consider method command_guard under class Scene_Battle(YSA Battle System: Classical AT
    :




    alias catb_command_guard command_guarddef command_guard  BattleManager.actor.input.confirm = true  catb_command_guard  @status_window.draw_item(BattleManager.actor.index)end


                                              When the battle system isn't catb, right after inputting guard command, the next actor(the right one)will be selected(you can observe this), even if it's the last member who guards. This is triggered by the original method command_guard, which is aliased as catb_command_guard. If it's the last member who guards, the next actor, which is nil, will be selected after calling catb_command_guard, causing BattleManager.actor to be nil. Game crashes when @status_window.draw_item(BattleManager.actor.index) is run with BattleManager.actor being nil.










                            - Confirm or cancel input bug:


                              Game crashes when a member confirm his/her/its action while he/she/it's dead.


                              Causes:

    Spoiler 



                                              Consider the following parts of method on_enemy_ok, on_enemy_cancel, on_actor_ok, on_actor_cancel, on_skill_ok or on_item_ok under class Scene_Battle(YSA Battle System: Classical AT
    :




    BattleManager.actor.input.confirm

                    Code:       
    1. @status_window.draw_item(BattleManager.actor.index)
    复制代码



                                              When a party member dies, the respective BattleManager.actor becomes nil. Game crashes when either of the above parts of code is run with BattleManager.actor being nil.










                            - Command window bug:


                              Neither party nor actor command window shows up when they should, causing the game to freeze.


                              Causes:

    Spoiler 



                                              Consider method update_message_open under class Scene_Battle(YSA Battle System: Classical AT
    :




    alias catb_update_message_open update_message_opendef update_message_open  catb_update_message_open  if !$game_message.busy? && @status_window.close? && !$game_troop.all_dead? && !$game_party.all_dead?    @status_window.open  endend


                                              After displaying text in battle, only the status window is opened, when party window and actor window are also supposed to open while they're active.










                            - Party member change bug:


                              Game crashes due to adding or removing party members.


                              Causes:

    Spoiler 



                                              Removing members -


                                              Consider the following part of method process_catb under class Scene_Battle(YSA Battle System: Classical AT
    :




    @f_actor_index =  if !@f_actor_index || @f_actor_index <  || @f_actor_index + 1 > BattleManager.action_list
    actor).sizef_actor = BattleManager.action_list
    actor)[@f_actor_index]@f_actor_index += 1 if (@f_actor_index + 1) < BattleManager.action_list
    actor).size && f_actor && f_actor.input && f_actor.input.item && f_actor.input.confirmf_actor = BattleManager.action_list
    actor)[@f_actor_index]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.setup(BattleManager.actor)  @actor_command_window.showend


                                              BattleManager.action_list
    actor) is the list of actors that can make or are already making actions at the moment.


                                              Consider the following part of method clear_catb under class Game_Battler(YSA Battle System: Classical AT
    :




    BattleManager.delete_catb_action(self)


                                              delete_catb_action(self) is the only method that deletes elements in BattleManager.action_list
    actor), and clear_catb is the only method that calls delete_catb_action(self). As removing members won't immediately trigger clear_catb, BattleManager.action_list
    actor) still includes the removed members if they can make or are already making actions right before removal. As member's index(f_actor.index) are nil when they've removed,  nil is passed to method set_actor under module BattleManager when the code BattleManager.set_actor(f_actor.index) is run:




    class <<selfdef set_actor(actor_index)  @actor_index = actor_indexendend


                                              This sets @actor_index as nil. Game crashes when the following method self.actor under module BattleManager is called by running the code @status_window.select(BattleManager.actor.index):




    def self.actor  @actor_index >=  ? $game_party.members[@actor_index] : nilend


                                              Adding members -


                                              Consider the following parts of method input under class Game_Actor(Yanfly Engine Ace - Ace Battle Engine):




    if @actions.nil?  make_actions  @action_input_index = 0end

                    Code:       
    1. @actions[@action_input_index].nil?
    复制代码



                                              This is where the game crashes when new members are added after the start of the battle, due to @action_input_index being nil as no value is assigned to it. This method sets @action_input_index to 0 only if @actions is nil.


                                              Consider the following part of method clear_actions under class Game_Actor:




    @action_input_index =


                                              This is one of the only 2 instances(the other one is the above) where a value is assigned to @action_input_index.


                                              Consider the following part of method initialize under class Game_Battler:




    @actions = []


                                              This defines @actions as an empty array.


                                              Consider the following part of method make_actions under class Game_Battler:




    @actions = Array.new(make_action_times) { Game_Action.new(self) }


                                              This assigns an array of actions with the size make_action_times to @actions.


                                              When new members are added after the start of the battle, clear_actions and initialize won't be called so their @actions are nil. When they can act, their @actions are defined as an array of actions with the size make_action_times. input is called after this but now their @actions aren't nil anymore, while clear_actions is still not called yet. No values are assigned to @action_input_index at all in the above process, causing the game to crash when @actions[@action_input_index].nil? is run with @action_input_index being nil.










                            - Action Times+ bug:


                              Action times is always 1 no matter how to user set the Action Times+. This is hardcoded in YSA Battle System: Classical ATB.


                              Causes:

    Spoiler 



                                              Consider the method make_action_times under class Game_Battler(YSA Battle System: Classical AT
    :




    alias catb_make_action_times make_action_timesdef make_action_times  BattleManager.btype?
    catb) ? 1 : catb_make_action_timesend


                                              make_action_times always returns 1 when the battle system is catb, causing Action Times+ meaningless.










                            - Enemy action picking bug:


                              Enemies pick new actions every frame, even while charging, causing them to have a chance to pick new actions and alters the charge rate before finish charging the original ones.


                              Causes:

    Spoiler 



                                              Consider the following part of method process_catb under class Scene_Battle(YSA Battle System: Classical AT
    :




    BattleManager.action_list.each { |battler|  battler.make_actions if battler.enemy?  perform_catb_action(battler) if !@subject}


                                              battler.make_actions causes enemies to pick actions. As it triggers every frame(even while charging, same below) due to process_catb being triggered every frame, enemies pick actions every frame and alters the charge rate before finish charging the original ones.










                            - Dying enemy selection bug:


                              Game crashes when enemies die while being selected.


                              Causes:

    Spoiler 



                                              Consider the following part of method update under class Window_BattleEnemy(Yanfly Engine Ace - Ace Battle Engine):




    enemy.sprite_effect_type = :whiten


                                              When enemies die, enemy becomes nil. Game crashes when the above code is run(triggered by selecting enemies) with enemy being nil.










    Video








            You may've noticed a bug at 1:17 of the video, which is Isabelle picking actions before her atb bar is full. This is merely a compatibility issue with Yanfly Engine Ace - Party System Add-On: Command Party.


    Features
            Plug and play(You don't need to edit anything in this script but you may still do so)

    How to use
            Open the script editor and put this script into an open slot between the script YSA Battle System: Classical ATB and Main.  Save to take effect.

    FAQ
            None

    Credit and Thanks
    DoubleX(Giving me credit is completely optional)
            The terms of use are the same as that of YSA Battle System: Classical ATB except that you must also give Yami credit(you should do this anyway) if you give DoubleX or his alias credit
             
    Compatibility
            Same as that of YSA Battle System: Classical ATB
             
    Changelog


            v1.05b(GMT 1200 26-2-2015):


            - Improved the efficiency of the Party member change bug fix


            v1.05a(GMT 0800 21-1-2015):


            - Tried to fix buffs/debuffs not removing when reaching 0 remaining turns


            v1.04c(GMT 0500 24-11-2014):


            - Tried to fix more issues on dying enemy selection bug


            v1.04b(GMT 0800 14-11-2014):


            - Tried to fix more issues on dying enemy selection bug


            v1.04a(GMT 0800 12-11-2014):


            - Tried to fix windows not closing upon victory nor defeat bug


            v1.03a(GMT 0200 20-8-2014):


            - Tried to fix battler escape bug


            v1.02d(GMT 1000 30-6-2014):


            - Tried to improve the action times+ bug fix


            v1.02c(GMT 0500 22-3-2014):


            - Tried to fix more bugs caused by the fixes on collapse check bug


            v1.02b(GMT 2330 7-3-2014):


            - Tried to fix bugs caused by the fixes on collapse check bug


            v1.02a(GMT 0600 7-3-2014):


            - Tried to fix collapse check bug


            v1.01g(GMT 0500 13-2-2014):


            - Tried to fix more issues of command window bug


            v1.01f(GMT 0000 27-1-2014):


            - Tried to fix bugs caused by the fixes on on turn end bug


            v1.01e(GMT 1500 26-1-2014):


            - Tried to fix bugs caused by the fixes on action times+ bug


            v1.01d(GMT 0600 22-1-2014):


            - Tried to fix more issues of command window bug


            v1.01c(GMT 0300 22-1-2014):


            - Tried to fix bugs caused by the fixes on autobattle flag and confusion bug and left arrow output bug


            v1.01b(GMT 1200 21-1-2014):


            - Tried to fix bugs caused by the fix on on turn end bug


            v1.01a (GMT 0000 13-1-2014):


            - Tried to fix on turn end bug


            v1.00a (GMT 1200 9-1-2014):


            - 1st version of this script finished


    (DoubleX)YSA CATB Bug Fix v1.05b.txt


    本贴来自国际rpgmaker官方论坛作者:DoubleX处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/doublex-rmvxa-bug-fixes-to-ysa-battle-system-classical-atb.22142/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 20:11 , Processed in 0.097224 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表