Difference between revisions of "Saves (GTA VC)"

From GTAMods Wiki
Jump to navigation Jump to search
m (Block 21: Streaming)
 
(63 intermediate revisions by 5 users not shown)
Line 3: Line 3:
  
 
== Location ==
 
== 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.
+
By default, the game places its save game files into the folder "[[User Files|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).
 
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 ==
 
== 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.
+
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.
  
=== Block 0: Script ===
+
=== Data Blocks ===
{| class="wikitable"
+
There is a DWORD value preceding any block of data which is equal to the size of the block.
! Offset
+
 
! Type
+
==== Block 0: Simple Vars ====
! width="400px"| Description
+
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 0
| dword
 
| size of block 0
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of block 0, data below
| -
 
| start of block 0, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||[[wikipedia:Wide character|wchar_t]][24] ||[[0318|last mission passed]]
 
|-
 
|-
| 0x00
+
|0x0030 ||word ||SYSTEMTIME wYear
| wchar_t[24]
 
| last mission passed ([[0318]])
 
 
|-
 
|-
| 0x30
+
|0x0032 ||word ||SYSTEMTIME wMonth
| word
 
| SYSTEMTIME wYear
 
 
|-
 
|-
| 0x32
+
|0x0034 ||word ||SYSTEMTIME wDayOfWeek
| word
 
| SYSTEMTIME wMonth
 
 
|-
 
|-
| 0x34
+
|0x0036 ||word ||SYSTEMTIME wDay
| word
 
| SYSTEMTIME wDayOfWeek
 
 
|-
 
|-
| 0x36
+
|0x0038 ||word ||SYSTEMTIME wHour
| word
 
| SYSTEMTIME wDay
 
 
|-
 
|-
| 0x38
+
|0x003A ||word ||SYSTEMTIME wMinute
| word
 
| SYSTEMTIME wHour
 
 
|-
 
|-
| 0x3A
+
|0x003C ||word ||SYSTEMTIME wSecond
| word
 
| SYSTEMTIME wMinute
 
 
|-
 
|-
| 0x3C
+
|0x003E ||word ||SYSTEMTIME wMilliseconds
| word
 
| SYSTEMTIME wSecond
 
 
|-
 
|-
| 0x3E
+
|0x0040 ||dword ||unknown, value is always 12609
| word
 
| SYSTEMTIME wMilliseconds
 
 
|-
 
|-
| 0x40
+
|0x0044 ||dword ||current [[ZONE#Vice City|level]]
| dword
 
| unknown, value is always 12609
 
 
|-
 
|-
| 0x44
+
|0x0048 ||float[3] ||camera coordinates (x,y,z)
| dword
 
| current island
 
 
|-
 
|-
| 0x48
+
|0x0054 ||dword ||unknown, but only present in Steam version saves. If present, n = 4 in following offsets for this block, otherwise n = 0.
| float[3]
 
| camera coordinates (x,y,z)
 
 
|-
 
|-
| 0x54
+
|0x0054+n ||dword ||number of milliseconds per game minute (1000 = normal)
| dword
 
| length (ms) of in-game minute (1000=normal)
 
 
|-
 
|-
| 0x58
+
|0x0058+n ||dword ||game timer when game clock last ticked
| dword
 
| weather timer
 
 
|-
 
|-
| 0x5C
+
|0x005C+n ||byte ||game hour
| byte
 
| game hour
 
 
|-
 
|-
| 0x5D
+
|0x005D+n ||byte[3] ||''align''
| byte[3]
 
| ''align''
 
 
|-
 
|-
| 0x60
+
|0x0060+n ||byte ||game minute
| byte
 
| game minute
 
 
|-
 
|-
| 0x61
+
|0x0061+n ||byte[3] ||''align''
| byte[3]
 
| ''align''
 
 
|-
 
|-
| 0x64
+
|0x0064+n ||dword ||pad number?
| dword
 
| pad number?
 
 
|-
 
|-
| 0x68
+
|0x0068+n ||dword ||game timer in milliseconds
| dword
 
| global timer
 
 
|-
 
|-
| 0x6C
+
|0x006C+n ||float ||[[015D|time scale]]
| float
 
| game speed ([[015D]])
 
 
|-
 
|-
| 0x70
+
|0x0070+n ||float ||time step (frame delta time)
| float
 
| unknown
 
 
|-
 
|-
| 0x74
+
|0x0074+n ||float ||time step (not clipped)
| float
 
| unknown
 
 
|-
 
|-
| 0x78
+
|0x0078+n ||dword ||number of the frames processed from the beginning of the game
| dword
 
| unknown
 
 
|-
 
|-
| 0x7C
+
|0x007C+n ||float ||time step #2 (constant 1.0, unused)
| float
 
| unknown, always 1.0
 
 
|-
 
|-
| 0x80
+
|0x0080+n ||float ||frames per update (constant 1.0, unused)
| float
 
| unknown, always 1.0
 
 
|-
 
|-
| 0x84
+
|0x0084+n ||float ||time scale (constant 1.0, unused)
| float
 
| unknown, always 1.0
 
 
|-
 
|-
| 0x88
+
|0x0088+n ||word ||old (previous) weather type
| word
 
| unknown
 
 
|-
 
|-
| 0x8A
+
|0x008A+n ||byte[2] ||''align''
| byte[2]
 
| ''align''
 
 
|-
 
|-
| 0x8C
+
|0x008C+n ||word ||new (next) weather type
| dword
 
| relates to weather?
 
 
|-
 
|-
| 0x8E
+
|0x008E+n ||byte[2] ||''align''
| byte[2]
 
| ''align''
 
 
|-
 
|-
| 0x90
+
|0x0090+n ||word ||forced weather type ([[01B5]] or [[01B6]]), -1 if not forced
| word
 
| current weather
 
 
|-
 
|-
| 0x92
+
|0x0092+n ||byte[2] ||''align''
| byte[2]
 
| ''align''
 
 
|-
 
|-
| 0x94
+
|0x0094+n ||float ||weather interpolation value
| dword
 
| unknown
 
 
|-
 
|-
| 0x98
+
|0x0098+n ||dword ||current [[Time cycle#Vice City 2|weather list]] offset (between 0 and 63)
| dword
 
| current weather table offset (between 0 and 63)
 
 
|-
 
|-
| 0x9C
+
|0x009C+n ||float ||current vehicle camera view (between 0.0 and 5.0)
| float
 
| current vehicle camera view (between 0.0 and 5.0)
 
 
|-
 
|-
| 0xA0
+
|0x00A0+n ||float ||current on foot camera view (classic controls only)
| float
 
| current on foot camera view (classic controls only)
 
 
|-
 
|-
| 0xA4
+
|0x00A4+n ||dword ||[[04BB|current interior]]
| dword
 
| current [[interior]] ([[04BB]])
 
 
|-
 
|-
| 0xA8
+
|0x00A8+n ||byte ||[[0572|taxi boost jump]]
| byte
 
| taxi boost jump ([[0572]])
 
 
|-
 
|-
| 0xA9
+
|0x00A9+n ||byte[3] ||''align''
| byte[3]
 
| ''align''
 
 
|-
 
|-
| 0xAC
+
|0x00AC+n ||byte ||invert look option
| byte
 
| unknown
 
 
|-
 
|-
| 0xAD
+
|0x00AD+n ||byte[3] ||''align''
| byte[3]
 
| ''align''
 
 
|-
 
|-
| 0xB0
+
|0x00B0+n ||dword ||[[04F9|extra color]]
| dword
 
| sky color ([[04F9]])
 
 
|-
 
|-
| 0xB4
+
|0x00B4+n ||dword ||is extra color on
| dword
 
| sky atmosphere (0=normal,1=interior)
 
 
|-
 
|-
| 0xB8
+
|0x00B8+n ||float ||extra color interpolation (between 0.0 and 1.0)
| float
 
| sky atmosphere blue overlay (between 0.0 and 1.0)
 
 
|-
 
|-
| 0xBC
+
|0x00BC+n ||dword[10] ||current radio station position
| dword[10]
 
| unknown, relates to radio station?
 
 
|-
 
|-
| 0xE4
+
|0x00E4+n ||dword ||size of script block
| dword
 
| size of script block
 
 
|-
 
|-
| 0xE8
+
|0x00E8+n ||- ||start of script block, see below
| -
 
| start of script block, see below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Subblock A:
+
|+ style="text-align: left;"|Subblock A:
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||char[4] ||<code>SCR\0</code>
| char[4]
 
| "SCR\0"
 
 
|-
 
|-
| 0x04
+
|0x0004 ||dword ||size of script block again
| dword
 
| size of script block again
 
 
|-
 
|-
| 0x08
+
|0x0008 ||dword ||size of subblock A
| dword
 
| size of subblock A
 
 
|-
 
|-
| 0x0C
+
|0x000C ||- ||start of subblock A: global variables - each variable is 4 bytes long
| -
 
| start of subblock A: global variables - each variable is 4 bytes long
 
 
|}
 
|}
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Subblock B:
+
|+ style="text-align: left;"|Subblock B:
! Offset
+
!style="width: 3.5em;" |Offset ||style="width: 9.5em;" |Type ||style="width: 34em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock B (constant 0x248)
| dword
 
| size of subblock B (constant 0x248)
 
 
|-
 
|-
| 0x04
+
|0x0004 ||dword ||[[0180|on mission flag]] offset in global variable space
| dword
 
| unknown
 
 
|-
 
|-
| 0x08
+
|0x0008 ||dword ||game timer when last mission is passed ([[0318]] or [[0595]]), -1 if never passed a mission
| dword
 
| unknown
 
 
|-
 
|-
| 0x0C
+
|0x000C ||BuildingSwap[25] ||[[03B6|swapped building model]] structures (see below)
| 16 bytes[25]
 
| 16 bytes each, swapped building model structures ([[03B6]]) (see below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Swapped building model structure:
+
|+ style="text-align: left;"|BuildingSwap ({{Hint|0x10|16}} bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||object type
| dword
+
*0 = no object
| type
+
*1 = treadable ([[PATH (IDE Section)|PATH]] is attached to model, value is never used)
 +
*2 = building (no PATH is attached, value is always used)
 
|-
 
|-
| 0x04
+
|0x0004 ||dword ||object index
| dword
 
| building handle
 
 
|-
 
|-
| 0x08
+
|0x0008 ||dword ||new building IDE model, -1 if no model
| dword
 
| new building IDE model
 
 
|-
 
|-
| 0x0C
+
|0x000C ||dword ||old building IDE model, -1 if no model
| dword
 
| old building IDE model
 
 
|}
 
|}
 
</div>
 
</div>
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
| 0x198
+
|style="width: 3.5em;" |0x019C ||style="width: 9.5em;" |InvisibilitySetting[20] ||style="width: 34em;" |[[0363|object invisibility setting]] structures (see below)
| 8 bytes[20]
 
| invisible objects? (possible struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Invisible objects structure:
+
|+ style="text-align: left;"|InvisibilitySetting (8 bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||object type
| dword
+
*0 = no model
| type
+
*1 = treadable
 +
*2 = building
 +
*3 = script objects/loaded dynamic objects
 +
*4 = unloaded dynamic objects
 
|-
 
|-
| 0x04
+
|0x0004 ||dword ||object index
| dword
 
| handle
 
 
|}
 
|}
 
</div>
 
</div>
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
| 0x238
+
|style="width: 3.5em;" |0x023C ||style="width: 9.5em;" | - ||style="width: 34em;" |start of another set of offset below
| -
+
|}
| start of another set of offset below
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||byte ||is mission script running
 +
|-
 +
|0x0001 ||byte ||is [[0551|Kaufman Cabs radio on]]
 +
|-
 +
|0x0002 ||byte[2] ||''align''
 +
|-
 +
|0x0004 ||dword ||size of main
 +
|-
 +
|0x0008 ||dword ||size of largest mission
 +
|-
 +
|0x000C ||word ||number of mission scripts
 +
|-
 +
|0x000E ||word ||number of exclusive mission scripts
 +
|-
 +
|0x0010 ||dword ||number of running scripts
 +
|-
 +
|0x0014 ||Script[n] ||script structures (see below) where n is the number of scripts
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
|+ style="text-align: left;"|Script ({{Hint|0x88|136}} bytes):
! Type
+
!Offset ||Type ||style="width: 100%;" |Description
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||pointer to next script
| byte
+
|-
| unknown
+
|0x0004 ||dword ||pointer to previous script
 +
|-
 +
|0x0008 ||char[8] ||[[03A4|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 [[00D8|mission cleanup]]
 +
|-
 +
|0x007B ||byte ||skip wake time (always 0)
 +
|-
 +
|0x007C ||dword ||[[0001|wake time]]
 
|-
 
|-
| 0x01
+
|0x0080 ||word ||"if" check result
| byte
 
| kaufman cabs radio ([[0551]])
 
 
|-
 
|-
| 0x02
+
|0x0082 ||byte ||"not" flag
| word
 
| unknown
 
 
|-
 
|-
| 0x04
+
|0x0083 ||byte ||[[0111|death/arrest state]]
| dword
 
| size of main
 
 
|-
 
|-
| 0x08
+
|0x0084 ||byte ||[[0112|death/arrest has been executed]]
| dword
 
| size of largest mission
 
 
|-
 
|-
| 0x0C
+
|0x0085 ||byte ||mission flag
| dword
 
| number of missions
 
<!--
 
0x0E - -
 
0x10 - -
 
-->
 
 
|}
 
|}
 
</div>
 
</div>
<!--
+
</div>
Subblock C:
 
-->
 
 
</div>
 
</div>
 
</div>
 
</div>
  
=== Block 1: Ped Pool ===
+
==== Block 1: Player Peds ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 1
 +
|-
 +
|0x0004 ||- ||start of block 1, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock
 +
|-
 +
|0x0004 ||- ||start of subblock, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||number of players
| dword
 
| size of block 1
 
 
|-
 
|-
| 0x04
+
|0x0004 ||Player[n] ||player structure (see below) where n is the number of players
| -
 
| start of block 1, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
|+ style="text-align: left;" |Player ({{Hint|0x6FF|1791}} bytes):
! Type
+
!Offset ||style="width: 4em;" |Type ||style="width: 40em;" |Description
! width="400px"| Description
 
 
|-
 
|-
<!--
+
|0x0000 ||dword ||ped type, always 0
0x00 - -
+
|-
0x04 - -
+
|0x0004 ||word ||ped model index
0x06 - -
+
|-
-->
+
|0x0006 ||dword ||ped pool index
 
|-
 
|-
| 0x0A
+
|0x000A ||CPlayerPed ||ped structure dump (see structure below)
| -
 
| ped structure (see struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
Only data that are loaded by the game are listed here. The rest of the data get saved but do not get loaded.
|+ style="text-align: left;"| Ped structure:
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
|+ style="text-align: left;" |CPlayerPed ({{Hint|0x6D8|1752}} bytes):
! Type
+
!Offset ||Type ||style="width: 100%;" |Description
! width="400px"| Description
 
 
|-
 
|-
| 0x34
+
|0x0034 ||float[3] ||x,y,z coordinates
| float[3]
+
|-
| x,y,z coordinates
+
|0x0354 ||float ||health
 +
|-
 +
|0x0358 ||float ||armor
 +
|-
 +
|0x0408 ||dword ||[[Weapon#Vice City|weapon]] slot 0 type
 +
|-
 +
|0x0414 ||dword ||weapon slot 0 ammo
 +
|-
 +
|0x0420 ||dword ||weapon slot 1 type
 +
|-
 +
|0x042C ||dword ||weapon slot 1 ammo
 +
|-
 +
|0x0438 ||dword ||weapon slot 2 type
 +
|-
 +
|0x0444 ||dword ||weapon slot 2 ammo
 +
|-
 +
|0x0450 ||dword ||weapon slot 3 type
 +
|-
 +
|0x045C ||dword ||weapon slot 3 ammo
 +
|-
 +
|0x0468 ||dword ||weapon slot 4 type
 +
|-
 +
|0x0474 ||dword ||weapon slot 4 ammo
 +
|-
 +
|0x0480 ||dword ||weapon slot 5 type
 +
|-
 +
|0x048C ||dword ||weapon slot 5 ammo
 +
|-
 +
|0x0498 ||dword ||weapon slot 6 type
 +
|-
 +
|0x04A4 ||dword ||weapon slot 6 ammo
 +
|-
 +
|0x04B0 ||dword ||weapon slot 7 type
 +
|-
 +
|0x04BC ||dword ||weapon slot 7 ammo
 +
|-
 +
|0x04C8 ||dword ||weapon slot 8 type
 +
|-
 +
|0x04D4 ||dword ||weapon slot 8 ammo
 +
|-
 +
|0x04E0 ||dword ||weapon slot 9 type
 +
|-
 +
|0x04EC ||dword ||weapon slot 9 ammo
 
|-
 
|-
| 0xB8
+
|0x0504 ||byte ||currently selected weapon slot, always set to 0 upon loading
| float
 
| weight
 
 
|-
 
|-
| 0x354
+
|0x0604 ||float ||max stamina
| float
 
| health
 
 
|-
 
|-
| 0x358
+
|0x0624 ||dword[4] ||[[035D|targettable object]] index, -1 if no object
| float
 
| armor
 
 
|}
 
|}
 
</div>
 
</div>
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
| 0x6E2
+
|0x06E2 ||style="width: 4em;" |dword ||style="width: 40em;" |[[01F0|max wanted level]]
| dword
+
|-
| max wanted level
+
|0x06E6 ||dword ||[[Wanted level#Chaos Level|max chaos level]]
 
|-
 
|-
| 0x6E6
+
|0x06EA ||char[21] ||current model name
| dword
 
| max criminal points, in tandem with max wanted level
 
<!--
 
0x6EA - -
 
-->
 
 
|}
 
|}
 +
</div>
 +
</div>
 
</div>
 
</div>
  
=== Block 2: Garages ===
+
==== Block 2: Garages ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 2
| dword
 
| size of block 2
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of block 2, data below
| -
 
| start of block 2, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock (constant 0x1EC4)
| dword
 
| size of subblock (4 bytes less than block header, constant 0x1EC4)
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of subblock, data below
| -
 
| start of another set of offset below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||style="width: 6.5em;" |Type ||style="width: 37em;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||number of [[garage]]s
 
|-
 
|-
| 0x00
+
|0x0004 ||dword ||[[021D|free bombs]]
| dword
 
| number of garages ([[0219]])
 
 
|-
 
|-
| 0x04
+
|0x0008 ||dword ||[[0335|free resprays]]
| dword
 
| free bombs (0=not,1=yes)
 
 
|-
 
|-
| 0x08
+
|0x000C ||dword ||number of cars collected (unused)
| dword
 
| free respray ([[0335]])
 
<!--
 
 
|-
 
|-
| 0x0C
+
|0x0010 ||dword ||number of Securicars collected (unused)
| -
 
| -
 
 
|-
 
|-
| 0x10
+
|0x0014 ||dword ||number of Police cars collected (unused)
| -
 
| -
 
 
|-
 
|-
| 0x14
+
|0x0018 ||dword ||cars collected by garage type 8 in [[flag field]] representation
| -
+
*0b00000'''1''' = car 1 collected
| -
+
*0b0000'''1'''0 = car 2 collected
-->
+
*0b000'''1'''00 = car 3 collected
 +
*0b00'''1'''000 = car 4 collected
 +
*0b0'''1'''0000 = car 5 collected
 +
*0b'''1'''00000 = car 6 collected
 
|-
 
|-
| 0x18
+
|0x001C ||dword ||cars collected by garage type 9 in flag field representation
| dword
 
| garage type 8 status, see below
 
 
|-
 
|-
| 0x1C
+
|0x0020 ||dword ||cars collected by garage type 10 in flag field representation
| dword
 
| garage type 9 status
 
 
|-
 
|-
| 0x20
+
|0x0024 ||dword ||cars collected by garage type 22 in flag field representation
| dword
 
| garage type 10 status
 
 
|-
 
|-
| 0x24
+
|0x0028 ||dword ||game timer when [[Text#Garage message|garage full message]] was last shown
| dword
 
| garage type 22 status
 
<!--
 
 
|-
 
|-
| 0x28
+
|0x002C ||StoredCar[48] ||stored car structures (see below)
| -
 
| -
 
-->
 
 
|-
 
|-
| 0x2C
+
|0x07AC ||Garage[32] ||garage structures (see below)
| 40 bytes[48]
 
| 40 bytes each, garage car structures (see struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Garage car structure:
+
|+ style="text-align: left;"|StoredCar ({{Hint|0x28|40}} bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||model ID
| dword
 
| model ID
 
 
|-
 
|-
| 0x04
+
|0x0004 ||float[3] ||x,y,z position
| float[3]
 
| x,y,z position
 
 
|-
 
|-
| 0x10
+
|0x0010 ||float[3] ||x,y,z vector rotation
| float[3]
 
| x,y,z vector rotation
 
 
|-
 
|-
| 0x1C
+
|0x001C ||dword ||[[02AC|proofs]]
| dword
 
| immunities
 
 
|-
 
|-
| 0x20
+
|0x0020 ||byte ||primary color
| byte
 
| primary color
 
 
|-
 
|-
| 0x21
+
|0x0021 ||byte ||secondary color
| byte
 
| secondary color
 
 
|-
 
|-
| 0x22
+
|0x0022 ||byte ||current radio station
| byte
 
| current radio station
 
 
|-
 
|-
| 0x23
+
|0x0023 ||byte ||variation 1
| byte
 
| variation 1
 
 
|-
 
|-
| 0x24
+
|0x0024 ||byte ||variation 2
| byte
 
| variation 2
 
 
|-
 
|-
| 0x25
+
|0x0025 ||byte ||bomb type
| byte
 
| bomb type
 
 
|}
 
|}
 
</div>
 
</div>
{| class="wikitable"
 
| 0x7AC
 
| 168 bytes[32]
 
| 168 bytes each, garage structures (see struct below)
 
|}
 
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Garage structure:
+
|+ style="text-align: left;"|Garage ({{Hint|0xA8|168}} bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| 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 ||[[057A|maximum number of cars in garage]] (4 = default)
 +
<!--
 +
0x0003 byte -
 +
-->
 +
|-
 +
|0x0004 ||byte ||closed but nothing dropped off (mission keepcar)
 +
|-
 +
|0x0005 ||byte ||[[02B9|is inactive]] (unused)
 +
|-
 +
|0x0006 ||byte ||[[0329|has respray happened]]
 +
|-
 +
|0x0007 ||byte ||''align''
 
|-
 
|-
| 0x00
+
|0x0008 ||dword ||[[02FA|target model]] (unused)
| byte
 
| type
 
 
|-
 
|-
| 0x01
+
|0x000C ||pointer ||door object
| byte
 
| door status (0=closed,1=opened,2=closing,3=opening)
 
 
|-
 
|-
| 0x02
+
|0x0010 ||pointer ||crusher top object (unused)
| byte
 
| max number of cars to store (4=default)
 
 
<!--
 
<!--
0x03 byte -
+
0x0014 - -
0x04 byte -
+
0x0015 - -
0x05 byte -
+
0x0016 - -
0x06 - -
+
0x0017 - -
0x08 - -
+
0x0018 - -
0x0C - -
 
0x10 - -
 
0x14 - -
 
0x15 - -
 
0x16 - -
 
0x17 - -
 
0x18 - -
 
 
-->
 
-->
 
|-
 
|-
| 0x19
+
|0x0019 ||byte ||[[03BB|rotating door]]
| byte
+
|-
| swing door ([[03BB]])
+
|0x001A ||byte ||[[03DA|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)
 
|-
 
|-
| 0x1A
+
|0x006C ||float ||door object z position
| byte
 
| camera follow player ([[03DA]])
 
 
|-
 
|-
| 0x1C
+
|0x0070 ||float ||crusher top object z position (unused)
| float[3]
 
| entrance bottom left x,y,z coordinates
 
 
|-
 
|-
| 0x28
+
|0x0074 ||dword ||game timer to open a closed garage
| float[4]
 
| rx,ry,rz,rw quaternion rotation
 
 
|-
 
|-
| 0x38
+
|0x007C ||pointer ||target vehicle
| float
 
| ceiling z coordinate
 
 
|}
 
|}
 
</div>
 
</div>
 
</div>
 
</div>
 
</div>
 
</div>
Export garage status (binary format):
 
*0b00000'''1'''=car 1 collected
 
*0b0000'''1'''0=car 2 collected
 
*0b000'''1'''00=car 3 collected
 
*0b00'''1'''000=car 4 collected
 
*0b0'''1'''0000=car 5 collected
 
*0b'''1'''00000=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 ===
+
==== Block 3: Game Logic ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 3
| dword
 
| size of block 3
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of block 3, data below
| -
 
| start of block 3, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock (constant 0x104)
| dword
 
| size of subblock (4 bytes less than block header, constant 0x104)
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of subblock, data below
| -
 
| start of another set of offset below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||number of [[058D|taxi shortcut pick-up points for mission]]
| dword
 
| number of restart taxis ([[058D]])
 
 
|-
 
|-
| 0x04
+
|0x0004 ||style="white-space: nowrap;" |TaxiShortcut[16] ||taxi shortcut structures (see below)
| [16]
 
| 16 bytes each, restart taxi structures (see struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Restart taxi structure:
+
|+ style="text-align: left;"|TaxiShortcut ({{Hint|0x10|16}} bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x0
+
|0x0000 ||float[3] ||x,y,z coordinates
| float[3]
 
| x,y,z coordinates
 
 
|-
 
|-
| 0xC
+
|0x000C ||float ||heading
| float
 
| z angle rotation
 
 
|}
 
|}
 
</div>
 
</div>
Line 693: Line 565:
 
</div>
 
</div>
  
=== Block 4: Vehicle Pool ===
+
==== Block 4: Vehicles ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 4
 +
|-
 +
|0x0004 ||- ||start of block 4, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock
| dword
+
|-
| size of block 4
+
|0x0004 ||- ||start of another set of offset below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||number of general vehicles
 +
|-
 +
|0x0004 ||dword ||number of boats
 +
|-
 +
|0x0008 ||dword ||number of bikes
 
|-
 
|-
| 0x04
+
|0x000C ||Vehicle[n] ||vehicle structures (see below) where n is the number of general vehicles, boats, and bikes
| -
 
| start of block 4, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
|+ style="text-align: left;"| Vehicle ({{Hint|0x5E6|1510}} (automobile) | {{Hint|0x4CA|1226}} (boat) | {{Hint|0x4F6|1270}} (bike) bytes):
! Type
+
!Offset ||Type ||style="width: 100%;" |Description
! width="400px"| Description
+
|-
 +
|0x0000 ||dword ||vehicle type
 +
*0 = automobile
 +
*1 = boat
 +
*5 = bike
 
|-
 
|-
| 0x00
+
|0x0004 ||word ||[[CARS (IDE Section)#Vice City|vehicle model index]]
| dword
+
|-
| size of subblock (6 bytes less than block header)
+
|0x0006 ||dword ||vehicle pool index
 
|-
 
|-
| 0x04
+
|0x000A ||CAutomobile<br>CBoat<br>CBike ||vehicle structure dump (see below, dependent on vehicle type)
| -
 
| start of another set of offset below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
If vehicle is type automobile (any vehicles with four wheels, including pilotable helicopters):
! Offset
+
{|class="wikitable" style="max-width: 48em;"
! Type
+
|+ style="text-align: left;"|CAutomobile ({{Hint|0x5DC|1500}} bytes):
! width="400px"| Description
+
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x00
+
|0x0034 ||float[3] ||x,y,z coordinates
| dword
 
| number of vehicles
 
 
|-
 
|-
| 0x04
+
|0x005C ||word ||IDE model number
| -
 
| start of another set of offset below
 
 
|}
 
|}
 +
</div>
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
If vehicle is type boat:
! Offset
+
{|class="wikitable" style="max-width: 48em;"
! Type
+
|+ style="text-align: left;"|CBoat ({{Hint|0x4C0|1216}} bytes):
! width="400px"| Description
+
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x00
+
|0x0034 ||float[3] ||x,y,z coordinates
| dword
 
| number of vehicles
 
 
|-
 
|-
| 0x0A
+
|0x005C ||word ||IDE model number
| -
 
| 1500 bytes each, vehicle structures (see below)
 
 
|}
 
|}
 +
</div>
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
If vehicle is type bike:
! Offset
+
{|class="wikitable" style="max-width: 48em;"
! Type
+
|+ style="text-align: left;"|CBike ({{Hint|0x4EC|1260}} bytes):
! width="400px"| Description
+
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x34
+
|0x0034 ||float[3] ||x,y,z coordinates
| float[3]
 
| x,y,z coordinates
 
 
|-
 
|-
| 0x5C
+
|0x005C ||word ||IDE model number
| word
 
| IDE model number
 
 
|}
 
|}
 
</div>
 
</div>
Line 768: Line 646:
 
</div>
 
</div>
  
=== Block 5: Object Pool ===
+
==== Block 5: Objects ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 5
| dword
 
| size of block 5
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of block 5, data below
| -
 
| start of block 5, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock (4 bytes less than block header)
| dword
 
| size of subblock (4 bytes less than block header)
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of another set of offset below
| -
 
| start of another set of offset below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||number of objects
| dword
 
| number of objects
 
 
|-
 
|-
| 0x04
+
|0x0004 ||Object[n] ||object structures (see below) where n is the number of objects
| -
 
| 88 bytes each, object structures (see struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Object structure:
+
|+ style="text-align: left;"|Object ({{Hint|0x58|88}} bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||word ||object [[IDE|model index]]
 +
|-
 +
|0x0002 ||dword ||object pool index
 +
|-
 +
|0x0006 ||float[3] ||x,y,z coordinates
 
|-
 
|-
| 0x00
+
|0x000F ||char[6] ||compressed rotational data
| word
 
| object IDE number
 
 
<!--
 
<!--
0x02 - -
+
0x001E - -
 +
0x0022 - -
 
-->
 
-->
 
|-
 
|-
| 0x06
+
|0x003A ||byte ||always 2
| float[3]
+
|-
| x,y,z coordinates
+
|0x003B ||byte ||is a [[pickup]]
 +
|-
 +
|0x003C ||byte ||is a pickup in shop (type 1 pickup)
 +
|-
 +
|0x003D ||byte ||is a pickup in shop out of stock (type 7 pickup)
 
<!--
 
<!--
0x1E - -
+
0x003E - -
0x22 - -
+
0x003F - -
0x3A - -
+
0x0040 - -
0x3B - -
+
0x0041 - -
0x3C - -
+
0x0042 - -
0x3D - -
+
0x0044 - -
0x3E - -
+
0x0046 - -
0x3F - -
+
0x004A - -
0x40 - -
+
0x004B - -
0x41 - -
+
0x004C - -
0x42 - -
+
0x0050 - -
0x44 - -
 
0x46 - -
 
0x4A - -
 
0x4B - -
 
0x4C - -
 
0x50 - -
 
 
-->
 
-->
 
|}
 
|}
Line 851: Line 712:
 
</div>
 
</div>
  
=== Block 7: Cranes ===
+
==== Block 6: Paths ====
{| class="wikitable"
+
 
! Offset
+
==== Block 7: Cranes ====
! Type
+
{|class="wikitable" style="max-width: 48em;"
! width="400px"| Description
+
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 7
| dword
 
| size of block 7
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of block 7, data below
| -
 
| start of block 7, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock (constant 0x3E8)
| dword
 
| size of subblock (constant 0x3E8)
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of subblock, data below
| -
 
| start of subblock below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||number of [[crane]]s
| dword
+
|-
| number of cranes
+
|0x0004 ||dword ||[[03EC|cars collected by military crane]]
<!--
 
| 0x04
 
| -
 
| -
 
-->
 
 
|-
 
|-
| 0x08
+
|0x0008 ||style="white-space: nowrap;" |Crane[8] ||crane structures (see below)
| [8]
 
| 124 bytes each, crane structures (see below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Crane structure:
+
|+ style="text-align: left;"|Crane ({{Hint|0x7C|124}} bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||pointer ||crane object
 +
|-
 +
|0x0004 ||pointer ||magnet object
 +
|-
 +
|0x0008 ||float ||pickup zone x1 ([[01EE|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
 +
|-
 
<!--
 
<!--
0x00 - -
+
0x0064 - -
0x04 - -
+
0x0068 - -
0x08 - -
 
0x0C - -
 
0x14 - -
 
0x18 - -
 
0x1C - -
 
0x20 - -
 
0x24 - -
 
0x28 - -
 
0x2C - -
 
0x30 - -
 
0x34 - -
 
0x38 - -
 
0x3C - -
 
 
-->
 
-->
 
|-
 
|-
| 0x40
+
|0x006C ||pointer ||vehicle to pick up
| float
+
|-
| current z rotation
+
|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 [[02FB|crusher crane]]
 +
|-
 +
|0x0078 ||byte ||is [[0368|military crane]]
 
<!--
 
<!--
0x44 - -
+
0x0079 - -
0x48 - -
 
0x4C - -
 
0x50 - -
 
0x54 - -
 
 
-->
 
-->
 
|-
 
|-
| 0x58
+
|0x007A ||byte ||model is not doc_crane_cab0
| float[2]
+
|-
| x, y coordinates of center of crane - changes as the crane rotates
+
|0x007B ||byte ||''align''
<!--
 
0x60 - -
 
0x64 - -
 
0x68 - -
 
0x6C - -
 
0x70 - -
 
0x74 - -
 
0x75 - -
 
0x76 - -
 
0x77 - -
 
0x78 - -
 
0x79 - -
 
0x7A - -
 
-->
 
 
|}
 
|}
 
</div>
 
</div>
Line 955: Line 826:
 
</div>
 
</div>
  
===Block 8: Pickups===
+
==== Block 8: Pickups ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 8
 
|-
 
|-
| 0x00
+
|0x0004 ||- ||start of block 8, data below
| dword
+
|}
| size of subblock (4 bytes less than block header, constant 0x4494)
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||style="width: 5.5em;" |Type ||style="width: 39em;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock (constant 0x4494)
 
|-
 
|-
| 0x04
+
|0x0004 ||Pickup[336] ||[[pickup]] structures (see below)
| [336]
 
| 52 bytes each, pickup structures (see below)
 
 
|}
 
|}
{| class="wikitable"
+
<div style="margin-left: 3em;">
|+ style="text-align: left;"| Pickup structure
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
|+ style="text-align: left;"| Pickup ({{Hint|0x34|52}} bytes):
! Type
+
!Offset ||Type ||style="width: 100%;" |Description
! width="400px"| Description
 
 
|-
 
|-
| 0x0
+
|0x0000 ||float[3] ||x,y,z coordinates
| float[3]
+
|-
| x,y,z coordinates
+
|0x000C ||float ||current [[04A6|protection]] revenue
 +
|-
 +
|0x0010 ||dword ||pickup object entity
 +
|-
 +
|0x0014 ||dword ||pickup extra object entity (weapons bomb or minigun for example)
 +
|-
 +
|0x0018 ||dword ||[[032B|ammo/money/text]]/protection revenue limit
 +
|-
 +
|0x001C ||dword ||timer
 +
|-
 +
|0x0020 ||word ||protection revenue rate
 +
|-
 +
|0x0022 ||word ||IDE model
 
<!--
 
<!--
0x0C - -
+
0x0024 - -
0x10 - -
 
0x14 - -
 
 
-->
 
-->
 
|-
 
|-
| 0x18
+
|0x0026 ||char[8] ||string to display in help box ([[0517]]/[[0518]])
| dword
+
|-
| ammo or asset revenue
+
|0x002E ||byte ||type
 +
|-
 +
|0x002F ||byte ||has been picked up
 
<!--
 
<!--
0x1C - -
+
0x0030 - -
0x20 - -
 
0x24 - -
 
0x26 - -
 
0x2A - -
 
 
-->
 
-->
 +
|}
 +
</div>
 +
{|class="wikitable" style="max-width: 48em;"
 +
|0x4444 ||style="width: 5.5em;" |word ||style="width: 39em;" |collected index for below, always between 0 and 19
 
|-
 
|-
| 0x2E
+
|0x4446 ||byte[2] ||''align''
| byte
 
| type
 
 
|-
 
|-
| 0x2F
+
|0x4448 ||dword[20] ||pickup index, latest collected pickup pointed by collected index from above
| byte
 
| has been picked up
 
<!--
 
0x30 - -
 
-->
 
 
|}
 
|}
 +
</div>
  
===Block 9: Phone Info===
+
==== Block 9: Phone Info ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 9
 +
|-
 +
|0x0004 ||- ||start of block 9, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock (constant 0xA30)
| dword
 
| size of subblock (4 bytes less than block header, constant 0xA30)
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of subblock, data below
| -
 
| start of another set of offset below
 
 
|}
 
|}
 
+
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||number of phone objects
 
|-
 
|-
<!--
+
|0x0004 ||dword ||number of active phones
0x00 - -
 
-->
 
| 0x04
 
| dword
 
| number of phones
 
 
|-
 
|-
| 0x08
+
|0x0008 ||Phone[50] ||[[024A|phone]] structures (see below)
| [50]
 
| 52 bytes each, phone structures (see below)
 
 
|}
 
|}
 
+
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Phone structure:
+
|+ style="text-align: left;"|Phone ({{Hint|0x34|52}} bytes):
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| 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
 
|-
 
|-
| 0x0
+
|0x0030 ||byte ||is player within range of phone
| float[3]
 
| x,y,z coordinates
 
 
|-
 
|-
| 0x2C
+
|0x0031 ||byte[3] ||''align''
| dword
 
| phone status (3=idle,9=ringing,others=leftover GTA III stuff)
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
===Block 10: Restart Points Buffer===
+
==== Block 10: Restart Points ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
 
| 0x00
 
| 0x00
 
| dword
 
| dword
| size of subblock (4 bytes less than block header, constant 0x124)
+
| size of block 10
 
|-
 
|-
 
| 0x04
 
| 0x04
 
| -
 
| -
| start of another set of offset below
+
| start of block 10, data below
 
|}
 
