The "Stack" is a collection of functions that are being run inside of each other. Think of it like an assembly line. When you make a new actor for instance, you call a constructor. That constructor then calls a setup function to get their name. The "stack" is now the setup function running inside (or on top) of the constructor. The setup script then calls a string function to generate the name. The stack is now the string function inside of the setup function inside of the constructor. When the string function finishes, it passes control back down the stack to the setup function, and the stack is now `setup` <- `constructor` again.
When you see a max stack size limit exceeded, it's usually because two or more functions keep calling each other back and forth without resolving any of their already running instances. You can fix this by terminating the circular reference or resolving the situation that creates it.
I hope this was helpful and not just me womansplaining nonsense. I really struggled with circular references when I first started developing professionally.
No worries! :kaohi:
The first screenshot shows a repeating pattern:
It's a bit odd that Item Core apparently initialises the items in inventory and then equips them...usually they get initialised directly (
The Call Stack is in reverse order: the top is the most recent call, the bottom is the least recent. So you're actually seeing where the loop starts. Maximum stack size exceeded is where it ends: the engine can tell something is wrong at that point so it just throws an error instead of continuing.
The first screenshot shows a repeating pattern:
Game_Actor.setupGame_Actor.initializeGame_ActorGame_Actor.actorGame_Actor.battleMembers(YEP Party System)Game_Party.leader_.scanLighting(Shora Lighting)_.gainItem(Shora Lighting)Game_Party.gainItem(YEP Item Core)Game_Actor.tradeItemWithPartyGame_Actor.changeEquipGame_Actor.equipInitIndependentEquipsGame_Actor.initIndependentEquips(YEP Item Core)Game_Actor.setup
gainItem during initialisation, but that happens before the actor has been added to $gameActors, so Shora's plugin does not see the leader, and the engine tries to initialise them...causing a loop.It's a bit odd that Item Core apparently initialises the items in inventory and then equips them...usually they get initialised directly (
Game_Item#setEquip). Like TheAM-Dol says, a different lighting plugin may stand a better chance of being compatible.The Call Stack is in reverse order: the top is the most recent call, the bottom is the least recent. So you're actually seeing where the loop starts. Maximum stack size exceeded is where it ends: the engine can tell something is wrong at that point so it just throws an error instead of continuing.