State change on full TP

This might not even be the best way to achieve this but I tried looking for conditional branches in events that were based on TP totals and couldn't find one.

After some research, I've tried this... but it doesn't work and I'm very new at this and have no experience with JavaScript, so not sure if I even put this in the right place.

passive.png



Here's what I'm attempting - I want my TP gauge to function like a limit gauge, and for the skill type "Draconic" to ONLY appear in the actor's command window when their TP gauge is full. Additionally, this would be a nice opportunity to add passive buffs to the player as an incentive to leave it full rather than immediately spend it on their special move.

Am I on the right track to achieve this or did I place the JS Passive Condition code in completely the wrong place? Does this require a Common Event trigger?



(as a bonus, it would be nice if each character got a unique benefit to leaving it full, so could I create a separate state for each character and does changing "user.tp" to a specific character work? What would that code be? actor1.tp? The characters' name? e.g. Ziedric.tp ? )

Many thanks to whoever could give some insight for a newbie here!
put == (after user.tp)

make seperate states for actors
put == (after user.tp)
Hmm, that's not working 🙁 I've tried user.tp == 100 user.tp==100 user.tp== and user.tp== 100


make seperate states for actors
I'm wondering how, because the condition just says user - how do I specify an actor?
Just to check, did you assign the passive state to the actor with a notetag?
You don't need to specify the actor, because you assign the different passive states to the different actors.
Just to check, did you assign the passive state to the actor with a notetag?


No - I don't exactly know what this means! I will stress this, I'm a newbie! 🙁
It's the first notetag in the passive states section:

<Passive State: x>

- Used for: Actor, Class, Skill, Weapon, Armor, Enemy Notetags
- Adds passive state(s) x to trait object, applying it to affected actor or
enemy unit(s).
I think I see the issue - this is a notetag that only works with the Yanfly plugin? I'm not using that, and looks like I can't because I'm using MZ not MV. This solution won't work for me then... 🙁

Is there a solution to this on MZ?
Huh? Did you try what I suggested?
Huh? Did you try what I suggested?

I honestly don't know how - I don't see a Passive States section - I looked it up and it seems it's a section of a Yanfly plugin. If it's not, I'm at a loss!

The screenshot in my OP is literally the only thing I've added in my attempt to get this working - outside of parameters on that screenshot I might need things explained to me. I will really stress this - I'm a newbie!

Try putting in your actor notes: <Passive State: 32>

And the state 32 Draconic notes:

<JS Passive Condition>
condition = user.tp == 100;
</JS Passive Condition>
We're in business!

Thanks for being patient with me. I'm looking up issues and seeing people suggest bits of code without the context that they require and are designed to work with a certain plugin, so I'm approaching a lot of these issues with an incomplete picture. Hopefully that will stop with more experience!


I also tried putting the <Passive State: 32> tag in the CLASS note section rather than Actor so that I can start my players without the ability to use Draconic and unlock it later with a class switch, whilst still allowing TP to be used for other things in the meantime!

This is perfect! Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/state-change-on-full-tp.176064/