SKKmods Posted August 24, 2018 Share Posted August 24, 2018 Several months after publishing a mod I wanted to provide unique names for the quest generated NPCs. They had all shared static custom name "Survivor" in a message title attached to the Refalias that geneates them. That quest is stopped, cleared and restarted for each NPC generation. Updated the message title to "<Alias=RescueLocation> Survivor" to give them unique names from a [stores text] location alias. Then looked into text replacement methods to cycle threough the existing static name NPCs in a holding RefCollection to update them to something random (thanks to Pra & Whats Your name) as the original locations must be lost in time. Thing is, I was super surprised when I selected an existing settler and their name had automatically updated to "Gorski Cabin Survivor" when that quest location alias has been cleared and recycled 5 times since. So I changed the Alias name to several other [stores text] enabled location aliases and all the names have persisted across all the quest/actor generations. From this I infer that [stores text] either attaches actor value type data (no not actual AVs) or pointers to the data on persistent refs created by quest aliases even after the quest is stopped and cleared. Not seen this documented before. Link to comment Share on other sites More sharing options...
markyrocks Posted August 24, 2018 Share Posted August 24, 2018 Dont you just love it when a plan comes together. Nice job. So you did have to update the existing npc's that already had the name or it just did it automatically? Link to comment Share on other sites More sharing options...
SKKmods Posted August 24, 2018 Author Share Posted August 24, 2018 All the NPCs that were generated through the quest have automatically updated their display names so no remediation or update process required. So, why not enable [ Stores Text ] for all quest aliases by default, just incase one gets lucky like me as the content is needed in the future ? Because I am sure persisting this info will have some unpublished downside that will bite one on the ass at some point. Link to comment Share on other sites More sharing options...
pra Posted August 24, 2018 Share Posted August 24, 2018 wait, did I get it right? you put alias-based text replacement into the message, set the alias to stores text, and instantly every NPC generated by the quest got the correct location name in their name? the one which was in the location alias at the time when the npc was generated? Link to comment Share on other sites More sharing options...
SKKmods Posted August 24, 2018 Author Share Posted August 24, 2018 @pra your info helped me develop the remediation plan B to inject unique names on the existing NPCs ... except I didn't need it as they automatically updated themselves. I just wanted to say thanks anyway :) Link to comment Share on other sites More sharing options...
markyrocks Posted August 24, 2018 Share Posted August 24, 2018 Well basically you changed the parent of the npc's and it automatically trickled down and changed all the children. Ya that's the way this format is designed to work right? Any values of a parent are supposed to override the children. I'm sure there's an exception. But if like you made those changes and never ran the quest again it probably wouldn't have updated them as long as the script didn't run again. Link to comment Share on other sites More sharing options...
Reneer Posted August 24, 2018 Share Posted August 24, 2018 (edited) Well basically you changed the parent of the npc's and it automatically trickled down and changed all the children. Ya that's the way this format is designed to work right? Any values of a parent are supposed to override the children. I'm sure there's an exception. But if like you made those changes and never ran the quest again it probably wouldn't have updated them as long as the script didn't run again.No, that's not quite what is happening. Think of "<Alias=RescueLocation>" as a pointer to an existing alias within the same quest. What is happening here is that each NPC generated by the quest stores the "<Alias=RescueLocation>" data somewhere local to them outside the quest itself, so that even when the quest is stopped and restarted, generating new NPCs with new names, the old NPCs still have the old "<Alias=RescueLocation>" information attached to them. At least, that is what it seems SKK is discussing here - behavior that wasn't well documented before. Edited August 24, 2018 by Reneer Link to comment Share on other sites More sharing options...
markyrocks Posted August 25, 2018 Share Posted August 25, 2018 Well basically you changed the parent of the npc's and it automatically trickled down and changed all the children. Ya that's the way this format is designed to work right? Any values of a parent are supposed to override the children. I'm sure there's an exception. But if like you made those changes and never ran the quest again it probably wouldn't have updated them as long as the script didn't run again.No, that's not quite what is happening. Think of "<Alias=RescueLocation>" as a pointer to an existing alias within the same quest. What is happening here is that each NPC generated by the quest stores the "<Alias=RescueLocation>" data somewhere local to them outside the quest itself, so that even when the quest is stopped and restarted, generating new NPCs with new names, the old NPCs still have the old "<Alias=RescueLocation>" information attached to them. At least, that is what it seems SKK is discussing here - behavior that wasn't well documented before. o ok i think i got it figured out. It still has to do with a parent.child situation. Its just not something i don't think many people think about. ok so the "name" is attached to a stored list of location refs on a message form. that message form is the parent of all the other instances of that message. so essentially all the other npcs that have a unique id associated with that form expressed like ParentForm.ChildForm.GetReference()when the ParentForm object reference changes it has to trickle down to the child. Im assuming the way the game know that is bc the parent probaby has an ID that it shares with the kids and when the form changed so did the parent ID, the children looked at their ID's and saw they didn't match and it caused everything to refresh. Now if you changed the Stored Data pool nothing would probably happen. If you went from location alias to Tom, BOB and fred the old npcs would keep their original names and the new ones would get the new names. I don't think the quest has to do with any of this if you delete the quest the npcs won't just disappear. If the npcs even had ties to the quest by some kinda quest alias that would be a child trait to the parent actor. Link to comment Share on other sites More sharing options...
Evangela Posted August 25, 2018 Share Posted August 25, 2018 Looks like this is a new discovery, aka, SKK50 you're the first to discover this. Link to comment Share on other sites More sharing options...
Recommended Posts