I figured what I was trying to do was reasonably simple. I have a handful of items that I want to add to the bottom of form lists by a script so that they don't overwrite the original form lists. So, with my NVSE in hand, I made a quest and checked "game start enabled", then attached the following script.
scriptname empammoexpansionenablescriptbegin gamemode ListAddForm AmmoList556mm Ammo556mmEMP ListAddForm AmmoList50MG Ammo50MGEMP ListAddForm AmmoList308 Ammo308EMP ListAddForm AmmoListMissile AmmoEMPMissile ListAddForm AmmoList25mmGrenade Ammo25mmGrenadeEMP ListAddForm AmmoList40mmGrenade Ammo40mmGrenadeEMP ListAddForm AmmoList12Ga Ammo12GaEMPSlug ListAddForm AmmoList20Ga Ammo20GaEMPSlug ShowMessage EMPAmmoEnabled stopquest empammoexpansionenablerend
This script works perfectly... once. That's the problem. When the player exits and reloads the game, all the form lists seem to "reset" to their defaults. So, though it works as intended the first time the quest runs (and, subsequently, works if the quest is started by a console command every time), the changes do not seem to save along with the game save file. Removing the "stopquest" line simply causes the script to go haywire and add endless copies to the form lists. I also would prefer that the script and quest stop running as soon as they've done what they're supposed to, instead of making a pointless background loop. I also tried a "runonce" float variable without stopping the quest, but that had the same problems.
So, what I'm trying to figure out is, A) is it possible to make scripted changes permanent effects to a save file (I also tested this with the setname command, which is also wiped on game exit) and B) if it's not, is it possible to make a script or quest that runs ONCE, every time a save game is loaded?
I have several ideas for mods with high compatibility that could use this if I could figure out this method, such as "Item sorter" mods that rename items with a setname script without changing any of their other attributes. Any help would be greatly appreciated!
