Stop TP From Increasing Upon Hp Damage

Hello~

I've been using RPG Maker VX Ace for a while now and I have a question regarding TP.

So I've been using Victor's Animated Battles and Cooperation Skills scripts, and I started to make some skills that use up 30 TP per character that takes action on a cooperation skill.

I did so by using a common event (unique common event per skill), like this:

For Cooperation Skill No. 1:

$game_actors[1].tp-=30

$game_actors[2].tp-=30

And it works, but I would like that skill to be somewhat powerful compared to other skills (for obvious reasons).

And because of that, I would like to regulate the TP adquisiton as much as I can, which is pretty easy using the "TP Gain" on the skills tab. But no matter how hard I try, there is but one thing that I can never control, and that is that my characters gain alot of TP by getting hit (its from default). So lets say I make my characters gain little TP for guarding, attacking, etc. in order for the "Special" attacks to be used less often, and, you know, to keep them being special.

If you ever played Kingdom Hearts II, you might remember the drive function, it was so strong that refilling the gauge to use a form again was a pain. Or maybe ever played a Tales Of game, and remember that getting Over Drive on lets say Tales of the Abyss, took a couple of fights before being usuable again. That DID made those special flashy attacks very special.

But to achieve that I first have to know if there is some way to regulate this.

Maybe I haven't gone deep enough regarding the TP, and maybe there is already a default option for my request somewhere, but if it isn't much trouble I would like to ask for your help 🙂

Thank You In Advance~
You are correct that you need a script to change how tp is gained from damage. This is the function that handles it:

Code:
class Game_Battler < Game_BattlerBase  #--------------------------------------------------------------------------  # * Charge TP by Damage Suffered  #--------------------------------------------------------------------------  def charge_tp_by_damage(damage_rate)    self.tp += 50 * damage_rate * tcr  endend
You can just comment out (put a # in front of) the self.tp += line to remove tp gained by damage completely. You can either comment out the line in the actual Game_Battler class or copy paste the above snippet into the materials section and do the same there. You could also lower the amount they receive by lowering that 50. That number basically represents how much TP you would gain with a hit that did 100% of your hp (times the tp recovery rate, which is a special parameter).
You could also just change the TP gain from attacks in the Skills tab, but that's the tedious way of doing it. 😛
^ actually he already did that based on his post... but his problem is not the TP gain of the one dealing the damage, but the TP gain of the target... which can be removed via commenting the line that Racheal shown... 🙂
Ah, then I wasn't paying attention.  Kudos to Racheal then for providing a viable solution.
that's normal especially on long questions, that's actually what I thought too when I first read it... 🙂
You are correct that you need a script to change how tp is gained from damage. This is the function that handles it:

class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # * Charge TP by Damage Suffered #-------------------------------------------------------------------------- def charge_tp_by_damage(damage_rate) self.tp += 50 * damage_rate * tcr endendYou can just comment out (put a # in front of) the self.tp += line to remove tp gained by damage completely. You can either comment out the line in the actual Game_Battler class or copy paste the above snippet into the materials section and do the same there. You could also lower the amount they receive by lowering that 50. That number basically represents how much TP you would gain with a hit that did 100% of your hp (times the tp recovery rate, which is a special parameter).
THANK YOU VERY MUCH 🙂 ~

You could also just change the TP gain from attacks in the Skills tab, but that's the tedious way of doing it. 😛
Yup, I'm doing it that way~ And it isn't tedious at all, tedious is coordinating and making each skill with Victor's scripts (but the result is awesome ;D).

that's normal especially on long questions, that's actually what I thought too when I first read it... 🙂
Hehe, I'll try to get to the point faster next time.

Anyway, thank you really much for the help guys! :3
You can add a "TCR" feature at 0% to prevent gaining TP from damage, but that also prevents gaining TP from the "gain TP" effect.
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/stop-tp-from-increasing-upon-hp-damage.19822/