DickJustice
Newbie
- May 17, 2018
- 27
- 36
So, recently, I decided to get back to sugarcube development and I feel like I'm going insane.
For some reason, math within the game either works or doesn't work based on some arcane ever-shifting rule. One variable is updating normally, the one right after it refuses to register any change. I tried googling my exact problem and motoslave docs aren't really helpful.
The issue is:
I want one variable to be a result of adding up a fraction of another variable. At first it returned NaN but I was able to identify the issue pretty fast, it was the order of variables. With that out of the way I thought I'm in the clear, only to realize that math just refuses to work.
<<set $looks = Math.abs(0 + $fitness + $looksmodwear + $looksmodmakeup) >> does nothing, $looks stays at 0 when I spam fitness training
<<set $looks = 0 + $fitness + $looksmodwear + $looksmodmakeup >> does nothing, again
<<set $maxenergy = 10 + $fitness / 10>> also does nothing
What am I missing? Motoslave docs state that simple expressions should be working. Is it StoryInit passage? Do I need to cook up a roundabout way to update stats?
For some reason, math within the game either works or doesn't work based on some arcane ever-shifting rule. One variable is updating normally, the one right after it refuses to register any change. I tried googling my exact problem and motoslave docs aren't really helpful.
The issue is:
I want one variable to be a result of adding up a fraction of another variable. At first it returned NaN but I was able to identify the issue pretty fast, it was the order of variables. With that out of the way I thought I'm in the clear, only to realize that math just refuses to work.
<<set $looks = Math.abs(0 + $fitness + $looksmodwear + $looksmodmakeup) >> does nothing, $looks stays at 0 when I spam fitness training
<<set $looks = 0 + $fitness + $looksmodwear + $looksmodmakeup >> does nothing, again
<<set $maxenergy = 10 + $fitness / 10>> also does nothing
What am I missing? Motoslave docs state that simple expressions should be working. Is it StoryInit passage? Do I need to cook up a roundabout way to update stats?