Animal behaviour

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
voskat
Posts: 10
Joined: Thu May 14, 2020 1:34 pm

Animal behaviour

Post 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!
Gotcha!
Posts: 354
Joined: Thu May 14, 2020 1:34 pm

Re: Animal behaviour

Post 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.
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: Animal behaviour

Post 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.
voskat
Posts: 10
Joined: Thu May 14, 2020 1:34 pm

Re: Animal behaviour

Post by voskat »

Thank you guys!

So it's clear that in Exult, the egg comes before the chicken.
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: Animal behaviour

Post 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.
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
voskat
Posts: 10
Joined: Thu May 14, 2020 1:34 pm

Re: Animal behaviour

Post by voskat »

Thanks, AOG! To be honest, this mostly started with a moral objection to killing rats. Because rats are great. :)
Locked