Difference between revisions of "AGI Specifications: Chapter 10 - Savegame Files"

From AGI Wiki
Jump to navigationJump to search
m (Andrew Branscom moved page AGI Specifications: Chapter 10 - Savegame to AGI Specifications: Chapter 10 - Savegame Files without leaving a redirect)
Line 1: Line 1:
 +
[[Adventure Game Interpreter Specifications|Table of Contents]]
 +
 +
<div align="center"><div id="Savegame"></div><div id="s10"></div><br /><span style="font-size: 22pt">Savegame Files</span>
 +
''Written by ''<br />
 +
''(Last updated: 31 August 1997).''</div>
 +
 +
 +
==<br /> <div id="ss10.1"></div><br />10.1 Format of the Savegame File ==
 +
 +
The <code>object</code> file stores two bits of information about the inventory items used in an AGI game. The starting room location and the name of the inventory item. It also has a byte that determines the maximum number of animated objects.
 +
 +
 +
 
Where a numeric value is specified over multiple bytes, it is always ''little-endian'', unless otherwise noted.
 
Where a numeric value is specified over multiple bytes, it is always ''little-endian'', unless otherwise noted.
  
  
=== Header (40 bytes) ===
+
====<br /> Header (40 bytes) ====
 +
 
 
'''0-30''' (31 bytes) Savegame description. This can be up to 30 printable characters, and is padded out with NUL (\0) bytes to a total of 31 bytes.
 
'''0-30''' (31 bytes) Savegame description. This can be up to 30 printable characters, and is padded out with NUL (\0) bytes to a total of 31 bytes.
  
Line 9: Line 23:
 
'''33-39''' (7 bytes) Game ID ("SQ2", "KQ3", "LLLLL", etc.), NUL padded.
 
'''33-39''' (7 bytes) Game ID ("SQ2", "KQ3", "LLLLL", etc.), NUL padded.
  
=== Game state ===
+
====<br /> Game state ====
 +
 
 
'''40-295''' (256 bytes) Variables, 1 variable per byte
 
'''40-295''' (256 bytes) Variables, 1 variable per byte
  

Revision as of 19:26, 7 March 2017

Table of Contents


Savegame Files

Written by

(Last updated: 31 August 1997).




10.1 Format of the Savegame File

The object file stores two bits of information about the inventory items used in an AGI game. The starting room location and the name of the inventory item. It also has a byte that determines the maximum number of animated objects.


Where a numeric value is specified over multiple bytes, it is always little-endian, unless otherwise noted.



Header (40 bytes)

0-30 (31 bytes) Savegame description. This can be up to 30 printable characters, and is padded out with NUL (\0) bytes to a total of 31 bytes.

31-32 (2 bytes) Unknown (0xE1 0x05); maybe a savegame version number?

33-39 (7 bytes) Game ID ("SQ2", "KQ3", "LLLLL", etc.), NUL padded.


Game state

40-295 (256 bytes) Variables, 1 variable per byte

296-327 (32 bytes) Flags, 8 flags per byte

328-331 (4 bytes) Clock ticks since game started. 1 clock tick == 50ms.

...

344-345 (2 bytes) ? 1 => player_control