TP Gain Tags [Passive State(s)]

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,723
Reaction score
7,847
First Language
German
Primarily Uses
RMMV
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.
 

RetroBoy

Veteran
Veteran
Joined
Dec 16, 2016
Messages
378
Reaction score
261
First Language
English
Primarily Uses
Because my system is FAR too elaborate and expansive for that to work.
 

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
147
First Language
English
Primarily Uses
RMMV
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.
 

JGreene

Veteran
Veteran
Joined
Oct 24, 2015
Messages
396
Reaction score
300
First Language
English
Primarily Uses
RMMV
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:
<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)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Oh wow, just got word the police are looking for an armed suspect within a 2 block radius of my office. Super glad I'm not there right now. :kaoswt:
Sheila Nagase

same caption as before. :3
"Be as honest as you possibly can as often as you can. It makes your lies much easier to believe."
Each new game means new ways to survive and you need to adapt when you have 10 different stores with lots of items for your adventure

Forum statistics

Threads
107,378
Messages
1,029,215
Members
139,474
Latest member
neotek7
Top