creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Agent Smells   
Lurhstaap

Lurhstaap
United States  

 visit Lurhstaap's website: Addicted To CAOS
  7/10/2016

OK, so I've figured out how to assign the unused scent 19 to bugs and critters. Just one problem... I can't find the referrers I need. For example here's the line in the .cos file that gave plants and flowers CA 9:

*flower smell 9: flowers, plants.
cacl 2 7 0 9
cacl 2 4 0 9

So clearly for 19 I'd do something like ... 2 x 0 19

But where can I look up the actual code(s)? They weren't in the CAOS manual or in other .cos files, at least not that I've found yet. Any thoughts?


Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  7/10/2016

Which codes? The number that means bug or critter? Just look for classifiers on the creatures wiki, there's a list there.

My TCR Norns
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/10/2016

That should work. I'll give it a shot. Thanks!

Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  7/10/2016

Classification system. :)

My TCR Norns
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/10/2016

Now if I just add those lines to the .cos file with all the other CA settings will that work? That is...

cacl 2 13 0 19
cacl 2 15 0 19


Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Papriko
Peppery One

Papriko



  7/10/2016

Kind of. Of course this only works with critters and bugs that actually do emit the smell, which isn't necessarily given unless you coded them to.
You probably heard of the EMIT command at that point, which makes TARG smell like something.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/10/2016  1

Hmmm, OK. So this is only half of the job in short. I also need to make the bugs and critters somehow emit the scent. That'd be a separate agent, like with the Butterfly Norn flowers one, I assume?

OMG I just realized something. This is the first time I've looked at CAOS, understood what it said, and did something meaningful with it, without the whole page turning into gibberish. My dyscalculia didn't kick in!! It's a tiny thing, but that's so awesome! I'm starting to feel like I can really do this if I just try hard enough!


Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Papriko
Peppery One

Papriko



  7/10/2016

As I said, you need to make them run the EMIT command at least once. If you create your own critters and bugs, throw it somewhere into the creation, like the physics properties.

If you wanna make it sort of a retroactive patch to run, you need an invisible agent that regularly goes through all critters and bugs in the world and makes them smell like your scent.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  7/10/2016

The main trouble I found with the butterfly norns' agent was that it was a one-shot - flowers and plants continue to wither and grow, and it didn't make it so that new flowers would always smell.

If you use Jagent to decompile your favourite critter agents, you might be able to add in a line to their installation codes to make each new critter or bug smell.

In the Albian Snails and Glow-Worms, for example, you can see the line

new: simp 2 13 10855 "albiansnail" 16 0 name "patch_plane"


The main things you can tell from that is that a new simple agent is being created, it's a bug (2 13 XXXXX), and it uses pictures from a file called 'albiansnail', which is exactly where you want to be.

A lot of agent properties, like their physics and smell, are set when they are created. So you want to scroll down a notch and find the line going

emit 3 0.001


and then change it to something like this:

emit 19 0.3


If you want to change something like the meerk, which doesn't smell already, you'd find the line going

new: simp 2 15 23 "meerk" 145 0 2500


scroll down the list of properties, and add in an emit line at some point before the "repe" (which closes a 'let's install lots of meerks' loop).

Similar thing for the balloon bugs.



My TCR Norns
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/10/2016

Ahhh, hmmm. I was going to just mimic the butterfly norn agent for retroactive coverage, but I didn't realize it had that problem. I'm guessing there's no easy way to fix that other than to have it periodically fire to update anything that's spawned since the last time?

Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Papriko
Peppery One

Papriko



  7/10/2016

Firing periodically to re-fix everything sadly is the easy way. The other solutions really only are A) make new agents to comply with this script, B) crack open some agents, fix their scripts, recompile and use those or C) ditch this idea.

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/10/2016

That's what I figured. I may create some compliant agents in time as I get better with CAOS and maybe edit some of the ones I use most, but I want this to benefit other people as well and I'd feel bad uploading an edited version of someone else's work without permission. So most likely I'll go for option A at least for now. A simple timer sounds fairly easy to set up.

Come to think of it, I can use the framework for Brainfarter as a reference. It fires every five minutes to make them forget what they're doing. All I have to do is change it so instead of making them forget every five minutes, it runs the scent-apply script.

Might make it happen faster because five minutes might be too much of a gap for effective coverage of new bug/critter spawns, but at the same time I don't want it too fast or it'll create lag... hmm. Any suggestions on that point?


Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Wingheart