|}
 
+
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
 
| 0x00
 
| 0x00
 +
| dword
 +
| size of subblock (constant 0x124)
 +
|-
 +
| 0x04
 +
| -
 +
| start of subblock, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
| 0x000
 
| char[4]
 
| char[4]
| "RST\0"
+
| <code>RST\0</code>
<!--
+
|-
0x4 - -
+
| 0x004
-->
+
| dword
 +
| size of rest of subblock
 
|-
 
|-
| 0x8
+
| 0x008
 
| float[3]
 
| float[3]
| hospital x,y,z coordinates ([[016C]])
+
| [[016C|hospital restart]] x,y,z coordinates
 
|-
 
|-
| 0x14
+
| 0x014
 
| float
 
| float
| hospital z angle
+
| hospital restart heading
 
|-
 
|-
|colspan=3| Each point is 0x8 in size
+
|colspan=3| 7 additional hospital restarts
 
|-
 
|-
| 0x88
+
| 0x088
 
| float[3]
 
| float[3]
| police x,y,z coordinates ([[016D]])
+
| [[016D|police restart]] x,y,z coordinates
 
|-
 
|-
| 0x94
+
| 0x094
 
| float
 
| float
| police z angle
+
| police restart heading
 +
|-
 +
|colspan=3| 7 additional police restarts
 +
