|
Development Forum |
 |
|  Senior Wrangler
Nutter
    
|
5/29/2013 | |
Is it possible to use a variable in a stim statement? e.g. to set a variable to a random number between 100 and 200, then use that for a quantity rather than specifying an absolute amount? I've been thinking about agents with genetic data, and it occurred that might be a way to allow things like sweetness or vitamin content of a fruit to evolve over generations. (Or even allow cross-breeding for particular effects.) |
 Peppery One
Papriko
    
|
5/29/2013 | |
Not with stim I believe, but with chem. I believe with stim it caused weird effects regarding learning when you tweak the values...
Chem doesn't have ANY learning effects, though...
Anyways, yeah, you can variables as a fully functional substitute of numbers. Every time an agent, a number or a string is demanded, you can use an ov## or va## instead. The saved information just has to match the demanded information (e.g. don't feed ownr as number or "hi there" as agent).
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Senior Wrangler
Nutter
    
|
5/29/2013 | |
Cool, thank you! I know a bit about the C1 CAOS but it's obviously been expanded a fair bit for C3 and I've yet to catch up... I do love the idea of agents with genetics though. It's like everything's alive... |
 Peppery One
Papriko
    
|
5/29/2013 | |
Oh yes, I like the idea too. Makes things more interesting.
Once I tweaked my bramboo a bit to change genetic min and max height. I extended the color variation too. The file was based on Vampess' fix.
Probably lost it, had to look into my cosfile storage.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |

Moe
  

|
5/29/2013 | |
Just a head's up. Stim statements have a value of 0 to 1 for their potency value, unlike the previous games that were 0 - 255. Also, the RAND statement for generating random numbers does not work with decimals, only whole integers. To generate a decimal in the range of 0 to 1, you'd need to first generate a random number of a larger range, say 0 100, and divide by 100.00. (Be sure to tell the engine 100.00, as the .00 will tell the engine to keep the decimal place, otherwise dividing by 100 will simply truncate the decimals.) |
|