Wingheart



  7/10/2016

Copying the New Toy Smell agent would also work.
Having it fire every 3 minutes seems OK, at least based on critter repopulation in my worlds.

 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/10/2016

The new toy smell agent only fires once, though, like the butterfly Norn agent, doesn't it?

EDIT: CAOS Tool says I have four syntax errors in this... anyone mind helping me out here? I'm confused. x.x

** injection script
inst
enum 1 1 36100
kill targ
next
new: simp 1 1 36100 "blank" 1 0 0
cacl 2 13 0 19
cacl 2 15 0 19
tick 500
mvsf game "CreatorX" game "CreatorY"
slow

** timer script
scrp 1 1 36100 9
enum 2 13 0
emit 19 0.6
next
enum 2 15 0
emit 19 0.6
endm

**remove script
rscr
enum 1 1 36100
kill targ
next
scrx 1 1 36100 9
enum 2 13 0
emit 19 0
next
enum 2 15 0
emit 19 0
next


Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  7/10/2016

In the CAOS tool, go to View, then check the 'error output window' box. a screen will pop up called 'error output'. Then use the Reformat tool (push Ctrl and R keys) and more detail will appear in the error output window.

It looks like you've forgotten to close your enum for the critters with a next - try that and then reformat again and see how it goes.


My TCR Norns
 
Wingheart

Wingheart



  7/11/2016

The New Toy Smell agent actually does fire on a timer to avoid the problem the Butterfly Norn agent had.
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/11/2016

Aha! That must have been it. It allowed me to inject the script this time. Thank you! Now to figure out how to tell if it worked or not. XD

Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Papriko
Peppery One

Papriko



  7/11/2016

Honestly? I would push the cacl lines somewhere else, e.g. right after the inst or between the killing loop and the new: simp.
It is not technically wrong there, but cacl is a global command. You are kinda doing things all over the place as it is right now. "Make an agent, oh, let's do these global settings, uhm, back to the agent..."
You should try to keep your scripts a little tidy and do one thing at a time unless you have to mix things up. Makes em way easier to write. And read. You can also add comments where ever you like, not only at the very beginning. That way you can point out every single step to future-you.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/11/2016

That sort of thing is totally beyond me right now. I'm just barely getting to begin to see it as meaningful information and not a bunch of gibberish. XD With that said, I very much appreciate that kind of feedback and please don't hesitate to give it to me! I have no idea what "tidiness" means in context of coding yet - I didn't realize I was doing anything out of order. I will do my best to be neater, but I'm operating in near-total ignorance right now, so any and all critique is very welcome!

Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  7/11/2016

I figured out that the 'next' was the mistake by doing what I described to you with the CAOS tool's error output window - it can be really helpful in finding typos or grammar errors. Also, I agree with Papriko - comments are your friends. :)

My TCR Norns
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/12/2016

I have made the suggested neatness adjustment. :) Thanks so much, guys. The agent seems to be working and I am very pleased. I'm about to experiment with removing the 'chase' and 'get' hunting instincts they have - if they can smell their way to food they may not need them anymore.

Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  7/12/2016

The other thing is that 'tick 500' corresponds to around 25 seconds - is this deliberate? I seem to remember ENUM is meant to be reasonably intensive, the moreso the more you have to count.

My TCR Norns
 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/12/2016

Oops! No, it's not. It's a typo. It originally said 2500, but apparently I deleted the 2 by mistake at some point.

Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  7/12/2016

2500 = ~every 2 minutes. :) That seems much more workable.

My TCR Norns
 
Papriko
Peppery One

Papriko



  7/12/2016

Can you actually have 2 things associated with a smell at once using cacl? Or do they override each other?

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Zaf

Zaf



  7/12/2016

Doesn't the creatures genetics need to be modified in order to react on the smells or is that already in them? I believe they use smell to figure out where to lay their eggs, but there's a difference between a metaroom and insect smell.
 
evolnemesis
Code Monkey

evolnemesis



  7/12/2016

@Zaf

Game cheats a bit there... Smell navigation is somewhat automated by the game engine. All the creature needs to do is think of an item it wants to approach, and if it is not in visible range, the engine sees if the creature can smell a CA that corresponds to that item, then gives the creature suggestions to walk towards it, makes it feel low down, high up, trapped, as necessary, until it reaches the closest peak of that smell. So, as long as a type of item is associated with a smell, and the item is emitting that smell, all creatures with a working smell lobe and navigational instincts will be able to navigate to it by smell.