|-
 +
| 0x108
 +
| word
 +
| number of hospital restarts
 +
|-
 +
| 0x10A
 +
| word
 +
| number of police restarts
 
|-
 
|-
|colspan=3| Each point is 0x8 in size
+
| 0x10C
<!--
+
| byte
0x104 - -
+
| override next restart active
0x108 - -
+
|-
0x10A - -
+
| 0x10D
0x10C - -
+
| byte[3]
0x10D - -
+
| ''align''
0x10E - -
 
-->
 
 
|-
 
|-
 
| 0x110
 
| 0x110
 
| float[3]
 
| float[3]
| override x,y,z coordinates ([[016E]])
+
| [[016E|override next restart]] x,y,z coordinates
 
|-
 
|-
 
| 0x11C
 
| 0x11C
 
| float
 
| float
| override z angle
+
| override next restart heading
<!--
+
|-
0x120 - -
+
| 0x120
0x121 - -
+
| byte
0x122 - -
+
| always 1, leftover from GTA III's [[040F]]
0x123 - -
+
|-
-->
+
| 0x121
 +
| byte
 +
| always 1, leftover from GTA III's [[040E]]
 +
|-
 +
| 0x122
 +
| byte
 +
| [[041F|override hospital level]]
 +
|-
 +
| 0x123
 +
