Increase TP when weapon is used

Is there any way to make a weapon increase TP when is used?

I am using Yanfly and others plugin, so maybe using a weapon notetag or something?
Do you mean the maximum amount of TP, or how quickly you gain it?

TP is hard-coded to cap at 100...it shouldn't be terribly hard to write a plugin to let you change that, but I don't know of one off the top of my head. Did you Google it?

If you mean how much TP you get per action, in your weapon go to Traits in the upper right, Param tab -> Sp-Parameter -> TP Charge Rate.
I mean how much TP the actor has,

for example, I have a character having 50TP.
He has a special sword that gives 10TP when is used.
If he uses it against an enemy, he gets +10TP, then after using it he has 60TP.

In other words, this script:
JavaScript:
user.gainTp(10);
in a weapon 😂
Isn't that the second thing I said? I assume when you keep saying the "weapon is used," that means you attack with it. So every skill has you gain the TP Gain that you typed in. Putting a TP Charge trait on the weapon will cause you to gain more.

Granted, it's a percentage, not a hard number, but it's the easiest way.

You could also, if you have the Yanfly plugins, make the sword have a passive state. In that state, give it a Custom Action End notetag with the gainTp function call you just typed.
Oh, in my game actors don't get TP when they attack, they get TP when they are attacked 👋

I thought that was how TP works, I will check my plugins to find what makes this behavior.
and the most basic mechanism for getting TP hasn't been mentioned yet:
each skill has a field TP Gain in the database, that is the number of TP the actor gains for using this skill.
and attack is a skill - although using this number will gain TP based on skill use, independent of weapon used.
I just checked it and it seems like actors get TP when they are attacked, not when they deal damage.

I think that "TP Charge Rate" trait is the TP rate received for taking damage, the same trait is found for armors.

and the most basic mechanism for getting TP hasn't been mentioned yet:
each skill has a field TP Gain in the database, that is the number of TP the actor gains for using this skill.
and attack is a skill - although using this number will gain TP based on skill use, independent of weapon used.

What I'm looking for is the opposite, gain TP based on the weapon used, independent of the skill used.
and the most basic mechanism for getting TP hasn't been mentioned yet:
To be fair...I mentioned it in post 4 😉

Oh, in my game actors don't get TP when they attack, they get TP when they are attacked 👋

I thought that was how TP works, I will check my plugins to find what makes this behavior.
That is also how TP works. If you put the TP Gain on your skills to 0, then you'll still gain it when actors take damage. You can use a plugin like Yanfly's Enhanced TP to get rid of that if you want.
I think that "TP Charge Rate" trait is the TP rate received for taking damage, the same trait is found for armors.
It is both.
What I'm looking for is the opposite, gain TP based on the weapon used, independent of the skill used.
I told you how to do that at the bottom of post 4.
Thank you so much!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/increase-tp-when-weapon-is-used.147051/