Jump to content

Working with AI Packages


Archjuly

Recommended Posts

Hi,

 

I am trying to override the behavior of guards to follow the player when he is sneaking.

 

For this I have attempted modifying the ActorBase LvlGuardImperial, by adding a new Package (not a template) to its stack. The Package uses the Follow template and has one condition (isSneaking on the player). Now I have two issues:

 

- First, while testing this in Whiterun only one guard seems to follow me (the one that stays near Belethor's General Goods), the others are still walking around the city when I sneak in front of them. I guess they are still patrolling or something, but my AI Package is at the top of the stack of LvlGuardImperial so I'm not sure I understand why it is not getting executed nor how to do what I want.

 

- Second, the guard that follows me doesn't stop when I get up. I guess the condition for my AI Package to be triggered is evaluated only when looking for something to do, but I can't find how to get out of the Package behavior (like saying if isSneaking is false at some point just stop doing this package).

 

This is my first attempt at modding, so if anyone could provide any explanations it would be greatly appreciated (or if you can point me to some good resource on AI packages that has more detail than the creation kit wiki I would very much like that as well).

 

Thanks,

 

Edit:

 

For my first issue, after some experiments I found out that despite all the guards in Whiterun using the actor base LvlGuardImperial, some of them aren't always using the AI Packages from their actor bases (apparently actors can either use the AI packages from their actor base or define their own AI packages, but cannot mix both). So, while the idle guard that was following me was probably a GuardWhiterunHoldImperialGeneric which uses the packages from its actor base, the others patrolling in Whiterun are GuardWhiterunImperialPatrolDay1 and GuardWhiterunImperialPatrolDay2 which do not use their actor base.

Edited by Archjuly
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...