MZ Visustella Enhanced TP

Is it possible to give TP to a character who kills an enemy?
I think they have this possibility if anyone kills an enemy (for the full group, then), but I've not seen an option for a single character.
I don't believe you can unfortunately.

But you could always throw it in the damage formula for the skill.

Code:
if (a.atk >= b.hp) {a.gainTp(100); a.atk;} else a.atk

If your damage formula (a.atk) is greather than or equal to the enemy's health (b.hp)
Then attacker will gain 100 TP (a.gainTp(100)) and execute damage formula (a.atk)
Else otherwise just do the regular damage formula (a.atk)
You could try this as a note tag of the skill. Change the 15 to the amount of TP you want the user to gain.

Code:
<JS Post-Damage>
if (target.isDead())
        user.gainTp(15);
</JS Post-Damage>

Ofc if you want this for any and all skills which cost TP putting the notetag in might get a bit tedious.
You could also pretty easily modify MZ's default code to do it. The trick is, doing that would probably overwrite something from the VisuStella plugin (or be overwritten by it, depending on where you put the plugins).
You could try this as a note tag of the skill. Change the 15 to the amount of TP you want the user to gain.

Code:
<JS Post-Damage>
if (target.isDead())
user.gainTp(15);
</JS Post-Damage>
This ^ in a passive state via SkillStatesCore would also do the trick if you're ok with it affecting the entire party.

1681387919385.png
This looks like an excellent idea, thank you.
let us know how it goes ^_^

Original thread: https://forums.rpgmakerweb.com/threads/visustella-enhanced-tp.156628/