Oblivion Mod talk:Save File Format/REFR
Deleted Content[edit]
In revamping this page, I've deleted the previous information describing the "Base Object" subrecord, and also deleted some notes about Script data. I'm adding the information here in case other editors can figure out how it fits in to the new article:
Used for objectRefs "owned" by the savegame, i.e. objectRefs with modindex == 0xFF.
Name | Type/Size | Info |
---|---|---|
base | iref | Iref/formid for base object. |
Wrye's Incomplete Tests: Seems to be some header stuff, then a count of number of variables with values, then array of index of variable then value of variable.
Length 10 (no variables): \x01\x00\x12\x0f>\x00\x00\x00\x00\x00 Length 42 (3 vars: 2 shorts, 1 ref) \x01\x00\x12\x0f>\x00\x00\x03\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00$@\x03 \x00\x00\x00\x00\x00\x00\x00\x00\x00>@\x04\x00\x00\xf0\xd9\x01\x00\x00\x00
So, at byte 8 is a count of the number of variables. After that is variable index 1 (4 byte integer), then the value, stored as a double (8 bytes). Then variable index 3, and its value. Then variable index 4 -- but here, the high 4 bits 'f' seem to flag that this is a reference, then the iref as a 4 byte integer. Finally something else (another counter??) wich is zero.
It seems that all numbers (but not refs), despite the script definition (short, long, float) are stored as doubles. Also, the variable index matches the index as defined in the source mod's SLSD/SCVR variable definition.
Variable storage in savegames: Numeric values of zero are not stored. Also, it seems that if the script for whatever reason undefines a variable, then the savegame will discard the values that it previously had saved for that variable.
This last may be important as it seems to allow "scrubbing" changes from scripts. E.g., supose Master A, then mod B, and mod C, both of which add new, conflicting variable lists to the same script from A. Now suppose a savegame running on mod B, where you want to switch to mod C. To do so: 1) Unload B. 2) Load the savegame and resave (this should scrub the scripts variables back to only those defined by master A). 3) Load C. 4) Load updated savegame and play.
I've also deleted most of the inventory information, because it was clearly incorrect (the propertiesNum variable was being mashed together with the actual properties, creating overly-complicated property flags and unidentifiable extra chunks of data). As for why I deleted the above sections:
Base Object is inconsistent with the identified record structure; it essentially separates out just one of the nine variables included in a Created subrecord. My best guess is that the Base Object information was added without making use of textdump save files to identify Bethesda's name for the subrecord or the size of the subrecord. In which case, the new information that I've added is more accurate than the Base Object information.
- However, I've only been able to analyze version 125 save files, so I considered whether the Base Object was a change made in version 126. However, chronology proves that the Base Object subrecord information must have also been based on version 125 save files. Specifically, the Base Object documentation was first added to the page on 13 February 2007. However, the first mention of version 126 save files was two months later, on 10 April 2007. Assuming that version 126 was indeed related to Shivering Isles or patch 1.2, the earliest such save files could have appeared would have been 23 March 2007 (release of patch 1.2) or 27 March 2007 (release of SI).
Script Notes: I haven't taken the time yet to figure out where the information belongs. All of the information on the Script subrecord format is now part of the Oblivion Mod:Save File Format/Properties page, and I think that information basically supercedes several of the details provided here. If I can remember once I've finished revamping these pages, I'll try to come back and re-incorporate any necessary information.