[SOLVED] Trying to get physical attacks to generate TP based on formula, been trying Yanfly's Enhanced TP

Pretty much says it all. Setting the TP gain in vanilla settings doesn't work, because I want it to be a formula, not static. But I can't figure out a way to get Yanfly's Enhanced TP to check for damage dealt being physical and not magical. And I don't know of any other plugin that might do it. One thing I tried in the plugin was:

if (value > 0 && this.isPhysical()){ formula }

But it didn't read it, just made attacks yield no TP at all (the formula works without that if statement just fine) I forget where I got the statement from, maybe it's just bad, or maybe the plugin just doesn't read it, but either way, I'm fresh out of ideas as to how to make TP be gained both with a formula and only physical attacks.
try
if ((value > 0) && (this.isPhysical()))

with multiple conditions it is better to make sure that the engine handles the sequence correctly, the AND-operator can sometimes slip into the wrong priority.
try
if ((value > 0) && (this.isPhysical()))

with multiple conditions it is better to make sure that the engine handles the sequence correctly, the AND-operator can sometimes slip into the wrong priority.

Still didn't work
Ok, I figured it out! Using Yanfly's Enhanced TP and SkillCore, I just put this in the notes of any attack skills I want it to apply to (such as the standard attack):

<Post-Damage Eval>
if ((this.isHpEffect()) && (value > 0)){
user.gainTp( formula )
}
</Post-Damage Eval>

Thanks for responding and the "in general" advice, Andar!

Edit: to clarify, in Enhanced TP, the custom mode being used is just set to "0" on everything

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/solved-trying-to-get-physical-attacks-to-generate-tp-based-on-formula-been-trying-yanflys-enhanced-tp.125425/