Okay so the quest in question has several empty aliases, marked as optional, and one filled alias, for the player filled with PlayerRef. The quest has a script with OnInit() event which calls a function that checks if another mod is installed and depending on whether it is there or not, uses forcerefto to fill one of the empty aliases. The player alias, also has a script attached which calls this function using the event OnPlayerLoadGame(), in case a user removes the other mod later on. When starting a new game, everything works fine. The player alias is filled as it should be, and the one other aliases is filled as well. Saving and loading the game, either in the same instance or with closing the game, causes all aliases to be set to none. My MCM quest for the mod, which also has a player alias, does not have the same problem. Edit: The function being called through the OnInit() and supposedly through OnPlayerLoadGame().
Event OnInit()
ModCheck()
EndEvent
Function ModCheck()
int modIndex = Game.GetModByName("Cutting Room Floor.esp")
if modIndex == 255
SC_KarindaMarker.Enable()
KarindaHorse.ForceRefTo(SC_KarindaHorse)
miscutil.PrintConsole("Cutting Room Floor not installed.")
else
Actor CRFKarindaHorse = Game.GetFormFromFile(0x0001FBCF, "Cutting Room Floor.esp") as Actor
KarindaHorse.ForceRefTo(CRFKarindaHorse)
miscutil.PrintConsole("Cutting Room Floor installed.")
if KarindaHorse.GetReference() == None
miscutil.PrintConsole("Error: Whiterun Horse Alias not filled.")
else
string horseName = (KarindaHorse.GetReference() as Actor).GetBaseObject().GetName()
miscutil.PrintConsole("Whiterun Horse Alias filled with "+horseName+".")
endif
endif
EndFunction