| byte
 +
| [[0420|override police station level]]
 
|}
 
|}
 +
</div>
 +
</div>
  
===Block 11: Radar Blips Buffer===
+
==== Block 11: Radar Blips ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 11
 +
|-
 +
|0x0004 ||- ||start of block 11, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock (constant 0xE18)
 +
|-
 +
|0x0004 ||- ||start of subblock, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||char[4] ||<code>RDR\0</code>
 
|-
 
|-
| 0x00
+
|0x0004 ||dword ||size of rest of subblock
| dword
 
| size of subblock (4 bytes less than block header, constant 0xE18)
 
 
|-
 
|-
| 0x04
+
|0x0008 ||style="white-space: nowrap;" |Blip[75] ||blip structures (see below)
| -
 
| start of another set of offset below
 
 
|}
 
|}
 
+
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
|+style="text-align: left;"|Blip ({{Hint|0x30|48}} bytes):
! Type
+
!Offset ||Type ||style="width: 100%;" |Description
! width="400px"| Description
+
|-
 +
|0x0000 ||dword ||[[0165|blip color]]
 +
|-
 +
|0x0004 ||float ||[[Saves_(GTA_3)#Notes|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)
 +
<!--
 +
0x0024 - -
 +
-->
 +
|-
 +
|0x0026 ||byte ||[[0166|dim blip]]
 +
<!--
 +
0x0027 - -
 +
-->
 
|-
 
|-
| 0x00
+
|0x0028 ||byte ||is short range
| char[4]
 
| "RDR\0"
 
 
<!--
 
<!--
0x04 - -
+
0x0029 - -
 
-->
 
-->
 
|-
 
|-
| 0x08
+
|0x002A ||word ||[[0168|blip scale]]
| [75]
+
|-
| 48 bytes each, blip structures (see below)
+
|0x002C ||word ||[[018B|blip display]]
 +
|-
 +
|0x002E ||word ||[[Blip#Vice City|sprite blip]]
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
{| class="wikitable"
+
==== Block 12: Zones ====
|+ style="text-align: left;"| Blip structure:
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 12
 +
|-
 +
|0x0004 ||- ||start of block 12, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock (constant 0x8BE0)
 
|-
 
|-
| 0x00
+
|0x0004 ||- ||start of subblock, data below
| dword
+
|}
| color
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||char[4] ||<code>ZNS\0</code>
 +
|-
 +
|0x0004 ||dword ||size of rest of subblock
 +
|-
 +
|0x0008 ||dword ||current level
 +
*1 = Vice City Beach
 +
*2 = Vice City Mainland
 
<!--
 
<!--
0x04 - -
+
0x0027 word -
0x08 - -
 
0x0C - -
 
 
-->
 
-->
 
|-
 
|-
| 0x10
+
|0x000E ||byte[2] ||''align''
| float[2]
+
|-
| x,y coordinates
+
|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
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
|+ style="text-align: left;"|Zone ({{Hint|0x38|56}} bytes):
 +
!Offset ||Type ||style="width: 100%;" |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
 
|-
 
|-
| 0x18
+
|0x0030 ||dword ||parent zone index
| float[3]
 
| x,y,z coordinates
 
 
<!--
 
<!--
0x24 - -
+
0x0034 dword -
 
-->
 
-->
 +
|}
 +
</div>
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
|+ style="text-align: left;"|ZoneInfo ({{Hint|0x44|68}} bytes):
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||word ||[[0152|in car ped density]]
 +
|-
 +
|0x0002 ||word ||[[04EC|car class 0 density]]
 +
|-
 +
|0x0004 ||word ||car class 0 and 1 density
 +
|-
 +
|0x0006 ||word ||car class 0, 1, and 2 density
 +
|-
 +
|0x0008 ||word ||car class 0, 1, 2, and 3 density
 +
|-
 +
|0x000A ||word ||car class 0, 1, 2, 3, and 4 density
 +
|-
 +
|0x000C ||word ||car class 0, 1, 2, 3, 4, and 5 density
 +
|-
 +
|0x000E ||word ||car class 0, 1, 2, 3, 4, 5, and 6 density
 +
|-
 +
|0x0010 ||word ||car class 0, 1, 2, 3, 4, 5, 6, and 7 density
 +
|-
 +
|0x0012 ||word ||car class 0, 1, 2, 3, 4, 5, 6, 7, and 8 density
 +
|-
 +
|0x0014 ||word ||car class 9 density
 
|-
 
|-
| 0x26
+
|0x0016 ||word ||car class 9 and 10 density
| byte
+
|-
| brightness ([[0166]])
+
|0x0018 ||word ||in car cop + gang 0 density
<!--
+
|-
0x27 - -
+
|0x001A ||word ||in car cop + gang 0 and 1 density
0x28 - -
+
|-
0x29 - -
+
|0x001C ||word ||in car cop + gang 0, 1, and 2 density
-->
+
|-
 +
|0x001E ||word ||in car cop + gang 0, 1, 2, and 3 density
 +
|-
 +
|0x0020 ||word ||in car cop + gang 0, 1, 2, 3, and 4 density
 +
|-
 +
|0x0022 ||word ||in car cop + gang 0, 1, 2, 3, 4, and 5 density
 +
|-
 +
|0x0024 ||word ||in car cop + gang 0, 1, 2, 3, 4, 5, and 6 density
 +
|-
 +
|0x0026 ||word ||in car cop + gang 0, 1, 2, 3, 4, 5, 6, and 7 density
 +
|-
 +
|0x0028 ||word ||in car cop + gang 0, 1, 2, 3, 4, 5, 6, 7, and 8 density
 +
|-
 +
|0x002A ||word ||in car cop density
 +
|-
 +
|0x002C ||word ||[[015C|on foot ped density]]
 +
|-
 +
|0x002E ||word ||on foot cop + gang 0 density
 +
|-
 +
|0x0030 ||word ||on foot cop + gang 0 and 1 density
 +
|-
 +
|0x0032 ||word ||on foot cop + gang 0, 1, and 2 density
 +
|-
 +
|0x0034 ||word ||on foot cop + gang 0, 1, 2, and 3 density
 +
|-
 +
|0x0036 ||word ||on foot cop + gang 0, 1, 2, 3, and 4 density
 +
|-
 +
|0x0038 ||word ||on foot cop + gang 0, 1, 2, 3, 4, and 5 density
 +
|-
 +
|0x003A ||word ||on foot cop + gang 0, 1, 2, 3, 4, 5, and 6 density
 +
|-
 +
|0x003C ||word ||on foot cop + gang 0, 1, 2, 3, 4, 5, 6, and 7 density
 
|-
 
|-
| 0x2A
+
|0x003E ||word ||on foot cop + gang 0, 1, 2, 3, 4, 5, 6, 7, and 8 density
| word
 
| size ([[0168]])
 
 
|-
 
|-
| 0x2C
+
|0x0040 ||word ||on foot cop density
| word
 
| show ([[018B]])
 
 
|-
 
|-
| 0x2E
+
|0x0042 ||word ||[[0324|ped group]]
| word
 
| type
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
===Block 12: All Zones Buffer===
+
==== Block 13: Gangs ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 13
 +
|-
 +
|0x0004 ||- ||start of block 13, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock (constant 0xE0)
 +
|-
 +
|0x0004 ||- ||start of subblock, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||char[4] ||<code>GNG\0</code>
 +
|-
 +
|0x0004 ||dword ||size of rest of subblock
 +
|-
 +
|0x0008 ||GangInfo[9] ||[[gang]] structures (see below)
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
|+ style="text-align: left;"|GangInfo ({{Hint|0x18|24}} bytes):
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||[[0236|gang car model]]
 +
|-
 +
|0x0004 ||dword ||[[0235|gang ped model]] 1
 +
|-
 +
|0x0008 ||dword ||gang ped model 2
 
|-
 
|-
| 0x00
+
|0x000C ||byte ||gang ped model preference
| dword
+
|-
| size of subblock (4 bytes less than block header, constant 0x8BE0)
+
|0x000D ||byte[3] ||''align''
 +
|-
 +
|0x0010 ||dword ||[[0237|gang weapon]] type 1
 
|-
 
|-
| 0x04
+
|0x0014 ||dword ||gang weapon type 2
| -
 
| start of another set of offset below
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
{| class="wikitable"
+
==== Block 14: Car Generators ====
! Offset
+
{|class="wikitable" style="max-width: 48em;"
! Type
+
!Offset ||Type ||style="width: 100%;" |Description
! width="400px"| Description
+
|-
 +
|0x0000 ||dword ||size of block 14
 +
|-
 +
|0x0004 ||- ||start of block 14, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock (constant 0x1FE8)
 
|-
 
|-
| 0x00
+
|0x0004 ||- ||start of subblock, data below
| char[4]
+
|}
| "ZNS\0"
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||char[4] ||<code>CGN\0</code>
 +
|-
 +
|0x0004 ||dword ||size of rest of subblock
 +
|-
 +
|0x0008 ||dword ||size of subdata before car generator structures (constant 0xC)
 +
|-
 +
|0x000C ||dword ||total number of [[014B|car generators]]
 +
|-
 +
|0x0010 ||dword ||total number of [[014C|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)
 
|-
 
|-
| 0x10
+
|0x001C ||CarGenerator[185] ||car generator structures (see below)
| -
 
| 56 bytes each, zone structures (see below)
 
 
|}
 
|}
 
+
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
|+ style="text-align: left;"|CarGenerator ({{Hint|0x2C|44}} bytes):
! Type
+
!Offset ||Type ||style="width: 100%;" |Description
! width="400px"| 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
 
|-
 
|-
| 0x00
+
|0x0020 ||dword ||game timer when car is generated, game timer + 60000 when car is stolen
| string
 
| name
 
 
|-
 
|-
| 0x08
+
|0x0024 ||dword ||vehicle index, -1 if not spawned or is stolen
| float[3]
 
| x1,y1,z1 coordinates
 
 
|-
 
|-
| 0x14
+
|0x0028 ||word ||[[014C|switch car generator]], -1 = always spawn, 0 = never spawn
| float[3]
 
| x2,y2,z2 coordinates
 
 
|-
 
|-
| 0x20
+
|0x002A ||byte ||has recently been stolen
| dword
 
| type
 
 
|-
 
|-
| 0x24
+
|0x002B ||byte ||''align''
| dword
 
| island number
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
===Block 13: All Gang Data===
+
==== Block 15: Particles ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
 
| 0x00
 
| 0x00
| char[4]
+
| dword
| "GNG\0"
+
| size of block 15
 
|-
 
|-
 
| 0x04
 
| 0x04
| [9]
+
| -
| 24 bytes each, gang structures (see below)
+
| start of block 15, data below
 
|}
 
|}
 
+
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Gang structure:
+
!Offset ||Type ||style="width: 100%;" |Description
! Offset
 
! Type
 
! width="400px"| Description
 
 
|-
 
|-
 
| 0x00
 
| 0x00
 
| dword
 
| dword
| car model ([[0236]])
+
| size of subblock
 
|-
 
|-
 
| 0x04
 
| 0x04
 
| dword
 
| dword
| ped model 1
+
| number of particle objects
 
|-
 
|-
 
| 0x08
 
| 0x08
 +
| style="white-space: nowrap;" |132 bytes[n]
 +
| particle structures (see below)
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
| 0x30
 +
| float[3]
 +
| x,y,z coordinates
 +
|-
 +
| 0x58
 
| dword
 
| dword
| ped model 2
+
| particle type
<!--
 
0x0C - -
 
-->
 
 
|-
 
|-
| 0x10
+
| 0x5C
 
| dword
 
| dword
| weapon number 1 ([[0237]])
+
| particle type
 +
|-
 +
| 0x60
 +
| byte
 +
| visibility
 +
|-
 +
| 0x61
 +
| byte
 +
| sparsity
 +
|-
 +
| 0x62
 +
| word
 +
| sparsity counter
 
|-
 
|-
| 0x14
+
| 0x68
| dword
+
| float[3]
| weapon number 2
+
| x,y,z strength
 +
|-
 +
| 0x78
 +
| float
 +
| scale
 
|}
 
