Unity Plugin (UP) & API
Increase base stats
This example builds upon the easy level progression example. If you haven’t already, take 2 minutes to go through it.
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
awith 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,
+1on increase is to be read as +1*floor(1000*pow(1.15,a))
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 uses * as a formula. This activates Increase base stats each time a resource reaches the Level Pool
Powering top studios around the World
+350 Academic Institutions are already teaching Machinations