creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
C3DS variables question   
Nutter
Senior Wrangler

Nutter
United Kingdom  


  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.)
 
Papriko
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...
 
Nutter
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...
 
Papriko
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

Moe


 visit Moe's website: Creatures 2 to Docking Station
  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.)
 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki