TP Gain Tags [Passive State(s)]

Hello,

I would like a plugin that allows me to set a type to a class, for example:

<Power>

And set the same on a Skill in the Note Box.

Then, if the Actor (or Enemy) uses a Skill of the coresponding note (in this example: <Power>) they raise their TP by 1 or 2 (being able to set the number might be better).

I am using Yanfly Passive States and only Yanfly Scripts. I theorize that it could probably be done with the Lunatic Mode but I'm unsure how. The "Types" I want to use are as follows:

Power
Finesse
Pressure
Guile
Resist
Presence
Advantage

Any help would be much appreciated.
why don't you make skills unique to that class and put the numbers into the TP-Gain field of the skill in the database?
Because that is the original way to gain TP on skill use, no script or plugin needed at all.

You might have to make double skills if you want that gain to be only for some but use the skills for everyone, but that would still be easier than waiting for a plugin to get written.
Because my system is FAR too elaborate and expansive for that to work.
http://www.rpgmakercentral.com/topic/37799-hp-mp-tp-colors-names/

https://forums.rpgmakerweb.com/index.php?threads/individual-actor-tp.48823/

Maybe one of these can help you.
I haven't tested this out yet, but I'm pretty sure it should work.

Give the class or enemy a passive state (for this example, we'll say the state has an ID of x).

Then, in the skill notebox, use a lunatic mode notetag:

Code:
<Custom Post-Damage Eval>
if (user.isStateAffected(x)) {
  user.gainTp(y);
}
</Custom Post-Damage Eval>

Where y is the amount of tp you want the user to gain.
@Naveed you're a legend. I'll try this!
I see you've got a solution, which works perfectly 🙂

This is for anyone else who might stumble across this thread and need a slightly different function:
Spoiler: action sequence & info
<Post-Damage Eval>
a.gainTp($gameVariables.value(X));
</Post-Damage Eval>


//Where X is the variable ID. You can set it through an event for each actor, class, skill type, or whatever. And then have the skill call this for a custom TP gain. Since it's a variable amount, it can be changed any time you want without further editing of the database.

(Requires Yanfly's Skill Core)

Original thread: https://forums.rpgmakerweb.com/threads/tp-gain-tags-passive-state-s.79906/