Stack error with TankentaiSBS+Yanfly ABE/CATB [Ace]

After checking out quite a few threads on the system stack error(stack too deep) it seems that this would occur when there is a double script or when it keeps calling itself.

This doesn't seem to be the issue with my project.

I have(in this order):

Yanfly ABE

Tankentai SBS

Yami CATB

Yanfly HP Gauges

The error ONLY appears if I do the following:

Start a new game, run a battle, exit to title and then start a new game. Otherwise (if I save/load, if I exit the game completely etc.) it works perfectly.

So somehow after calling those scripts, starting a new game floods the stack. Like as if there is something left over after I already ran a battle.

Any idea on how I can resolve it? Perhaps clear it on "New Game" somehow?

I switched stuff around already, however this order of scripts is the only way they will work together to give me an active time side battle system that functions.

Further info:

Seems to happen here - Game_BattlerBase: 146 - stack level too deep

That line is part of the following:

  #--------------------------------------------------------------------------
  # * Get Current States as an Object Array
  #--------------------------------------------------------------------------
  def states
    @states.collect {|id| $data_states[id] }
  end

No idea what to do with that! As I mentioned, loading a game works fine, only occurs when a new game is started after a battle has already occurred.
(deleted)
Yuliya, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you have more to add, just edit your post and add it.


Stack level often comes from having the same method aliased in the same way (for example, by having the same script in your project twice).


Please provide links to the scripts you are using. Thank you.
Apologies for the double post and missing info, thank you for the speedy reply.


Here are the links to the original scripts:


Yanfly's Ace Battle Engine: http://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/


Enu's Tankentai SBS: http://rpgex.sakura.ne.jp/home/material/sv_ace.html


Yami's Classical Active Time Battle: http://yamiworld.wordpress.com/rgss3/battle-scripts/yeas-add-on/ysa-battle-system-classical-active-time-battle/


Yanfly's Enemy HP Bars: http://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/enemy-hp-bars/


The scripts are not in the project twice, made double sure...hehe.


Ran it through Hime's stack debugger: http://himeworks.wordpress.com/2013/08/12/system-stack-debugger/


And have the following:

Spoiler
=============================================================


System stack error detected


    from Game_BattlerBase:146:in `states'


    from Game_BattlerBase:182:in `feature_objects'


    from Game_Actor:354:in `feature_objects'


    from Game_BattlerBase:188:in `all_features'


    from Game_BattlerBase:194:in `features'


    from Game_BattlerBase:224:in `features_set'


    from Game_BattlerBase:397:in `slot_type'


    from Game_BattlerBase:403:in `dual_wield?'


    from Game_Actor:152:in `equip_slots'


    from Game_Actor:119:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:55:in `members'


    from BattleManager:114:in `actor'


    from Yanfly CATB:543:in `clear_catb'


    from Yanfly CATB:614:in `on_restrict'


    from Game_Battler:113:in `add_new_state'


    from Yanfly ABE:1479:in `add_new_state'


    from Game_Battler:83:in `add_state'


    from Game_BattlerBase:505:in `refresh'


    from Yanfly HP Gauges:282:in `refresh'


    from Game_Actor:294:in `refresh'


    from Game_Actor:125:in `init_equips'


    from Game_Actor:44:in `setup'


    from Game_Actor:27:in `initialize'


    from Stats:833:in `initialize'


    from Game_Actors:20:in `new'


    from Game_Actors:20:in `[]'


    from Game_Party:61:in `block in all_members'


    from Game_Party:61:in `collect'


    from Game_Party:61:in `all_members'


    from Game_Party:67:in `battle_members'


    from Game_Player:48:in `actor'


    from Game_Player:40:in `refresh'


    from DataManager:104:in `setup_new_game'


    from テストプレイ高速化:22:in `command_new_game'


    from Window_Selectable:212:in `call'


    from Window_Selectable:212:in `call_handler'


    from Window_Command:136:in `call_ok_handler'


    from Window_Selectable:322:in `process_ok'


    from Window_Selectable:297:in `process_handling'


    from Window_Selectable:276:in `update'


    from Scene_Base:95:in `block in update_all_windows'


    from Scene_Base:93:in `each'


    from Scene_Base:93:in `update_all_windows'


    from Scene_Base:49:in `update_basic'


    from Scene_Base:41:in `update'


    from Scene_Base:14:in `main'


    from SceneManager:23:in `run'


    from Main:15:in `block in <main>'
How many actors are in your party when you start a new game?


Do you have any script slots that are unnamed, but actually do have a script in them? That one comes up from time to time, but I suspect it's not the cause here (I'm just asking for the sake of completeness).
One actor in party when a new game is started. Two when I exit the game.

The same error happens if I exit the game with one actor in party.

No unnamed script slots.
Can you provide a link to this script:


テストプレイ高速化


Or if you just want to upload your project somewhere, I can take a look at it.
PMed you.
It appears to be an incompatibility between the Yami CATB script and the VXAce_SP1 script. Though I can't see any classes/methods that the two of them both reference.


Move your Yami CATB script to the slot between the Yanfly ABE and the VXAce_SP1 scripts.
Thanks. That got rid of the Stack Error. Caused another problem though, CATB doesn't work as intended and gives you turns when ATB is not full, crashing the game in battle 🙂
maybe they aren't compatible... btw, if you don't need much of takentai's capabilities, you might just wanna use Yami's symphony or Yanfly's Visual battlers to get the sideview battle... I'm sure Yanfly'sBE+VB+Yami'sCATB works since I'm using them...
Thanks. I'll give that a try and see if I can get it to do what I want instead of using Tankentai.

Edit: I've decided to go ahead and go with Battle Symphony instead of incompatible scripts. The thread can be locked.

Original thread: https://forums.rpgmakerweb.com/threads/stack-error-with-tankentaisbs-yanfly-abe-catb-ace.19504/