Space Crusade Savegame Format

From ModdingWiki
Jump to navigation Jump to search


The *.SAV file in SpaceCrusade contains the saved Chapters data. Chapters can be saved between Missions.

Space Crusade Savegame Format
Format typeSaved game
Save locationsHub location between levels
Elements savedRank, medals, inventory, various stats
Games

Format

There are three separate savegames, one for each Chapter, named BA.SAV, IF.SAV and UM.SAV

Each file holds 10 slots. And is composed by the Header and the slot sections. Positions are fixed. If you mess something up you can always delete the file; the game will always generate a default upon saving for the first time.

Each Chapter's slot is loaded in memory at different locations:

  • BA DS:5491
  • IF DS:557A
  • UM DS:5663

The internal format is the following:

Offset Data type Section name Description
0x00 UINT16LE[2] 2 Bytes Header Incremental number, contains the latest slot number that increments upon each save
0x02 char[1700] Savegame slots There are 10 slots, 170 (0xAA) bytes each


Savegame slot sections

Offset Data type Section name Description
0x00 UINT16LE Savegame slot ID Progressive number
0x02 UINT8[60] Squad info Commander rank, achievements and squad selected equipment
0x40 char[18] Last used Space Marine here is stored the current space marine in use
0x52 char[18] Space Marine Commander Equipment, status, game flags and position on map
0x64 char[18] Space Marine 1 Equipment, status, game flags and position on map
0x76 char[18] Space Marine 2 Equipment, status, game flags and position on map
0x88 char[18] Space Marine 3 Equipment, status, game flags and position on map
0x9A char[18] Space Marine 4 Equipment, status, game flags and position on map

Squad info section

In code this offset is always referred using SI+X pointer.

Offset Data type Default values Description
BA IF UM
0x00 UINT8 01 02 03 Chapter number, automatically changes the Marine's names and starting positions
0x01 UINT8 00 00 00 Commander's rank 01-seargent, 06-supremus
0x02 UINT8 80 80 80 Badges available for trade = 01
0x03 UINT8 00 00 00 Primary mission completed (80 = yes)
0x04 UINT8 00 00 00 Secondary mission completed (80 = yes)
0x05 UINT8 00 00 00 UNKNOWN
0x06 UINT8 00 00 00 Badges owned
0x07 UINT16LE 0000 0000 0000 Accomplished primary missions (FE1F = all)
0x09 UINT16LE 0000 0000 0000 played missions (FE1F = all) (this info is not used)
0x0B UINT8 00 00 00 Last mission kills
0x0C UINT8 80 80 80 UNKNOWN
0x0D UINT8 80 80 80 80 = The squad participated in the mission, 00 = did not.
0x0E UINT8 00 00 00 UNKNOWN
0x0F UINT16LE 0000 0000 0000 Last mission score
0x11 UINT8 00 00 00 UNKNOWN
0x12 UINT16LE A001 8384 A051 UNKNOWN
0x14 UINT8 01 01 01 COMMANDER ORDERS slots available
0x15 UINT8 04 04 04 EQUIPMENT slots avialable
0x16 UINT8 00 00 00 COMMANDER ORDERS slots selected
0x17 BYTE 00 00 00 Fire! order (bitmask with higher bit selected, 80=order selected)
0x18 BYTE 00 00 00 Move it! order
0x19 BYTE 00 00 00 Photon granades
0x1A BYTE 00 00 00 Close assualt order
0x1B BYTE 00 00 00 By sections order
0x1C BYTE 00 00 00 Heavy weapon order
0x1D UINT8 00 00 00 EQUIPMENT slots selected
0x1E BYTE 00 00 00 Targeter 1 (87= targeter on bolt rifle)
0x1F BYTE 00 00 00 Targeter 2 (84= targeter on Assault Cannon)
0x20 BYTE 00 00 00 Blind granades
0x21 BYTE 00 00 00 Bolt pistols
0x22 BYTE 00 00 00 Melta bomb
0x23 BYTE 00 00 00 Bionic arm
0x24 BYTE 00 00 00 Close assault blades
0x25 BYTE 00 00 00 Force field
0x26 BYTE 00 00 00 Bionic eye
0x27 BYTE 00 00 00 Suspensors
0x28 BYTE 00 00 00 Combi-weapon
0x29 BYTE 00 00 00 Bio-scanner
0x2A BYTE 00 00 00 Digital weapons
0x2B BYTE 00 00 00 Medi-kit
0x2C BYTE[4] 00 00 00 IN-GAME squad conditions, higher bit is deselected each turn
0x30 UINT8 00 00 00 Sum of the points collected by killing Gretchins
0x31 UINT8 00 00 00 Sum of the points collected by killing Orcs
0x32 UINT8 00 00 00 Sum of the points collected by killing Genestealer
0x33 UINT8 00 00 00 Sum of the points collected by killing Chaos Marine with heavy weapon
0x34 UINT8 00 00 00 Sum of the points collected by killing Chaos Marine Commander
0x35 UINT8 00 00 00 Sum of the points collected by killing Androids
0x36 UINT8 00 00 00 Sum of the points collected by killing Dreadnought
0x37 UINT8 00 00 00 UNKNOWN
0x38 UINT8 00 00 00 UNKNOWN
0x39 UINT8 00 00 00 UNKNOWN
0x3A UINT8 00 00 00 UNKNOWN
0x3B UINT8 00 00 00 UNKNOWN

Space Marine info section

all six sections have the exact same structure that the game uses to update all the data of the specific space marine during play

Offset Data type Default value Description
0x00 UINT8[2] 0000 X Y position on map grid
0x02 BYTE 00 2D sprite orientation orthogonals and diagonals, possible values 1-8 (1=nord)
0x03 BYTE 00 equipped weapon (see Weapon types)
0x04 BYTE 02 armour class
0x06 BYTE 80 marine present on map (alive)
0x07 BYTE 01 life points (6 for commanders)
0x08 BYTE[3] 00 UNKNOWN
0x0C BYTE 01 Combat action (range or close combat) available (00=performed)
0x0D BYTE 01 Movement action available (00=performed)
0x0E BYTE 04 Maximum steps (6 for commanders o light weapon)
0x0F BYTE 80 Marine is targeted (if higher bit is set, the marine is a CC or Range target, 00=not targeted)
0x10 BYTE 04 UNKNOWN
0x11 BYTE 04 Various order condition (1=fire twice, 07=a rapporto) see Alien Events

Weapon types

Close combat distance is 1, Ranged combat distance is unlimited but must be in line of sight. Marines and aliens block LOS.

Hex value Weapon name Close combat dice Ranged combat dice Description Available for
0x01 Bolter and Power Axe 2 RED 2 WHITE - Commander
0x02 Power Glove and Power Sword 2 RED and 2 WHITE none Close combat only Commander
0x03 Heavy Bolter 2 WHITE 2 RED One target Commander
0x04 Assault Cannon 2 WHITE 2 RED Result can be splitted among multiple targets Space Marine
0x05 Missile Launcher 2 WHITE 2 RED Hits an area of 3x3 Space Marine
0x06 Plasma Gun 2 WHITE 2 RED Shoots only orthogonally or diagonally and hits everything in line Space Marine
0x07 Bolter 1 2 WHITE 2 WHITE One target Space Marine
0x08 Bolter 2 2 WHITE 2 WHITE One target Space Marine
0x09 Bolter 3 2 WHITE 2 WHITE One target Space Marine

Despite the game code restrictions, savegame can be edited to duplicate weapons and assign, for example, a commander only weapon to a marine, or Chapter specific equipment to other Chapter. Even change maximum steps, armour class or life points.