@papriko

Not sure, there is no 'remove association' command, so I tend to think a smell can only be associated with one agent type and overwrites, but if it does work on both, they'd confuse bugs with critters navigationally, which could mess them up if they are thinking 'approach bug' and a critter is closer... they'd stop at the critter and not see the bug they expect.

Might not be too bad, considering they are looking for both for the same reason (hungry), and once navigation ends they should just grab whichever is nearby because it will be visible right next to them. Even if it's not exactly what they were looking for, it should still get their attention if they're hungry and they have instincts to eat both.


"For small creatures such as we, the vastness is bearable only through love."
"We are a way for the cosmos to know itself." - Carl Sagan

 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/12/2016

They don't seem to be experiencing any confusion, oddly enough. It does seem to be working on both. I recall someone mentioning that Marine Terrarium fish normally give off protein scent, which implies that multiple types of thing can have the same scent, but I don't know if that's actually true or not. And I did give them a gene to facilitate their response to the scent, but technically it isn't needed, anymore than normal genomes need specific genes telling them to approach normal food scents when hungry. It's sort of built into the brain to approach the smell of food when you're hungry. With these guys though the food they're told to seek didn't have a unique smell. Now that it does they're much more efficient at finding food purposefully. I can probably retire my older solution, the 'chase' and 'get' instincts.

One thing I like is they're much better at finding flying or swimming food that's way above their heads or too far below their feet. In the past they'd tend to sort of pace above or below such things if there was nothing else edible nearby and they were hungry - as if they knew food was nearby but weren't sure where it was. Now they seem much better at rising up high and grabbing stuff.

EDIT: I just remembered that when I was looking at .cos files to work on the agent I noticed that CA 9 is associated with both 'flower' and 'plant' type items. So I guess it does work?

EDIT II: It occurs to me that they may not be confused because even though bugs and critters are different classifiers they both still trigger the 'ate an animal' stimulus. Thus they might learn over time to view them as essentially the same thing even though they recognize that they are technically different? Or maybe the code is just willing/able to process them as pretty much the same? Dunno.


Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 
evolnemesis
Code Monkey

evolnemesis



  7/12/2016

Now that I think about it, It's probably pretty unlikely they'd think 'approach bug' when a critter is closer or vice versa... Probably makes it pretty much a non-issue...

"For small creatures such as we, the vastness is bearable only through love."
"We are a way for the cosmos to know itself." - Carl Sagan

 
Papriko
Peppery One

Papriko



  7/12/2016  1

It is one thing to add a smell to an item, a whole different if the association stands or not.
If you want, you can make a toy emit grendel stench (via EMIT obviously). Creatures seeking grendels (for whatever reason) would probably navigate to said toy , but they would not be able to make the connection between the smell and the toy (due to the lack of the CACL). They would just stupidly sit there, stare into the distance and wonder where that non-existent grendel might be.

Presumably, the fish work in a similar way:
When hungry for protein, go and search out whatever smells like protein.
Oops, we ended up in a fish tank. Too bad.
We are still hungry though.
Well, since we are here already, we can as well try to munch on whatever we can grab.
Oh look, fish is edible, who had expected that? Learned something new.
And all this despite protein being linked to fruit, not critter.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Zaf

Zaf



  7/12/2016

evolnemesis wrote:
@Zaf

Game cheats a bit there... Smell navigation is somewhat automated by the game engine. All the creature needs to do is think of an item it wants to approach, and if it is not in visible range, the engine sees if the creature can smell a CA that corresponds to that item, then gives the creature suggestions to walk towards it, makes it feel low down, high up, trapped, as necessary, until it reaches the closest peak of that smell. So, as long as a type of item is associated with a smell, and the item is emitting that smell, all creatures with a working smell lobe and navigational instincts will be able to navigate to it by smell.


Well at least you don't have to start *re-program* the creatures genetics for the smell to work.

 
Lurhstaap

Lurhstaap


 visit Lurhstaap's website: Addicted To CAOS
  7/12/2016

I should note that I also edited a relevant .cos file to include the cacl commands. So the brain association ought to be working. It certainly seems to be (though they've always been fairly good at feeding themselves so I'd have to do a formal study to tell if I'm imagining things or not. XD)

Conclude with killer catchphrase.
(Lurhstaap)
"This is not knowledge -
this is information!"
New Model Army, "Courage"

 


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