Well it seems fast exit 2 doesnt always work either. Sometimes it messes up even with fast exit 2 installed upon a crash. If there is nowhere accessible where this file backs up its stored array, is there the possiblity of putting an "export" and "import" function into the mod? It just seems that no matter what i do as far as crashes go that there is no foolproof way for this array not to get corrupted or otherwise lost.
Sorry to hear you still have problems. I think the actual problem is that the array functionality of OBSEv18 as used by MMO causes the crash in your game, so that the arrays are already messed up at the moment the crash happens. There's no possibility of exporting the data to a file, and having a second copy array in the same script will quite surely not help.
So I think we'll need to find out why you're having this problem. To me it looks like OBSE completely mis-interpretes the array commands from MMO in your game. I have no idea why, but it looks like the same error as has been reported a few times (for different mods) in the OBSE thread. The only thing I can think of doing, is to make a special version with lots of logging, and let you try that out. What you can do, is to try to disable all mods except MMO and load up a game from right out of the sewer if you have one. Then play around with that and see if the problem's gone.
TheNiceOne, my mod needs to get the values of miscAdjustment and coinValue from GoldAdjustment. However at the moment I get zero for both, presumably because my script looks at the values before yours sets them.
Is there a variable in GA that I can check that guarantees that the values are valid?
EDIT: I guess I can read your ini too. Shouldn't cause any issues with GA, should it?
You can read GA's ini file, but for that to work, you need a quest named "GoldAdjustment" that runs a script which defines the variables "misAdjustment" and "coinValue", and then you can check those variables from your own mod after having read my ini. This is kind of troublesome, so it's indeed better to read them through
RunScriptLine "set myQuest.myVar to GoldAdjustment.miscAdjustment".
But as you have already found out - if you do this early in your own script, you don't know if GA has had time to read its values from the ini file yet. This is a common problem for inter-mod communication.
But what do you need them for? I guess it is to ensure compatibility with "DBs Weighted Gold Plus". If so, is there a possibility that you can use "
RunScriptLine "set GoldAdjustment.disabled to 1" (or a higher number) whenever you add gold to the player instead? This prevents GA from making any adjustment to any received gold for the next 1 second (or more if you set a higher number). This also has the advantage that I will guarantee compatibility for future versions of GA, while the miscAdjustment and coinValue may be changed in the future.
One problem with this mod: if using the Timescale settings in the ini file it messes up the Where Spirits Have Lease quest.
The stage where Mr. Benirus opens the sealed portal only works with a Timescale of 30. I have both a generic script that modifies Timescale and the UOP does it specifically for this quest, but it seems the ini values override any scripted Timescale. It also overrides from the console.
So maybe scripted Timescale would be better? If so the only problem is determining which script has highest priority.
EDIT: Or, if possible, just make an exception for AnvilBenirusManorBasemant "Benirus Manor Basemant" [CELL:000147B1] in the ini and set timescale there to 30.
This is one of the things that version 2.2 is supposed to fix. Can you check if it works correctly now, Petrus?