|}
 +
</div>
 +
</div>
  
===Block 14: All Car Generators===
+
==== Block 16: Audio Script Objects ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 16
| char[4]
+
|-
| "CGN\0"
+
|0x0004 ||- ||start of block 16, data below
<!--
+
|}
0x04 - -
+
<div style="margin-left: 3em;">
0x08 - -
+
{|class="wikitable" style="max-width: 48em;"
0x0C - -
+
!Offset ||Type ||style="width: 100%;" |Description
0x10 - -
+
|-
0x14 - -
+
|0x0000 ||dword ||size of subblock
0x15 - -
+
|-
0x16 - -
+
|0x0004 ||- ||start of subblock, data below
0x18 - -
+
|}
-->
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||char[4] ||<code>AUD\0</code>
 +
|-
 +
|0x0004 ||dword ||size of rest of subblock
 +
|-
 +
|0x0008 ||dword ||number of [[018D#Vice City|audio script objects]]
 +
|-
 +
|0x0012 ||AudioScriptObject[n] ||audio script object structures (see below) where n is the number of audio script objects
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
|+ style="text-align: left;"|AudioScriptObject ({{Hint|0x18|24}} bytes):
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||audio pool index
 +
|-
 +
|0x0004 ||word ||sound index
 +
|-
 +
|0x0006 ||word ||''align''
 +
|-
 +
|0x0008 ||float[3] ||x,y,z coordinates
 
|-
 
|-
| 0x1C
+
|0x0014 ||dword ||audio entity
| [185]
 
| 44 bytes each, car generator structures (see below)
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
{| class="wikitable"
+
==== Block 17: Script Paths ====
|+ style="text-align: left;"| Car generator structure:
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 17
 +
|-
 +
|0x0004 ||- ||start of block 17, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock
 +
|-
 +
|0x0004 ||ScriptPath[3] ||[[Script Path|script path]] structures (see below)
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
|+ style="text-align: left;"|ScriptPath:
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||total number of nodes on path
 
|-
 
|-
| 0x00
+
|0x0004 ||dword ||pointer to path nodes data
| dword
 
| model ID
 
 
|-
 
|-
| 0x04
+
|0x0008 ||float ||total distance of path
| float[3]
 
| x,y,z coordinates
 
 
|-
 
|-
| 0x10
+
|0x000C ||float ||[[049E|path speed]]
| float
 
| z angle rotation
 
 
|-
 
|-
| 0x14
+
|0x0010 ||float ||[[049F|distance along path]]
| word
 
| primary color
 
 
|-
 
|-
| 0x16
+
|0x0014 ||float ||width
| word
 
| secondary color
 
 
|-
 
|-
| 0x18
+
|0x0018 ||dword ||state
| byte
 
| force spawn
 
 
|-
 
|-
| 0x19
+
|0x001C ||dword[6] ||object handles
| byte
 
| alarm
 
 
|-
 
|-
| 0x1A
+
|0x0034 ||Node[n] ||path nodes data (see below) where n is the number of nodes
| byte
+
|}
| lock
+
<div style="margin-left: 3em;">
<!--
+
{|class="wikitable" style="max-width: 48em;"
0x1B - -
+
|+ style="text-align: left;"|Node ({{Hint|0x14|20}} bytes):
0x1C - -
+
!Offset ||Type ||style="width: 100%;" |Description
0x1E - -
 
0x20 - -
 
0x24 - -
 
-->
 
 
|-
 
|-
| 0x28
+
|0x0000 ||float[3] ||coordinate point
| word
 
| [[014C]]
 
 
|-
 
|-
| 0x2A
+
|0x000C ||float ||distance along path to coordinate point
| byte
 
| has recently been stolen
 
 
<!--
 
<!--
0x2B - -
+
0x0010 - -
 
-->
 
-->
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
===Block 16: All Audio Script Objects===
+
==== Block 18: Player Info ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 18 (constant 0x170)
 
|-
 
|-
| 0x00
+
|0x0004 ||- ||start of block 18, data below
| char[4]
+
|}
| "AUD\0"
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock
 +
|-
 +
|0x0004 ||- ||start of subblock, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||current money
 +
|-
 +
|0x0004 ||byte ||wasted/busted status
 
<!--
 
<!--
0x04 - -
+
0x0005 - -
0x08 - -
+
0x0009 - -
 +
0x000B - -
 
-->
 
-->
 
|-
 
|-
| 0x12
+
|0x000F ||dword ||currently displayed money
| -
+
|-
| 24 bytes each, audio structures (see below)
+
|0x0013 ||dword ||number of packages picked up
|}
+
|-
{| class="wikitable"
+
|0x0017 ||dword ||[[02ED|total number of packages]]
|+ style="text-align: left;"| Audio structure:
+
|-
! Offset
+
|0x001B ||byte ||[[0330|never gets tired]]
! Type
+
|-
! width="400px"| Description
+
|0x001C ||byte ||[[0331|fast reload]]
 +
|-
 +
|0x001D ||byte ||[[055D|fire proof]]
 +
|-
 +
|0x001E ||byte ||max health
 +
|-
 +
|0x001F ||byte ||max armor
 +
|-
 +
|0x0020 ||byte ||[[0413|get out of jail free]]
 +
|-
 +
|0x0021 ||byte ||[[0414|free health care]]
 
|-
 
|-
| 0x04
+
|0x0022 ||byte ||[[0501|can do drive by]]
| word
 
| ID number
 
 
<!--
 
<!--
0x06 - -
+
0x0023 - -
 
-->
 
-->
 
|-
 
|-
| 0x08
+
|0x0069 ||byte ||Rosenberg's audio status
| float[3]
 
| x,y,z coordinates
 
 
<!--
 
<!--
0x14 - -
+
0x006A - -
 
-->
 
-->
 
|}
 
|}
 +
