Picking Up Carrots and Creatures CAOS

Examining the Picked Up Script for C1 CarrotsUnderstanding CAOS in any of the Creatures games requires a lot of patience and studying, yet it’s one side of the series that can be very rewarding! CAOS is the scripting language in Creatures, and represents the foundation for creating a lot of new content. I recently introduced a new feature to Discover Albia with the first C1 CAOS lesson, and it’s time to pick up another script! Don’t feel discouraged if it all doesn’t seem simple: I’ve been researching and experimenting for weeks, and I still have a ton of coding to understand. CAOS is quite fun to learn… Aside from a few frustrations!

Picking Up a Carrot and All That Goes Into ItWhereas we took a look at a fairly complex script last time, we’ll get a small break with this shorter script! This one defines what happens when a carrot is picked up. This one might be easier to understand, since I’m sure everyone has picked up a carrot in Creatures 1 before. Make sure to familiarize yourself with the List of Script Numbers, and to download the Official Creatures CAOS Guide! One thing to keep in mind is that script defines what happens when a carrot is picked up by the hand or a Norn/Grendel. It appears that there is another script that could be used to define parameters specifically for the hand, although I haven’t seen this put to use in the original items. Onto an examination of this C1 script!

Annotating the Carrot’s Pick Up Script (2 6 3 4)

As before, I know this is the right script because it corresponds with the class number for the carrot (2 6 3), and is for the pick up script (script number 4). Feel free to ask if you’d like more details about figuring this out!

CAOS Code Explanation
scrp 2 6 3 4 Some programs begin with this line, while others name the file by it. This simply creates a new script for 2 6 3 (carrot) for script number 4 (pick up, or get). Everything will happen only when a Creature or the hand picks up a carrot.
doif pose gt 4 If the carrot’s pose is greater than 4, the following commands should be executed. You may need to use a program to open the sprite file for the carrot (pars.spr) to understand this better. However, poses for 5 and 6 are for the full grown carrot, while poses 0-4 are for seedlings. Hence, only full grown carrots will continue on with this set of doif (pronounced “do if”) instructions. This makes sense, since only full grown carrots should be picked up.
pose 5 The carrot will show up in pose 5, and only pose 5. This corresponds to a mature carrot in the ground, or the carrots seen in the above images. Basically, a picked up carrot can only appear in this one pose. It helps make carrying around carrots a bit more realistic, and simulates gravity in a small way.
endi This marks the end of this very short doif statement, but is still required.
endm Voila: The end of the script!

Breaking Down the Script Even More

This is one of the shorter scripts associated with the C1 carrots, and doesn’t require too much more explanation. If you (or a Creature) picks up a carrot, it will be held in an upright position. Note that in the original carrots, the seedlings can actually be held, which creates a situation outside of this script. Luckily, no harm is done… Besides confusing a lot of Norns and Grendels! More annotated scripts are on the way, plus a beta testing opportunity for my carrot updates!

Add a Comment

Feel free to join the discussion! E-mail addresses are not published, and required fields are marked.

« Previous Post | Next Post »