*brainstorm copied from another topic*
Hey....I just had a thought...and yes, it was mildly painful
There are functions, both vanilla (limited) and FOSE (I think...) to write things to an external file, such as a .txt file while the game is running, such as the console dump, etc.
*IF* the function(s) are there in FOSE (I'll have to wade through the bazzillion commands heh), WOULD there be a way to export CURRENT gamesettings/globals/etc into a file, triggered, lets say, by the player doing a save, and/or everytime they hit the ESC key to enter the game menu?
If so, this could go a long way toward helping with continuity issues that we've all had issues with. You could theoretically force-save and force-load everything from object/npc positional data to current AI packages on an NPC to the state of a trap (triggered or not)...even door states, heck the list goes on and on.
*IF* this isn't in the vanilla or FOSE commands yet...I think this would be a helluva addition to FOSE. And since there are at least basic functionalities for exporting data already (console dump, etc) I should think customizing a similar command(s) for dumping all kinds of variables, globals, etc. should be doable, yes?
What I'm 'picturing', if you'll bear with me, is each mod that wants to export data would dump that data to a sequential text file with the mods name, so if a mod has an .esm and three .esp files, theoretically, the mod could maintain four separate .txt files, each with data specific to that .esp or .esm.
The data in the file could be force loaded via script whenever the game is loaded from a savegame, and from there could be applied to...well...ANYTHING that might need it.
This could conceivably solve everything from traps breaking to NPC's not being where they should.
Also, a GREAT command I'd like to see, if it isn't in there already: GetExists.
This would return a (1) if the object or NPC or creature in question is physically in the game world....ANYWHERE in the game world. and a (0) if not.
This would go hand in hand with the data export/import functions to solve things like vanishing NPC's.
Example: I have a cavern system with a scripted NPC ghost. The ghost is spawned when the player enters the caverns, and the exit is blocked off behind them. The player has to travel a short distance to encounter the 'ghost'.
*PROBLEM*: If the player saves the game and later reloads it before/during/after meeting the 'ghost'...the npc vanishes, never to be seen again.
By storing the fact that the player is 1) in the caves and 2) has not triggered/has triggered/has talked to/whatever the npc state is, and by running a script that fires everytime the game is loaded up from savegame, even with quickload/save....I can grab or respawn the vanished NPC and plop him back where he belongs, and set his current state to what it should be.