</div>
 +
</div>
  
===Block 17: Script Paths===
+
==== Block 19: Stats ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of block 19
 
|-
 
|-
| 0x00
+
|0x0004 ||- ||start of block 19, data below
| dword
+
|}
| total number of [[Script Path|paths]]
+
<div style="margin-left: 3em;">
<!--
+
{|class="wikitable" style="max-width: 48em;"
0x04 - -
+
!Offset ||Type ||style="width: 100%;" |Description
0x08 - -
+
|-
-->
+
|0x0000 ||dword ||size of subblock
 
|-
 
|-
| 0x0C
+
|0x0004 ||- ||start of subblock, data below
| float
+
|}
| speed ([[049E]])
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x10
+
|0x0000 ||dword ||people wasted by player
| float
 
| distance along path ([[049F]])
 
 
|-
 
|-
| 0x14
+
|0x0004 ||dword ||people wasted by others
| float
 
| some sort of offset
 
<!--
 
0x18 - -
 
-->
 
 
|-
 
|-
| 0x1C
+
|0x0008 ||dword ||road vehicles destroyed
| -
 
| object handle, up to 6 supported
 
|}
 
 
 
===Block 18: Player Info===
 
{| class="wikitable"
 
! Offset
 
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x000C ||dword ||boats destroyed
| dword
 
| current money
 
 
|-
 
|-
| 0x04
+
|0x0010 ||dword ||tires popped with gunfire
| byte
 
| wasted/busted status
 
<!--
 
0x05 - -
 
0x09 - -
 
0x0B - -
 
-->
 
 
|-
 
|-
| 0x0F
+
|0x0014 ||dword ||bullets fired
| dword
 
| currently displayed money
 
 
|-
 
|-
| 0x13
+
|0x0018 ||dword[23] ||peds of [[ped type]] wasted
| dword
 
| number of packages picked up
 
 
|-
 
|-
| 0x17
+
|0x0074 ||dword ||planes and helicopters destroyed
| dword
 
| total number of packages ([[02ED]])
 
 
|-
 
|-
| 0x1B
+
|0x0078 ||float ||[[030C|current progress]]
| byte
 
| infinite run ([[0330]])
 
 
|-
 
|-
| 0x1C
+
|0x007C ||float ||[[030D|total progress]]
| byte
 
| fast reload ([[0331]])
 
 
|-
 
|-
| 0x1D
+
|0x0080 ||dword ||kilograms of explosives used
| byte
 
| fireproof ([[055D]])
 
 
|-
 
|-
| 0x1E
+
|0x0084 ||dword ||bullets that hit
| byte
 
| max health
 
 
|-
 
|-
| 0x1F
+
|0x0088 ||dword ||number of headshots
| byte
 
| max armor
 
 
|-
 
|-
| 0x20
+
|0x008C ||dword ||total number of wanted stars attained
| byte
 
| free busted once
 
 
|-
 
|-
| 0x21
+
|0x0090 ||dword ||total number of wanted stars evaded
| byte
 
| free wasted once ([[0414]])
 
 
|-
 
|-
| 0x22
+
|0x0094 ||dword ||times busted
| byte
 
| driveby enabled ([[0501]])
 
<!--
 
0x23 - -
 
0x69 - -
 
0x6A - -
 
-->
 
|}
 
 
 
===Block 19: Stats===
 
{| class="wikitable"
 
! Offset
 
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0098 ||dword ||hospital visits
| dword
 
| peds wasted by player
 
 
|-
 
|-
| 0x04
+
|0x009C ||dword ||days passed in game
| dword
 
| peds wasted by others
 
 
|-
 
|-
| 0x08
+
|0x00A0 ||dword ||safehouse visits
| dword
 
| cars exploded
 
 
|-
 
|-
| 0x0C
+
|0x00A4 ||dword ||sprayings
| dword
 
| boats exploded
 
 
|-
 
|-
| 0x10
+
|0x00A8 ||float ||[[030E|max insane jump distance]]
| dword
 
| tyres popped
 
 
|-
 
|-
| 0x14
+
|0x00AC ||float ||[[030F|max insane jump height]]
| dword
 
| bullets fired
 
 
|-
 
|-
| 0x18
+
|0x00B0 ||dword ||[[0310|max insane jump flips]]
| dword[23]
 
| number of peds killed per [[Ped type]]
 
 
|-
 
|-
| 0x74
+
|0x00B4 ||dword ||[[0311|max insane jump rotation]]
| dword
 
| helis exploded
 
 
|-
 
|-
| 0x78
+
|0x00B8 ||dword ||[[0312|best insane stunt so far]]
| float
 
| progress made ([[030C]])
 
 
|-
 
|-
| 0x7C
+
|0x00BC ||dword ||[[0313|unique jumps completed]]
| float
 
| total progress ([[030D]])
 
 
|-
 
|-
| 0x80
+
|0x00C0 ||dword ||[[0314|total unique jumps]]
| dword
 
| kg of explosives used
 
 
|-
 
|-
| 0x84
+
|0x00C4 ||dword ||[[0317|mission attempts]]
| dword
 
| bullets hit
 
 
|-
 
|-
| 0x88
+
|0x00C8 ||dword ||[[0315|passengers dropped off]]
| dword
 
| headshots
 
 
|-
 
|-
| 0x8C
+
|0x00CC ||dword ||[[0316|cash made in taxi]]
| dword
 
| total number of wanted stars attained
 
 
|-
 
|-
| 0x90
+
|0x00D0 ||dword ||Portland passed (unused)
| dword
 
| total number of wanted stars evaded
 
 
|-
 
|-
| 0x94
+
|0x00D4 ||dword ||Staunton passed (unused)
| dword
 
| times busted
 
 
|-
 
|-
| 0x98
+
|0x00D8 ||dword ||Shoreside passed (unused)
| dword
 
| times wasted
 
 
|-
 
|-
| 0x9C
+
|0x00DC ||dword ||[[055A|porn leaflet rubbish visibility]]
| dword
 
| days passed
 
 
|-
 
|-
| 0xA0
+
|0x00E0 ||dword ||[[057C|allows hurricane weather]]
| dword
 
| savecount
 
 
|-
 
|-
| 0xA4
+
|0x00E4 ||float ||distance traveled on foot
| dword
 
| Pay 'n' Spray resprays
 
 
|-
 
|-
| 0xA8
+
|0x00E8 ||float ||distance traveled by car
| float
 
| max insane stunt jump distance
 
 
|-
 
|-
| 0xAC
+
|0x00EC ||float ||distance traveled by bike
| float
 
| max insane stunt jump height
 
 
|-
 
|-
| 0xB0
+
|0x00F0 ||float ||distance traveled by boat
| dword
 
| max insane stunt flips
 
 
|-
 
|-
| 0xB4
+
|0x00F4 ||float ||distance traveled by golf cart
| dword
 
| max insane stunt rotation
 
 
|-
 
|-
| 0xB8
+
|0x00F8 ||float ||distance traveled by helicopter
| dword
 
| max insane stunt rating
 
 
|-
 
|-
| 0xBC
+
|0x00FC ||float ||distance traveled by plane
| dword
 
| unique jumps completed ([[0313]])
 
 
|-
 
|-
| 0xC0
+
|0x0100 ||dword ||[[0401|people saved in an ambulance]]
| dword
 
| unique jump count ([[0314]])
 
 
|-
 
|-
| 0xC4
+
|0x0104 ||dword ||[[0402|criminals killed on vigilante mission]]
| dword
 
| mission attempts ([[0317]])
 
 
|-
 
|-
| 0xC8
+
|0x0108 ||dword ||[[0404|total fires extinguished]]
| dword
 
| passengers dropped off ([[0315]])
 
 
|-
 
|-
| 0xCC
+
|0x010C ||dword ||[[0578|highest vigilante mission level]]
| dword
 
| cash made in taxi mission ([[0316]])
 
 
|-
 
|-
| 0xD0
+
|0x0110 ||dword ||[[0403|highest paramedic mission level]]
| dword
 
| unused1
 
 
|-
 
|-
| 0xD4
+
|0x0114 ||dword ||[[0599|fire truck mission level]]
| dword
 
| unused2
 
 
|-
 
|-
| 0xD8
+
|0x0118 ||dword ||photographs taken
| dword
 
| unused3
 
 
|-
 
|-
| 0xDC
+
|0x011C ||dword ||rampages passed
| dword
 
| secondary trash type (flying newspapers?) ([[055A]])
 
 
|-
 
|-
| 0xE0
+
|0x0120 ||dword ||[[0408|total number of rampages]]
| dword
 
| secondary weather table ([[057C]])
 
 
|-
 
|-
| 0xE4
+
|0x0124 ||dword ||[[042C|total number of missions]]
| float
 
| distance traveled foot
 
 
|-
 
|-
| 0xE8
+
|0x0128 ||dword ||flight hours
| float
 
| distance traveled car
 
 
|-
 
|-
| 0xEC
+
|0x012C ||dword ||fishes fed (number of times drowned)
| float
 
| distance traveled bike
 
 
|-
 
|-
| 0xF0
+
|0x0130 ||dword ||seagulls sniped
| float
 
| distance traveled boat
 
 
|-
 
|-
| 0xF4
+
|0x0134 ||float ||[[0528|weapon budget]]
| float
 
| distance traveled golf cart
 
 
|-
 
|-
| 0xF8
+
|0x0138 ||float ||[[04CF|fashion budget]]
| float
 
| distance traveled heli
 
 
|-
 
|-
| 0xFC
+
|0x013C ||float ||visits from loan sharks (unused)
| float
 
| distance traveled plane
 
 
|-
 
|-
| 0x100
+
|0x0140 ||float ||[[0531|stores knocked off]]
| dword
 
| people saved in ambulance mission ([[0401]])
 
 
|-
 
|-
| 0x104
+
|0x0144 ||float ||movie stunts (unused)
| dword
 
| criminals killed on vigilante ([[0402]])
 
 
|-
 
|-
| 0x108
+
|0x0148 ||float ||[[0533|assassination contracts completed]]
| dword
 
| fires extinguished in firefighter mission ([[0404]])
 
 
|-
 
|-
| 0x10C
+
|0x014C ||float ||[[0534|pizzas delivered]]
| dword
 
| highest vigilante level ([[0578]])
 
 
|-
 
|-
| 0x110
+
|0x0150 ||float ||garbage pickups made (unused)
| dword
 
| highest ambulance level ([[0403]])
 
 
|-
 
|-
| 0x114
+
|0x0154 ||float ||[[0536|'ice cream' sold]]
| dword
 
| highest firefighter level ([[0599]])
 
 
|-
 
|-
| 0x118
+
|0x0158 ||float ||top shooting range score (unused, see 0x01FF)
| dword
 
| photos taken
 
 
|-
 
|-
| 0x11C
+
|0x015C ||float ||shooting range rank (unused, see 0x01FF)
| dword
 
| rampages passed
 
 
|-
 
|-
| 0x120
+
|0x0160 ||dword ||longest wheelie time
| dword
 
| rampage count ([[0408]])
 
 
|-
 
|-
| 0x124
+
|0x0164 ||dword ||longest stoppie time
| dword
 
| total number of missions ([[042C]])
 
 
|-
 
|-
| 0x128
+
|0x0168 ||dword ||longest two wheels time
| dword
 
| flight time
 
 
|-
 
|-
| 0x12C
+
|0x016C ||dword ||longest wheelie distance
| dword
 
| times drowned
 
 
|-
 
|-
| 0x130
+
|0x0170 ||dword ||longest stoppie distance
| dword
 
| seagulls snpied
 
 
|-
 
|-
| 0x134
+
|0x0174 ||dword ||longest two wheels distance
| float
 
| weapon budget ([[0528]])
 
 
|-
 
|-
| 0x138
+
|0x0178 ||dword ||[[0529|property budget]]
| float
 
| fashion budget  
 
 
|-
 
|-
| 0x13C
+
|0x017C ||dword ||auto repair and painting budget
| float
 
| visits from loan sharks (unused)
 
 
|-
 
|-
| 0x140
+
|0x0180 ||dword ||property destroyed
| float
 
| stores knocked off ([[0531]])
 
 
|-
 
|-
| 0x144
+
|0x0184 ||dword ||[[0542|number of properties owned]]
| float
 
| movie stunts (unused?)
 
 
|-
 
|-
| 0x148
+
|0x0188 ||dword ||[[0543|bloodring kills]]
| float
 
| assasination contracts completed ([[0533]])
 
 
|-
 
|-
| 0x14C
+
|0x018C ||dword ||[[0544|longest time in bloodring]]
| float
 
| pizzas delivered ([[0534]])
 
 
|-
 
|-
| 0x150
+
|0x0190 ||byte[15] ||[[0542|properties owned]]
| float
 
| garbage pickups made (unused)
 
 
|-
 
|-
| 0x154
+
|0x019F ||dword ||highest media attention
| float
 
| ice creams sold ([[0536]])
 
 
|-
 
|-
| 0x158
+
|0x01A3 ||dword[23] ||[[042E|best times for races/vehicle missions in seconds]]
| float
 
| top shooting range score (unused, see 0x1FF)
 
 
|-
 
|-
| 0x15C
+
|0x01FF ||dword[5] ||[[042F|minigame records]]
| float
+
*0 - Highest score for Shooter
| shooting range rank (unused, see 0x1FF)
+
*1 - Best Percentage of hits for Shooter
 +
*2 - Number of drug deals made
 +
*3 - Highest score with Keepie-Uppy beach ball
 +
*4 - Unused
 
|-
 
|-
| 0x160
+
|0x0213 ||dword ||[[0582|hotring best result]]
| dword
 
| longest wheelie time
 
 
|-
 
|-
| 0x164
+
|0x0217 ||dword ||peds killed recently (always zero while saving)
| dword
 
| longest stoppie time
 
 
|-
 
|-
| 0x168
+
|0x021B ||dword ||total peds killed (used for calculating rating)
| dword
 
| longest 2wheel time
 
 
|-
 
|-
| 0x16C
+
|0x021F ||char[8] ||[[0318|last passed mission]] GXT key
| dword
 
| longest wheelie distance
 
 
|-
 
|-
| 0x170
+
|0x0227 ||dword ||cheat rating
| dword
 
| longest stoppie distance
 
 
|-
 
|-
| 0x174
+
|0x022B ||float[10] ||listening time per [[List of radio stations (VC)|radio station]] in milliseconds
| dword
+
|}
| longest 2wheel distance
+
</div>
 +
