Hi there!
Yes, you can do all this.
1 - Set the plugin parameters Charge Tp By Action and Charge Tp When Miss to true.
2 - Create a new entry on the Formulas parameter, under the Charge Tp By Action:
const result = target.result()
const isTargetWeakToElement = BattleManager._action.calcElementRate(target) > 1
if(result.critical){
return 30
}else if(result.missed){
return -15
}else if(isTargetWeakToElement){
return 45
}else{
return 0
}
3 - Apply that formula ID on the note tag of what you want to use that formula (actor, enemy, skill, weapon, armor).
That should do the trick. Since you can use formulas, you can do almost everything to change the behavior of how the user gains/loses tp when using an action.
[EDIT] Just for reference, this may be helpful for you. The meaning of each thing on the Charge Tp By Action Formula:
- this = The one who is attacking/using action(user).
- target = The one who is receiving the attack/action
- item = The skill or item used on the action
- item.tpGain = The TP Gain field from the database(skills and items)
- this.tcr = The user/attacker TP Charge Rate
- Now to get access to the action results, we can do this:
- const result = target.result()
- result.critical = returns true if the action was critical
- result.evaded = returns true if the target has evaded the attack
- result.missed = returns true if the user misses the action on the target
- const isTargetWeakToElement = BattleManager._action.calcElementRate(target) > 1






























































































































