8 years ago
Quick question about commodities
So, code probably still displaying weirdly, but I'll try to copy/paste anyway for demonstration (edit: oh yay, code tags seem to be working right again):
This is straight from commodity_Trait_Toddler_Silly_RandomlyGetsPlayful
My question is, I'm pretty sure I get that under "states" 0 is literally just 0. It's when the commodity hits the min_value_tuning.
But I'm not totally getting the purpose of the 1 state. Is it just a programming quirk of a true/false structure where there needs to be a binary 1/0 with a state for each and that's all it serves a purpose in being? Cause it clearly doesn't have an attribute that triggers from it. It just exists as an alternative to 0.
I'm guessing I'm just struggling with this because I'm very tired. Something tells me that the reason it's there, is if it wasn't, the commodity would default to the 0 state, no matter what numerical value the commodity was at, simply because it's the only state that exists.
Whereas with 1 existing, it somehow knows to treat it as "1 or greater"? And then it treats that as the state for anything above 0?
This is straight from commodity_Trait_Toddler_Silly_RandomlyGetsPlayful
False
0
-20
-1
-30
20
1
30
120
1
False
True
400
1680
1440
0
False
143289
0
1
0
0
1
My question is, I'm pretty sure I get that under "states" 0 is literally just 0. It's when the commodity hits the min_value_tuning.
But I'm not totally getting the purpose of the 1 state. Is it just a programming quirk of a true/false structure where there needs to be a binary 1/0 with a state for each and that's all it serves a purpose in being? Cause it clearly doesn't have an attribute that triggers from it. It just exists as an alternative to 0.
I'm guessing I'm just struggling with this because I'm very tired. Something tells me that the reason it's there, is if it wasn't, the commodity would default to the 0 state, no matter what numerical value the commodity was at, simply because it's the only state that exists.
Whereas with 1 existing, it somehow knows to treat it as "1 or greater"? And then it treats that as the state for anything above 0?