Holy cow! I am running into co-save issues using OBSE 18 and Pluggy 125. The co-save is 33MB! I disabled the mod and saved and the co-save went to 456 bytes. Now, the person to blame is me as I am developing the mod, but I am hoping to determine why it is so big. It seems to be related to data I pull from a file and somehow it is not releasing arrays or something. I use arrays to store the data I pull from the pluggy file. It is supposed to overwrite what was there when the game loads, but it is not. It is referencing something and bloating the obse file.
Couple of questions:
1. Will updating Pluggy fix this?
Quite surely not. It is most likely some temporary strings in your scripts that never get released.
2. What do I need to do to make sure the arrays are getting de-referenced and deleted?
Learn their ways
Wrye Bash has a command named something like ".obse statistics" which you can call by right-clicking on a save. It will open up a popup with all data in the .obse co-save file. To weed out bloat in my mod, I opened such a co-save, pasted it into a text editor. Then did something I suspected increased bloat, saved, opened the co-save for the new save, and compared the two. Not a simple job, but it helped me.
3. Is there a better way to read an INI style file than by using Pluggy? (Maybe I will dump Pluggy and use esp files. I like Pluggy as it is easily user extendable for settings.)
For lots of strings, not as far as I know. But for settings, OBSE's RunBatchScript is the simplest and best.
4. If I dereference an array that contains arrays will it delete the sub arrays?
Yes
5. Is this a Pluggy issue with not deleting something?
In my use of Pluggy strings, I only use the temporary strings (with numbers as IDs) to avoid any such issue, so I don't know how much problem it can be.
Info:
Converting pluggy strings to OBSE strings via abusing an item by setting its name to the pluggy string then reading back using OBSE function.
Upgrade Pluggy and use the ToOBSE function instead.
Relying on OBSE to detect deference of arrays for deletion. May be using arrays in arrays too. In fact, I am sure I am. Explicit de-reference of arrays?
The only place I found it necessary to explicit de-reference OBSE arrays, was if an array (t_ar) already pointed to something before being used on the left side in a
ForEach t_ar <- m_ar. Strings defined in user functions MUST be explicitely de-referenced before the function script returns though, which was the major cause of bloat in my mod.