</div>
 +
 
 +
==== Block 20: Set Pieces ====
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x178
+
|0x0000 ||dword ||size of block 20
| dword
 
| property budget ([[0529]])
 
 
|-
 
|-
| 0x17C
+
|0x0004 ||- ||start of block 20, data below
| dword
+
|}
| auto repair and painting budget
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x180
+
|0x0000 ||dword ||size of subblock
| dword
 
| property destroyed
 
 
|-
 
|-
| 0x184
+
|0x0004 ||- ||start of subblock, data below
| dword
+
|}
| number of properties owned ([[0542]])
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x188
+
|0x0000 ||dword ||number of [[04F8|set pieces]]
| dword
 
| bloodring kills ([[0543]])
 
 
|-
 
|-
| 0x18C
+
|0x0004 ||SetPiece[96] ||set piece structures (see below)
| dword
+
|}
| longest time in bloodring ([[0544]])
+
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
|+ style="text-align: left;"|SetPiece ({{Hint|0x38|56}} bytes):
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x190
+
|0x0000 ||dword ||type
| byte[15]
 
| properties owned ([[0542]])
 
 
|-
 
|-
| 0x19F
+
|0x0008 ||float ||timer
| dword
 
| highest media attention
 
 
|-
 
|-
| 0x1A3
+
|0x0008 ||float ||trigger area x1
| dword[23]
 
| best times for races/vehicle missions in seconds ([[042E]])
 
 
|-
 
|-
| 0x1FF
+
|0x000C ||float ||trigger area y2
| 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
+
|0x0010 ||float ||trigger area x2
| dword
 
| Hotring Best Result ([[0582]])
 
 
|-
 
|-
| 0x217
+
|0x0014 ||float ||trigger area y1
| dword
 
| peds killed recently (always zero while saving)
 
 
|-
 
|-
| 0x21B
+
|0x0018 ||float[2] ||policeA spawn x,y
| dword
 
| total peds killed (used for calculating rating)
 
 
|-
 
|-
| 0x21F
+
|0x0020 ||float[2] ||policeB spawn x,y
| char[8]
 
| last passed mission GXT entry name ([[0318]])
 
 
|-
 
|-
| 0x227
+
|0x0028 ||float[2] ||policeA heading x,y
| dword
 
| cheat rating
 
 
|-
 
|-
| 0x22B
+
|0x0030 ||float[2] ||policeB heading x,y
| float[10]
 
| listening time per [[List of radio stations (VC)|radio station]] in miliseconds
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
===Block 20: Set Pieces===
+
==== Block 21: Streaming ====
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
! Offset
+
!Offset ||Type ||style="width: 100%;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
 
| 0x00
 
| 0x00
 
| dword
 
| dword
| number of trigger zones ([[04F8]])
+
| size of block 21
 
|-
 
|-
 
| 0x04
 
| 0x04
| [96]
+
| -
| 56 bytes each, trigger zone structures (see below)
+
| start of block 21, data below
 
|}
 
|}
 
+
<div style="margin-left: 3em;">
{| class="wikitable"
+
{|class="wikitable" style="max-width: 48em;"
|+ style="text-align: left;"| Trigger zone structure:
+
!Offset ||Type ||style="width: 100%;" |Description
! Offset
 
! Type
 
! width="400px"| Description
 
 
|-
 
|-
 
| 0x00
 
| 0x00
 
| dword
 
| dword
| type
+
| size of subblock (constant 0x12C)
<!--
+
|-
0x04 - -
+
| 0x04
-->
+
| -
 +
| start of subblock, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
| 0x00
 +
|style="white-space: nowrap;" |300 bytes
 +
| streaming flags for first 300 model indices (0-299) (-1 if model is not loaded)
 +
|}
 +
</div>
 +
</div>
 +
 
 +
==== Block 22: Ped Types ====
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of block 22
 +
|-
 +
|0x0004 ||- ||start of block 22, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||dword ||size of subblock (constant 0x2E8)
 +
|-
 +
|0x0004 ||- ||start of subblock, data below
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
!Offset ||Type ||style="width: 100%;" |Description
 +
|-
 +
|0x0000 ||char[4] ||<code>PTP\0</code>
 +
|-
 +
|0x0004 ||dword ||size of rest of subblock
 +
|-
 +
|0x0008 ||PedType[23] ||ped type structures (see below)
 +
|}
 +
