Recover TP by percentage?

Right now I am working on recovery based skills for my game and one of them is intended to recover TP. However I only see the option to set it to a constant number instead of a percentage of the maximum. Is there any possible way to do this? 
A character's maximum TP is always 100, making this a rather silly question!  😛


If you're using some script to change some characters' maximum TP, then I think you could restore a percentage of TP using the Formula box (or Hime's Formula Effects script).  Although I'm shaky with JS, I believe the formula to restore 17% of Max TP would be a.tp += ((17 * a.maxTp()) / 100); ((damage/healing formula here))
Ah OK so If I wanted 33% I would just have to set the TP recovery to 33 then.
var tpVar = actor.tp
actor.gainTp( tpVar * .04);


This script, when shoved into the script box in events, would give the actor in question 4% of their TP back. 🙂


So if their tp is not a max of 100, you could figure out percentages easier.

Original thread: https://forums.rpgmakerweb.com/threads/recover-tp-by-percentage.56753/