Saves (GTA 4)

From GTAMods Wiki
Revision as of 18:49, 12 March 2019 by Parik (talk | contribs) (Add text in the NotDefined block to make it clear they don't contain any data.)
Jump to navigation Jump to search

This article deals with the format of a save game file for the PC version of GTA 4.

Location

By default, the game places its save game files into the "%LocalAppData%\Rockstar Games\GTA IV\savegames\user_XXXXXXXXXXXXXXXX\" folder where XXXXXXXXXXXXXXXX is a 16-character string tied to the user's Games for Windows Live account.

The save files themselves are named in the format SGTA4XX where XX represents the in-game slot number. There are 12 slots available in the game (1-12) plus an additional auto-save slot (SGTA400).

Format Details

  • Save file size varies but is typically just under 2 megabytes.
  • Byte order is little endian. For example, the number 3452 (0x0D7C) is represented as as 0x7C 0x0D.
  • A savegame consists of 32 data blocks, two blocks with metadata and a checksum number.

Savegame Metadata

A savegame file starts with this block, which has a constant length of 0x110 bytes.

OFFSET TYPE DESCRIPTION
0x00 dword savegame version number
0x04 dword savegame size in bytes
0x08 dword global variables size (?)
0x0C char[4] "SAVE" string
0x10 wchar_t[128] Name of last mission passed
0x110 end

Notes:

  • Savegame version number value is set under the [SAVEGAME_VERSION_NUMBER] section in the GTA IV/common/data/version.txt file
  • Last mission name is prefixed with either "TLAD - " or "TBoGT - " for Episodes From Liberty City saves

Data Blocks

Each data block consists of the 5 characters BLOCK followed by a variable amount of data; in general, each block has its own unique internal format. Following the BLOCK character is always a dword specifying the size of the block, starting at the beginning of BLOCK characters.

Block 0: SimpleVars

OFFSET TYPE DESCRIPTION
0x00 char[5] a "BLOCK" string
0x04 dword size of block in bytes (always 0xB9)
0x09 dword start of data; see below
SimpleVars
OFFSET TYPE DESCRIPTION
0x00 byte[32] unknown data
0x20 dword length (ms) of in-game minute
0x24 dword weather timer (?)
0x28 dword in-game month
0x2C dword in-game day
0x30 dword in-game hours
0x34 dword in-game minutes
0x38 dword in-game day of week
0x3C byte[116] unknown data
0xB0 end

Block 1: PlayerInfo

This block has a constant length of 0xD4 bytes.

OFFSET TYPE DESCRIPTION
0x0000 uint32 size of block
0x0004 float[3] player coordinates
0x0010 uint32 constant 192 (size of PlayerInfo)
0x0014 PlayerInfo player info
OFFSET TYPE DESCRIPTION
PlayerInfo (192 bytes)
0x0008 uint32 player money
0x0010 uint32 player display money
0x0020 uint8 never tired
0x0021 uint8 fast reload
0x0022 uint8 fire proof
0x0024 uint16 max health
0x0026 uint16 max armour
0x0028 uint8 lose weapons after busted
0x0029 uint8 free health care
0x002a uint8 can drive by
0x002b uint8 can be hassled by gangs
0x0030 uint32 max wanted level
0x0034 uint32 max chaos
0x0040 float[4] player coordinates (x,y,z,w)
0x0050 float health
0x0054 float armour
0x0058 uint32 (current weapon slot?)
0x005c uint32[10] weapon slots
0x0084 uint16[10] weapons ammo
0x00a4 uint32 prop variation
0x00a8 uint8[11] drawable variation
0x00b3 uint8[11] texture variation

Block 2: ExtraContent

OFFSET TYPE DESCRIPTION
0x0000 uint32 block size
0x0004 uint64 flags (bit set for the active episode(s))
0x000C Episode[64] episodes array
OFFSET TYPE DESCRIPTION
Episode (65 bytes)
0x0000 uint8 episode id
0x0001 char[64] episode name

Block 3: Scripts

OFFSET TYPE DESCRIPTION
0x0000 uint32 size of block
0x0004 - start of block (data below)
OFFSET TYPE DESCRIPTION
0x0000 MissionCleanupEntry[456] mission cleanup entries
0x4E60 uint32 global variables size (size)
0x4E64 uint32[size] global variables array
OFFSET TYPE DESCRIPTION
0x0000 uint32 unknown (value used for padding below) ^
0x0004 int32 xlive globals buffer size (n) ^
0x0008 uint8[n] xlive globals buffer
OFFSET TYPE DESCRIPTION
0x0000 uint32 threads count
0x0004 uint8[24][77] thread names
0x073C uint32 threads count
0x0740 Thread[77] threads
OFFSET TYPE DESCRIPTION
? uint32[] padding (sum of the following values)
0x0000 uint32 unknown
0x0004 uint32 last mission pass time
0x0008 Unknown[140] (Unknown is 44 bytes long) unknown array (script store names)
0x17B0 BuildingSwap[25] building swap array
0x18DC InvisibleObject[10] invisible objects array
0x192C uint32 ped queue membership size
0x1930 Unknown[8] (88 bytes each) ped queue membership
0x1BF0 uint32[10] suppressed car models
0x1C18 ConnectedLOD[10] connected lods
0x1C68 Unknown[16] (32 bytes each) unknown (related to TXDs)
0x1E68 Unknown[100] (48 bytes each) unknown (related to textures)
OFFSET TYPE DESCRIPTION
ConnectedLOD (8 bytes)
0x0000 uint32 object 1 pool index
0x0004 uint32 object 2 pool index
OFFSET TYPE DESCRIPTION
Invisibility Settings (8 bytes)
0x0000 uint32 type (0 = none, 2 = building, 3 = object, 4 = dummy object)
0x0004 uint32 index in the respective pool
OFFSET TYPE DESCRIPTION
BuildingSwap (16 bytes)
0x0000 uin32 type (2 if building swap, 0 if empty)
0x0004 uint32 index of building in pool (0 if type is 0)
0x0008 uint32 new model
0x000C uint32 old model
OFFSET TYPE DESCRIPTION
Thread
0x0000 uint8[24] thread name
0x0018 uint32[2] (unknown)
0x0020 uint32 saved death arrest stack off
0x0024 uint8 (unknown)
0x0025 uint8 is script safe for network game
0x0026 uint8 should the script be saved
0x0027 uint8 is a minigame script
0x0028 uint8 can remove blips created by any script
0x0029 uint8 (unknown)
0x002A uint32 (unknown)
0x002E ThreadContext script context
0x0082 uint32 constant zero
0x0086 uint32[] script stack
OFFSET TYPE DESCRIPTION
0x0000 uint32 xlive buffer last index (n)
0x0004 uint8[4 * n + 4]
  • xlive buffer data
  • only if (n) if greater than 0
OFFSET TYPE DESCRIPTION
0x0000 uint32[] unknown array (size is (1 + unknown last index[unknowns]))
OFFSET TYPE DESCRIPTION
ThreadContext (84 bytes)
0x0000 uint32 thread id
0x0004 uint32 script hash
0x0008 uint32 state
0x000C uint32 instruction pointer
0x0010 uint32 number of stack pointers ^
0x0014 uint32[3] timers
0x0024 float wait time
0x0050 uint32 unknown data last index ^
OFFSET TYPE DESCRIPTION
MissionCleanupEntry (44 bytes)
0x0000 byte type
0x0004 uint32 handle
0x0008 uint32 thread id

Types:

  • 1 = vehicle
  • 2 = character
  • 3 = dummy character
  • 4 = object
  • 5 = ptfx
  • 6 = fire
  • 7 = group
  • 8 = ped queue
  • 9 = sequence task
  • 10 = decision maker
  • 11 = checkpoint
  • 12 = texture
  • 13 = txd
  • 14 = streamed txd
  • 15 = cover point
  • 16 = anim
  • 17 = model
  • 18 = blip
  • 18 = blip
  • 19 = onscreen timer
  • 20 = onscreen counter
  • 21 = camera
  • 22 = viewport

Block 4: Garages

Stores garages defined in the game along with their stored vehicles.

The block starts with a 4 byte integer containing the size of it. The below data follows.

OFFSET TYPE DESCRIPTION
0x0000 uint32 garage count
0x0004 uint8 (unknown)
0x0005 uint8 resprays are free
0x0006 uint8 resprays are disabled
0x0007 uint32 (unknown)
0x000B uint32 safehouse garage count
0x000F StoredCar[20] stored cars array
0x05AF Garage[40] garages array
StoredCar (72 bytes)
OFFSET TYPE DESCRIPTION
0x0000 float[3] position (x, y, z)
0x000C uint32 handling flags
0x0010 uint16 model index
0x0032 uint8[4] colors
0x0038 uint32 extras
0x003C uint32 livery
0x0043 uint8[3] rotation (x, y, z)
0x0048 uint16 flags (see below)

flags - Bitfield

  • 0b000000001 = Valid
  • 0b000001000 = Bullet proof
  • 0b000010000 = Fire proof
  • 0b000100000 = Explosion proof
  • 0b001000000 = Collision proof
  • 0b010000000 = Melee proof

Note:

  • There can be leftover stored cars from previous save games in empty slots. Check if the "Valid" flag is set to see if it will be loaded in game.
Garage (72 bytes)
OFFSET TYPE DESCRIPTION
0x0000 uint8 type
0x0001 uint8 open state
0x0002 uint8 door flags
0x0004 float[3] position (x, y, z)
0x0010 float[2] direction a (x, y)
0x0018 float[2] direction b (x, y)
0x0020 float top z
0x0024 float (unknown)
0x0028 float (unknown)
0x002C float left coordinate
0x0030 float right coordinate
0x0034 float front coordinate
0x0038 float back coordinate
0x003C uint32 (unknown)
0x0040 uint32 garage name hash
0x0044 uint8 original type
0x0045 uint8 safehouse garage index (if safehouse)

Block 5: GameLogic

OFFSET TYPE DESCRIPTION
0x0000 uint32 size of block
0x0004 uint8 lose money on being wasted
0x0005 uint8 lose weapons on getting busted
0x0006 uint32 unknown (subtracted from money for $500,000 achievement)

Block 6: PathFind

Block 7: Pickups

This block contains an array of 650 Pickup structures plus 9 bytes of padding. Each Pickup structure is a constant 0x54 bytes.

OFFSET TYPE DESCRIPTION
0x00 char[5] a "BLOCK" string
0x04 dword size of block in bytes (always 0xD55A)
0x09 Pickup[650] Pickups array
0xD551 byte[9] padding
Pickup
OFFSET TYPE DESCRIPTION
0x00 dword unknown
0x04 int32_t index (-1 indicates unused pickup)
0x08 dword unknown
0x0C dword unknown
0x10 dword amount (ammo, etc.)
0x14 dword unknown
0x18 dword unknown
0x1C dword unknown
0x20 dword unknown
0x24 float[3] location (x,y,z)
0x30 dword unknown
0x34 dword unknown
0x34 dword unknown
0x38 float unknown
0x3C dword unknown
0x40 float unknown
0x44 dword unknown
0x48 uint16_t object ID
0x4A uint16_t reference number
0x4C uint8_t pickup type
0x4D uint8_t flags
0x4E word unknown
0x50 dword unknown
0x54 (end)

Block 8: Restart

This block stores where the player respawns on dying or getting busted.

It also stores the coordinates for the safehouse spawns

OFFSET TYPE DESCRIPTION
0x0000 uint32 wasted restart point count
0x0004 RestartPoint[10] wasted restart points array
0x00F4 uint32 busted restart point count
0x00F8 RestartPoint[20] busted restart points array
0x02D8 uint32 safehouse count
0x02DC Safehouse[6] safehouses array
0x0432 uint8 override next restart
0x0433 float[4] overridden restart point coordinates (x, y, z, w)
0x0443 float overriden restart point heading
0x0447 uint8 supress fade in after death arrest
0x0448 RestartPoint extra wasted restart point
0x0460 RestartPoint extra busted restart point
RestartPoint (24 bytes)
OFFSET TYPE DESCRIPTION
0x0000 float[4] coordinates (x, y, z, w)
0x0010 float heading
0x0014 uint32 town (0 = Broker and Dukes, 1 = Algonquin, 2 = Alderney)
Safehouse (57 bytes)
OFFSET TYPE DESCRIPTION
0x0000 float[4] coordintaes (x, y, z, w)
0x0010 float heading
0x0014 char[32] name
0x0034 uint32 town (see above)
0x0038 uint8 enabled

Block 9: Radar

OFFSET TYPE DESCRIPTION
0x0000 uint32 block size
0x0004 uint32[3] unknown
0x0010 uint32 saved blips count
0x0014 Blip[150] blips array
Blip (100 bytes)
OFFSET TYPE DESCRIPTION
0x0000 uint32 blip index
0x0004 bool unknown (always true for saved blips)
0x0005 uint16 flags
0x0007 float[4] position (x, y, z, w)
0x001F char[30] sprite name
0x0043 uint32 priority
0x0047 uint32 type (only type 4, 8 and 5 are saved)
0x004B uint32 display
0x004F float scale
0x0053 uint32 colour id
0x0057 uint8 alpha

Block 10: Zones

OFFSET TYPE DESCRIPTION
0x0000 uint32 block size
0x0004 uint32 zone count
0x0008 Zone[300] zones
0x2EE0 char[100] (unknown) (likely unused)
0x2F44 uint32 (unknown) (likely unused)
Zone (40 bytes)
OFFSET TYPE DESCRIPTION
0x0000 char[8] name
0x0008 char[8] gxt entry (also used for audio)
0x0010 float[6] bounds (x1, y1, z1, x2, y2, z2)
0x0020 uint8 population type (bitfield)
0x0021 uint8 scumminess (bitfield)

Block 11: Gangs

Block 12: CarGenerators

This block stores Car Generators managed by scripts in GTA 4. This includes mission rewards and boats or helicopters disabled before Algonquin and Alderney are unlocked.

OFFSET TYPE DESCRIPTION
0x0000 CarGenerator[25] Car Generators array (see below)
0x044C Unknown[15] Unknown is 16 bytes each
CarGenerator
OFFSET TYPE DESCRIPTION
0x0000 float[3] Position of the Parked Vehicle
0x000C float[2] Rotation (X,Y)
0x0014 float[2] Unknown (has something to do with Z rotation)
0x001C uint16_t Model ID
0x001E uint16_t Pool index (normally always 0)
0x0022 uint8_t Color 1
0x0023 uint8_t Color 2
0x0024 uint8_t Color 3
0x0025 uint8_t Color 4
0x0026 uint8_t[5] Unknown (flags)
0x002B uint8_t Enabled (0 = disabled, 101 = enabled)

Block 13: Stats

This block has a constant length of 0x1724 bytes and stores various statistics; most of which can be viewed the game's Stats menu.

OFFSET TYPE DESCRIPTION
0x00 dword Size of block
0x04 byte[80] unknown stats
0x54 float game_progress (GTA IV main story only. TLAD and TBoGT variables are below.)
0x58 float roman_like
0x5C float roman_respect
0x60 float roman_mission_progress
0x64 float vlad_mission_progress
0x65 float jacob_like
0x6C float jacob_respect
0x70 float jacob_mission_progress
0x74 float faustin_mission_progress
0x78 float manny_mission_progress
0x7C float elizabeta_mission_progress
0x80 float dwayne_like
0x84 float dwayne_respect
0x88 float dwayne_mission_progress
0x8C float brucie_like
0x90 float brucie_respect
0x94 float brucie_mission_progress
0x98 float playboy_mission_progress
0x9C float francis_mission_progress
0xA0 float ulpc_mission_progress
0xA4 float packie_like
0xA8 float packie_respect
0xAC float packie_mission_progress
0xB0 float ray_mission_progress
0xB4 float gerry_mission_progress
0xB8 float derrick_mission_progress
0xBC float bernie_mission_progress
0xC0 float bell_mission_progress
0xC4 float gambetti_mission_progress
0xC8 float jimmy_mission_progress
0xCC float carmen_ortiz_fondness
0xD0 float carmen_trust
0xD4 float alex_chilton_fondness
0xD8 float alex_trust
0xDC float kiki_jenkins_fondness
0xE0 float kiki_trust
0xE4 float michelle_fondness
0xE8 float michelle_trust
0xEC float kate_fondness
0xF0 float kate_trust
0xF4 byte[93] unknown stats
0x268 float tlad_game_progress
0x26C byte[53] unknown stats
0x340 float tbogt_game_progress
0x344 byte[65] unknown stats
0x448 dword missions_passed
0x44C dword missions_failed
0x450 dword missions_attempted
0x454 dword replays_used
0x458 dword people_killed
0x45C dword taxi_fares_completed
0x460 dword times_cheated
0x464 dword days_passed
0x468 dword times_died
0x46C dword people_run_down
0x470 dword vehicles_exploded
0x474 dword flips_done_in_vehicle
0x478 dword most_vehicle_air_spins
0x47C dword air_launches
0x480 dword helicopter_tours_taken
0x484 dword taxis_hailed
0x488 dword stunt_jumps_found
0x48C dword stunt_jumps_completed
0x490 dword kills_since_last_save
0x494 dword fires_started
0x498 dword criminals_killed
0x49C dword cars_stolen
0x4A0 dword bikes_stolen
0x4A4 dword boats_stolen
0x4A8 dword helicopters_stolen
0x4AC dword stars_attained
0x4B0 dword stars_evaded
0x4B4 dword vehicles_exported
0x4B8 dword bridges_flown_under
0x4BC dword paynspray_visits
0x4C0 dword times_got_drunk
0x4C4 dword drug_packages_delivered
0x4C8 dword cars_sold_to_stevie
0x4CC dword random_characters_met
0x4D0 dword bullets_fired
0x4D4 dword bullets_hit
0x4D8 dword kills_by_headshot
0x4DC dword melee_kills
0x4E0 dword armed_kills
0x4E4 dword __stat
0x4E8 dword __stat
0x4EC dword cars_exploded
0x4F0 dword bikes_exploded
0x4F4 dword boats_exploded
0x4F8 dword helicopters_exploded
0x4FC dword tires_popped_by_gunshot
0x500 dword weapons_pickedup
0x504 dword texts_received
0x508 dword calls_made_on_phone
0x50C dword calls_received_on_phone
0x510 dword prostitute_visits
0x514 dword tramps_given_money_to
0x518 dword emails_sent
0x51C dword meals_eaten
0x520 dword hotdogs_eaten
0x524 dword burgers_eaten
0x528 dword nuts_eaten
0x52C dword binoculars_used
0x530 dword player_died_by_melee
0x534 dword player_shot_to_death
0x538 dword player_was_blown_up
0x53C dword player_was_roadkill
0x540 dword scored_with_girl
0x544 dword pool_wins
0x548 dword pool_defeats
0x54C dword pool_clearances_from_break
0x550 dword darts_wins
0x554 dword darts_defeats
0x558 dword darts_180s_hit
0x55C dword darts_bullseyes
0x560 dword darts_shortest_checkout
0x564 dword bowling_high_score
0x568 dword bowling_wins
0x56C dword bowling_draws
0x570 dword bowling_defeats
0x574 dword bowling_spares
0x578 dword bowling_perfects
0x57C dword bowling_strikes
0x580 dword total_races_lost
0x584 dword total_races_won
0x588 dword south_broken_wins
0x58C dword south_broker_races
0x590 dword airport_run_wins
0x594 dword airport_run_races
0x598 dword dukes_blvd_wins
0x59C dword dukes_blvd_races
0x5A0 dword south_algonquin_wins
0x5A4 dword south_algonquin_races
0x5A8 dword star_junction_wins
0x5AC dword star_junction_races
0x5B0 dword road_to_bohan_wins
0x5B4 dword road_to_bohan_races
0x5B8 dword north_alderny_wins
0x5BC dword north_alderny_races
0x5C0 dword elevated_wins
0x5C4 dword elevated_races
0x5C8 dword south_alderny_wins
0x5CC dword south_alderny_races
0x5D0 dword qub3d_high_score
0x5D4 dword boating_destinations
0x5D8 dword heli_ride_destinations
0x5DC dword activities_with_roman
0x5E0 dword activities_with_jacob
0x5E4 dword activities_with_brucie
0x5E8 dword activities_with_dwayne
0x5EC dword activities_with_packie
0x5F0 dword vigilante_levels_done
0x5F4 dword most_wanted_completed
0x5F8 dword pigeons_exterminated
0x5FC dword first_aid_collected
0x600 dword islands_unlocked
0x604 dword total_dates
0x608 dword successful_dates
0x60C dword bad_dates
0x610 dword girls_dumped
0x614 dword emails_received
0x618 dword photos_taken
0x61C dword mocap_cutscenes_skipped
0x620 dword mocap_cutscenes_watched
0x624 dword cutscenes_skipped
0x628 dword cutscenes_watched
0x62C dword sodas_drunk
0x630 dword kills_with_unarmed
0x634 dword kills_with_baseball_bat
0x638 dword kills_with_poolcue
0x63C dword kills_with_knife
0x640 dword kills_with_grenade
0x644 dword kills_with_molotov
0x648 dword kills_with_rocket
0x64C dword kills_with_pistol
0x650 dword kills_with_combat_pistol
0x654 dword kills_with_pump_shotgun
0x658 dword kills_with_combat_shotgun
0x65C dword kills_with_micro_smg
0x660 dword kills_with_smg
0x664 dword kills_with_assault_rifle
0x668 dword kills_with_carbine_rifle
0x66C dword kills_with_combat_sniper
0x670 dword kills_with_sniper_rifle
0x674 dword kills_with_rpg
0x678 dword kills_with_flame_thrower
0x67C dword kills_with_minigun
0x680 dword kills_with_episodic_1
0x684 dword kills_with_episodic_2
0x688 dword kills_with_episodic_3
0x68C dword kills_with_episodic_4
0x690 dword kills_with_episodic_5
0x694 dword kills_with_episodic_6
0x698 dword kills_with_episodic_7
0x69C dword kills_with_episodic_8
0x6A0 dword kills_with_episodic_9
0x6A4 dword kills_with_episodic_10
0x6A8 dword kills_with_episodic_11
0x6AC dword kills_with_episodic_12
0x6B0 dword kills_with_episodic_13
0x6B4 dword kills_with_episodic_14
0x6B8 dword kills_with_episodic_15
0x6BC dword kills_with_episodic_16
0x6C0 dword kills_with_episodic_17
0x6C4 dword kills_with_episodic_18
0x6C8 dword kills_with_episodic_19
0x6CC dword kills_with_episodic_20
0x6D0 dword kills_with_episodic_21
0x6D4 dword kills_with_episodic_22
0x6D8 dword kills_with_episodic_23
0x6DC dword kills_with_episodic_24
0x6E0 dword times_busted
0x6E4 dword saves_made
0x6E8 byte[4156] unknown stats
0x1724 end

Block 14: IplStore

OFFSET TYPE DESCRIPTION
0x0000 uint32 block size
0x0004 uint32 length of the following array (500)
0x0008 bool[500] an array of boolean (the wpl of that index will be loaded if true)

Block 15: StuntJumps

OFFSET TYPE DESCRIPTION
0x00 dword Size of block
0x04 byte whether stunt jumps are enabled
0x05 dword number of stunt jumps completed
0x09 dword number of stunt jumps
0x0E byte[4] total stunt jumps
0x11 StuntJump[64] start of stunt jump structs (0x64 bytes each; see below)
StuntJump
OFFSET TYPE DESCRIPTION
0x00 dword pool index
0x04 float[4] Start zone point 1 (x,y,z,w)
0x14 float[4] Start zone point 2 (x,y,z,w)
0x24 float[4] Land zone point 1 (x,y,z,w)
0x34 float[4] Land zone point 2 (x,y,z,w)
0x44 float[4] Camera coordinates (x,y,z,w)
0x54 dword reward amount
0x58 byte is completed
0x59 byte is found
0x5A byte[10] unknown, maybe align/padding

Block 16: Radio

Block 17: Objects

OFFSET TYPE DESCRIPTION
0x0000 uint32 block size
0x0004 uint32 object count
0x0008 Object[10] objects (only mission cleanup objects are saved)
OFFSET TYPE DESCRIPTION
Object (72 bytes)
0x0000 uint32 pool handle
0x0004 uint32 model hash
0x0008 float[4] coordinates (x,y,z,w)
0x0018 Matrix compressed rotation matrix

Block 18: Relationships

Block 19: Inventory

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 20: Pools

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 21: PhoneInfo

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 22: AudioScriptObject

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 23: SetPieces

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 24: Streaming

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 25: PedType

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 26: Tags

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 27: Shopping

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 28: GangWars

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 29: EntryExits

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 30: 3dMarkers

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Block 31: Vehicles

This block is empty, and data is neither stored nor written in this block after the initial "BLOCK" string and the constant size (9)

Checksum

The checksum follows the last data block.

  • The savegame size in bytes in the meta data should be set to 1977922 (0x1E2E42), before calculating the checksum.
  • It is the sum of all the bytes preceding the checksum value.
  • Implementation Example: A Python script for calculating the checksum value

Note:

  • The reason is that the game adds the GFLW data size to the metadata after it has calculated the checksum.
  • The checksum value is ignored by the game. An incorrect checksum will not prevent a save file from being loaded.

End Block

This block has a constant length of 0x16C bytes. Data in this block appears to relate to Games For Windows Live data.

OFFSET TYPE DESCRIPTION
0x00 char[4] END\0
0x04 dword Unknown, appears to always be 0x128
0x08 byte[292] Unknown, appears to always be a mix of 0x0, 0x1, 0x2 and 0x3 bytes
0x12C byte[64] Unknown
0x16C end