Increase base stats

Build upon the easy level progression example: introduce registers to compute formulas. This example builds upon the easy level progression example.

This example builds upon the easy level progression example. If you haven’t already, take 2 minutes to go through it.

Level-up Cost

Each time the player reaches a new Level compute floor(1000*pow(1.15,a)) and add the result (increase) to the Level up cost.

  • Registers compute formulas.
    • They get input from one or multiple Nodes in the form of variables and use the output of the computation to influence the state of Nodes or the flow of Resources.
    • The Level-up cost formula takes the Level number as input. It computes floor(1000*pow(1.15,a)) by replacing the variable a with the current Level number.
  • increase changes the XP requirement for leveling-up by adding the result of the computation on the Level-up cost Resource Connection
  • In this instance, +1 on increase is to be read as +1*floor(1000*pow(1.15,a))

Character’s Base Stats

Each time the player reaches a new Level, trigger and Increase base stats: HP by 30, Stamina by 10 and Mana by 20.

  • ⇢ State Connections change the state of elements on the diagram
    • trigger has the Type Trigger, set to Trigger on gain. This activates Increase base stats each time a resource reaches the Level Pool