trepleen Posted September 24, 2014 Share Posted September 24, 2014 If OnGameLoad() is always executed, why would anyone want to use OnConfigInit?  Actual adjusted values should be stored in your mods quest script, and this mcm menu simply gets and sets values from your mods quest script. Right?  If I have an array that needs to get set one time, that array should only exist in my mods own quest script, in the oninit() event, correct?  Let's say you update your mod and modify the mcm menu. Why even check for versions? Why not simply add the new code to OnVersionUpdate so everything is up to date?  event OnConfigInit() ;why use this event endEvent event OnVersionUpdate(int a_version) ;or even this event endEvent  event OnGameReload() ;when you can simply use this event that always executes and skip checking for versions  ;configure pagesPages = new string[1]Pages[0] = "Page 1"Pages[1] = "Page 2" ;various personalities for katreenakatreenapersonalitylist = new string[1]katreenapersonalitylist[0] = ""katreenapersonalitylist[1] = "Loving"  endevent  If you want persistent values throughout MCM menu versions, shouldn't you just store the important values in your own script from a quest for example? Link to comment
jacques00 Posted September 25, 2014 Share Posted September 25, 2014 If OnGameLoad() is always executed, why would anyone want to use OnConfigInit? Â The OnVersionUpdate seems to be bugged for me, so I had to make a work-around with several safety checks to make sure the mod's script updates correctly. The OnConfigInit is useful for first-time run scripts to initialize values, even if there are other event functions that do the same thing. I haven't used or heard of OnGameLoad() before, so I can't speak on that, but I have used OnPlayerLoadGame(), and that falls under one of my update safety checks since it runs every load game (I would rather use this for version checking than for initializing values). Â I assume that OnConfigInt is usually used in conjunction with other event functions to handle certain situations. I would assume in case someone wanted to implement a version roll-back system that they would use it to avoid overwriting older scripts and recall the values if necessary. Â Regardless, whatever it's used for, it's just an option and that's up to the person doing the scripting to decide what to use for what purpose. I'm horrid at scripting anyway, so I'm not one to judge others on their scripting choices. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.