Dynamically Allocated IDs

Post » Tue Sep 24, 2013 1:40 am

(I'm reposting a topic I made on the Skyrim nexus forums)

So I've been wracking my brain as to why saves seem to uniformly become unstable (CTDs, unloadable) after hours of play, regardless of mods, graphics settings, etc. People make mentions of "save game bloat," but I've always wondered what this means. Nirnroots and ash piles? I have a very limited knowledge of Skyrim's engine, but thinking about it logically there must be something accumulating over time while the player plays the game that, when it hits critical mass, leads to a "corrupt" save. I was just messing around, and happened to type "help bandit" in the console.

Something piqued my interest. A whole bunch of bandit IDs prefixed with "FF". That struck me as odd, because I have no data file with that index number in my load order. After a little research, I found that these are Dynamically Allocated IDs. The game creates these continuously as you play when it spawns objects into the world.

Could it be related to this this article? (I cannot post the link on these forums. It's an old GameSpy article from 2011 talking about improvements in Skyrim over Oblivion entitled "Skyrim: A Modder's Wishlist".)

9. Bug-fixing!
Though the modders have found a lot of bugs in the original Oblivion code, Bethesda has only fixed one of them. Ian Patterson of the Oblivion Script Extender explains that bug; "We discovered and identified a bug in form ID allocation that would cause the dynamic object ID counter to wrap around from 0xFFFFFFFF to 0 instead of 0xFF000000, causing the game to crash when a dynamic object is allocated in the wrong range." Um... and for the non-programmers? "It's a guaranteed "time bomb" that will eventually crash the game, even unmodded, even on consoles. It was enough to make them notice.

As a little test, I loaded up a save I made a while ago and a recent save and typed in "help bandit" in the console for both of them. I found 274 dynamically allocated bandit IDs in the older save and 302 for IDs in the more recent one. The number of dynamically allocated IDs had increased.

But that wasn't most interesting thing for me. It was that the same bandit, FF00082B (probably the first poor slob I killed in this game save) is in both save files. The game is still keeping track of the first bandit I killed 20~ hours and hundreds of saves ago. In other words, rather than being "dynamic" these IDs seem to be set in stone once they are created.

What I want to ask is... is it possible for the game engine to "run out" of IDs to dynamically allocate to things? Since it never seems to clear them and keeps adding more.

I should add that even after running the popular Skyrim Save Cleaner, with the option checked to get rid of dead NPCs, these 300 FF00xxxx bandit IDs remain. I think, if I may propose, that this is an unexplored angle to the reason behind the almost uniform degradation of stability in Skyrim save files on not only the PC, but Xbox 360 and PS3 versions as well.

User avatar
Ashley Clifft
 
Posts: 3468
Joined: Thu Jul 26, 2007 5:56 am

Post » Tue Sep 24, 2013 9:58 am

Fiven the range of possible IDs from FF000000 to FFFFFFFF, that is a possible 16,777,216 IDs. If you are only around 300, I think you are safe.

User avatar
Anna S
 
Posts: 3408
Joined: Thu Apr 19, 2007 2:13 am


Return to V - Skyrim