Jump to content

Quest Reference Aliases Clearing On Game Load


Recommended Posts

I'm having a unique issue with one of the quests that I've created. The quest centers around its reference aliases, from which I have NPCs assume a new 'identity' with new AI packages. Everything works great until I save game and reload. The reference alias is cleared and the NPC is left in an un-interactable state since I cleared the other aliases it was using.

Strangely, I do not experience this issue on the other 3 quests I have written so far. I'm still investigating the differences between the quests, but I'm wondering if anyone else has run into this issue. And if so, why is it happening and how should I fix it?

Further context: The NPCs of interest are any of the potential followers, specifically once they have been recruited as Blades. I'm getting the actor value from the reference alias of the Blades recruitment quest, then using ForceRefTo to force the alias below to reference the follower actor of interest. Once this is done, I clear the Blade ref alias so that the Blades AI package does not conflict with the AI package of the reference alias below.

creation-kit-quest-reference-aliases-clearing-on-game-load-v0-58a7xwtu0imd1.webp

Edited by Garuda002
Link to comment
Share on other sites

So far as I know, aliases don't clear by themselves.  Some script must be clearing them.  Seeing as you say this is your own new quest, there is little chance that any existing scripts can find your aliases to clear them.  I think you must somehow be clearing the aliases yourself.

The only things that clear aliases are ReferenceAlias.clear, Quest.stop and failing to fill the alias in the first place.

I think you should review your scripts, looking for logic errors that lead to ReferenceAlias.clear being called out of turn.  Start with the ReferenceAlias scripts attached to your aliases (like the suspiciously named BO_PotDismissSpyScript), then any script that references your new quest.  And investigate also whether you somehow stop the quest, or fail to start it.

In the end, it's likely a small detail.

Link to comment
Share on other sites

On 9/3/2024 at 4:31 AM, xkkmEl said:

So far as I know, aliases don't clear by themselves.  Some script must be clearing them.  Seeing as you say this is your own new quest, there is little chance that any existing scripts can find your aliases to clear them.  I think you must somehow be clearing the aliases yourself.

The only things that clear aliases are ReferenceAlias.clear, Quest.stop and failing to fill the alias in the first place.

I think you should review your scripts, looking for logic errors that lead to ReferenceAlias.clear being called out of turn.  Start with the ReferenceAlias scripts attached to your aliases (like the suspiciously named BO_PotDismissSpyScript), then any script that references your new quest.  And investigate also whether you somehow stop the quest, or fail to start it.

In the end, it's likely a small detail.

So I started with BO_PotDismissSpyScript, it doesn't actually dismiss the spy it just does a ForceRefTo for another alias, of which I use to clear the alias from the pic. Either way I commented out the code and still no dice. Next I'll try commenting out the only clear call for that alias in the whole quest. I'll report back.

Link to comment
Share on other sites

For anyone that may stumble across this looking for answers to the same issue, I ended up recreating the quest from scratch and that new quest simply doesn't have the same issue (at least not yet). I don't know if this was an issue originating from when I first configured the original quest resulting in it being in some weird state under the hood, or if it was because I missed adding a script in my last mod release, or if it actually was my scripting logic and I just haven't experienced it yet because I haven't finished recreating the quest.

Either way, I think the lesson I learned is to always test saving and loading game after your reference aliases have filled to make sure that the quest is holding the data. And I guess if it's not and you can't find a fix by configuring your quest, the aliases, or reworking your scripting logic, you've at least caught it early and can recreate the quest and hopefully it works the second time.

I'm about to drop an update to my mod, so I'll post a follow-up response stating if the quest got broken again after release. If so, I must be doing something seriously wrong.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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