Page 1 of 1
Animal behaviour
Posted: Tue Feb 22, 2022 5:39 am
by voskat
Hi, I'm actually a programmer but not extremely comfortable (yet) with C++ and Usecode.
Where am I supposed to look if I'd want to change the behaviours of animals in the game? What if I'd want giant rats to not automatically go for the kill, but act more like rabbits or other peaceful rodents?
Thanks in advance for any pointers!
Re: Animal behaviour
Posted: Tue Feb 22, 2022 7:34 am
by Gotcha!
I hazard a guess that it depends on the Schedule and mainly the Alignment linked to the creature-spawning egg.
If the Alignment is Evil/Chaotic, then the Avatar will take a whack at it. If the Schedule is also Combat, then the creature will take a whack at you as soon as it sees you.
Hence you sometimes come across birds and rabbits that attack you, because for some weird reason the devs decided to put these critters into Combat mode while also making them Chaotic/Evil.
So you'd basically have to go through all the eggs in the games to set these particular eggs to spawn friendly critters.
Re: Animal behaviour
Posted: Tue Feb 22, 2022 9:09 pm
by Donfrow
Gotcha is correct with the schedules and alignment with how they work from a monster/egg.
If you're doing it from a usecode perspective the same logic is used but you would trigger the switch to combat and an evil alignment in a conversation block or other triggering condition, such as a usecode egg, to start the attack. The monster/NPC that has been updated will then be "evil" and attack you and you can attack it without worry of guards, etc. You can do the opposite and have a triggering condition move the NPC/monster out of combat/evil alignment if needed as well.
Using your rats as an example, you could spawn some of them in a peaceful mode that wanders the streets but have a usecode egg in a certain location (ie, rats nest, etc) trigger logic to spawn hostile rats.
Re: Animal behaviour
Posted: Sat Feb 26, 2022 11:51 pm
by voskat
Thank you guys!
So it's clear that in Exult, the egg comes before the chicken.
Re: Animal behaviour
Posted: Sun Feb 27, 2022 3:40 pm
by agentorangeguy
If you want a situation where said animal only attacks if you come near, you could set it on "Patrol" as either evil or chaotic, and have path eggs that are set to "Combat Near". Path eggs are a bit tricky, somewhere on these forums you might be able to find a list of what each quality does. That way if the Avatar or party go near the monster when its patrolling it will attack. Alternatively, if you have something set to Patrol and they don't have path eggs, after a little bit of a delay they will default into combat mode.
Re: Animal behaviour
Posted: Mon Feb 28, 2022 11:25 pm
by voskat
Thanks, AOG! To be honest, this mostly started with a moral objection to killing rats. Because rats are great.