Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

TP System Questions

A topic by K-apple created 9 days ago Views: 33 Replies: 2
Viewing posts 1 to 2

With your plugin I was wondering if it was possible to change the tp system where players gain a set amount of TP when landing a critical hit, targeting an enemy weakness, and/or avoiding an attack. Inversely I also wanted to create a system where players would lose TP if they miss an attack or receive a critical hit or a have their elemental weaknesses exploited.

Developer (2 edits)

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
(+1)

Thank you so much for this and especially the code. I'll purchase this plugin as soon as I can.