Jump to content

Serana Follower Behavior Mod Not Working


pyrotx

Recommended Posts

I am trying to make a mod that should automatically make any follower npcs, so far just Serana, to relax and sandbox when in a town or any area I specify. My method is to have sandbox ai packages, one for each town, then have trigger boxes around each area that remove her from the CurrentFollowerFaction. I figure if I don't remove her from the current follower faction the ai packages won't start because the follower behavior will just override it. So I made a script and attached it to the trigger box and tested it, but nothing happened. Here is the Script:

 

Actor Property SeranaRef Auto

 

Faction Property CurrentFollowerFaction Auto

 

Faction Property FollowerSafeAreaFaction Auto

 

; SERANA ---------------------------------------------------------------------------------------

 

Event OnTriggerEnter(ObjectReference akActionRef)

 

if akActionRef == Game.GetPlayer()

 

if SeranaRef.IsInFaction(CurrentFollowerFaction)

 

SeranaRef.RemoveFromFaction(CurrentFollowerFaction)

 

SeranaRef.AddToFaction(FollowerSafeAreaFaction)

 

endIf

 

endIf

 

EndEvent

 

 

 

Event OnTriggerLeave(ObjectReference akActionRef)

 

if akActionRef == Game.GetPlayer()

 

if SeranaRef.IsInFaction(FollowerSafeAreaFaction)

 

SeranaRef.RemoveFromFaction(FollowerSafeAreaFaction)

 

SeranaRef.AddToFaction(CurrentFollowerFaction)

 

endIf

 

endIf

 

EndEvent

 

 

The script compiles just fine, but it doesn't do anything. Does anyone know why it wont work or activate, or have any other ideas? I would like to make the followers in Skyrim less drone like sometime soon, it just creeps me out.

Also I have considered just using the dialogue menu like other mods, but that seemed kind of boring. So is there any way to change the programming of the follower ai directly, as in not through the creation kit?

Edited by pyrotx
Link to comment
Share on other sites

You are aware that the CurrentFollowerFaction is added by a Quest Alias that the NPC is in (eg: DialogueFollower quest)
So trying to remove them from the CurrentFollowerFaction will more then likely fail.

You haven't really mentioned how your setting your AI Sandbox Package up.
eg: Adding the Sandbox AI package to the NPC directly in CK or using a Quest Alias with the AI Package stacked on the Alias and then force the NPC into the alias.
But it sounds like your missing some pieces of the puzzle.

You honestly don't need trigger boxes with scripts attached all over the game world to do what your after.

You'll need to start with the basics.
1) Create an empty Game Start Enabled quest with a reasonably high priority, for example 60 or above (DialogueFollower quest has a priority of 50, so your quest needs higher then this).
In the empty quest you will need to add Dialogue so you can tell the follower initially that this is the area you may sandbox in when we are here.
In the empty quest you will also need Empty Aliases so you can force the follower into after telling them that they may sandbox anytime we are here.
On each alias you will need a Sandbox AI Package and each package needs to be linked to a marker and conditions added so the package will only fire when your in that area where the marker is and if they following with you.

2) Create a new empty cell that you can put some markers in.
These are the markers that you link your sandbox ai packages to.
You will be moving a marker from this cell when in game after telling a follower they may sandbox here when you are in this location.

That's the very basic of it.

If your trying to add packages to the NPC base actor in CK then I'd advise against it.
It's way to much effort adding packages to each NPC and also not good editing existing vanilla NPCs as it has a higher potential of breaking the game or being incompatible with other mods.

Another note:
Serana is not a good follower to screw with her AI, you will more then likely break her quests and or AI if you are not very careful or don't know what you're doing.

Edited by sLoPpYdOtBiGhOlE
Link to comment
Share on other sites

Ok thank you, I will try your idea about a movable marker and dialogue options. The only reason I want trigger boxes is to activate the effect without the use of the dialogue menu. But why does Bethesda insist on their sadistic aliasing, I hate it.

 

Also the ai packages are set up so that there is one for each location, or one per town basically. The ai packages have the conditions that the player must be in the area, and that follower have a custom faction, the FollowerSafeAreaFaction. Then I just use preexisting markers without moving them with sandboxMultiLocation. I might try messing with Lydia for now, but serana shouldn't be messed up since the faction changes only happen in recreational areas, not in quests zones.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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