Red Faction N-Gage Savegame Format

From Red Faction Wiki
Revision as of 04:02, 23 September 2024 by Goober (talk | contribs) (→‎File format)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This information was detailed via experimentation by Goober. It is by no means "official" and so I give no guarantee for the correctness of the information you find here. Of course please correct any possible errors or missing information you may find.

Introduction

Red Faction (N-Gage) savegame files are written on creation, and loaded into memory when the game launches. Savegame files must match the below naming scheme, and are loaded in the order detailed below.

save.bin0
save.bin1
save.bin2
save.bin3
save.bin4
save.bin5

File format

The savegame file format is laid out as follows:

Offset Purpose
0x0 Level ID
0x2 Has Control Baton (boolean)
0x3 Has Riot Shield (boolean)
0x4 Has 12mm Pistol (boolean)
0x5 Has Submachine Gun (boolean)
0x6 Has Shotgun (boolean)
0x7 Has Assault Rifle (boolean)
0x8 Has Sniper Rifle (boolean)
0x9 Has Remote Charge (boolean)
0xa Has Grenade (boolean)
0xb Has Rocket Launcher (boolean)
0xc Has Rail Driver (boolean)
0xd Has Heavy Machine Gun (boolean)
0xe Has Fusion Rocket Launcher (boolean)
0x14 Control Baton clip ammo
0x18 Riot Shield clip ammo
0x1c 12mm Pistol clip ammo
0x20 Submachine Gun clip ammo
0x24 Shotgun clip ammo
0x28 Assault Rifle clip ammo
0x2c Sniper Rifle clip ammo
0x30 Remote Charge clip ammo
0x34 Grenade clip ammo
0x38 Rocket Launcher clip ammo
0x3c Rail Driver clip ammo
0x40 Heavy Machine Gun clip ammo
0x44 Fusion Rocket Launcher clip ammo
0x54 Control Baton reserve ammo
0x58 Riot Shield reserve ammo
0x5c 12mm Pistol reserve ammo
0x60 Submachine Gun reserve ammo
0x64 Shotgun reserve ammo
0x68 Assault Rifle reserve ammo
0x6c Sniper Rifle reserve ammo
0x70 Remote Charge reserve ammo
0x74 Grenade reserve ammo
0x78 Rocket Launcher reserve ammo
0x7c Rail Driver reserve ammo
0x80 Heavy Machine Gun reserve ammo
0x84 Fusion Rocket Launcher reserve ammo
0x9a Player health
0x9e Player armor
0x94 Currently selected weapon

Level IDs

Offset 0x0 must contain a level ID in hexadecimal. The game has 28 levels total, the IDs for which are listed below.

ID (Hex) Level Name
00 The Mines
01 The Mines pt.2
02 The Mines pt.3
03 The Barracks
04 The Barracks pt.2
05 Docking Bay
06 Docking Bay pt.2
07 Docking Bay pt.3
08 Crevasse
09 Crevasse pt.2
0a Geothermal Power Plant
0b Power Plant pt.2
0c Power Plant pt.3
0d Corporate HQ
0e Corporate HQ pt.2
0f Corporate HQ pt.3
10 Medical Research
11 Medical Research pt.2
12 Medical Research pt.3
13 Capek's Lair
14 Capek's Lair pt.2
15 The Inner Sanctum
16 The Inner Sanctum pt.2
17 Merc Command Center
18 Command Center pt.2
19 Missile Battery
1a Masako's Lair
1b Masako's Lair pt.2
1c Masako's Lair pt.3

Current Weapon IDs

Offset 0x94 must contain a weapon ID in hexadecimal. The game has 13 weapons total, the IDs for which are listed below.

ID (Hex) Level Name
00 Control Baton
01 Riot Shield
02 12mm Pistol
03 Submachine Gun
04 Shotgun
05 Assault Rifle
06 Sniper Rifle
07 Remote Charge
08 Grenade
09 Rocket Launcher
0a Rail Driver
0b Heavy Machine Gun
0c Fusion Rocket Launcher