Mod:Save Game Offset List
< Mod: Battlespire File Formats(Redirected from Battlespire:Save Game Offset List)An editor has requested for this article to be peer reviewed to receive a broader perspective on how it may be improved. Please make any edits as you see fit to help improve the quality of this article. |
This following article contains offset lists for the character data in SAVETREE.DAT and explanations of the format of this file.
Overall File FormatEdit
It took me a while to figure out the overall format since the structure I first assumed was wrong, leading me down the wrong track. The way I currently understand it makes more sense and describes the entire file from beginning to end. The SAVETREE.DAT file is made of a number of blocks in the following format.
- Begin Block
- [4 bytes] = Block Type
- [Integer] = Block Size from current position, in bytes
- [ Block Information] = Depends on Block Type
- End Block
This structure is repeated until a block of size 0 is encountered. Following this is 81 bytes at the end of the file which has not been identified yet. The total size of each block is the Block Size read + 4 (due to the block type). The following is a list of the various block types found in a number of files (bytes appear as they found in file, in hexadecimal). As it turns out the size of the block actually determines the main type, with the block type bytes specifying some other data (such as sub-type). The sizes of the blocks along with their possible types are listed below. Block size is does not include the 4 bytes of block type.
Size | Possible Description | |
---|---|---|
3Eh | (62) | ? |
ACh | (172) | ? |
B4h | (180) | Spell |
330h | (816) | Item |
354h | (852) | Monster/Character Data |
4F2h | (1266) | Contains mostly a bunch of 01's, Only one/file? |
The block type bytes may be different for various block sizes.
Block Type | Possible Description | |||
---|---|---|---|---|
00 | 00 | 00 | 00 | |
00 | 00 | 00 | 08 | |
00 | 00 | 00 | 14 | |
00 | 00 | 00 | 20 | |
00 | 00 | 00 | 30 | |
00 | 00 | 00 | 31 | |
00 | 00 | 00 | 32 | |
00 | 00 | 00 | 4D | |
00 | 00 | 00 | 84 | |
00 | 00 | 00 | 89 | |
00 | 00 | 00 | 96 | |
00 | 00 | 00 | FE | |
00 | 00 | 00 | FF | |
00 | 01 | 00 | 00 | Occurs only for first field in file |
68 | 01 | 3F | 96 |
There is currently nothing known about these bytes, save the one for character data.
Character Data OffsetsEdit
What follows is a list of offsets for the character data. It also works partially for mobs but not perfectly, indicating some difference between the two. These came from a variety of sources. Initially someone (Ken, jerry_fletcher@hotmail.com) emailed me some Battlespire modules for UGE, some sort of universal game editor. This gave me the basis for most of the attribute and skill offsets, but didn't describe the format very accurately. From hacking the game by creating classes with various attributes and looking at the savegame I was able to determine the other offsets in time.
The 'Normal' attribute and skills are the values when no spell or item modifies are in place. For example a characters natural Stealth is 45%. He/she puts on a pair of boots which modifies Stealth by +10%. Now their stealth is at 55% while their normal stealth value remains at 45%.
The 'Count' attribute is related to skill advancement. For instance, each time the character jumps this count is incremented. When it reaches a certain level the jumping skill increases and the count is reset.
The 'Offset' is the distance from the start of the character field, including the 4 bytes of block type characters.
The 'Field Size/Type' gives the size of the field. Long Integers are defined as 4 bytes while Integers are 2.
Offset | Field Name | Field Size/Type | Offset | Field Name | Field Size/Type | |
---|---|---|---|---|---|---|
69 | Name | 32 Characters? | 431 | Normal Critical Strike | Long Integer | |
101 | Strength | Long Integer | 447 | Class Name | 22 Characters | |
105 | Intelligence | Long Integer | 471 | Resistance | Character | |
109 | Willpower | Long Integer | 00001=Magic | |||
113 | Agility | Long Integer | 00010=Frost | |||
117 | Endurance | Long Integer | 00100=Fire | |||
121 | Personality | Long Integer | 01000=Shock | |||
125 | Speed | Long Integer | 10000=Poison | |||
129 | Luck | Long Integer | 484 | Immunity | Character | |
133 | Normal Strength | Long Integer | 00001=Magic | |||
137 | Normal Intelligence | Long Integer | 00010=Frost | |||
141 | Normal Willpower | Long Integer | 00100=Fire | |||
145 | Normal Agility | Long Integer | 01000=Shock | |||
149 | Normal Endurance | Long Integer | 10000=Poison | |||
153 | Normal Personality | Long Integer | 473 | Acute Hearing | Character | |
157 | Normal Speed | Long Integer | 00=No | |||
161 | Normal Luck | Long Integer | 01=Yes | |||
165 | Current SP | Integer | 474 | Spell Absorption | Character | |
167 | Max SP | Integer | 00=No | |||
169 | Normal Max SP | Integer | 01=Yes | |||
171 | Current Wounds | Long Integer | 475 | Rapid Healing | Character | |
175 | Max Wounds | Long Integer | 00=No | |||
179 | Normal Max Wounds | Long Integer | 01=Yes | |||
183 | ???Medical | Long Integer | 476 | Regenerate Health | Character | |
187 | ???Medical Count | Long Integer | 00=No | |||
191 | Normal ???Medical | Long Integer | 01=Yes | |||
195 | Jumping | Long Integer | 477 | Regenerate SP | Character | |
199 | Jumping Count | Long Integer | 00=No | |||
203 | Normal Jumping | Long Integer | 01=Yes | |||
207 | ???Lockpicking | Long Integer | 478 | Atheleticism | Character | |
211 | ???Lockpicking Count | Long Integer | 00=No | |||
215 | Normal ???Lockpicking | Long Integer | 01=Yes | |||
219 | Stealth | Long Integer | 480 | Spell Point Mult | Character | |
223 | Stealth Count | Long Integer | 483 | Adrenaline Rush | Character | |
227 | Normal Stealth | Long Integer | 00=No | |||
231 | Swimming | Long Integer | 01=Yes | |||
235 | Swimming Count | Long Integer | 484 | Low Tolerance | Character | |
239 | Normal Swimming | Long Integer | 00001=Magic | |||
243 | Backstabbing | Long Integer | 00010=Frost | |||
247 | Backstabbing Count | Long Integer | 00100=Fire | |||
251 | Normal Backstabbing | Long Integer | 01000=Shock | |||
255 | Dodging | Long Integer | 10000=Poison | |||
259 | Dodging Count | Long Integer | 485 | Critical Weakness | Character | |
263 | Normal Dodging | Long Integer | 00001=Magic | |||
267 | ???Running | Long Integer | 00010=Frost | |||
271 | ???Running Count | Long Integer | 00100=Fire | |||
275 | Normal ???Running | Long Integer | 01000=Shock | |||
279 | Destruction | Long Integer | 10000=Poison | |||
283 | Destruction Count | Long Integer | 486 | Regenerate Spell Points | Character | |
287 | Normal Destruction | Long Integer | 00=Yes | |||
291 | Restoration | Long Integer | 01=No | |||
295 | Restoration Count | Long Integer | 487 | Forbidden Weapon | Character | |
299 | Normal Restoration | Long Integer | 00001=Short | |||
303 | Illusion | Long Integer | 00010=Long | |||
307 | Illusion Count | Long Integer | 00100=Blunt | |||
311 | Normal Illusion | Long Integer | 01000=Axe | |||
315 | Alteration | Long Integer | 10000=Missile | |||
319 | Alteration Count | Long Integer | 488 | Forbidden Armor | Character | |
323 | Normal Alteration | Long Integer | 03=Heavy | |||
327 | Thaumaturgy | Long Integer | 02=Medium | |||
331 | Thaumaturgy Count | Long Integer | 01=Light | |||
335 | Normal Thaumaturgy | Long Integer | 490 | Forbidden Material | Character | |
339 | Mysticism | Long Integer | 09=Daedric | |||
343 | Mysticism Count | Long Integer | 08=Orcish | |||
347 | Normal Mysticism | Long Integer | etc.... | |||
351 | Short Blade | Long Integer | 503 | Class Name (again)? | 22 Characters | |
355 | Short Blade Count | Long Integer | 536 | Spell Point Mult | Character | |
359 | Normal Short Blade | Long Integer | 544 | Forbidden Armor | Character | |
363 | Long Blade | Long Integer | 546 | Forbidden Material | Character | |
367 | Long Blade Count | Long Integer | 619 | Gender | Character | |
371 | Normal Long Blade | Long Integer | 00=Male | |||
375 | Hand-to-Hand | Long Integer | 08=Female | |||
379 | Hand-to-Hand Count | Long Integer | 643 | Hair Picture # | Character | |
383 | Normal Hand-to-Hand | Long Integer | 644 | Mouth Picture # | Character | |
387 | Axe | Long Integer | 645 | Eye Picture # | Character | |
391 | Axe Count | Long Integer | 674 | Race (0-5) | Character | |
395 | Normal Axe | Long Integer | ||||
399 | Blunt Weapon | Long Integer | ||||
403 | Blunt Weapon Count | Long Integer | ||||
407 | Normal Blunt Weapon | Long Integer | ||||
411 | Missile | Long Integer | ||||
415 | Missile Count | Long Integer | ||||
419 | Normal Missile | Long Integer | ||||
423 | Critical Strike | Long Integer | ||||
427 | Critical Strike Count | Long Integer |
There are currently three unknown entries in the skill list. Their estimated values are given although this is not yet confirmed. They are based on the skill offset list found in Daggerfall. The skill order is the same except for the skills not found in Battlespire (like the language skills etc...). The running skill is quite certain, based on the position in the list and the fact that running potions exist in the game. The merchant skill is a best guess but other possibilities for this offset are either streetwise or etiquette. Similarly lock-picking may be replaced by pick-pocketing or mercantile. There is a possibility that a new skill exists at these locations, one not found in Daggerfall. Verification of these skills are still required (e-mail me!).
Item Data OffsetsEdit
The following is the list of known and some unknown variables found in the item block. Thanks to Cory Orndorff (orn9124@kutztown.edu) for sending me some offsets to get me started. Again, the 'Offset' is the distance from the beginning of the block, including the 4 byte block type.
Offset | Description | Size |
---|---|---|
69 | Name | 32 Characters? |
103 | Item ID | 8 |
MCAPE501=cape of type 501 | ||
MSHRT214=shirt of type 214 | ||
112 | Current Usage | 4 |
116 | Max Usage | 4 |
120 | Material / Damage modifier | ??? |
00=Iron | ||
01=Steel | ||
02=Silver | ||
03=Elven | ||
04=Dwarven | ||
05=Mithril | ||
06=Adamantium | ||
07=Ebony | ||
08=Orcish | ||
09=Daedric | ||
122 | Weight (1 bit=0.5 lbs) | 2 |
131 | Number of Items | ??? |
248 | Name continuation | ??? |