|
|
Line 276: |
Line 276: |
| | 0x00 | | | 0x00 |
| | dword | | | dword |
− | | type | + | | always 2 |
| |- | | |- |
| | 0x04 | | | 0x04 |
Line 294: |
Line 294: |
| | 0x198 | | | 0x198 |
| | 8 bytes[20] | | | 8 bytes[20] |
− | | invisible objects? (possible struct below) | + | | 8 bytes each, object visibility structure ([[0363]]) (see below) |
| |} | | |} |
| <div style="margin-left: 3em;"> | | <div style="margin-left: 3em;"> |
| {| class="wikitable" | | {| class="wikitable" |
− | |+ style="text-align: left;"| Invisible objects structure: | + | |+ style="text-align: left;"| Objects visibility structure: |
| ! Offset | | ! Offset |
| ! Type | | ! Type |
Line 305: |
Line 305: |
| | 0x00 | | | 0x00 |
| | dword | | | dword |
− | | type | + | | always 2 |
| |- | | |- |
| | 0x04 | | | 0x04 |
Revision as of 05:16, 14 January 2015
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 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.
Block 0: Script
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of block 0
|
0x04
|
-
|
start of block 0, data below
|
Offset
|
Type
|
Description
|
0x00
|
wchar_t[24]
|
last mission passed (0318)
|
0x30
|
word
|
SYSTEMTIME wYear
|
0x32
|
word
|
SYSTEMTIME wMonth
|
0x34
|
word
|
SYSTEMTIME wDayOfWeek
|
0x36
|
word
|
SYSTEMTIME wDay
|
0x38
|
word
|
SYSTEMTIME wHour
|
0x3A
|
word
|
SYSTEMTIME wMinute
|
0x3C
|
word
|
SYSTEMTIME wSecond
|
0x3E
|
word
|
SYSTEMTIME wMilliseconds
|
0x40
|
dword
|
unknown, value is always 12609
|
0x44
|
dword
|
current island
|
0x48
|
float[3]
|
camera coordinates (x,y,z)
|
0x54
|
dword
|
length (ms) of in-game minute (1000=normal)
|
0x58
|
dword
|
weather timer
|
0x5C
|
byte
|
game hour
|
0x5D
|
byte[3]
|
align
|
0x60
|
byte
|
game minute
|
0x61
|
byte[3]
|
align
|
0x64
|
dword
|
pad number?
|
0x68
|
dword
|
global timer
|
0x6C
|
float
|
game speed (015D)
|
0x70
|
float
|
unknown
|
0x74
|
float
|
unknown
|
0x78
|
dword
|
unknown
|
0x7C
|
float
|
unknown, always 1.0
|
0x80
|
float
|
unknown, always 1.0
|
0x84
|
float
|
unknown, always 1.0
|
0x88
|
word
|
unknown
|
0x8A
|
byte[2]
|
align
|
0x8C
|
dword
|
relates to weather?
|
0x8E
|
byte[2]
|
align
|
0x90
|
word
|
current weather
|
0x92
|
byte[2]
|
align
|
0x94
|
dword
|
unknown
|
0x98
|
dword
|
current weather table offset (between 0 and 63)
|
0x9C
|
float
|
current vehicle camera view (between 0.0 and 5.0)
|
0xA0
|
float
|
current on foot camera view (classic controls only)
|
0xA4
|
dword
|
current interior (04BB)
|
0xA8
|
byte
|
taxi boost jump (0572)
|
0xA9
|
byte[3]
|
align
|
0xAC
|
byte
|
unknown
|
0xAD
|
byte[3]
|
align
|
0xB0
|
dword
|
sky color (04F9)
|
0xB4
|
dword
|
sky atmosphere (0=normal,1=interior)
|
0xB8
|
float
|
sky atmosphere blue overlay (between 0.0 and 1.0)
|
0xBC
|
dword[10]
|
unknown, relates to radio station?
|
0xE4
|
dword
|
size of script block
|
0xE8
|
-
|
start of script block, see below
|
Subblock A:
Offset
|
Type
|
Description
|
0x00
|
char[4]
|
"SCR\0"
|
0x04
|
dword
|
size of script block again
|
0x08
|
dword
|
size of subblock A
|
0x0C
|
-
|
start of subblock A: global variables - each variable is 4 bytes long
|
Subblock B:
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock B (constant 0x248)
|
0x04
|
dword
|
unknown
|
0x08
|
dword
|
unknown
|
0x0C
|
16 bytes[25]
|
16 bytes each, swapped building model structures (03B6) (see below)
|
Swapped building model structure:
Offset
|
Type
|
Description
|
0x00
|
dword
|
always 2
|
0x04
|
dword
|
building handle
|
0x08
|
dword
|
new building IDE model
|
0x0C
|
dword
|
old building IDE model
|
0x198
|
8 bytes[20]
|
8 bytes each, object visibility structure (0363) (see below)
|
Objects visibility structure:
Offset
|
Type
|
Description
|
0x00
|
dword
|
always 2
|
0x04
|
dword
|
handle
|
0x238
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
byte
|
unknown
|
0x01
|
byte
|
kaufman cabs radio (0551)
|
0x02
|
word
|
unknown
|
0x04
|
dword
|
size of main
|
0x08
|
dword
|
size of largest mission
|
0x0C
|
dword
|
number of missions
|
Block 1: Ped Pool
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of block 1
|
0x04
|
-
|
start of block 1, data below
|
Offset
|
Type
|
Description
|
0x0A
|
-
|
ped structure (see struct below)
|
Ped structure:
Offset
|
Type
|
Description
|
0x34
|
float[3]
|
x,y,z coordinates
|
0xB8
|
float
|
weight
|
0x354
|
float
|
health
|
0x358
|
float
|
armor
|
0x6E2
|
dword
|
max wanted level
|
0x6E6
|
dword
|
max criminal points, in tandem with max wanted level
|
Block 2: Garages
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of block 2
|
0x04
|
-
|
start of block 2, data below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header, constant 0x1EC4)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
number of garages (0219)
|
0x04
|
dword
|
free bombs (0=not,1=yes)
|
0x08
|
dword
|
free respray (0335)
|
0x18
|
dword
|
garage type 8 status, see below
|
0x1C
|
dword
|
garage type 9 status
|
0x20
|
dword
|
garage type 10 status
|
0x24
|
dword
|
garage type 22 status
|
0x2C
|
40 bytes[48]
|
40 bytes each, garage car structures (see struct below)
|
Garage car structure:
Offset
|
Type
|
Description
|
0x00
|
dword
|
model ID
|
0x04
|
float[3]
|
x,y,z position
|
0x10
|
float[3]
|
x,y,z vector rotation
|
0x1C
|
dword
|
immunities
|
0x20
|
byte
|
primary color
|
0x21
|
byte
|
secondary color
|
0x22
|
byte
|
current radio station
|
0x23
|
byte
|
variation 1
|
0x24
|
byte
|
variation 2
|
0x25
|
byte
|
bomb type
|
0x7AC
|
168 bytes[32]
|
168 bytes each, garage structures (see struct below)
|
Garage structure:
Offset
|
Type
|
Description
|
0x00
|
byte
|
type
|
0x01
|
byte
|
door status (0=closed,1=opened,2=closing,3=opening)
|
0x02
|
byte
|
max number of cars to store (4=default)
|
0x19
|
byte
|
swing door (03BB)
|
0x1A
|
byte
|
camera follow player (03DA)
|
0x1C
|
float[3]
|
entrance bottom left x,y,z coordinates
|
0x28
|
float[4]
|
rx,ry,rz,rw quaternion rotation
|
0x38
|
float
|
ceiling z coordinate
|
Export garage status (binary format):
- 0b000001=car 1 collected
- 0b000010=car 2 collected
- 0b000100=car 3 collected
- 0b001000=car 4 collected
- 0b010000=car 5 collected
- 0b100000=car 6 collected
Add them up to set the garage as car already collected:
0b000011, cars 1 and 2 collected
0b100011, cars 1, 2, and 6 are collected
Block 3: Game Logic
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of block 3
|
0x04
|
-
|
start of block 3, data below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header, constant 0x104)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
number of restart taxis (058D)
|
0x04
|
[16]
|
16 bytes each, restart taxi structures (see struct below)
|
Restart taxi structure:
Offset
|
Type
|
Description
|
0x0
|
float[3]
|
x,y,z coordinates
|
0xC
|
float
|
z angle rotation
|
Block 4: Vehicle Pool
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of block 4
|
0x04
|
-
|
start of block 4, data below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (6 bytes less than block header)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
number of vehicles
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
number of vehicles
|
0x0A
|
-
|
1500 bytes each, vehicle structures (see below)
|
Offset
|
Type
|
Description
|
0x34
|
float[3]
|
x,y,z coordinates
|
0x5C
|
word
|
IDE model number
|
Block 5: Object Pool
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of block 5
|
0x04
|
-
|
start of block 5, data below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
number of objects
|
0x04
|
-
|
88 bytes each, object structures (see struct below)
|
Object structure:
Offset
|
Type
|
Description
|
0x00
|
word
|
object IDE number
|
0x06
|
float[3]
|
x,y,z coordinates
|
Block 7: Cranes
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of block 7
|
0x04
|
-
|
start of block 7, data below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (constant 0x3E8)
|
0x04
|
-
|
start of subblock below
|
Offset
|
Type
|
Description
|
0x00
|
dword
|
number of cranes
|
0x08
|
[8]
|
124 bytes each, crane structures (see below)
|
Crane structure:
Offset
|
Type
|
Description
|
0x40
|
float
|
current z rotation
|
0x58
|
float[2]
|
x, y coordinates of center of crane - changes as the crane rotates
|
Block 8: Pickups
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header, constant 0x4494)
|
0x04
|
[336]
|
52 bytes each, pickup structures (see below)
|
Pickup structure
Offset
|
Type
|
Description
|
0x0
|
float[3]
|
x,y,z coordinates
|
0x18
|
dword
|
ammo or asset revenue
|
0x2E
|
byte
|
type
|
0x2F
|
byte
|
has been picked up
|
Block 9: Phone Info
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header, constant 0xA30)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x04
|
dword
|
number of phones
|
0x08
|
[50]
|
52 bytes each, phone structures (see below)
|
Phone structure:
Offset
|
Type
|
Description
|
0x0
|
float[3]
|
x,y,z coordinates
|
0x2C
|
dword
|
phone status (3=idle,9=ringing,others=leftover GTA III stuff)
|
Block 10: Restart Points Buffer
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header, constant 0x124)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
char[4]
|
"RST\0"
|
0x8
|
float[3]
|
hospital x,y,z coordinates (016C)
|
0x14
|
float
|
hospital z angle
|
Each point is 0x8 in size
|
0x88
|
float[3]
|
police x,y,z coordinates (016D)
|
0x94
|
float
|
police z angle
|
Each point is 0x8 in size
|
0x110
|
float[3]
|
override x,y,z coordinates (016E)
|
0x11C
|
float
|
override z angle
|
Block 11: Radar Blips Buffer
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header, constant 0xE18)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
char[4]
|
"RDR\0"
|
0x08
|
[75]
|
48 bytes each, blip structures (see below)
|
Blip structure:
Offset
|
Type
|
Description
|
0x00
|
dword
|
color
|
0x10
|
float[2]
|
x,y coordinates
|
0x18
|
float[3]
|
x,y,z coordinates
|
0x26
|
byte
|
brightness (0166)
|
0x2A
|
word
|
size (0168)
|
0x2C
|
word
|
show (018B)
|
0x2E
|
word
|
type
|
Block 12: All Zones Buffer
Offset
|
Type
|
Description
|
0x00
|
dword
|
size of subblock (4 bytes less than block header, constant 0x8BE0)
|
0x04
|
-
|
start of another set of offset below
|
Offset
|
Type
|
Description
|
0x00
|
char[4]
|
"ZNS\0"
|
0x10
|
-
|
56 bytes each, zone structures (see below)
|
Offset
|
Type
|
Description
|
0x00
|
string
|
name
|
0x08
|
float[3]
|
x1,y1,z1 coordinates
|
0x14
|
float[3]
|
x2,y2,z2 coordinates
|
0x20
|
dword
|
type
|
0x24
|
dword
|
island number
|
Block 13: All Gang Data
Offset
|
Type
|
Description
|
0x00
|
char[4]
|
"GNG\0"
|
0x04
|
[9]
|
24 bytes each, gang structures (see below)
|
Gang structure:
Offset
|
Type
|
Description
|
0x00
|
dword
|
car model (0236)
|
0x04
|
dword
|
ped model 1
|
0x08
|
dword
|
ped model 2
|
0x10
|
dword
|
weapon number 1 (0237)
|
0x14
|
dword
|
weapon number 2
|
Block 14: All Car Generators
Offset
|
Type
|
Description
|
0x00
|
char[4]
|
"CGN\0"
|
0x1C
|
[185]
|
44 bytes each, car generator structures (see below)
|
Car generator structure:
Offset
|
Type
|
Description
|
0x00
|
dword
|
model ID
|
0x04
|
float[3]
|
x,y,z coordinates
|
0x10
|
float
|
z angle rotation
|
0x14
|
word
|
primary color
|
0x16
|
word
|
secondary color
|
0x18
|
byte
|
force spawn
|
0x19
|
byte
|
alarm
|
0x1A
|
byte
|
lock
|
0x28
|
word
|
014C
|
0x2A
|
byte
|
has recently been stolen
|
Block 16: All Audio Script Objects
Offset
|
Type
|
Description
|
0x00
|
char[4]
|
"AUD\0"
|
0x12
|
-
|
24 bytes each, audio structures (see below)
|
Audio structure:
Offset
|
Type
|
Description
|
0x04
|
word
|
ID number
|
0x08
|
float[3]
|
x,y,z coordinates
|
Block 17: Script Paths
Offset
|
Type
|
Description
|
0x00
|
dword
|
total number of paths
|
0x0C
|
float
|
speed (049E)
|
0x10
|
float
|
distance along path (049F)
|
0x14
|
float
|
some sort of offset
|
0x1C
|
-
|
object handle, up to 6 supported
|
Block 18: Player Info
Offset
|
Type
|
Description
|
0x00
|
dword
|
current money
|
0x04
|
byte
|
wasted/busted status
|
0x0F
|
dword
|
currently displayed money
|
0x13
|
dword
|
number of packages picked up
|
0x17
|
dword
|
total number of packages (02ED)
|
0x1B
|
byte
|
infinite run (0330)
|
0x1C
|
byte
|
fast reload (0331)
|
0x1D
|
byte
|
fireproof (055D)
|
0x1E
|
byte
|
max health
|
0x1F
|
byte
|
max armor
|
0x20
|
byte
|
free busted once
|
0x21
|
byte
|
free wasted once (0414)
|
0x22
|
byte
|
driveby enabled (0501)
|
Block 19: Stats
Offset
|
Type
|
Description
|
0x00
|
dword
|
peds wasted by player
|
0x04
|
dword
|
peds wasted by others
|
0x08
|
dword
|
cars exploded
|
0x0C
|
dword
|
boats exploded
|
0x10
|
dword
|
tyres popped
|
0x14
|
dword
|
bullets fired
|
0x18
|
dword[23]
|
number of peds killed per Ped type
|
0x74
|
dword
|
helis exploded
|
0x78
|
float
|
progress made (030C)
|
0x7C
|
float
|
total progress (030D)
|
0x80
|
dword
|
kg of explosives used
|
0x84
|
dword
|
bullets hit
|
0x88
|
dword
|
headshots
|
0x8C
|
dword
|
total number of wanted stars attained
|
0x90
|
dword
|
total number of wanted stars evaded
|
0x94
|
dword
|
times busted
|
0x98
|
dword
|
times wasted
|
0x9C
|
dword
|
days passed
|
0xA0
|
dword
|
savecount
|
0xA4
|
dword
|
Pay 'n' Spray resprays
|
0xA8
|
float
|
max insane stunt jump distance
|
0xAC
|
float
|
max insane stunt jump height
|
0xB0
|
dword
|
max insane stunt flips
|
0xB4
|
dword
|
max insane stunt rotation
|
0xB8
|
dword
|
max insane stunt rating
|
0xBC
|
dword
|
unique jumps completed (0313)
|
0xC0
|
dword
|
unique jump count (0314)
|
0xC4
|
dword
|
mission attempts (0317)
|
0xC8
|
dword
|
passengers dropped off (0315)
|
0xCC
|
dword
|
cash made in taxi mission (0316)
|
0xD0
|
dword
|
unused1
|
0xD4
|
dword
|
unused2
|
0xD8
|
dword
|
unused3
|
0xDC
|
dword
|
secondary trash type (flying newspapers?) (055A)
|
0xE0
|
dword
|
secondary weather table (057C)
|
0xE4
|
float
|
distance traveled foot
|
0xE8
|
float
|
distance traveled car
|
0xEC
|
float
|
distance traveled bike
|
0xF0
|
float
|
distance traveled boat
|
0xF4
|
float
|
distance traveled golf cart
|
0xF8
|
float
|
distance traveled heli
|
0xFC
|
float
|
distance traveled plane
|
0x100
|
dword
|
people saved in ambulance mission (0401)
|
0x104
|
dword
|
criminals killed on vigilante (0402)
|
0x108
|
dword
|
fires extinguished in firefighter mission (0404)
|
0x10C
|
dword
|
highest vigilante level (0578)
|
0x110
|
dword
|
highest ambulance level (0403)
|
0x114
|
dword
|
highest firefighter level (0599)
|
0x118
|
dword
|
photos taken
|
0x11C
|
dword
|
rampages passed
|
0x120
|
dword
|
rampage count (0408)
|
0x124
|
dword
|
total number of missions (042C)
|
0x128
|
dword
|
flight time
|
0x12C
|
dword
|
times drowned
|
0x130
|
dword
|
seagulls snpied
|
0x134
|
float
|
weapon budget (0528)
|
0x138
|
float
|
fashion budget
|
0x13C
|
float
|
visits from loan sharks (unused)
|
0x140
|
float
|
stores knocked off (0531)
|
0x144
|
float
|
movie stunts (unused?)
|
0x148
|
float
|
assasination contracts completed (0533)
|
0x14C
|
float
|
pizzas delivered (0534)
|
0x150
|
float
|
garbage pickups made (unused)
|
0x154
|
float
|
ice creams sold (0536)
|
0x158
|
float
|
top shooting range score (unused, see 0x1FF)
|
0x15C
|
float
|
shooting range rank (unused, see 0x1FF)
|
0x160
|
dword
|
longest wheelie time
|
0x164
|
dword
|
longest stoppie time
|
0x168
|
dword
|
longest 2wheel time
|
0x16C
|
dword
|
longest wheelie distance
|
0x170
|
dword
|
longest stoppie distance
|
0x174
|
dword
|
longest 2wheel distance
|
0x178
|
dword
|
property budget (0529)
|
0x17C
|
dword
|
auto repair and painting budget
|
0x180
|
dword
|
property destroyed
|
0x184
|
dword
|
number of properties owned (0542)
|
0x188
|
dword
|
bloodring kills (0543)
|
0x18C
|
dword
|
longest time in bloodring (0544)
|
0x190
|
byte[15]
|
properties owned (0542)
|
0x19F
|
dword
|
highest media attention
|
0x1A3
|
dword[23]
|
best times for races/vehicle missions in seconds (042E)
|
0x1FF
|
dword[5]
|
minigame records (042F)
- 0 - Highest score for Shooter
- 1 - Best Percentage of hits for Shooter
- 2 - Number of drug deals made
- 3 - Highest score with Keepie-Uppy beach ball
- 4 - Unused
|
0x213
|
dword
|
Hotring Best Result (0582)
|
0x217
|
dword
|
peds killed recently (always zero while saving)
|
0x21B
|
dword
|
total peds killed (used for calculating rating)
|
0x21F
|
char[8]
|
last passed mission GXT entry name (0318)
|
0x227
|
dword
|
cheat rating
|
0x22B
|
float[10]
|
listening time per radio station in miliseconds
|
Block 20: Set Pieces
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
|
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
Block 22: Pedtype
Block 23: Planes
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.
See also
External links