Jump to content

NPC Follower Bug with Loading game


jamochawoke

Recommended Posts

Ok I have a quest where an NPC is supposed to follow you until you reach a certain stage in the quest.

 

When I get to the part of the quest where the NPC is supposed to follow you I do a result script of the topic dialogue that sets two variables in the Quest Script.

set MyQuestName.Follower to 1
set MyQuestName.FollowMe to 1

 

The Dialogue topics when you speak to the NPC give the results of:

 

"Follow me please."

set MyQuestName.FollowMe to 1

 

"Stay here please."

set MyQuestName.FollowMe to 0

 

Then the NPC has two AI packages on top of all of their other packages that use those two variables to Follow and Wait for the player.

 

The conditions for follow are:

GetQuestVariable MyQuestName.Follower == 1 AND
GetQuestVariable MyQuestName.FollowMe == 1 AND

 

The conditions for wait are:

GetQuestVariable MyQuestName.Follower == 1 AND
GetQuestVariable MyQuestName.FollowMe == 0 AND

 

 

Now when I get to the part where the NPC is supposed to follow me everything works perfectly. Since those two AI packages are on top of the rest of their AI packages they follow and wait flawlessly until the part of the Quest where they are supposed to go home then I set Follower to 0 and do an EvaluatePackage so they don't meet the conditions and go back to their normal schedule. It works great if I run the quest from beginning to end in one go.

 

-------------------------------------------------------------------------------------------------------------------------

 

However, I have noticed a fairly large bug with this.

 

When I save a game, say halfway through the quest, and then quit and then reload the game the NPC wanders off and goes back to their normal schedule. Telling them to follow or wait through dialogue does nothing and they just keep going halfway across the world to get back to their normal schedule.

 

This makes me feel like the Quest variables are resetting every time you load the game and aren't being saved. Since you can toggle "FollowMe" to 1 or 0 through dialogue but "Follower" is set to 1 or 0 through quest stages this seems to support my thoughts.

 

Do quest script variables reset every time you load the game? If so, how do I go about preventing this?

 

I based this NPC and the following part of the quest off of the Dark Brotherhood Murderer and Mage Guild Apprentice that you can get to follow you during those questlines. I double checked but it seems that they do the same thing I did but they do not have the bug mine does. So that leads me to believe that the quest variable for "Follower" is getting reset to 0 every time I load the game. But I could be totally wrong.

 

Honestly, I'm just pretty frustrated and can't wrap my head around what I've done wrong.

Edited by jamochawoke
Link to comment
Share on other sites

I've never had quest variables reset on me when loading a game...

 

Try typing "sqv YourQuest" into the console to show quest variables for your quest. If they are resetting, I don't know what the problem is. You can try using factions and faction ranks as the package conditions instead.

Link to comment
Share on other sites

Yeah the variables were resetting.

 

I spent a few hours doing some research into it and it seems that Autosaves especially don't like to save Quest Script variables because Bethesda wanted faster load times for plugins.... with one exception.

 

If you put your quest script in a seperate .esm file it will always save it. That's why the quests you find in Oblivion.esm don't reset upon loading and that's why the followers there don't reset to their base AI packages when you load a save.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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