Wooow life has been busy lately. Between running the CCSF Surveys and having some friends in town, on top of work, keeping the house clean, and all that fun stuff, I haven't had a whole lot of time for Creaturely enjoyments. Regardless, I figured I would make a post about something I have been fiddling with the last few days.
As a few of you may know, I can't sprite. As fewer of you may know, I don't -like- to sprite. Okay, I can enjoy spriting things when the sprite is the charm of the agent, like a critter or a plant, but when I'm coding something utilitarian, like a control panel or a machine, spriting is just this annoying necessity that I have to do to make my code accessible to the majority. As such, I generally seek to find ways around it. Shortcut keys are one example. But lately I've been experimenting with "voice" activation, that is, simple commands are typed into the hand's speech bubble to trigger certain scripts. I'll share what I've found so far-- it's fairly simple if you understand some CAOS basics.
You'll want to set this on short timer script-- shorter than it takes for speech bubbles to possibly disappear unseen.
enum 1 2 9
1 2 9 is the classifier for all the speech bubbles, including those made by creatures. This script is essentially going to search every speech bubble in the world for a certain trigger phrase.
doif ov80 ne 1
setv ov80 1
When the script is running possibly several times within a speech bubble's life, it's very possible that it will search the same bubble more than once, and thus produce the effects more than once. To stop this from happening we want to "mark" each speech bubble that we search by changing an ov (I use 80, but you can really use anything the speech bubble doesn't already use) to reflect this. If the bubble has been marked, the script passes over and ignores it, if it is unmarked, the script marks it and carries on with the script.
part 1
part 1 is the text part of the compound agent that is the speech bubble, so the script needs to focus on that to see what's inside.
sets ov82 ptxt
And in just about five lines of code, you have the text of a speech bubble stored in ov82! But it's not finished yet, because when you're searching the bubbles for a trigger word, the searches are case sensitive, so to prevent problems with that you'll want to convert it to all lower case:
sets ov82 lowa ov82
Better. Now you can set your trigger scripts here. Most commonly you would do something like:
doif ov82 = "cheese"
*insert whatever script the word "cheese" will trigger
endi
but the trigger word doesn't have to match the speech exactly, you can also used a SINS command to search inside the text instead of matching it directly.
doif sins ov82 1 "cheese" ne -1
*insert cheesy script
endi
This option will trigger the script if your speech bubble contains the word "cheese" at all, so if you said "I love cheese" or "This cheese is green" the script would trigger. You can actually make some very complex commands if you use SUBS to break up the strings, too.
Make sure you close out your script with endi and next!
It's worth reminding you that this does read all speech bubbles including those of creatures, so you could do something like search the text for the phrase "hungry for starch" and cause the script to get the location of the bubble and go drop some seeds there (though you would probably want use the catalogue tags instead of directly searching for the word/phrase to keep it compatible with non-english versions of creatures).
The upside to these command-activated agents is that they require no sprites and no items to clutter your screen or keep track of. I guess the downside would be that if there were a lot of commands involved, people would be more apt to forget them all.
What do you guys think? Would you use a "voice" activated agent or do you prefer to push a button?
A Creatures blog about everything from raising norns traditionally to tinkering with their brains to changing the world they live in.
Showing posts with label caos. Show all posts
Showing posts with label caos. Show all posts
Tuesday, July 6, 2010
Wednesday, July 22, 2009
Targeting certain norn breeds
Figured I'd write this down before I forgot it, and in case it helps anyone out.
It appears to be quite possible (and strangely simple) to create agents that will only affect certain norn breeds-- or at least the breed according to the head sprite.
The key string is FACE, and can be used something like this:
enum 4 0 0
sets va00 face
doif va00 = "a00d" or va00 = "a40d"
sezz "I have a chichi face!"
endi
next
Such a command will cause all the chichi-headed norns in the world to proudly declare their heritage.
FACE returns the file name of the baby head sprite of the target creature. In this command, if the head sprite matches a00d (the baby male chichi) or a40d (the baby female chichi), the norn must have a chichi head. It doesn't matter what life stage the creature is actually at-- FACE will always return the name of the baby sprite.
You can also easily find out the head sprite name of a creature by targeting it and caosing, "targ norn sezz face". The creature will tell you his/her face sprite so you don't have to go digging through your image folders to find out what matches. Just make sure you get both male and female sprite names.
Now whatever havoc you decide to wreak on specific creature breeds is up to you. You might make a toy that comforts treehuggers, calms down hardmans (hardmen?), poisons toxics, and so on.
I'm still trying to see if there's a way to retrieve the names of sprite files of other body parts. It would be neat to have a script that allows norns with butterfly bodies to fly, or to allow creatures with magma tails to emit heat. No luck so far though.
It appears to be quite possible (and strangely simple) to create agents that will only affect certain norn breeds-- or at least the breed according to the head sprite.
The key string is FACE, and can be used something like this:
enum 4 0 0
sets va00 face
doif va00 = "a00d" or va00 = "a40d"
sezz "I have a chichi face!"
endi
next
Such a command will cause all the chichi-headed norns in the world to proudly declare their heritage.
FACE returns the file name of the baby head sprite of the target creature. In this command, if the head sprite matches a00d (the baby male chichi) or a40d (the baby female chichi), the norn must have a chichi head. It doesn't matter what life stage the creature is actually at-- FACE will always return the name of the baby sprite.
You can also easily find out the head sprite name of a creature by targeting it and caosing, "targ norn sezz face". The creature will tell you his/her face sprite so you don't have to go digging through your image folders to find out what matches. Just make sure you get both male and female sprite names.
Now whatever havoc you decide to wreak on specific creature breeds is up to you. You might make a toy that comforts treehuggers, calms down hardmans (hardmen?), poisons toxics, and so on.
I'm still trying to see if there's a way to retrieve the names of sprite files of other body parts. It would be neat to have a script that allows norns with butterfly bodies to fly, or to allow creatures with magma tails to emit heat. No luck so far though.
Labels:
caos
Monday, May 4, 2009
Agent: Mind Arrows
You know, with all the messing around I've done in CAOS, I don't think I've ever actually compiled a complete agent before. Not for C3/DS anyway. But just for the sake of my own learning and amusement, I spent the better part of the day scripting these Mind Arrows.
They're quite simple, and contain some of the concepts I mentioned in a previous post about mind control. If a creature comes within range of the arrows, his mind is bombarded with very strong suggestions to go right or left. I dropped a sezz line in there too, just so I could tell easily if the creature was acting out of his own will or under the control of the arrows. I suppose I might comment that out in future versions if it gets too annoying.
Scripting the commands for the up and down arrows was a little trickier; after trying multiple solutions I finally set the agent to first check if it is touching a lift-- if so, the creature will be told to push/pull it in accordance with the arrow's direction; if not, the creature will be told to push the call button until the lift appears. For this reason, arrows pointing up or down need to be place in a position where they will be touching the lift when it is called; otherwise the creatures will be pushing that call button until they starve.
They're astonishingly effective. I was able to use the arrows to get all my norns in the meso crowded into a single corner fairly quickly. If I do develop this further I would like to add a similar concept to the left and right arrows for doors and teleporters, so the "walkways" don't have to be limited to the metaroom.
What you actually do with this agent is up to you. You might use it as sort of mental forcefield to keep creatures away from a certain area, or as a way to encourage norns to travel more if they start crowding together in one place. I think I'm going to see if I can create a path that wraps around the entire C12DS world so my norns can take a tour of the world rather than sitting by the incubator all day.
Of course, in case you couldn't guess it already, I created this agent as a very, very early prototype for that mental barrier I was thinking about in my last post.. you know, for that metaroom I'll never actually be able to make? Despite my complete lack of skill I've been plotting it out anyway... you know, just in case I end up with the necessary skills someday.
So I do plan on expanding/specifying this agent...trying to figure out how to only make it activate in certain seasons, how to make it distinguish between male and female norns. It's got a ways to go, but right now it's a fun little toy for getting your creatures where they need to go.
Anyway enough rambling. Download the Mind Arrows here!
Scripting the commands for the up and down arrows was a little trickier; after trying multiple solutions I finally set the agent to first check if it is touching a lift-- if so, the creature will be told to push/pull it in accordance with the arrow's direction; if not, the creature will be told to push the call button until the lift appears. For this reason, arrows pointing up or down need to be place in a position where they will be touching the lift when it is called; otherwise the creatures will be pushing that call button until they starve.
They're astonishingly effective. I was able to use the arrows to get all my norns in the meso crowded into a single corner fairly quickly. If I do develop this further I would like to add a similar concept to the left and right arrows for doors and teleporters, so the "walkways" don't have to be limited to the metaroom.
What you actually do with this agent is up to you. You might use it as sort of mental forcefield to keep creatures away from a certain area, or as a way to encourage norns to travel more if they start crowding together in one place. I think I'm going to see if I can create a path that wraps around the entire C12DS world so my norns can take a tour of the world rather than sitting by the incubator all day.
Of course, in case you couldn't guess it already, I created this agent as a very, very early prototype for that mental barrier I was thinking about in my last post.. you know, for that metaroom I'll never actually be able to make? Despite my complete lack of skill I've been plotting it out anyway... you know, just in case I end up with the necessary skills someday.
So I do plan on expanding/specifying this agent...trying to figure out how to only make it activate in certain seasons, how to make it distinguish between male and female norns. It's got a ways to go, but right now it's a fun little toy for getting your creatures where they need to go.
Anyway enough rambling. Download the Mind Arrows here!
Labels:
agents,
caos,
development,
downloads,
mind control
Friday, April 3, 2009
CAOS Notes: Mind control
I guess I initially started this blog to keep track of my norn populations, runs, etc., but since I like to dabble in CAOS so much, why not use it to keep track of my CAOS notes too?
I've never been particularly good at making agents; there's always some tiny technicality I can't figure out and there's not many CAOS experts left in the community that can help me out in those areas. But when it comes to one-shot lines that I can type in the CAOS command line, that's where I have fun.
So this is the "mind control" line I'm playing with:
targ norn urge writ targ 36 1 1 1
This line will essentially force your targeted norn to drop everything that it's doing, focus its attention on the nearest norn, and make its only priority in life to push that norn. It breaks down like this:
targ norn: Tells the script to target the creature you currently have selected. Alternetively, replace this with "enum 4 0 0" and and "next" to the end of the line to inflict your mind control powers on all creatures in your world.
urge writ: This is the key command here. This tells the script it's about to send evil mind control powers into something. The rest of the script gives the specifics:
targ: Sending the stimulus to the target creature, which we just defined in the first part as being the one you have selected (or if you went the alternate route, each creature in the world in turn).
36 1 1 1: This is the syntax: [noun id] [strength of noun suggestion] [verb id] [ strength of verb suggestion].
36 is the noun id for "norn." As this script forces the target to push norns, they first need to focus on the nearest norn. Other ids are 1, for hand, 11, for food, or 34, for portal. I'll post a list at the end of the noun ids as I know them.
The "1" following the 36 means, "force this creature to pay attention to this noun," but you can tone this down a bit if you like: use 0.5 instead of 1 if you just want to suggest that the norn pay attention to the noun, or 0.9 to strongly suggest it, 0.1 to barely whisper it, or any decimal you like depending on how strong you want your suggestion to be. It also works negatively: if you use a -1, it will force the norn to completely ignore the noun.
The second "1" is the verb id; this happens to be the verb id for "push." And just as explained above, the third is the strength of the verb suggestion; leave it at 1 to force the creature to perform the verb, or use a decimal or negative instead, depending on what your intention is.
I could see some interesting opportunities with this code. While it does interfere with a creature's natural thought process, it might be useful for getting an especially stubborn norn to start eating. Once it is forced to eat, and learns that eating reduces hunger, and that connection is reinforced, it should eat on its own from then on. Overusing the mind control though would likely result in the norn not doing anything for itself, ever, so it should be used with caution.
I could also see it being very useful in agents for people that like to actually play with their creatures with a bit of imagination. For those that enjoy raising norns to fight off grendels, for example, a "war drums" toy could reduce fear in nearby norns and encourage them to beat the snot out of any nearby grendels.
Or perhaps a "crowd scattering" agent that explodes and encourages all nearby creatures to retreat from it, or an "evacuation siren" that encourages norns to push doors, teleporters, and portals. There's a lot of fun possibilbilities there.
I could see a complex, connectable agent with a bunch of different travel options like, go right, pull lift, push door, etc., and if you set them up in a certain way you could hatch a bunch of norns on one side of the world and they would be forced to follow the instructions to end up where you wanted them to go.
You could create a mental forcefield with something like that: if a creature gets within range of the agent, it will force it to go back the way it came.
You could also get a bit cruel with it and create a madness agent that bombards the creature's brain with ridiculous whispered suggestions like, "eat elevator" and "hit hand." Or even worse, create some sort of corrupted dark artifact that heals the creature that holds it fully and gives it Life, but also fills it with anger and suggests it to beat every creature around it.
Ah, so many possibilities.
Now, if you're not already, click the link below to view the full post and the noun/verb id numbers.
As promised, these are the noun and verb ids according to my notes; if there's any errors or anything do let me know so I can fix them. I couldn't find lists like these anywhere else online, so I made some educated guesses based on what I've found from other classifiers and playing with the brain in the genetics kit. But to really know for sure you'll have to experiment with all of them.
Noun ids:
1. Hand
2. Door
3. Seed
4. Good plant
5. Bad plant
6. Leaf
7. Flower
8. Good Fruit
9. Bad Fruit
10. Detritus
11. Food
12. Button or Switch
13. Good Bug
14. Bad Bug
15. Good Critter
16. Bad Critter
17. Nest
18. Agent Egg
19. Weather
20. Bad
21. Toy
22. Incubator
23. Vendor
24. Tool
25. Potion
26. Lift
27. Teleporter
28. Machinery
29. Creature Egg
30. Norn Home
31. Grendel Home
32. Ettin Home
33. Gadget
34. Portal
35. (unclassified?)
36. Norn
37. Grendel
38. Ettin
Verb ids:
0. (look?)
1. Push
2. Pull
3. (deactivate?)
4. Approach
5. Retreat
6. Get
7. Drop
8. Express
9. Rest
10. Go east
11. Go west
12. Eat
13. Hit
Enjoy your newfound mind control power :D
I've never been particularly good at making agents; there's always some tiny technicality I can't figure out and there's not many CAOS experts left in the community that can help me out in those areas. But when it comes to one-shot lines that I can type in the CAOS command line, that's where I have fun.
So this is the "mind control" line I'm playing with:
targ norn urge writ targ 36 1 1 1
This line will essentially force your targeted norn to drop everything that it's doing, focus its attention on the nearest norn, and make its only priority in life to push that norn. It breaks down like this:
targ norn: Tells the script to target the creature you currently have selected. Alternetively, replace this with "enum 4 0 0" and and "next" to the end of the line to inflict your mind control powers on all creatures in your world.
urge writ: This is the key command here. This tells the script it's about to send evil mind control powers into something. The rest of the script gives the specifics:
targ: Sending the stimulus to the target creature, which we just defined in the first part as being the one you have selected (or if you went the alternate route, each creature in the world in turn).
36 1 1 1: This is the syntax: [noun id] [strength of noun suggestion] [verb id] [ strength of verb suggestion].
36 is the noun id for "norn." As this script forces the target to push norns, they first need to focus on the nearest norn. Other ids are 1, for hand, 11, for food, or 34, for portal. I'll post a list at the end of the noun ids as I know them.
The "1" following the 36 means, "force this creature to pay attention to this noun," but you can tone this down a bit if you like: use 0.5 instead of 1 if you just want to suggest that the norn pay attention to the noun, or 0.9 to strongly suggest it, 0.1 to barely whisper it, or any decimal you like depending on how strong you want your suggestion to be. It also works negatively: if you use a -1, it will force the norn to completely ignore the noun.
The second "1" is the verb id; this happens to be the verb id for "push." And just as explained above, the third is the strength of the verb suggestion; leave it at 1 to force the creature to perform the verb, or use a decimal or negative instead, depending on what your intention is.
I could see some interesting opportunities with this code. While it does interfere with a creature's natural thought process, it might be useful for getting an especially stubborn norn to start eating. Once it is forced to eat, and learns that eating reduces hunger, and that connection is reinforced, it should eat on its own from then on. Overusing the mind control though would likely result in the norn not doing anything for itself, ever, so it should be used with caution.
I could also see it being very useful in agents for people that like to actually play with their creatures with a bit of imagination. For those that enjoy raising norns to fight off grendels, for example, a "war drums" toy could reduce fear in nearby norns and encourage them to beat the snot out of any nearby grendels.
Or perhaps a "crowd scattering" agent that explodes and encourages all nearby creatures to retreat from it, or an "evacuation siren" that encourages norns to push doors, teleporters, and portals. There's a lot of fun possibilbilities there.
I could see a complex, connectable agent with a bunch of different travel options like, go right, pull lift, push door, etc., and if you set them up in a certain way you could hatch a bunch of norns on one side of the world and they would be forced to follow the instructions to end up where you wanted them to go.
You could create a mental forcefield with something like that: if a creature gets within range of the agent, it will force it to go back the way it came.
You could also get a bit cruel with it and create a madness agent that bombards the creature's brain with ridiculous whispered suggestions like, "eat elevator" and "hit hand." Or even worse, create some sort of corrupted dark artifact that heals the creature that holds it fully and gives it Life, but also fills it with anger and suggests it to beat every creature around it.
Ah, so many possibilities.
Now, if you're not already, click the link below to view the full post and the noun/verb id numbers.
As promised, these are the noun and verb ids according to my notes; if there's any errors or anything do let me know so I can fix them. I couldn't find lists like these anywhere else online, so I made some educated guesses based on what I've found from other classifiers and playing with the brain in the genetics kit. But to really know for sure you'll have to experiment with all of them.
Noun ids:
1. Hand
2. Door
3. Seed
4. Good plant
5. Bad plant
6. Leaf
7. Flower
8. Good Fruit
9. Bad Fruit
10. Detritus
11. Food
12. Button or Switch
13. Good Bug
14. Bad Bug
15. Good Critter
16. Bad Critter
17. Nest
18. Agent Egg
19. Weather
20. Bad
21. Toy
22. Incubator
23. Vendor
24. Tool
25. Potion
26. Lift
27. Teleporter
28. Machinery
29. Creature Egg
30. Norn Home
31. Grendel Home
32. Ettin Home
33. Gadget
34. Portal
35. (unclassified?)
36. Norn
37. Grendel
38. Ettin
Verb ids:
0. (look?)
1. Push
2. Pull
3. (deactivate?)
4. Approach
5. Retreat
6. Get
7. Drop
8. Express
9. Rest
10. Go east
11. Go west
12. Eat
13. Hit
Enjoy your newfound mind control power :D
Labels:
caos,
mind control
Subscribe to:
Posts (Atom)