OBSE - Cleaning string vars

Post » Wed Sep 28, 2011 9:32 pm

Hey guys,
I've been lazy again have not managed my string variables properly.
I.e.: I've created string_vars over the same variable names without destroying (with sv_Destruct) their previous data.
So, I've started to get this:
Loading strings  WARNING: substantial numbers of string variables exist for the following files (may indicate savegame bloat):    kuerteeSimpleVampirismExpanded.esp (157 strings)


I used to get it in my other mods: Battle Fatigue and Injuries, and Alternative to death and reload.
They're easy to do a clean save on, because their data is non-critical to the player's progress.
However, Simple Vampirism Expanded's effects are too important that restarting it from a clean save is not ideal.
(It does have a facility that checks the length of time the player was a vampire and set its effects from that.
But that facility is more so that players can start playing the mod from their mid-game.
Players who've played the mod from start, wouldn't want random effects from that facility.)

What's the best way to remove unnecessary String_vars from the saved-game?
Note that I've already added a sv_Destruct to my script that removes the string immediately after they are used.
However, I can guess that previous string_vars that shows up in the log are from data that's been disconnected from the variable because I simply created new data over the same variable name.

Does this make sense? If so, help would be appreciated.
Thanks!
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Wed Sep 28, 2011 7:32 pm

Don't know if this would work, but what about deleting the function that created these string variables and creating a new function with the same name? If the string variables are linked to the function they should (hopefully) be deleted too.
User avatar
Baylea Isaacs
 
Posts: 3436
Joined: Mon Dec 25, 2006 11:58 am


Return to IV - Oblivion