creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Help Forum
old
Logging What Creatures Say?   
Malkin

Malkin
Australia  
Manager


 visit Malkin's website: Malkin's page at CWiki
  5/6/2015

Is there a way to automatically log what my creatures say while the game is running, and save it in an external text file?

My TCR Norns
 
evolnemesis
Code Monkey

evolnemesis



  5/6/2015

I would think it's definitely doable in an agent... there are logging and file saving and file appending functions in CAOS, and there is an event that all agents get when creatures speak around them (this is how the 'speech bubble factory' bootstrap script works... I think the event message number is 169, but you can check in the speech bubble factory .cos file in the bootstrap directory or the CAOS documentation in the appendix where it lists message/script numbers).

You can either modify the speech bubble factory .cos file , or make a new agent that responds to that event (your agent would just need have a script corresponding to event #169...) If you make a new agent, its hearing range is the same as its sight range, so you'd want to set RNGE accordingly in its create script.


"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



  5/6/2015

The CAOS Documentation wrote:
126
Make Speech Bubble
Called when a creature speaks, so scripts can display a speech bubble. Every agent which has this script is called. _P1_ is the text being spoken, _P2_ is the creature who is speaking.


Taken from the Script Numbers table.
We are not going to make speech bubbles, but it is juuuuust what we need. That's probably what evolnemesis was looking for. The entire script could look something like this:
scrp # # # 126
* target the speaking creature
targ _p2_
* timestamp, weekday month/day/year hour:minute:second
sets va00 rtif rtim "%A %x %X"
* space
adds va00 " "
* add the creature's name
adds va00 hist name gtos 0
* a : and a space to seperate name and text
adds va00 ": "
* what was said
adds va00 _p1_

* if file exists append, otherwise create it in main Journal directory
file oope 1 "creature_conversation.txt" 1
* write text to file
outs va00
* close file and finish
file oclo
targ ownr
endm


That script alone together with a dummy agent should record all the speech in the world. You should check the file, though, I *think* after 65.000 and a bit lines files are full.
I have to warn you, though. I am quite confident that it will work, but this script is untested.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
evolnemesis
Code Monkey

evolnemesis



  5/6/2015

Very nice... I did have the number wrong, but yeah, that is the general idea... should be pretty simple to implement.

Really, that message number could come in handy for all kinds of things... Maybe a toy that hops towards the nearest norn that complains of boredom... There are already food vendors that listen for complaints, but a few more couldn't hurt... maybe make one that wheels towards the hungry norn and dispenses food right in front of it (spoiled norn...) Or maybe a pest or beast that reacts negatively to speech near it and stings/attacks the offender. Or plants that grow faster when spoken to...

If you were really ambitious, you could make a kind of furby toy for creatures that 'learns' their speech and talks back, maybe saying random words it has heard... For example, with educated and non-educated norns and grendels around, it would eventually be saying nonsensical sentences with norn and grendel bibble words and names from your world mixed together with some handish, like 'Lavender like ung', or 'em bibble grah'..


"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

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  5/7/2015

Actually, that's kind of what I'm interested in testing - whether creatures who are raised in a DS world where the empathic vendor is listening to them express significantly more than creatures who are raised in a world where the empathic vendor is deafened.

Would it be possible to cut the logging off with a timestamp once the log file approaches the maximum size?


My TCR Norns
 
evolnemesis
Code Monkey

evolnemesis



  5/7/2015  1

Also remember that, unless they have Librarian or CFF 3.0+ speech edits, creatures will also express more when they are crowded, to get rid of even small amounts of anger (of course, they get more crowded from this, causing a feedback loop, and while retreating from each other, they will be looking at each other, so not only will they be expressing more, they will also be forced to answer anything each other say, including the randomly forced opinion expressions any time they interact, which as you know is the whole problem with that instinct and the 'heard creature speak' working together and why I made those changes).

And of course creatures are forced to express by scripts when they have any particularly high drives, but this will be true for all creatures.

I'd suggest for best results, to try and keep the number of creatures in the world relatively stable while running the test (maybe set a limit of like 8-10 alive in the world at once and keep them in that room), so that you don't get misleading results based changes in stress related to a changing number of creatures or their extra use of resources... Otherwise, it will be too hard to keep your test and control environments similar enough to each other to isolate and get really meaningful results about the effect the vendors are having.

I was actually thinking more of an opposite kind of test on my end... Though a bit cruel, to have things violently attack creatures and cause them pain if they speak, bugs that sting them if they talk near them for example, or beasts that attack and injure them, so that quieter norns will live longer and be happier (or at least they will learn to be quieter near the beasts or pests, or maybe they will end up fighting them for their right to free speech)...


"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



  5/7/2015

Btw, it might make more sense to make per-world logs actually, so maybe rather create the file in the Journal folder of the individual worlds:
file oope 0 "creature_conversation.txt" 1


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Sparrow314

Sparrow314



  5/7/2015

This sounds really exciting - please post the results of your testing! :)
 


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