Horses and stables behavior

Post » Sat Aug 22, 2009 4:24 am

Hi. I have a city and it has a stable. I have an area staked out for the horses and I'm in the process of trying to add a horse, however, I'm not sure I understand the AI that horses use at all and my attempts at creating my own AI for the horses has (sort of) failed.

As it is I have a marker in the horse enclosure. There is a wander package that works providing the horse is only a short distance from the marker (about 600), and then there is another package that will make the horse return to the stable if it finds itself some distance away.

First thing: The horse doesn't seem to do much in the way of wandering! It is set to wander slightly less than the distance that it needs to be from the marker, but it doesn't actually do much moving at all.

Second thing: If I jump on the horse and ride it away, it will return to the stable almost as soon as I get off it, and I cant work out how to make it hang about for a bit before setting off.

Can anyone offer some advice about horses, stables and generally getting them to return to the stable when they are abandoned for a while?

Cheers

MVK
User avatar
liz barnes
 
Posts: 3387
Joined: Tue Oct 31, 2006 4:10 am

Post » Fri Aug 21, 2009 7:31 pm

Your horse needs at least two packages. One is a wander package set to wander near current location, with a radius for how far they can wander, but not a specific marker. This will make the horse wait for you when you dismount. If you give this package a specific marker, then when you dismount the horse will always return to its marker to fulfill the terms of that package.

The second package needed is a Travel package with your stable marker set as the location and the condition IsPlayersLastRiddenHorse == 0 this will send your horse back to the stable when the player chooses a new horse.

I believe it's possible to script a horse to return to the stable after X number of game hours abandoned, but I've never done it so not sure how you might implement that.

[EDIT] It should be noted for testing that it sometimes takes a bit of time for a horse to recognize the location has changed so if you hop on, ride him down the road quick and get off he may walk away. That's normal Oblivion horse behavior. Ride him a bit before dismounting to test.
User avatar
Farrah Barry
 
Posts: 3523
Joined: Mon Dec 04, 2006 4:00 pm

Post » Sat Aug 22, 2009 5:13 am

Thanks Darkrder. I'm none too worried about there being a time limit, I just figured that was the way to go. Now that you've explained the way the AI works it makes a lot more sense. many thanks.

MVK
User avatar
cutiecute
 
Posts: 3432
Joined: Wed Sep 27, 2006 9:51 am

Post » Sat Aug 22, 2009 5:54 am

Good luck! If you have anymore questions just come back. :goodjob:
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm


Return to IV - Oblivion