Magicite System Bug?

I'm working on my own variation of the Magicite System from FF6. The way it works is that while you have a Tarot Card equipped, you have four spells available to you, and every time you gain enough Ability Orbs, you level up with it and get one of the spells added to your list, but it's cheaper and more powerful than the original.

So the way I have it is that every enemy drops 1 Ability Orb as an item. Then as you return to the map, an Event triggers where it'll do a loop, it'll check to see what card a character has equipped and add a Variable equal to the number of Ability Orbs you earned in battle, then removes them all from your inventory.

It's designed so that one event does every check for every character and every Tarot Card they have equipped.

But the problem I ran into is during testing, I got the fourth Check on the 0 Fool Tarot Card, and when I tried to master another, 1 Magician, it kept repeating the fourth 0 Fool text box and began looping that text box over and over again. Basically I wanna know if anyone has any ideas how to prevent the fourth check on a Tarot Card to repeat itself. I have an example below of the event.

I should stress that no Plugins are installed, and I haven't tried to do a test where a card besides 0 Fool is tested first as I feel the results would be the same. Finally, this one event has all 22 Tarot Cards for one character and is intended to house every playable character.

1778788091423.png
if you move all your "Grim 0 Fool" variable checks inside the branch where you check if they have the fool equipped, it should only be possible to get it once and only if it happens when the card is equipped.

Otherwise, you could get the exp exactly to any threshold and any fight that drops an orb would trigger the branch
another thing, NEVER use loop inside an autorun => as it keeps looping,
same for parallel events.

so remove your loop too (unless its an action button and use break loops).
NEVER use loop inside an autorun
I mean, not to be pedantic, but never isn't quite true.
I agree, it is pointless to loop the whole event like that.

But to say never use a loop in an auto-run might be the wrong impression. If a block of the event needs to loop before executing the rest of the logic, it's totally fine to use a loop.
Sorry to be pedantic, just wanted to keep the record straight.
Update.

So the reason for the loop in the first place is that it's because it does the check for each Ability Orb at a time. So it checks one Orb, ticks all the appropriate triggers, then loops back around to check another Orb.

That being said, I think I realised that if I add a new event in the list that checks to see if it's maxed out like "Grim 0 Fool Mastered" I can see if it checks to see if that event is on first.

That or make each Character/Tarot Card Combination it's own separate event, which would mean having over 400 separate events on every single map that has enemies to fight. Not impossible, but extremely tedious.
I mean, not to be pedantic, but never isn't quite true.
I agree, it is pointless to loop the whole event like that.

But to say never use a loop in an auto-run might be the wrong impression. If a block of the event needs to loop before executing the rest of the logic, it's totally fine to use a loop.
Sorry to be pedantic, just wanted to keep the record straight.
I can agree, but the event page alone isn't fully given, if it start with a loop and ends
at the bottom, we don't see either if it breaks the loops, what behind the loop,
how it turn it off.


Update.

So the reason for the loop in the first place is that it's because it does the check for each Ability Orb at a time. So it checks one Orb, ticks all the appropriate triggers, then loops back around to check another Orb.

That being said, I think I realised that if I add a new event in the list that checks to see if it's maxed out like "Grim 0 Fool Mastered" I can see if it checks to see if that event is on first.

That or make each Character/Tarot Card Combination it's own separate event, which would mean having over 400 separate events on every single map that has enemies to fight. Not impossible, but extremely tedious.
if you want to do this periodically over time, you can shorten it by a scriptcall,
use a variable to check this value.

but while I don't know the mechanic or how it used, I can't really help improve it either.
I've found a method where I use a conditional branch that only works when an event is off, and use the 4th mastered event to turn it on, thus removing the loop entirerly.
1778847262426.png


I should stress that there was a break loop at the bottom of the event page which I should've shown but it didn't occur to me, but either way I think I have the entire thing sorted. Thanks for your help.

Original thread: https://forums.rpgmakerweb.com/threads/magicite-system-bug.183610/