Transferring TP skill

Hi all. I want to create a skill that takes the users current TP and transfers it to another member. I'm hoping I can do this with Yanfly's skill core or something similar.


My code is:


<Cost Display Eval>


var variableId = 102;


var value = a.tp;


$gameVariables.setValue(variableId, value);


</Cost Display Eval>


<Custom Cost Display>


\c[4]\v[102]\c[0] TP


</Custom Cost Display>


<Pre-Damage Eval>


a.gainTp(-v[102]);


</Pre-Damage Eval>


But unfortunately, since I can't choose TP in the damage type, the user does not lose TP and the target does not gain TP due to no formula. Anyone have an idea how to accomplish this?
Hi all. I want to create a skill that takes the users current TP and transfers it to another member. I'm hoping I can do this with Yanfly's skill core or something similar.


My code is:


<Cost Display Eval>


var variableId = 102;


var value = a.tp;


$gameVariables.setValue(variableId, value);


</Cost Display Eval>


<Custom Cost Display>


\c[4]\v[102]\c[0] TP


</Custom Cost Display>


<Pre-Damage Eval>


a.gainTp(-v[102]);


</Pre-Damage Eval>


But unfortunately, since I can't choose TP in the damage type, the user does not lose TP and the target does not gain TP due to no formula. Anyone have an idea how to accomplish this?

Add in a <Custom TP Cost> notetag that determines the TP cost. Add in "Gain TP" to the "Effects" area. Set the target to 1 ally.
The problem with that is I want a straight 1:1 conversion, not a set amount. I should have specified that in the op


All TP that the user has can be transferred to the target. I can place the TP in a variable no problem I'm just unsure how to call it and apply it to the target.
Ah, I happen to have the skill Entrust, inspired from the Final Fantasy Record Keeper, that do just that hehe~


I used Action Sequence and Skill Core to do that. 


Set Damage Type as none, hit type as Certain Hit, and Success to 100%.


Put this on your notebox: 


This will make your Skill cost as much as user's current TP. 

Code:
<Custom TP Cost>
  cost += user.tp
</Custom TP Cost>

And then for the action sequence and the actual effect itself: 


I have Enhanced TP, but I forgot whether it is needed for that command in Action Sequence or not. 

Code:
<setup action>
display action
</setup action>

<target action>
perform start

change variable 1 = user.tp // use any variable you want btw
animation x: user // custom animation that look like orbs of energy fly out the user
wait for animation
tp -variable 1: user, (show) //this part will empty user's TP gauge

animation x: user // custom animation that looks like the previous orbs of energy entering the ally's body
wait for animation
tp +variable 1: target, (show) 
</target action>

<follow action>
perform finish
</follow action>

<finish action>
clear battle log
</finish action>





The only downside is the skill is selectable and usable even at 0TP, though it does just what it does exactly (give 0TP to ally, lel)
Awesome. Exactly what I was looking for. Thanks bud.
Did you try (Yanfly skill core)
<Custom TP Cost>
value  = user.tp;
// or
// cost  = user.tp;
</Custom TP Cost>
Then with Yanfly dmg core script
<damage formula>
// if you want to set tp
target.setTp(user.tp);
// or
// target.tp = user.tp;
// If you want add/transfer
// target.gainTp(user.tp);
// Or simply after setting tp dmg
// value = -user.tp;
</damage formula>
I'm on mobile device so i can't verify code but it should be simple
I hope something will work

Original thread: https://forums.rpgmakerweb.com/threads/transferring-tp-skill.63469/