Hello fellas I was wondering if there’s a way to make it that if a character reaches 100 tp they get a custom event happen to em, I was thinking of a character getting stunned or getting healed. Is it possible to make this in game or with a plugin?
I believe you can do this with eventing. MV doesn’t have a TP option in the troop event conditions or in Conditional Branch, but a Script condition can check it. In the troop’s battle event, set the page condition to Turn End with the span set to Turn, then add a Conditional Branch using Script:
$gameActors.actor(1).tp >= 100
Inside the branch you can add your stun with Change State or heal with Recover All, then use Change TP to drop it back down so it doesn’t fire again every turn. It checks at the end of each turn, so the effect happens at the end of the turn they hit 100. Change the 1 to whichever actor ID you want to check, and add another branch for each actor.
Troop events only run for the troop they’re on, so you’d have to copy it to every troop. I know it makes it difficult to keep them all updated, but Yanfly’s Base Troop Events plugin lets you set it up once on a base troop and it runs in every battle: Base Troop Events (YEP) - Yanfly.moe Wiki
Thanks you so much! I was getting pretty close to figuring out but thanks to you I managed to get it working! Also thanks for the plugin recommendation!
I still have a problem that If I set up the character to have -10% tp every turn then the branch wont trigger, I tried to bypass the system by giving the character 10 tp then remove 20 tp but it sadly didn’t work either, I am still happy with this and I can just try to work with what I have right now!
Also to those who might find this and want to use the stun option or the like I recommend also adding change tp to the branch so it won’t get your character in a stun loop.
Thanks again Baz!
Glad you got it working!
If that 10% drain is the TP Regeneration trait, I’m wondering if it’s the order things happen at the end of a turn. MV applies regeneration to everyone first and the Turn End troop event runs right after, so a character who hits 100 during the turn is already back at 90 by the time the branch checks.
If the drain is always there, checking for 90 instead should catch the turn they hit 100:
$gameActors.actor(1).tp >= 90
That number would need changing if the drain amount ever changes. The other way is to take the trait off and do the drain in the troop event itself, with Change TP set to Decrease 10 below the Conditional Branch (outside of it), so the check always happens first.
Just tried having the tp drain be another battle event and it works! Thank you so much for the help!