<div style="margin-left: 3em;">
 +
{|class="wikitable" style="max-width: 48em;"
 +
|+ style="text-align: left;"|PedType ({{Hint|0x20|32}} bytes):
 +
!Offset ||Type ||style="width: 100%;" |Description
 
|-
 
|-
| 0x08
+
|0x0000 ||dword ||bitstring (each associated to an entry in ped.dat)
| float
 
| trigger area x1
 
 
|-
 
|-
| 0x0C
+
|0x0004 ||float ||first value/50.0
| float
 
| trigger area y2
 
 
|-
 
|-
| 0x10
+
|0x0008 ||float ||second value/50.0
| float
 
| trigger area x2
 
 
|-
 
|-
| 0x14
+
|0x000C ||float ||third value/50.0
| float
 
| trigger area y1
 
 
|-
 
|-
| 0x18
+
|0x0010 ||float ||fourth value
| float[2]
 
| policeA spawn x,y
 
 
|-
 
|-
| 0x20
+
|0x0014 ||float ||fifth value
| float[2]
 
| policeB spawn x,y
 
 
|-
 
|-
| 0x28
+
|0x0018 ||dword ||threat flags
| float[2]
 
| policeA heading x,y
 
 
|-
 
|-
| 0x30
+
|0x001C ||dword ||avoid flags
| float[2]
 
| policeB heading x,y
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
  
=== Block 21: Streaming ===
+
=== Padding ===
=== Block 22: Pedtype ===
+
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.
=== Block 23: Planes ===
 
  
 
=== Checksum ===
 
=== 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.
 
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 ==
 
* {{Icon|3}} [[Saves (GTA 3)]]
 
* {{Icon|SA}} [[Saves (GTA SA)]]
 
  
 
== External links ==
 
== External links ==
Line 1,968: Line 1,985:
 
*{{GTAF|457357|Current development topic}}
 
*{{GTAF|457357|Current development topic}}
 
*{{GTAF|454001|Savefile Editor}}, by voodoo48
 
*{{GTAF|454001|Savefile Editor}}, by voodoo48
 +
*{{GTAF|646386|Vice City Save Converter}}, by {{U|Silent}} &ndash; converts between Steam and retail versions
 +
*[http://gtasnp.com/resources/010/gtavc.bt 010 template for VC save files]
  
 +
{{Savegame-navi}}
 
{{VC-navi}}
 
{{VC-navi}}
 
[[Category:Save Formats]]
 

Latest revision as of 16:19, 3 December 2017

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 level
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 number of milliseconds per game minute (1000 = normal)
0x0058+n dword game timer when game clock last ticked
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 game timer in milliseconds
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 list 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 is extra color on
0x00B8+n float extra color interpolation (between 0.0 and 1.0)
0x00BC+n dword[10] current radio station position
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 last 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 invisibility setting structures (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 is Kaufman Cabs radio on
0x0002 byte[2] align
0x0004 dword size of main
0x0008 dword size of largest mission
0x000C word number of mission scripts
0x000E word number of exclusive mission scripts
0x0010 dword number of running scripts
0x0014 Script[n] script structures (see below) where n is the number of scripts
Script (0x88 bytes):
Offset Type Description
0x0000 dword pointer to next script
0x0004 dword pointer to previous 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 Player[n] player structure (see below) where n is the number of players
Player (0x6FF bytes):
Offset Type Description
0x0000 dword ped type, always 0
0x0004 word ped model index
0x0006 dword ped pool index
0x000A CPlayerPed ped structure dump (see structure below)

Only data that are loaded by the game are listed here. The rest of the data get saved but do not get loaded.

CPlayerPed (0x6D8 bytes):
Offset Type Description
0x0034 float[3] x,y,z coordinates
0x0354 float health
0x0358 float armor
0x0408 dword weapon slot 0 type
0x0414 dword weapon slot 0 ammo
0x0420 dword weapon slot 1 type
0x042C dword weapon slot 1 ammo
0x0438 dword weapon slot 2 type
0x0444 dword weapon slot 2 ammo
0x0450 dword weapon slot 3 type
0x045C dword weapon slot 3 ammo
0x0468 dword weapon slot 4 type
0x0474 dword weapon slot 4 ammo
0x0480 dword weapon slot 5 type
0x048C dword weapon slot 5 ammo
0x0498 dword weapon slot 6 type
0x04A4 dword weapon slot 6 ammo
0x04B0 dword weapon slot 7 type
0x04BC dword weapon slot 7 ammo
0x04C8 dword weapon slot 8 type
0x04D4 dword weapon slot 8 ammo
0x04E0 dword weapon slot 9 type
0x04EC dword weapon slot 9 ammo
0x0504 byte currently selected weapon slot, always set to 0 upon loading
0x0604 float max stamina
0x0624 dword[4] targettable object index, -1 if no object
0x06E2 dword max wanted level
0x06E6 dword max chaos level
0x06EA char[21] current model name

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
0x000C dword number of cars collected (unused)
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 inactive (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
Offset Type Description
0x0000 dword number of taxi shortcut pick-up points for mission
0x0004 TaxiShortcut[16] taxi shortcut structures (see 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 (see below) where n is the number of general vehicles, boats, and bikes
Vehicle (0x5E6 (automobile) | 0x4CA (boat) | 0x4F6 (bike) bytes):
Offset Type Description
0x0000 dword vehicle type
  • 0 = automobile
  • 1 = boat
  • 5 = bike
0x0004 word vehicle model index
0x0006 dword vehicle pool index
0x000A CAutomobile
CBoat
CBike
vehicle structure dump (see below, dependent on vehicle type)

If vehicle is type automobile (any vehicles with four wheels, including pilotable helicopters):

CAutomobile (0x5DC bytes):
Offset Type Description
0x0034 float[3] x,y,z coordinates
0x005C word IDE model number

If vehicle is type boat:

CBoat (0x4C0 bytes):
Offset Type Description
0x0034 float[3] x,y,z coordinates
0x005C word IDE model number

If vehicle is type bike:

CBike (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 Object[n] object structures (see below) where n is the number of objects
Object (0x58 bytes):
Offset Type Description
0x0000 word object model index
0x0002 dword object pool index
0x0006 float[3] x,y,z coordinates
0x000F char[6] compressed rotational data
0x003A byte always 2
0x003B byte is a pickup
0x003C byte is a pickup in shop (type 1 pickup)
0x003D byte is a pickup in shop out of stock (type 7 pickup)

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
Offset Type Description
0x0000 dword number of cranes
0x0004 dword cars collected by military crane
0x0008 Crane[8] crane structures (see 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
0x0000 word in car ped density
0x0002 word car class 0 density
0x0004 word car class 0 and 1 density
0x0006 word car class 0, 1, and 2 density
0x0008 word car class 0, 1, 2, and 3 density
0x000A word car class 0, 1, 2, 3, and 4 density
0x000C word car class 0, 1, 2, 3, 4, and 5 density
0x000E word car class 0, 1, 2, 3, 4, 5, and 6 density
0x0010 word car class 0, 1, 2, 3, 4, 5, 6, and 7 density
0x0012 word car class 0, 1, 2, 3, 4, 5, 6, 7, and 8 density
0x0014 word car class 9 density
0x0016 word car class 9 and 10 density
0x0018 word in car cop + gang 0 density
0x001A word in car cop + gang 0 and 1 density
0x001C word in car cop + gang 0, 1, and 2 density
0x001E word in car cop + gang 0, 1, 2, and 3 density
0x0020 word in car cop + gang 0, 1, 2, 3, and 4 density
0x0022 word in car cop + gang 0, 1, 2, 3, 4, and 5 density
0x0024 word in car cop + gang 0, 1, 2, 3, 4, 5, and 6 density
0x0026 word in car cop + gang 0, 1, 2, 3, 4, 5, 6, and 7 density
0x0028 word in car cop + gang 0, 1, 2, 3, 4, 5, 6, 7, and 8 density
0x002A word in car cop density
0x002C word on foot ped density
0x002E word on foot cop + gang 0 density
0x0030 word on foot cop + gang 0 and 1 density
0x0032 word on foot cop + gang 0, 1, and 2 density
0x0034 word on foot cop + gang 0, 1, 2, and 3 density
0x0036 word on foot cop + gang 0, 1, 2, 3, and 4 density
0x0038 word on foot cop + gang 0, 1, 2, 3, 4, and 5 density
0x003A word on foot cop + gang 0, 1, 2, 3, 4, 5, and 6 density
0x003C word on foot cop + gang 0, 1, 2, 3, 4, 5, 6, and 7 density
0x003E word on foot cop + gang 0, 1, 2, 3, 4, 5, 6, 7, and 8 density
0x0040 word on foot cop density
0x0042 word ped group

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 type 1
0x0014 dword gang weapon type 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 switch car generator, -1 = always spawn, 0 = never spawn
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
0x0000 dword size of block 16
0x0004 - start of block 16, data below
Offset Type Description
0x0000 dword size of subblock
0x0004 - start of subblock, data below
Offset Type Description
0x0000 char[4] AUD\0
0x0004 dword size of rest of subblock
0x0008 dword number of audio script objects
0x0012 AudioScriptObject[n] audio script object structures (see below) where n is the number of audio script objects
AudioScriptObject (0x18 bytes):
Offset Type Description
0x0000 dword audio pool index
0x0004 word sound index
0x0006 word align
0x0008 float[3] x,y,z coordinates
0x0014 dword audio entity

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 ScriptPath[3] script path structures (see below)
ScriptPath:
Offset Type Description
0x0000 dword total number of nodes on path
0x0004 dword pointer to path nodes data
0x0008 float total distance of path
0x000C float path speed
0x0010 float distance along path
0x0014 float width
0x0018 dword state
0x001C dword[6] object handles
0x0034 Node[n] path nodes data (see below) where n is the number of nodes
Node (0x14 bytes):
Offset Type Description
0x0000 float[3] coordinate point
0x000C float distance along path to coordinate point

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
Offset Type Description
0x0000 dword current money
0x0004 byte wasted/busted status
0x000F dword currently displayed money
0x0013 dword number of packages picked up
0x0017 dword total number of packages
0x001B byte never gets tired
0x001C byte fast reload
0x001D byte fire proof
0x001E byte max health
0x001F byte max armor
0x0020 byte get out of jail free
0x0021 byte free health care
0x0022 byte can do drive by
0x0069 byte Rosenberg's audio status

Block 19: Stats

Offset Type Description
0x0000 dword size of block 19
0x0004 - start of block 19, data below
Offset Type Description
0x0000 dword size of subblock
0x0004 - start of subblock, data below
Offset Type Description
0x0000 dword people wasted by player
0x0004 dword people wasted by others
0x0008 dword road vehicles destroyed
0x000C dword boats destroyed
0x0010 dword tires popped with gunfire
0x0014 dword bullets fired
0x0018 dword[23] peds of ped type wasted
0x0074 dword planes and helicopters destroyed
0x0078 float current progress
0x007C float total progress
0x0080 dword kilograms of explosives used
0x0084 dword bullets that hit
0x0088 dword number of headshots
0x008C dword total number of wanted stars attained
0x0090 dword total number of wanted stars evaded
0x0094 dword times busted
0x0098 dword hospital visits
0x009C dword days passed in game
0x00A0 dword safehouse visits
0x00A4 dword sprayings
0x00A8 float max insane jump distance
0x00AC float max insane jump height
0x00B0 dword max insane jump flips
0x00B4 dword max insane jump rotation
0x00B8 dword best insane stunt so far
0x00BC dword unique jumps completed
0x00C0 dword total unique jumps
0x00C4 dword mission attempts
0x00C8 dword passengers dropped off
0x00CC dword cash made in taxi
0x00D0 dword Portland passed (unused)
0x00D4 dword Staunton passed (unused)
0x00D8 dword Shoreside passed (unused)
0x00DC dword porn leaflet rubbish visibility
0x00E0 dword allows hurricane weather
0x00E4 float distance traveled on foot
0x00E8 float distance traveled by car
0x00EC float distance traveled by bike
0x00F0 float distance traveled by boat
0x00F4 float distance traveled by golf cart
0x00F8 float distance traveled by helicopter
0x00FC float distance traveled by plane
0x0100 dword people saved in an ambulance
0x0104 dword criminals killed on vigilante mission
0x0108 dword total fires extinguished
0x010C dword highest vigilante mission level
0x0110 dword highest paramedic mission level
0x0114 dword fire truck mission level
0x0118 dword photographs taken
0x011C dword rampages passed
0x0120 dword total number of rampages
0x0124 dword total number of missions
0x0128 dword flight hours
0x012C dword fishes fed (number of times drowned)
0x0130 dword seagulls sniped
0x0134 float weapon budget
0x0138 float fashion budget
0x013C float visits from loan sharks (unused)
0x0140 float stores knocked off
0x0144 float movie stunts (unused)
0x0148 float assassination contracts completed
0x014C float pizzas delivered
0x0150 float garbage pickups made (unused)
0x0154 float 'ice cream' sold
0x0158 float top shooting range score (unused, see 0x01FF)
0x015C float shooting range rank (unused, see 0x01FF)
0x0160 dword longest wheelie time
0x0164 dword longest stoppie time
0x0168 dword longest two wheels time
0x016C dword longest wheelie distance
0x0170 dword longest stoppie distance
0x0174 dword longest two wheels distance
0x0178 dword property budget
0x017C dword auto repair and painting budget
0x0180 dword property destroyed
0x0184 dword number of properties owned
0x0188 dword bloodring kills
0x018C dword longest time in bloodring
0x0190 byte[15] properties owned
0x019F dword highest media attention
0x01A3 dword[23] best times for races/vehicle missions in seconds
0x01FF dword[5] minigame records
  • 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
0x0213 dword hotring best result
0x0217 dword peds killed recently (always zero while saving)
0x021B dword total peds killed (used for calculating rating)
0x021F char[8] last passed mission GXT key
0x0227 dword cheat rating
0x022B float[10] listening time per radio station in milliseconds

Block 20: Set Pieces

Offset Type Description
0x0000 dword size of block 20
0x0004 - start of block 20, data below
Offset Type Description
0x0000 dword size of subblock
0x0004 - start of subblock, data below
Offset Type Description
0x0000 dword number of set pieces
0x0004 SetPiece[96] set piece structures (see below)
SetPiece (0x38 bytes):
Offset Type Description
0x0000 dword type
0x0008 float timer
0x0008 float trigger area x1
0x000C float trigger area y2
0x0010 float trigger area x2
0x0014 float trigger area y1
0x0018 float[2] policeA spawn x,y
0x0020 float[2] policeB spawn x,y
0x0028 float[2] policeA heading x,y
0x0030 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 300 bytes streaming flags for first 300 model indices (0-299) (-1 if model is not loaded)

Block 22: Ped Types

Offset Type Description
0x0000 dword size of block 22
0x0004 - start of block 22, data below
Offset Type Description
0x0000 dword size of subblock (constant 0x2E8)
0x0004 - start of subblock, data below
Offset Type Description
0x0000 char[4] PTP\0
0x0004 dword size of rest of subblock
0x0008 PedType[23] ped type structures (see below)
PedType (0x20 bytes):
Offset Type Description
0x0000 dword bitstring (each associated to an entry in ped.dat)
0x0004 float first value/50.0
0x0008 float second value/50.0
0x000C float third value/50.0
0x0010 float fourth value
0x0014 float fifth value
0x0018 dword threat flags
0x001C 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