Is there some sort of tutorial for formula somewhere? I can only deduce how to use it from the tooltips from the editor, but not enough to learn it from the tooltips alone. How do I create more complex formulas? Like add then multiply? Do I have to store the result of the formula setting into a variable then create a new node that will multiply the variable? If that's the case then I will have to repeatedly use the Store Formula Value node. Insights? Thanks !
Generally, each formula node with an operator changes the formula's current value. E.g. Add will add the node's value to the current formula value, Multiply will multiply the formula value by the node's value. The formula is calculated node by node, and you don't have to store the formula value each time, as that's handled automatically.
You'd only use a Store Formula Value node in case you want to remember a certain value that was calculated during the formula, before the formula's value is changed further.
1) Create a chain of separate formulas, each calculating a certain step of the larger formula you're trying to create, then link them together in a primary formula. You can call the value of each formula step using the 'value' node and then setting the value type to 'formula.'
2) This one is a pain in the @$$, but I eventually opted to create a list of formulas that I called 'value formulas'-one for every single stat in my game and a few extra besides. These value formulas start with a 'check value' node that branches depending on what value is passed along to the formula at start. This option is easy to find when calling up formulas; it asks what initial value you'd like to pass along.
The way I worked them is like this: if the initial value is 102+ for example, I *SET* the formula value to the appropriate stat value and divide by two, then round down. If the formula checks and finds that its initial value isn't 102 then it checks to see if it's 103. If it is, then it sets the appropriate stat value and divides by three, then rounds down. And so on. It just goes down the chain, checking until it finds the correct value.
The 202+ range divides and then rounds down
The 302+ range multiplies
0 just sets the stat value, but will never be used unless I #$%& something up
1 isn't referenced, because 'math.' Or, 'maths' if you're from the UK. Regardless, adding or dividing by 1 isn't going to get you anywhere, so don't bother with it.
The good news to creating these value formulas is that you can set it up once and then copy it, only changing the stat values in each case, which admittedly is still a royal pain. But, from that point on you should be able to plug the multiplied or divided value of any stat directly into a formula, which is handy for keeping things tidy.
P.S. - If you use combined values for any of your stats, make sure to place those stats behind whatever other stats they reference in your list. If your combatants have a formula called 'chin whiskers' linked to a formula that uses a stat called, 'mustachio', and 'mustachio' comes after 'chin whiskers' in your list, then 'chin whiskers' won't properly incorporate the full splendor of your mustachio. Your direct formula will display the correct value, but your game will show a different value along with any later formulas that use 'chin whiskers', because you don't actually have a mustachio as far as your chin whiskers are concerned, unless you remembered to do the sensible thing and put your mustachio first.