ThatGuyYeah Posted January 11, 2018 Share Posted January 11, 2018 I am writing scripts for my mod and I know that I will be updating this mod regularly over the next year. My question is about persistence in variables that I will be adding. My concern is that when I update the mod (not changing the name or anything like that, just adding onto the esp so they will just have to replace the esp) that variables/choices that the players made previously, will be wiped out with the next version of the mod. I hope that is not the case and I will do a few experiments as I build the mod (i.e. making a test save and seeing if the changes I make will reset the values), but I have no idea. My major concern is that I have a mechanic which is really just a variable that I initialize as 0, but will either go up or down based on player actions. My concern is if a person updates my mod mid game, that value will be knocked back to 0. I am hoping there is some Persistence that it will remain at its default value. Any feedback would be nice on this. My second concern is Quest Stages. The variable I mentioned is going to be used a lot through the mod and to save on putting a lot of scripting on the dialogues, I wanted to make a quest handler in order to handle the quest. My approach is to build a quest that has a few stages where each stage where the stages will make the value go up or go down and it is repeatable. I am wondering if this will be a valid and correct approach than the other approach is to heavily script each dialogue choice that will affect it. The drawback of this is that once a stage hits the highest stage, it will not register going back down (meaning that if you have a stage of 40 then setting the stage so 20 will still make the value 40), but it will still do the actions of the stage 20. It seems weird to me so I would like feedback on this. Thank you for your time. Link to comment Share on other sites More sharing options...
Evangela Posted January 11, 2018 Share Posted January 11, 2018 Hmm, this may or may not be of help to you but may want to look into this: https://www.nexusmods.com/skyrim/mods/58705 If you want to err on the side of caution with variable persistence. It sounds to me that you aim to make sure values for variables are stored and untouched with subsequent updates. Link to comment Share on other sites More sharing options...
ThatGuyYeah Posted January 11, 2018 Author Share Posted January 11, 2018 That's the pretty much the goal. I am aiming for a relationship mechanic (ala Fallout 4) and a remembrance mechanic (ala Telltale Games) for Serana and I know I will be updating the mod and releasing a new update here and there (as I progress the dialogue expansion in Dragonborn and the Main Game). My fear is that the subsequent updates (when a person is downloading and replacing my mod with the new version MAY reset those variables. I get the suspicion that it might not and I should be fine, but given this is the Creation Kit and Skyrim, I might not be so lucky. I am doing test runs right now to see, but again, I don't know. This is pretty much uncharted territory for me. But considering when Bethesda updates their Update.esm patch, I don't think it would change, Also, thanks for the link, I'm trying to keep the mod as lightweight as possible with other mod requirements (I even toe the line with the Unofficial Patch). I personally don't want to deal with having to use SKSE as a requirement, but if it does fail, I will look into that more. Thank you. Link to comment Share on other sites More sharing options...
simtam Posted January 11, 2018 Share Posted January 11, 2018 (edited) You would have to mark your quest with "allow repeated stages", iirc. But in your case it's simpler to just make a regular script function, not a quest fragment. Variables tend to be persistent with respect to mod updates - but there are a lot of things you can utilize as a variable, so I would double-check this with a test mod update if I were you. Edited January 11, 2018 by simtam Link to comment Share on other sites More sharing options...
FrankFamily Posted January 11, 2018 Share Posted January 11, 2018 So, If I've understood correctly your question is what will happen if the value of some variable on a someone's save now is changed on an update, will the variable take the new value or remain with the one from the save, right? If so, check this: https://www.creationkit.com/index.php?title=Save_File_Notes_(Papyrus), it explains that. Link to comment Share on other sites More sharing options...
Recommended Posts