Yanfly's EnhancedTP "Damage Reference" Help

Hi,

I'm currently trying to add in a formula for HP Damage Gain (pretty much identical to FFX Stoic)
The FFX Formula is calculated with: Damage received × 30 / Max HP maximum 30

I've tried to do this but I'm having trouble referencing "Damage Received" The rest I can do. I had a look through and found a reference to "damageRate" so tried that but I get an error saying it's "null" so, not sure.

Here is what I'd like:
damageRate * user.tcr / user.mhp

Can anyone tell me the reference I need please?
Any ideas?

I've been playing around with this and I think I can get it to work if I can set a variable to equal the damage just dealt, I'm using Yanfly's Damage Core so thought I could use that. Thus far the only thing I've been able to do which doesn't cause the game to crash or errors is:
$gameVariables[100] = value;
as the last line in the damage core (naturally i moved the last 2 lines up one to make space for it.) But sadly it's returning the value of "0" which is annoying.

Anyone got any inspired ideas?
@Coopziana First, don't double post, it's againist fourm rules.

Second, use user.hpResult() * user.tcr/user.mhp

If that doesn't work try
target.hpResult() * user.tcr/user.mhp
@Coopziana First, don't double post, it's againist fourm rules.

Second, use user.hpResult() * user.tcr/user.mhp

If that doesn't work try
target.hpResult() * user.tcr/user.mhp

@Zarsla Sorry for the double post. I was intended to be additional information, but I see where you are coming from.

Second. So far it looks like that works, thanks for the help. I had actually worked it out the more complicated way of setting damage amount to a variable and then using the variable in the TP formula, but your way is much better. I'm going to change my TP formula to that but i'll also keep the DamageCore Variable as it may come in handy later.

Thanks again.

Edit: I was wrong, it doesn't work. Says there's no value for .hpresult() on both user and target.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-enhancedtp-damage-reference-help.89701/