creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
How would I get a vendor food to..   
HavenHerbaven

HavenHerbaven
Canada  


  4/17/2014

Okay so I'm starting on a new project and I'm wondering how I would I get the food in the vendor to lets say Increase Hotness? Also It would be a randomized vendor, where would i add the line would it be in the Food script area?

Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/17/2014

Would you like your food item to increase hotness when it's eaten?

To bypass the learning mechanism, you'd use the CHEM command with the appropriate number for Hotness from the C3 Chemical List.

The Chilis from the Garden Box have their eat script as follows:

*Finally, the eat script. Nom.

scrp 2 8 22935 12
inst
snde "leat"
stim writ from 78 1

*going to add hotness and vitamin C to mimic the hardman chilis.

doif from ne null
targ from
chem 153 .15
chem 99 .35
endi

kill ownr
endm


Hope this helps! :)


My TCR Norns
 
HavenHerbaven

HavenHerbaven



  4/17/2014

That helps alot now! I would add it to the eat script? Also can you add more than one chemical?

Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/17/2014

If you wanted the food to increase hotness when eaten, you would add it to the eat script. :) As you'd be doing the randomisation long before it gets to that stage, it wouldn't affect putting the heat in. And yes, you can add more than one chemical, you just have to add a new CHEM line for each one.

My TCR Norns
 
HavenHerbaven

HavenHerbaven



  4/18/2014

So for the CHEM line would be this
doif from ne null
targ from
chem 153 .15
chem 99 .35
endi
?

Also how would the code look if it where decreasing?

I also was wondering with my sprite sheet I have a grab and a put down would I need more code than lets say when I did my pudding?


Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/18/2014

The line I was referring to was just the 'chem [number] [number]' line. :)

First you need to check that the FROM isn't null. The FROM is 'the thing that made this script run'. In this case, the FROM is the creature that eats the food.

doif from ne null


Then you need to set the TARG to not be the food, but the creature that ate the food, by setting the TARG to be FROM.

targ from


Then you inject 0.15 units of chemical number 153, and 0.35 units of chemical number 99. The amount has to be something between -1.0 and 1.0.

chem 153 .15
chem 99 .35



If you wanted to add in more chemicals, you could add in more of these kinds of lines - for example, the General Cure from C3 has these chemicals:
chem 100 .15
chem 97 .15
chem 95 .15
chem 92 .15
chem 93 .15
chem 96 .15
chem 94 .15
chem 117 .45


Then you need to close off the DOIF statement from before with an ENDI. :)


My TCR Norns
 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/18/2014

What would you want your get and drop scripts for your agent to do?

My TCR Norns
 
HavenHerbaven

HavenHerbaven



  4/18/2014

Oh now I see.

Okay so It would vend laying down and then the creature picks it up and it be the standing sprites than the creature would set it down and it would be back to the laying down position. Is that possible?


Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/18/2014

That should be quite easy. Because all of your POSEs will be relative to the BASE, the randomisation won't interfere with it, as long as you have your 'standing up' and 'lying down' pictures in the same sequence. :)


**pickup event
scrp 2 21 1000 4
stim writ from 18 1
pose [standing up pose #]
endm


**drop event
scrp 2 21 1000 5
stim writ from 19 1
pose [laying down pose #]
endm


My TCR Norns
 
HavenHerbaven

HavenHerbaven



  4/18/2014

So in to sprite file The standing up ones would have a slightly different background would that change anything? or do I have to make the Background taller in the laying down to?

Also where would I add the pose?


Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/18/2014

I think you'd have to make both of the backgrounds the same size, lying down and standing up. I'm not sure what you mean by 'where you'd add the pose'?

My TCR Norns
 
HavenHerbaven

HavenHerbaven



  4/18/2014

Where would I add the pose scripts in my code? like at what area in it.

Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/18/2014

You would create two new scripts, scrp 2 11 X 4 for your pickup script

and 2 11 X 5 for your drop script. :)


My TCR Norns
 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/20/2014

The other thing when working with chemicals, is that very small amounts of chemicals can have a big impact on how the norns behave - so it's best to be conservative and inject small amounts of things. Norns tend to eat a lot of food anyway, so it's particularly important there to keep the amounts smallish!

My TCR Norns
 


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
1 online
Malkin
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