|
|
Line 1,068: |
Line 1,068: |
| |0x0000 ||dword ||[[0165|blip color]] | | |0x0000 ||dword ||[[0165|blip color]] |
| |- | | |- |
− | |0x0004 ||float ||unknown, always 1.0 | + | |0x0004 ||float ||[[Saves_(GTA_3)#Notes|debug sphere cross offset]], unused, always 1.0 |
| |- | | |- |
| |0x0008 ||dword ||blip type | | |0x0008 ||dword ||blip type |
Revision as of 15:00, 22 October 2016
This article deals with the format of a save game file for the PC version of GTA Vice City.
Location
By default, the game places its save game files into the folder "GTA Vice City User Files" which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed.
The save files themselves are named in the format GTAVCsfX.b where X represents the in-game slot number. There are 8 slots available in the game (1-8).
Format details
The save file is in binary format (little endian format -> least significant byte first) consisting of 23 blocks of data. Each block starts with the size of the current block. To reach the next block, read the size of the currently selected block, add that value to the block's start address, and add four. Initial offset listed here starts four bytes after the start of the block.
Data Blocks
There is a DWORD value preceding any block of data which is equal to the size of the block.
Block 0: Simple Vars
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 0
|
0x0004 |
- |
start of block 0, data below
|
Offset |
Type |
Description
|
0x0000 |
wchar_t[24] |
last mission passed
|
0x0030 |
word |
SYSTEMTIME wYear
|
0x0032 |
word |
SYSTEMTIME wMonth
|
0x0034 |
word |
SYSTEMTIME wDayOfWeek
|
0x0036 |
word |
SYSTEMTIME wDay
|
0x0038 |
word |
SYSTEMTIME wHour
|
0x003A |
word |
SYSTEMTIME wMinute
|
0x003C |
word |
SYSTEMTIME wSecond
|
0x003E |
word |
SYSTEMTIME wMilliseconds
|
0x0040 |
dword |
unknown, value is always 12609
|
0x0044 |
dword |
current island
|
0x0048 |
float[3] |
camera coordinates (x,y,z)
|
0x0054 |
dword |
unknown, but only present in Steam version saves. If present, n = 4 in following offsets for this block, otherwise n = 0.
|
0x0054+n |
dword |
length (ms) of in-game minute (1000 = normal)
|
0x0058+n |
dword |
weather timer
|
0x005C+n |
byte |
game hour
|
0x005D+n |
byte[3] |
align
|
0x0060+n |
byte |
game minute
|
0x0061+n |
byte[3] |
align
|
0x0064+n |
dword |
pad number?
|
0x0068+n |
dword |
global timer
|
0x006C+n |
float |
time scale
|
0x0070+n |
float |
time step (frame delta time)
|
0x0074+n |
float |
time step (not clipped)
|
0x0078+n |
dword |
number of the frames processed from the beginning of the game
|
0x007C+n |
float |
time step #2 (constant 1.0, unused)
|
0x0080+n |
float |
frames per update (constant 1.0, unused)
|
0x0084+n |
float |
time scale (constant 1.0, unused)
|
0x0088+n |
word |
old (previous) weather type
|
0x008A+n |
byte[2] |
align
|
0x008C+n |
word |
new (next) weather type
|
0x008E+n |
byte[2] |
align
|
0x0090+n |
word |
forced weather type (01B5 or 01B6), -1 if not forced
|
0x0092+n |
byte[2] |
align
|
0x0094+n |
float |
weather interpolation value
|
0x0098+n |
dword |
current weather table offset (between 0 and 63)
|
0x009C+n |
float |
current vehicle camera view (between 0.0 and 5.0)
|
0x00A0+n |
float |
current on foot camera view (classic controls only)
|
0x00A4+n |
dword |
current interior
|
0x00A8+n |
byte |
taxi boost jump
|
0x00A9+n |
byte[3] |
align
|
0x00AC+n |
byte |
invert look option
|
0x00AD+n |
byte[3] |
align
|
0x00B0+n |
dword |
extra color
|
0x00B4+n |
dword |
extra color active (0 = inactive, 1 = active)
|
0x00B8+n |
float |
extra color fade (between 0.0 and 1.0)
|
0x00BC+n |
dword[10] |
unknown, relates to radio station?
|
0x00E4+n |
dword |
size of script block
|
0x00E8+n |
- |
start of script block, see below
|
Subblock A:
Offset |
Type |
Description
|
0x0000 |
char[4] |
SCR\0
|
0x0004 |
dword |
size of script block again
|
0x0008 |
dword |
size of subblock A
|
0x000C |
- |
start of subblock A: global variables - each variable is 4 bytes long
|
Subblock B:
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock B (constant 0x248)
|
0x0004 |
dword |
on mission flag offset in global variable space
|
0x0008 |
dword |
game timer when mission is passed (0318 or 0595), -1 if never passed a mission
|
0x000C |
BuildingSwap[25] |
swapped building model structures (see below)
|
BuildingSwap (0x10 bytes):
Offset |
Type |
Description
|
0x0000 |
dword |
object type
- 0 = no object
- 1 = treadable (PATH is attached to model, value is never used)
- 2 = building (no PATH is attached, value is always used)
|
0x0004 |
dword |
object index
|
0x0008 |
dword |
new building IDE model, -1 if no model
|
0x000C |
dword |
old building IDE model, -1 if no model
|
0x019C |
InvisibilitySetting[20] |
object visibility structure (0363) (see below)
|
InvisibilitySetting (8 bytes):
Offset |
Type |
Description
|
0x0000 |
dword |
object type
- 0 = no model
- 1 = treadable
- 2 = building
- 3 = script objects/loaded dynamic objects
- 4 = unloaded dynamic objects
|
0x0004 |
dword |
object index
|
0x023C |
- |
start of another set of offset below
|
Offset |
Type |
Description
|
0x0000 |
byte |
is mission script running
|
0x0001 |
byte |
Kaufman Cabs radio
|
0x0002 |
byte[2] |
align
|
0x0004 |
dword |
size of main
|
0x0008 |
dword |
size of largest mission
|
0x000C |
word |
number of missions
|
0x000E |
word |
unknown
|
0x0010 |
dword |
number of running scripts
|
0x0014 |
- |
136 bytes each, script structure (see below)
|
Script structure:
Offset |
Type |
Description
|
0x0000 |
dword |
pointer to previous script
|
0x0004 |
dword |
pointer to next script
|
0x0008 |
char[8] |
name
|
0x0010 |
dword |
current instruction pointer
|
0x0014 |
dword[6] |
return stack
|
0x002C |
word |
stack counter
|
0x002E |
word |
align
|
0x0030 |
dword[16] |
16 local variables
|
0x0070 |
dword |
timerA (local variable 16)
|
0x0074 |
dword |
timerB (local variable 17)
|
0x0078 |
byte |
is active
|
0x0079 |
byte |
"if" statement result
|
0x007A |
byte |
uses mission cleanup
|
0x007B |
byte |
skip wake time (always 0)
|
0x007C |
dword |
wake time
|
0x0080 |
word |
"if" check result
|
0x0082 |
byte |
"not" flag
|
0x0083 |
byte |
death/arrest state
|
0x0084 |
byte |
death/arrest has been executed
|
0x0085 |
byte |
mission flag
|
Block 1: Player Peds
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 1
|
0x0004 |
- |
start of block 1, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
number of players
|
0x0004 |
PlayerPed[n] |
start of player structure where n is the number of players
|
PlayerPed (0x6FF bytes):
Offset |
Type |
Description
|
0x0006 |
dword |
index
|
0x000A |
CPed |
ped structure dump (see structure below)
|
Only data that are loaded by the game are listed here. The rest of the data only get saved but do not get loaded.
CPed (0x6D8 bytes):
Offset |
Type |
Description
|
0x0034 |
float[3] |
x,y,z coordinates
|
0x0354 |
float |
health
|
0x0358 |
float |
armor
|
0x0408 |
dword |
weapon group 0 number
|
0x0414 |
dword |
weapon group 0 ammo
|
0x0420 |
dword |
weapon group 1 number
|
0x042C |
dword |
weapon group 1 ammo
|
0x0438 |
dword |
weapon group 2 number
|
0x0444 |
dword |
weapon group 2 ammo
|
0x0450 |
dword |
weapon group 3 number
|
0x045C |
dword |
weapon group 3 ammo
|
0x0468 |
dword |
weapon group 4 number
|
0x0474 |
dword |
weapon group 4 ammo
|
0x0480 |
dword |
weapon group 5 number
|
0x048C |
dword |
weapon group 5 ammo
|
0x0498 |
dword |
weapon group 6 number
|
0x04A4 |
dword |
weapon group 6 ammo
|
0x04B0 |
dword |
weapon group 7 number
|
0x04BC |
dword |
weapon group 7 ammo
|
0x04C8 |
dword |
weapon group 8 number
|
0x04D4 |
dword |
weapon group 8 ammo
|
0x04E0 |
dword |
weapon group 9 number
|
0x04EC |
dword |
weapon group 9 ammo
|
0x0504 |
byte |
currently selected weapon group, always set to 0 upon loading
|
0x0604 |
float |
max stamina
|
0x0624 |
dword[4] |
targettable object index, -1 if no object
|
Block 2: Garages
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 2
|
0x0004 |
- |
start of block 2, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0x1EC4)
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
number of garages
|
0x0004 |
dword |
free bombs
|
0x0008 |
dword |
free resprays
|
0x0010 |
dword |
number of Securicars collected (unused)
|
0x0014 |
dword |
number of Police cars collected (unused)
|
0x0018 |
dword |
cars collected by garage type 8 in flag field representation
- 0b000001 = car 1 collected
- 0b000010 = car 2 collected
- 0b000100 = car 3 collected
- 0b001000 = car 4 collected
- 0b010000 = car 5 collected
- 0b100000 = car 6 collected
|
0x001C |
dword |
cars collected by garage type 9 in flag field representation
|
0x0020 |
dword |
cars collected by garage type 10 in flag field representation
|
0x0024 |
dword |
cars collected by garage type 22 in flag field representation
|
0x0028 |
dword |
game timer when garage full message was last shown
|
0x002C |
StoredCar[48] |
stored car structures (see below)
|
0x07AC |
Garage[32] |
garage structures (see below)
|
StoredCar (0x28 bytes):
Offset |
Type |
Description
|
0x0000 |
dword |
model ID
|
0x0004 |
float[3] |
x,y,z position
|
0x0010 |
float[3] |
x,y,z vector rotation
|
0x001C |
dword |
proofs
|
0x0020 |
byte |
primary color
|
0x0021 |
byte |
secondary color
|
0x0022 |
byte |
current radio station
|
0x0023 |
byte |
variation 1
|
0x0024 |
byte |
variation 2
|
0x0025 |
byte |
bomb type
|
Garage (0xA8 bytes):
Offset |
Type |
Description
|
0x0000 |
byte |
type
|
0x0001 |
byte |
state
- 0 = closed
- 1 = opened
- 2 = closing
- 3 = opening
- 4 = opened with serviced car (bomb and spray shops)
- 5 = closed with vehicle dropped off (mission keepcar)
|
0x0002 |
byte |
maximum number of cars in garage (4 = default)
|
0x0004 |
byte |
closed but nothing dropped off (mission keepcar)
|
0x0005 |
byte |
is deactive (unused)
|
0x0006 |
byte |
has respray happened
|
0x0007 |
byte |
align
|
0x0008 |
dword |
target model (unused)
|
0x000C |
pointer |
door object
|
0x0010 |
pointer |
crusher top object (unused)
|
0x0019 |
byte |
rotating door
|
0x001A |
byte |
special camera for garage
|
0x001B |
byte |
align
|
0x001C |
float[3] |
primary x,y,z coordinates (garage opcode parameters 1, 2, 3)
|
0x0028 |
float[4] |
rx,ry,rz,rw quaternion rotation
|
0x0038 |
float |
ceiling z coordinate (garage opcode parameter 8)
|
0x0044 |
float |
lower x coordinate (min of x1 + x2 - x primary, x primary, x1, or x2)
|
0x0048 |
float |
upper x coordinate (max of x1 + x2 - x primary, x primary, x1, or x2)
|
0x004C |
float |
lower y coordinate
|
0x0050 |
float |
upper y coordinate
|
0x0054 |
float |
door current height relative to base of garage
|
0x0058 |
float |
door maximum height relative to base of garage
|
0x005C |
float |
door object x position, 0 if no door
|
0x0060 |
float |
door object y position, 0 if no door
|
0x0064 |
float |
crusher top object x position (unused)
|
0x0068 |
float |
crusher top object y position (unused)
|
0x006C |
float |
door object z position
|
0x0070 |
float |
crusher top object z position (unused)
|
0x0074 |
dword |
game timer to open a closed garage
|
0x007C |
pointer |
target vehicle
|
Block 3: Game Logic
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 3
|
0x0004 |
- |
start of block 3, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0x104)
|
0x0004 |
- |
start of subblock, data below
|
TaxiShortcut (0x10 bytes):
Offset |
Type |
Description
|
0x0000 |
float[3] |
x,y,z coordinates
|
0x000C |
float |
heading
|
Block 4: Vehicles
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 4
|
0x0004 |
- |
start of block 4, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock
|
0x0004 |
- |
start of another set of offset below
|
Offset |
Type |
Description
|
0x0000 |
dword |
number of general vehicles
|
0x0004 |
dword |
number of boats
|
0x0008 |
dword |
number of bikes
|
0x000C |
Vehicle[n] |
vehicle structures where n is the number of general vehicles, boats, and bikes
|
Vehicle (0x5E6 (general) | 0x4CA (boat) | 0x4F6 (bike) bytes):
Offset |
Type |
Description
|
0x0000 |
dword |
vehicle type
- 0 = general
- 1 = boat
- 5 = bike
|
0x0004 |
word |
vehicle IDE model
|
0x0006 |
dword |
vehicle index
|
0x000A |
- |
vehicle structure dump (see below, dependent on vehicle type)
|
If vehicle is type general:
General vehicle structure (0x5DC bytes):
Offset |
Type |
Description
|
0x0034 |
float[3] |
x,y,z coordinates
|
0x005C |
word |
IDE model number
|
If vehicle is type boat:
Boat structure (0x4C0 bytes):
Offset |
Type |
Description
|
0x0034 |
float[3] |
x,y,z coordinates
|
0x005C |
word |
IDE model number
|
If vehicle is type bike:
Bike structure (0x4EC bytes):
Offset |
Type |
Description
|
0x0034 |
float[3] |
x,y,z coordinates
|
0x005C |
word |
IDE model number
|
Block 5: Objects
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 5
|
0x0004 |
- |
start of block 5, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (4 bytes less than block header)
|
0x0004 |
- |
start of another set of offset below
|
Offset |
Type |
Description
|
0x0000 |
dword |
number of objects
|
0x0004 |
- |
88 bytes each, object structures (see struct below)
|
Object structure:
Offset |
Type |
Description
|
0x0000 |
word |
object IDE number
|
0x0006 |
float[3] |
x,y,z coordinates
|
Block 6: Paths
Block 7: Cranes
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 7
|
0x0004 |
- |
start of block 7, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0x3E8)
|
0x0004 |
- |
start of subblock, data below
|
Crane (0x7C bytes):
Offset |
Type |
Description
|
0x0000 |
pointer |
crane object
|
0x0004 |
pointer |
magnet object
|
0x0008 |
float |
pickup zone x1 (crane opcode parameter 3)
|
0x000C |
float |
pickup zone x2 (crane opcode parameter 5)
|
0x0010 |
float |
pickup zone y1 (crane opcode parameter 6)
|
0x0014 |
float |
pickup zone y2 (crane opcode parameter 4)
|
0x0018 |
float |
drop off point x (crane opcode parameter 7)
|
0x001C |
float |
drop off point y (crane opcode parameter 8)
|
0x0020 |
float |
drop off point z (crane opcode parameter 9)
|
0x0024 |
float |
drop off heading in radians (crane opcode parameter 10)
|
0x0028 |
float |
crane arm pick up rotation in radians
|
0x002C |
float |
crane arm drop off rotation in radians
|
0x0030 |
float |
crane arm pick up distance from center of crane
|
0x0034 |
float |
crane arm drop off distance from center of crane
|
0x0038 |
float |
crane arm pick up height
|
0x003C |
float |
crane arm drop off height
|
0x0040 |
float |
crane arm current rotation in radians
|
0x0044 |
float |
crane arm current distance from center of crane
|
0x0048 |
float |
crane arm current height
|
0x004C |
float[3] |
crane hook initial x, y, z
|
0x0058 |
float[3] |
crane hook current x, y, z
|
0x006C |
pointer |
vehicle to pick up
|
0x0070 |
dword |
game timer + 10000 when crane has finished lifting car
|
0x0074 |
byte |
crane activity
- 0 = idle crane
- 1 = crusher/military crane active
- 2 = crane inactive
|
0x0075 |
byte |
crane status
- 0 = idle
- 1 = crane moving to pick up
- 3 = moving upwards from pick up
- 2 = moving to destination
- 4 = moving downwards to drop off
- 5 = moving upwards from drop off
|
0x0076 |
byte |
number of vehicles collected
|
0x0077 |
byte |
is crusher crane
|
0x0078 |
byte |
is military crane
|
0x007A |
byte |
model is not doc_crane_cab0
|
0x007B |
byte |
align
|
Block 8: Pickups
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 8
|
0x0004 |
- |
start of block 8, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0x4494)
|
0x0004 |
Pickup[336] |
pickup structures (see below)
|
Pickup (0x34 bytes):
Offset |
Type |
Description
|
0x0000 |
float[3] |
x,y,z coordinates
|
0x000C |
float |
current protection revenue
|
0x0010 |
dword |
pickup object entity
|
0x0014 |
dword |
pickup extra object entity (weapons bomb or minigun for example)
|
0x0018 |
dword |
ammo/money/text/protection revenue limit
|
0x001C |
dword |
timer
|
0x0020 |
word |
protection revenue rate
|
0x0022 |
word |
IDE model
|
0x0026 |
char[8] |
string to display in help box (0517/0518)
|
0x002E |
byte |
type
|
0x002F |
byte |
has been picked up
|
0x4444 |
word |
collected index for below, always between 0 and 19
|
0x4446 |
byte[2] |
align
|
0x4448 |
dword[20] |
pickup index, latest collected pickup pointed by collected index from above
|
Block 9: Phone Info
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 9
|
0x0004 |
- |
start of block 9, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0xA30)
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
number of phone objects
|
0x0004 |
dword |
number of active phones
|
0x0008 |
Phone[50] |
phone structures (see below)
|
Phone (0x34 bytes):
Offset |
Type |
Description
|
0x0000 |
float[3] |
x,y,z coordinates
|
0x000C |
dword[6] |
pointer to phone message string
|
0x0024 |
dword |
game timer when phone message ends for states 5 and 6
|
0x0028 |
dword |
object index
|
0x002C |
dword |
phone state
- 3 = no ringing
- 4 = ringing, message just once
- 5 = ringing, message repeated, phone was never picked up
- 6 = ringing, message repeated, phone was picked up before
- 7 = no ringing, finished state of state 4
- 8 = no ringing, finished state of states 5 and 6
- 9 = only ringing
|
0x0030 |
byte |
is player within range of phone
|
0x0031 |
byte[3] |
align
|
Block 10: Restart Points
Offset |
Type |
Description
|
0x00
|
dword
|
size of block 10
|
0x04
|
-
|
start of block 10, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
size of subblock (constant 0x124)
|
0x04
|
-
|
start of subblock, data below
|
Offset |
Type |
Description
|
0x000
|
char[4]
|
RST\0
|
0x004
|
dword
|
size of rest of subblock
|
0x008
|
float[3]
|
hospital restart x,y,z coordinates
|
0x014
|
float
|
hospital restart heading
|
7 additional hospital restarts
|
0x088
|
float[3]
|
police restart x,y,z coordinates
|
0x094
|
float
|
police restart heading
|
7 additional police restarts
|
0x108
|
word
|
number of hospital restarts
|
0x10A
|
word
|
number of police restarts
|
0x10C
|
byte
|
override next restart active
|
0x10D
|
byte[3]
|
align
|
0x110
|
float[3]
|
override next restart x,y,z coordinates
|
0x11C
|
float
|
override next restart heading
|
0x120
|
byte
|
always 1, leftover from GTA III's 040F
|
0x121
|
byte
|
always 1, leftover from GTA III's 040E
|
0x122
|
byte
|
override hospital level
|
0x123
|
byte
|
override police station level
|
Block 11: Radar Blips
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 11
|
0x0004 |
- |
start of block 11, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0xE18)
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
char[4] |
RDR\0
|
0x0004 |
dword |
size of rest of subblock
|
0x0008 |
Blip[75] |
blip structures (see below)
|
Blip (0x30 bytes):
Offset |
Type |
Description
|
0x0000 |
dword |
blip color
|
0x0004 |
float |
debug sphere cross offset, unused, always 1.0
|
0x0008 |
dword |
blip type
- 0 = none
- 1 = car
- 2 = char
- 3 = object/pickup
- 4 = coord
- 5 = contact point
|
0x000C |
dword |
entity (0 = not an entity)
|
0x0010 |
float[2] |
x,y coordinates (does not apply to entities)
|
0x0018 |
float[3] |
x,y,z coordinates (does not apply to entities)
|
0x0026 |
byte |
dim blip
|
0x0028 |
byte |
is short range
|
0x002A |
word |
blip scale
|
0x002C |
word |
blip display
|
0x002E |
word |
sprite blip
|
Block 12: Zones
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 12
|
0x0004 |
- |
start of block 12, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0x8BE0)
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
char[4] |
ZNS\0
|
0x0004 |
dword |
size of rest of subblock
|
0x0008 |
dword |
current level
- 1 = Vice City Beach
- 2 = Vice City Mainland
|
0x000E |
byte[2] |
align
|
0x0010 |
Zone[20] |
type 0 and 1 (navig) zone structures (see below)
|
0x0470 |
Zone[169] |
type 2 (info) zone structures (see below)
|
0x2968 |
ZoneInfo[338] |
ped/car/gang info zone structures (see below)
|
0x8330 |
word |
total number of type 0 and 1 (navig) zones
|
0x8332 |
word |
total number of type 2 (info) zones
|
0x8334 |
word |
total number of type 2 (info) zones * 2 - 1
|
0x8336 |
byte[2] |
align
|
0x8338 |
Zone[39] |
type 3 (map) zone structures (see below)
|
0x8BC0 |
word[14] |
crime report audio zones
|
0x8BDC |
word |
total number of type 1 (map) zones
|
0x8BDE |
word |
total number of crime report audio zones
|
Zone (0x38 bytes):
Offset |
Type |
Description
|
0x0000 |
char[8] |
name
|
0x0008 |
float[3] |
x1,y1,z1 coordinates
|
0x0014 |
float[3] |
x2,y2,z2 coordinates
|
0x0020 |
dword |
type
|
0x0024 |
dword |
level
|
0x0028 |
word |
zone info id night
|
0x002A |
word |
zone info id day
|
0x002C |
dword |
child zone index
|
0x0030 |
dword |
parent zone index
|
ZoneInfo (0x44 bytes):
Offset |
Type |
Description
|
Block 13: Gangs
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 13
|
0x0004 |
- |
start of block 13, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0xE0)
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
char[4] |
GNG\0
|
0x0004 |
dword |
size of rest of subblock
|
0x0008 |
GangInfo[9] |
gang structures (see below)
|
GangInfo (0x18 bytes):
Offset |
Type |
Description
|
0x0000 |
dword |
gang car model
|
0x0004 |
dword |
gang ped model 1
|
0x0008 |
dword |
gang ped model 2
|
0x000C |
byte |
gang ped model preference
|
0x000D |
byte[3] |
align
|
0x0010 |
dword |
gang weapon number 1
|
0x0014 |
dword |
weapon number 2
|
Block 14: Car Generators
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 14
|
0x0004 |
- |
start of block 14, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock (constant 0x1FE8)
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
char[4] |
CGN\0
|
0x0004 |
dword |
size of rest of subblock
|
0x0008 |
dword |
size of subdata before car generator structures (constant 0xC)
|
0x000C |
dword |
total number of car generators
|
0x0010 |
dword |
total number of active car generators
|
0x0014 |
byte |
process counter
|
0x0015 |
byte |
generate even if player is close counter
|
0x0016 |
byte[2] |
align
|
0x0018 |
dword |
size of rest of subblock (constant 0x1FCC)
|
0x001C |
CarGenerator[185] |
car generator structures (see below)
|
CarGenerator (0x2C bytes):
Offset |
Type |
Description
|
0x0000 |
dword |
vehicle IDE model
|
0x0004 |
float[3] |
x,y,z coordinates
|
0x0010 |
float |
heading
|
0x0014 |
word |
primary color
|
0x0016 |
word |
secondary color
|
0x0018 |
byte |
force spawn
|
0x0019 |
byte |
alarm
|
0x001A |
byte |
lock
|
0x001B |
byte |
align
|
0x001C |
word |
min delay
|
0x001E |
word |
max delay
|
0x0020 |
dword |
game timer when car is generated, game timer + 60000 when car is stolen
|
0x0024 |
dword |
vehicle index, -1 if not spawned or is stolen
|
0x0028 |
word |
014C, 101 = -1
|
0x002A |
byte |
has recently been stolen
|
0x002B |
byte |
align
|
Block 15: Particles
Offset |
Type |
Description
|
0x00
|
dword
|
size of block 15
|
0x04
|
-
|
start of block 15, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
size of subblock
|
0x04
|
dword
|
number of particle objects
|
0x08
|
132 bytes[n]
|
particle structures (see below)
|
Offset |
Type |
Description
|
0x30
|
float[3]
|
x,y,z coordinates
|
0x58
|
dword
|
particle type
|
0x5C
|
dword
|
particle type
|
0x60
|
byte
|
visibility
|
0x61
|
byte
|
sparsity
|
0x62
|
word
|
sparsity counter
|
0x68
|
float[3]
|
x,y,z strength
|
0x78
|
float
|
scale
|
Block 16: Audio Script Objects
Offset |
Type |
Description
|
0x00
|
dword
|
size of block 16
|
0x04
|
-
|
start of block 16, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
size of subblock
|
0x04
|
-
|
start of subblock, data below
|
Offset |
Type |
Description
|
0x00
|
char[4]
|
AUD\0
|
0x04
|
dword
|
size of rest of subblock
|
0x08
|
dword
|
number of audio objects (n)
|
0x12
|
24 bytes[n]
|
audio structures (see below)
|
Audio structure:
Offset |
Type |
Description
|
0x04
|
word
|
audio index
|
0x08
|
float[3]
|
x,y,z coordinates
|
Block 17: Script Paths
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 17
|
0x0004 |
- |
start of block 17, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock
|
0x0004 |
- |
start of subblock, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
total number of nodes on script path
|
0x0008 |
float |
total distance of path
|
0x000C |
float |
path speed
|
0x0010 |
float |
distance along path
|
0x0014 |
float |
some sort of offset
|
0x001C |
- |
object handle, up to 6 supported
|
Block 18: Player Info
Offset |
Type |
Description
|
0x0000 |
dword |
size of block 18 (constant 0x170)
|
0x0004 |
- |
start of block 18, data below
|
Offset |
Type |
Description
|
0x0000 |
dword |
size of subblock
|
0x0004 |
- |
start of subblock, data below
|
Block 19: Stats
Offset |
Type |
Description
|
0x00
|
dword
|
size of block 19
|
0x04
|
-
|
start of block 19, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
size of subblock
|
0x04
|
-
|
start of subblock, data below
|
Block 20: Set Pieces
Offset |
Type |
Description
|
0x00
|
dword
|
size of block 20
|
0x04
|
-
|
start of block 20, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
size of subblock
|
0x04
|
-
|
start of subblock, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
number of trigger zones (04F8)
|
0x04
|
[96]
|
56 bytes each, trigger zone structures (see below)
|
Trigger zone structure:
Offset |
Type |
Description
|
0x00
|
dword
|
type
|
0x08
|
float
|
timer
|
0x08
|
float
|
trigger area x1
|
0x0C
|
float
|
trigger area y2
|
0x10
|
float
|
trigger area x2
|
0x14
|
float
|
trigger area y1
|
0x18
|
float[2]
|
policeA spawn x,y
|
0x20
|
float[2]
|
policeB spawn x,y
|
0x28
|
float[2]
|
policeA heading x,y
|
0x30
|
float[2]
|
policeB heading x,y
|
Block 21: Streaming
Offset |
Type |
Description
|
0x00
|
dword
|
size of block 21
|
0x04
|
-
|
start of block 21, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
size of subblock (constant 0x12C)
|
0x04
|
-
|
start of subblock, data below
|
Offset |
Type |
Description
|
0x00
|
20 bytes[15]
|
streaming structures
|
Block 22: Ped Types
Offset |
Type |
Description
|
0x00
|
dword
|
size of block 22
|
0x04
|
-
|
start of block 22, data below
|
Offset |
Type |
Description
|
0x00
|
dword
|
size of subblock (constant 0x2E8)
|
0x04
|
-
|
start of subblock, data below
|
Offset |
Type |
Description
|
0x00
|
char[4]
|
PTP\0
|
0x04
|
dword
|
total size of pedtype structures
|
0x08
|
32 bytes[23]
|
pedtype structures (see below)
|
Pedtype structure:
Offset |
Type |
Description
|
0x00
|
dword
|
bitstring (each associated to an entry in ped.dat)
|
0x04
|
float
|
first value/50.0
|
0x08
|
float
|
second value/50.0
|
0x0C
|
float
|
third value/50.0
|
0x10
|
float
|
fourth value
|
0x14
|
float
|
fifth value
|
0x18
|
dword
|
threat flags
|
0x1C
|
dword
|
avoid flags
|
Padding
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31464 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. There could be up to 4 padding blocks, each one is up to 55,000 bytes in length.
Checksum
The last four bytes of the save file is the checksum value. It is the sum of all preceding bytes in the file. If the checksum does not match that sum, the game will consider the save file to be "corrupted" and refuse to load it. For any change in the save file, make sure the checksum value is updated.
External links