Difference between revisions of "Saves (GTA VC)"

From GTAMods Wiki
Jump to navigation Jump to search
(Block 4: Vehicles: update)
Line 19: Line 19:
 
|0x0000 ||dword ||size of block 0
 
|0x0000 ||dword ||size of block 0
 
|-
 
|-
|0x0004 || - ||start of block 0, data below
+
|0x0004 ||- ||start of block 0, data below
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
Line 51: Line 51:
 
|0x0054 ||dword ||unknown, but only present in Steam version saves. If present, n = 4 in following offsets for this block, otherwise n = 0.
 
|0x0054 ||dword ||unknown, but only present in Steam version saves. If present, n = 4 in following offsets for this block, otherwise n = 0.
 
|-
 
|-
|0x0054 + n ||dword ||length (ms) of in-game minute (1000=normal)
+
|0x0054 + n ||dword ||length (ms) of in-game minute (1000 = normal)
 
|-
 
|-
 
|0x0058 + n ||dword ||weather timer
 
|0x0058 + n ||dword ||weather timer
Line 121: Line 121:
 
|0x00E4 + n ||dword ||size of script block
 
|0x00E4 + n ||dword ||size of script block
 
|-
 
|-
|0x00E8 + n || - ||start of script block, see below
+
|0x00E8 + n ||- ||start of script block, see below
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
Line 134: Line 134:
 
|0x0008 ||dword ||size of subblock A
 
|0x0008 ||dword ||size of subblock A
 
|-
 
|-
|0x000C || - ||start of subblock A: global variables - each variable is 4 bytes long
+
|0x000C ||- ||start of subblock A: global variables - each variable is 4 bytes long
 
|}
 
|}
 
{|class="wikitable"
 
{|class="wikitable"
Line 142: Line 142:
 
|0x0000 ||dword ||size of subblock B (constant 0x248)
 
|0x0000 ||dword ||size of subblock B (constant 0x248)
 
|-
 
|-
|0x0004 ||dword ||unknown
+
|0x0004 ||dword ||[[0180|on mission flag]] offset in global variable space
 
|-
 
|-
|0x0008 ||dword ||unknown
+
|0x0008 ||dword ||game timer when mission is completed ([[0318]] or [[0595]]), -1 if never completed a mission
 
|-
 
|-
 
|0x000C ||BuildingSwap[25] ||[[03B6|swapped building model]] structures (see below)
 
|0x000C ||BuildingSwap[25] ||[[03B6|swapped building model]] structures (see below)
Line 198: Line 198:
 
|0x0010 ||dword ||number of running scripts
 
|0x0010 ||dword ||number of running scripts
 
|-
 
|-
|0x0014 || - ||136 bytes each, script structure (see below)
+
|0x0014 ||- ||136 bytes each, script structure (see below)
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
Line 205: Line 205:
 
!Offset ||Type ||style="width: 30em;" |Description
 
!Offset ||Type ||style="width: 30em;" |Description
 
|-
 
|-
|0x0000 ||dword ||next script
+
|0x0000 ||dword ||pointer to previous script
 
|-
 
|-
|0x0004 ||dword ||previous script
+
|0x0004 ||dword ||pointer to next script
 
|-
 
|-
|0x0008 ||char[8] ||name ([[03A4]])
+
|0x0008 ||char[8] ||[[03A4|name]]
 
|-
 
|-
 
|0x0010 ||dword ||current instruction pointer
 
|0x0010 ||dword ||current instruction pointer
Line 233: Line 233:
 
|0x0079 ||byte ||"if" statement result
 
|0x0079 ||byte ||"if" statement result
 
|-
 
|-
|0x007A ||byte ||uses mission cleanup
+
|0x007A ||byte ||uses [[00D8|mission cleanup]]
 
|-
 
|-
|0x007B ||byte ||awake flag
+
|0x007B ||byte ||skip wake time (always 0)
 
|-
 
|-
|0x007C ||dword ||wake up time
+
|0x007C ||dword ||[[0001|wake time]]
 
|-
 
|-
 
|0x0080 ||word ||"if" check result
 
|0x0080 ||word ||"if" check result
Line 260: Line 260:
 
|0x0000 ||dword ||size of block 1
 
|0x0000 ||dword ||size of block 1
 
|-
 
|-
|0x0004 || - ||start of block 1, data below
+
|0x0004 ||- ||start of block 1, data below
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
Line 268: Line 268:
 
|0x0000 ||dword ||size of subblock
 
|0x0000 ||dword ||size of subblock
 
|-
 
|-
|0x0004 || - ||start of subblock, data below
+
|0x0004 ||- ||start of subblock, data below
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
Line 332: Line 332:
 
==== Block 2: Garages ====
 
==== Block 2: Garages ====
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |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"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock (constant 0x1EC4)
| dword
 
| size of subblock (constant 0x1EC4)
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of subblock, data below
| -
 
| start of subblock, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||style="width: 6.5em;" |Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||number of garages ([[0219]])
| dword
 
| number of garages ([[0219]])
 
 
|-
 
|-
| 0x04
+
|0x0004 ||dword ||free bombs (0 = not free, 1 = free)
| dword
 
| free bombs (0=not,1=yes)
 
 
|-
 
|-
| 0x08
+
|0x0008 ||dword ||[[0335|free resprays]]
| dword
 
| free respray ([[0335]])
 
 
<!--
 
<!--
 
|-
 
|-
| 0x0C
+
|0x000C ||- ||-
| -
+
|-
| -
+
|0x0010 ||- ||-
 
|-
 
|-
| 0x10
+
|0x0014 ||- ||-
| -
 
| -
 
|-
 
| 0x14
 
| -
 
| -
 
 
-->
 
-->
 
|-
 
|-
| 0x18
+
|0x0018 ||dword ||cars collected by garage type 8, see below
| dword
 
| garage type 8 status, see below
 
 
|-
 
|-
| 0x1C
+
|0x001C ||dword ||cars collected by garage type 9
| dword
 
| garage type 9 status
 
 
|-
 
|-
| 0x20
+
|0x0020 ||dword ||cars collected by garage type 10
| dword
 
| garage type 10 status
 
 
|-
 
|-
| 0x24
+
|0x0024 ||dword ||cars collected by garage type 22
| dword
 
| garage type 22 status
 
 
|-
 
|-
| 0x28
+
|0x0028 ||dword ||time when garage full message was last shown
| dword
 
| time when garage full message was last shown
 
 
|-
 
|-
| 0x2C
+
|0x002C ||40 bytes[48] ||garage car structures (see struct below)
| 40 bytes[48]
 
| garage car structures (see struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
 
|+ style="text-align: left;"| Garage car structure:
 
|+ style="text-align: left;"| Garage car structure:
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||model ID
 
|-
 
|-
| 0x00
+
|0x0004 ||float[3] ||x,y,z position
| dword
 
| model ID
 
 
|-
 
|-
| 0x04
+
|0x0010 ||float[3] ||x,y,z vector rotation
| float[3]
 
| x,y,z position
 
 
|-
 
|-
| 0x10
+
|0x001C ||dword ||[[02AC|proofs]]
| float[3]
 
| x,y,z vector rotation
 
 
|-
 
|-
| 0x1C
+
|0x0020 ||byte ||primary color
| dword
 
| immunities
 
 
|-
 
|-
| 0x20
+
|0x0021 ||byte ||secondary color
| byte
 
| primary color
 
 
|-
 
|-
| 0x21
+
|0x0022 ||byte ||current radio station
| byte
 
| secondary color
 
 
|-
 
|-
| 0x22
+
|0x0023 ||byte ||variation 1
| byte
 
| current radio station
 
 
|-
 
|-
| 0x23
+
|0x0024 ||byte ||variation 2
| byte
 
| variation 1
 
 
|-
 
|-
| 0x24
+
|0x0025 ||byte ||bomb type
| byte
 
| variation 2
 
|-
 
| 0x25
 
| byte
 
| bomb type
 
 
|}
 
|}
 
</div>
 
</div>
 
{| class="wikitable"
 
{| class="wikitable"
| 0x7AC
+
|0x07AC ||style="width: 6.5em;" |168 bytes[32] ||style="width: 30em;" |garage structures (see struct below)
| 168 bytes[32]
 
| garage structures (see struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
 
|+ style="text-align: left;"| Garage structure:
 
|+ style="text-align: left;"| Garage structure:
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||byte ||type
| byte
 
| type
 
 
|-
 
|-
| 0x01
+
|0x0001 ||byte ||door status
| byte
+
* 0 = closed
| door status (0=closed,1=opened,2=closing,3=opening)
+
* 1 = opened
 +
* 2 = closing
 +
* 3 = opening
 
|-
 
|-
| 0x02
+
|0x0002 ||byte ||[[057A|maximum number of cars in garage]] (4 = default)
| byte
 
| max number of cars to store (4=default)
 
 
<!--
 
<!--
0x03 byte -
+
0x0003 byte -
0x04 byte -
+
0x0004 byte -
0x05 byte -
+
0x0005 byte -
0x06 - -
+
0x0006 - -
0x08 - -
+
0x0008 - -
0x0C - -
+
0x000C - -
0x10 - -
+
0x0010 - -
0x14 - -
+
0x0014 - -
0x15 - -
+
0x0015 - -
0x16 - -
+
0x0016 - -
0x17 - -
+
0x0017 - -
0x18 - -
+
0x0018 - -
-->
+
-->
 
|-
 
|-
| 0x19
+
|0x0019 ||byte ||[[03BB|rotating garage door]]
| byte
 
| swing door ([[03BB]])
 
 
|-
 
|-
| 0x1A
+
|0x001A ||byte ||[[03DA|special camera for garage]]
| byte
 
| camera follow player ([[03DA]])
 
 
|-
 
|-
| 0x1C
+
|0x001C ||float[3] ||entrance bottom left x,y,z coordinates
| float[3]
 
| entrance bottom left x,y,z coordinates
 
 
|-
 
|-
| 0x28
+
|0x0028 ||float[4] ||rx,ry,rz,rw quaternion rotation
| float[4]
 
| rx,ry,rz,rw quaternion rotation
 
 
|-
 
|-
| 0x38
+
|0x0038 ||float ||ceiling z coordinate
| float
 
| ceiling z coordinate
 
 
|}
 
|}
 
</div>
 
</div>
Line 540: Line 464:
 
|0x0000 ||dword ||size of block 3
 
|0x0000 ||dword ||size of block 3
 
|-
 
|-
|0x0004 || - ||start of block 3, data below
+
|0x0004 ||- ||start of block 3, data below
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
Line 548: Line 472:
 
|0x0000 ||dword ||size of subblock (constant 0x104)
 
|0x0000 ||dword ||size of subblock (constant 0x104)
 
|-
 
|-
|0x0004 || - ||start of subblock, data below
+
|0x0004 ||- ||start of subblock, data below
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
Line 654: Line 578:
 
==== Block 5: Objects ====
 
==== Block 5: Objects ====
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |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"
! Offset
+
!Offset ||Type ||style="width: 30em;" |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"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||number of objects
| dword
 
| number of objects
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||88 bytes each, object structures (see struct below)
| -
 
| 88 bytes each, object structures (see struct below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
 
|+ style="text-align: left;"| Object structure:
 
|+ style="text-align: left;"| Object structure:
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||word ||object IDE number
| word
 
| object IDE number
 
 
<!--
 
<!--
0x02 - -
+
0x0002 - -
 
-->
 
-->
 
|-
 
|-
| 0x06
+
|0x0006 ||float[3] ||x,y,z coordinates
| float[3]
 
| x,y,z coordinates
 
 
<!--
 
<!--
0x1E - -
+
0x001E - -
0x22 - -
+
0x0022 - -
0x3A - -
+
0x003A - -
0x3B - -
+
0x003B - -
0x3C - -
+
0x003C - -
0x3D - -
+
0x003D - -
0x3E - -
+
0x003E - -
0x3F - -
+
0x003F - -
0x40 - -
+
0x0040 - -
0x41 - -
+
0x0041 - -
0x42 - -
+
0x0042 - -
0x44 - -
+
0x0044 - -
0x46 - -
+
0x0046 - -
0x4A - -
+
0x004A - -
0x4B - -
+
0x004B - -
0x4C - -
+
0x004C - -
0x50 - -
+
0x0050 - -
 
-->
 
-->
 
|}
 
|}
Line 739: Line 639:
 
==== Block 7: Cranes ====
 
==== Block 7: Cranes ====
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| 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"
! Offset
+
!Offset ||Type ||style="width: 30em;" |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, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||number of [[crane]]s
| dword
 
| number of [[crane]]s
 
 
|-
 
|-
| 0x04
+
|0x0004 ||dword ||[[03EC|cars collected by military crane]]
| dword
 
| [[03EC|number of vehicles collected by military crane]]
 
 
|-
 
|-
| 0x08
+
|0x0008 ||124 bytes[8] ||crane structures (see below)
| 124 bytes[8]
 
| crane structures (see below)
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
 
|+ style="text-align: left;"| Crane structure:
 
|+ style="text-align: left;"| Crane structure:
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||index in static objects pool
| dword
 
| index in static objects pool
 
 
<!--
 
<!--
0x04 - -
+
0x0004 - -
 
-->
 
-->
 
|-
 
|-
| 0x08
+
|0x0008 ||float ||pickup zone x1 ([[01EE|crane opcode]] parameter 3)
| float
 
| pickup zone x1 ([[01EE|crane opcode]] parameter 3)
 
 
|-
 
|-
| 0x0C
+
|0x000C ||float ||pickup zone x2 (crane opcode parameter 5)
| float
+
|-
| pickup zone x2 (crane opcode parameter 5)
+
|0x0010 ||float ||pickup zone y1 (crane opcode parameter 6)
 
|-
 
|-
| 0x10
+
|0x0014 ||float ||pickup zone y2 (crane opcode parameter 4)
| float
 
| pickup zone y1 (crane opcode parameter 6)
 
 
|-
 
|-
| 0x14
+
|0x0018 ||float ||drop off point x (crane opcode parameter 7)
| float
 
| pickup zone y2 (crane opcode parameter 4)
 
 
|-
 
|-
| 0x18
+
|0x001C ||float ||drop off point y (crane opcode parameter 8)
| float
 
| drop off point x (crane opcode parameter 7)
 
 
|-
 
|-
| 0x1C
+
|0x0020 ||float ||drop off point z (crane opcode parameter 9)
| float
 
| drop off point y (crane opcode parameter 8)
 
 
|-
 
|-
| 0x20
+
|0x0024 ||float ||drop off heading in radians (crane opcode parameter 10)
| float
 
| drop off point z (crane opcode parameter 9)
 
 
|-
 
|-
| 0x24
+
|0x0028 ||float ||crane arm pick up rotation in radians
| float
 
| drop off heading in radians (crane opcode parameter 10)
 
 
|-
 
|-
| 0x28
+
|0x002C ||float ||crane arm drop off rotation in radians
| float
 
| crane arm pick up rotation in radians
 
 
|-
 
|-
| 0x2C
+
|0x0030 ||float ||crane arm pick up distance from center of crane
| float
 
| crane arm drop off rotation in radians
 
 
|-
 
|-
| 0x30
+
|0x0034 ||float ||crane arm drop off distance from center of crane
| float
 
| crane arm pick up distance from center of crane
 
 
|-
 
|-
| 0x34
+
|0x0038 ||float ||crane arm pick up height
| float
 
| crane arm drop off distance from center of crane
 
 
|-
 
|-
| 0x38
+
|0x003C ||float ||crane arm drop off height
| float
 
| crane arm pick up height
 
 
|-
 
|-
| 0x3C
+
|0x0040 ||float ||crane arm current rotation in radians
| float
 
| crane arm drop off height
 
 
|-
 
|-
| 0x40
+
|0x0044 ||float ||crane arm current distance from center of crane
| float
 
| crane arm current rotation in radians
 
 
|-
 
|-
| 0x44
+
|0x0048 ||float ||crane arm current height
| float
 
| crane arm current distance from center of crane
 
 
|-
 
|-
| 0x48
+
|0x004C ||float[3] ||crane hook initial x, y, z
| float
 
| crane arm current height
 
 
|-
 
|-
| 0x4C
+
|0x0058 ||float[3] ||crane hook current x, y, z
| float[3]
 
| crane hook initial x, y, z
 
|-
 
| 0x58
 
| float[3]
 
| crane hook current x, y, z
 
 
|-
 
|-
 
<!--
 
<!--
0x64 - -
+
0x0064 - -
0x68 - -
+
0x0068 - -
 
-->
 
-->
 
|-
 
|-
| 0x6C
+
|0x006C ||dword ||pointer to vehicle to pick up
| dword
 
| pointer to vehicle to pick up
 
 
|-
 
|-
| 0x70
+
|0x0070 ||dword ||current game time + 10000 (only updates when crane has finished lifting car)
| dword
 
| current game time + 10000 (only updates when crane has finished lifting car)
 
 
|-
 
|-
| 0x74
+
|0x0074 ||byte ||crane activity
| byte
 
| crane activity
 
 
* 0 = idle crane
 
* 0 = idle crane
 
* 1 = crusher/military crane active
 
* 1 = crusher/military crane active
 
* 2 = crane inactive
 
* 2 = crane inactive
 
|-
 
|-
| 0x75
+
|0x0075 ||byte ||crane status
| byte
 
| crane status
 
 
* 0 = idle
 
* 0 = idle
 
* 1 = crane moving to pick up
 
* 1 = crane moving to pick up
Line 903: Line 733:
 
* 5 = moving upwards from drop off
 
* 5 = moving upwards from drop off
 
|-
 
|-
| 0x76
+
|0x0076 ||byte ||number of vehicles collected
| byte
 
| number of vehicles collected
 
 
|-
 
|-
| 0x77
+
|0x0077 ||byte ||is [[02FB|crusher crane]]
| byte
 
| is [[02FB|crusher crane]]
 
 
|-
 
|-
| 0x78
+
|0x0078 ||byte ||is [[0368|military crane]]
| byte
 
| is [[0368|military crane]]
 
 
<!--
 
<!--
0x79 - -
+
0x0079 - -
 
-->
 
-->
 
|-
 
|-
| 0x7A
+
|0x007A ||byte ||model is not doc_crane_cab0
| byte
 
| model is not doc_crane_cab0
 
 
|-
 
|-
| 0x7B
+
|0x007B ||byte ||''align''
| byte
 
| ''align''
 
 
|}
 
|}
 
</div>
 
</div>
Line 1,751: Line 1,571:
 
==== Block 17: Script Paths ====
 
==== Block 17: Script Paths ====
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 17
| dword
 
| size of block 17
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of block 17, data below
| -
 
| start of block 17, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of subblock
| dword
 
| size of subblock
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of subblock, data below
| -
 
| start of subblock, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||total number of nodes on [[Script Path|script path]]
| dword
 
| total number of [[Script Path|paths]]
 
 
<!--
 
<!--
0x04 - -
+
0x0004 - -
0x08 - -
 
 
-->
 
-->
 
|-
 
|-
| 0x0C
+
|0x0008 ||float ||total distance of path
| float
+
|-
| speed ([[049E]])
+
|0x000C ||float ||[[049E|path speed]]
 
|-
 
|-
| 0x10
+
|0x0010 ||float ||[[049F|distance along path]]
| float
 
| distance along path ([[049F]])
 
 
|-
 
|-
| 0x14
+
|0x0014 ||float ||some sort of offset
| float
 
| some sort of offset
 
 
<!--
 
<!--
0x18 - -
+
0x0018 - -
 
-->
 
-->
 
|-
 
|-
| 0x1C
+
|0x001C ||- ||object handle, up to 6 supported
| -
 
| object handle, up to 6 supported
 
 
|}
 
|}
 
</div></div>
 
</div></div>
Line 1,814: Line 1,611:
 
==== Block 18: Player Info ====
 
==== Block 18: Player Info ====
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||size of block 18
| dword
 
| size of block 18
 
 
|-
 
|-
| 0x04
+
|0x0004 ||- ||start of block 18, data below
| -
 
| start of block 18, data below
 
 
|}
 
|}
 
<div style="margin-left: 3em;">
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
{| class="wikitable"
! Offset
+
!Offset ||Type ||style="width: 30em;" |Description
! Type
+
|-
! width="400px"| Description
+
|0x0000 ||dword ||size of subblock
 
|-
 
|-
| 0x00
+
|0x0004 ||- ||start of subblock, data below
| dword
+
|}
| size of subblock
+
<div style="margin-left: 3em;">
|-
+
{| class="wikitable"
| 0x04
+
!Offset ||Type ||style="width: 30em;" |Description
| -
 
| start of subblock, data below
 
|}
 
<div style="margin-left: 3em;">
 
{| class="wikitable"
 
! Offset
 
! Type
 
! width="400px"| Description
 
 
|-
 
|-
| 0x00
+
|0x0000 ||dword ||current money
| dword
 
| current money
 
 
|-
 
|-
| 0x04
+
|0x0004 ||byte ||wasted/busted status
| byte
 
| wasted/busted status
 
 
<!--
 
<!--
0x05 - -
+
0x0005 - -
0x09 - -
+
0x0009 - -
0x0B - -
+
0x000B - -
 
-->
 
-->
 
|-
 
|-
| 0x0F
+
|0x000F ||dword ||currently displayed money
| dword
 
| currently displayed money
 
 
|-
 
|-
| 0x13
+
|0x0013 ||dword ||number of packages picked up
| dword
 
| number of packages picked up
 
 
|-
 
|-
| 0x17
+
|0x0017 ||dword ||total number of packages ([[02ED]])
| dword
 
| total number of packages ([[02ED]])
 
 
|-
 
|-
| 0x1B
+
|0x001B ||byte ||[[0330|never gets tired]]
| byte
 
| infinite run ([[0330]])
 
 
|-
 
|-
| 0x1C
+
|0x001C ||byte ||fast reload ([[0331]])
| byte
 
| fast reload ([[0331]])
 
 
|-
 
|-
| 0x1D
+
|0x001D ||byte ||fireproof ([[055D]])
| byte
 
| fireproof ([[055D]])
 
 
|-
 
|-
| 0x1E
+
|0x001E ||byte ||max health
| byte
 
| max health
 
 
|-
 
|-
| 0x1F
+
|0x001F ||byte ||max armor
| byte
 
| max armor
 
 
|-
 
|-
| 0x20
+
|0x0020 ||byte ||[[0413|get out of jail free]]
| byte
 
| free busted once
 
 
|-
 
|-
| 0x21
+
|0x0021 ||byte ||[[0414|free health care]]
| byte
 
| free wasted once ([[0414]])
 
 
|-
 
|-
| 0x22
+
|0x0022 ||byte ||[[0501|can do drive by]]
| byte
 
| driveby enabled ([[0501]])
 
 
<!--
 
<!--
0x23 - -
+
0x0023 - -
0x69 - -
+
0x0069 - -
0x6A - -
+
0x006A - -
 
-->
 
-->
 
|}
 
|}

Revision as of 17:11, 25 July 2015

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

Location

By default, the game places its save game files into the folder "GTA Vice City User Files" which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed.

The save files themselves are named in the format GTAVCsfX.b where X represents the in-game slot number. There are 8 slots available in the game (1-8).

Format details

The save file is in binary format (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 (0318)
0x0030 word SYSTEMTIME wYear
0x0032 word SYSTEMTIME wMonth
0x0034 word SYSTEMTIME wDayOfWeek
0x0036 word SYSTEMTIME wDay
0x0038 word SYSTEMTIME wHour
0x003A word SYSTEMTIME wMinute
0x003C word SYSTEMTIME wSecond
0x003E word SYSTEMTIME wMilliseconds
0x0040 dword unknown, value is always 12609
0x0044 dword current island
0x0048 float[3] camera coordinates (x,y,z)
0x0054 dword unknown, but only present in Steam version saves. If present, n = 4 in following offsets for this block, otherwise n = 0.
0x0054 + n dword length (ms) of in-game minute (1000 = normal)
0x0058 + n dword weather timer
0x005C + n byte game hour
0x005D + n byte[3] align
0x0060 + n byte game minute
0x0061 + n byte[3] align
0x0064 + n dword pad number?
0x0068 + n dword global timer
0x006C + n float game speed (015D)
0x0070 + n float unknown
0x0074 + n float unknown
0x0078 + n dword unknown
0x007C + n float unknown, always 1.0
0x0080 + n float unknown, always 1.0
0x0084 + n float unknown, always 1.0
0x0088 + n word unknown
0x008A + n byte[2] align
0x008C + n word relates to weather?
0x008E + n byte[2] align
0x0090 + n word current weather
0x0092 + n byte[2] align
0x0094 + n dword unknown
0x0098 + n dword current weather table offset (between 0 and 63)
0x009C + n float current vehicle camera view (between 0.0 and 5.0)
0x00A0 + n float current on foot camera view (classic controls only)
0x00A4 + n dword current interior (04BB)
0x00A8 + n byte taxi boost jump
0x00A9 + n byte[3] align
0x00AC + n byte unknown
0x00AD + n byte[3] align
0x00B0 + n dword extra color
0x00B4 + n dword extra color active (0 = inactive, 1 = active)
0x00B8 + n float extra color fade (between 0.0 and 1.0)
0x00BC + n dword[10] unknown, relates to radio station?
0x00E4 + n dword size of script block
0x00E8 + n - start of script block, see below
Subblock A:
Offset Type Description
0x0000 char[4] "SCR\0"
0x0004 dword size of script block again
0x0008 dword size of subblock A
0x000C - start of subblock A: global variables - each variable is 4 bytes long
Subblock B:
Offset Type Description
0x0000 dword size of subblock B (constant 0x248)
0x0004 dword on mission flag offset in global variable space
0x0008 dword game timer when mission is completed (0318 or 0595), -1 if never completed a mission
0x000C BuildingSwap[25] swapped building model structures (see below)
BuildingSwap (16/0x10 bytes):
Offset Type Description
0x0000 dword always 2
0x0004 dword building handle
0x0008 dword new building IDE model
0x000C dword old building IDE model
0x019C InvisibilitySetting[20] object visibility structure (0363) (see below)
InvisibilitySetting (8 bytes):
Offset Type Description
0x0000 dword always 2
0x0004 dword handle
0x023C - start of another set of offset below
Offset Type Description
0x0000 byte unknown
0x0001 byte Kaufman Cabs radio
0x0002 word unknown
0x0004 dword size of main
0x0008 dword size of largest mission
0x000C word number of missions
0x000E word unknown
0x0010 dword number of running scripts
0x0014 - 136 bytes each, script structure (see below)
Script structure:
Offset Type Description
0x0000 dword pointer to previous script
0x0004 dword pointer to next script
0x0008 char[8] name
0x0010 dword current instruction pointer
0x0014 dword[4] return stack
0x0024 dword unknown
0x0028 dword unknown
0x002C word stack counter
0x002E word unknown
0x0030 dword[16] 16 local variables
0x0070 dword timerA (local variable 16)
0x0074 dword timerB (local variable 17)
0x0078 byte is active
0x0079 byte "if" statement result
0x007A byte uses mission cleanup
0x007B byte skip wake time (always 0)
0x007C dword wake time
0x0080 word "if" check result
0x0082 byte "not" flag
0x0083 byte death/arrest state
0x0084 byte death/arrest has been executed
0x0085 byte mission flag

Block 1: Player Peds

Offset Type Description
0x0000 dword size of block 1
0x0004 - start of block 1, data below
Offset Type Description
0x0000 dword size of subblock
0x0004 - start of subblock, data below
Offset Type Description
0x0000 dword number of players
0x0004 PlayerPed[n] start of player structure where n is the number of players
PlayerPed (1791/0x6FF bytes):
Offset Type Description
0x0006 dword index
0x000A CPed ped structure dump (see structure below)
CPed (1752/0x6D8 bytes):
Offset Type Description
0x0034 float[3] x,y,z coordinates
0x0053 byte
  • bit 1 = bullet proof
  • bit 2 = fire proof
  • bit 3 = collision proof
  • bit 4 = melee proof
0x00B8 float weight
0x0354 float health
0x0358 float armor
0x03A8 dword pointer to last car entered/car about to be entered
0x03AC byte is ped in any vehicle (0 = not in vehicle, 1 = in vehicle)
0x0504 byte currently selected weapon type
0x0598 byte last damaged by weapon
0x06E2 dword max wanted level
0x06E6 dword max criminal points, in tandem with max wanted 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 (0219)
0x0004 dword free bombs (0 = not free, 1 = free)
0x0008 dword free resprays
0x0018 dword cars collected by garage type 8, see below
0x001C dword cars collected by garage type 9
0x0020 dword cars collected by garage type 10
0x0024 dword cars collected by garage type 22
0x0028 dword time when garage full message was last shown
0x002C 40 bytes[48] garage car structures (see struct below)
Garage car structure:
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
0x07AC 168 bytes[32] garage structures (see struct below)
Garage structure:
Offset Type Description
0x0000 byte type
0x0001 byte door status
  • 0 = closed
  • 1 = opened
  • 2 = closing
  • 3 = opening
0x0002 byte maximum number of cars in garage (4 = default)
0x0019 byte rotating garage door
0x001A byte special camera for garage
0x001C float[3] entrance bottom left x,y,z coordinates
0x0028 float[4] rx,ry,rz,rw quaternion rotation
0x0038 float ceiling z coordinate

Export garage status (binary format):

  • 0b000001=car 1 collected
  • 0b000010=car 2 collected
  • 0b000100=car 3 collected
  • 0b001000=car 4 collected
  • 0b010000=car 5 collected
  • 0b100000=car 6 collected

Add them up to set the garage as car already collected:

0b000011, cars 1 and 2 collected
0b100011, cars 1, 2, and 6 are collected

Block 3: Game Logic

Offset Type Description
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 shortcuts (058D)
0x0004 16 bytes[16] taxi shortcut structures (see structure below)
Taxi shortcut structure:
Offset Type Description
0x0000 float[3] x,y,z coordinates
0x000C float heading

Block 4: Vehicles

Offset Type Description
0x0000 dword size of block 4
0x0004 - start of block 4, data below
Offset Type Description
0x0000 dword size of subblock
0x0004 - start of another set of offset below
Offset Type Description
0x0000 dword number of general vehicles
0x0004 dword number of boats
0x0008 dword number of bikes
0x000C Vehicle[n] vehicle structures where n is the number of general vehicles, boats, and bikes
Vehicle (0x5E6 (general) | 0x4CA (boat) | 0x4F6 (bike) bytes):
Offset Type Description
0x0000 dword vehicle type
  • 0 = general
  • 1 = boat
  • 5 = bike
0x0004 word vehicle IDE model
0x0006 dword vehicle index
0x000A - vehicle structure dump (see below, dependent on vehicle type)

If vehicle is type general:

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

If vehicle is type boat:

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

If vehicle is type bike:

Bike structure (1260/0x4EC bytes):
Offset Type Description
0x0034 float[3] x,y,z coordinates
0x005C word IDE model number

Block 5: Objects

Offset Type Description
0x0000 dword size of block 5
0x0004 - start of block 5, data below
Offset Type Description
0x0000 dword size of subblock (4 bytes less than block header)
0x0004 - start of another set of offset below
Offset Type Description
0x0000 dword number of objects
0x0004 - 88 bytes each, object structures (see struct below)
Object structure:
Offset Type Description
0x0000 word object IDE number
0x0006 float[3] x,y,z coordinates

Block 6: Paths

Block 7: Cranes

Offset Type Description
0x0000 dword size of block 7
0x0004 - start of block 7, data below
Offset Type Description
0x0000 dword size of subblock (constant 0x3E8)
0x0004 - start of subblock, data below
Offset Type Description
0x0000 dword number of cranes
0x0004 dword cars collected by military crane
0x0008 124 bytes[8] crane structures (see below)
Crane structure:
Offset Type Description
0x0000 dword index in static objects pool
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 dword pointer to vehicle to pick up
0x0070 dword current game time + 10000 (only updates 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 (52/0x34 bytes):
Offset Type Description
0x0000 float[3] x,y,z coordinates
0x000C float current protection revenue (04A6)
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
0x00 dword size of block 9
0x04 - start of block 9, data below
Offset Type Description
0x00 dword size of subblock (constant 0xA30)
0x04 - start of subblock, data below
Offset Type Description
0x04 dword number of phones
0x08 52 bytes[50] phone structures (see below)
Phone structure:
Offset Type Description
0x0 float[3] x,y,z coordinates
0x2C dword phone status (3=idle,9=ringing,others=leftover GTA III stuff)

Block 10: Restart Points

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 all data below
0x008 float[3] hospital restart x,y,z coordinates (016C)
0x014 float hospital restart heading
7 additional hospital restarts
0x088 float[3] police restart x,y,z coordinates (016D)
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 (016E)
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 always 0, leftover from GTA III's 041F
0x123 byte always 0, leftover from GTA III's 0420

Block 11: Radar Blips

Offset Type Description
0x00 dword size of block 11
0x04 - start of block 11, data below
Offset Type Description
0x00 dword size of subblock (constant 0xE18)
0x04 - start of subblock, data below
Offset Type Description
0x00 char[4] "RDR\0"
0x08 48 bytes[75] blip structures (see below)
Blip structure:
Offset Type Description
0x00 dword color
0x10 float[2] x,y coordinates
0x18 float[3] x,y,z coordinates
0x26 byte brightness (0166)
0x2A word size (0168)
0x2C word show (018B)
0x2E word type

Block 12: Zones

Offset Type Description
0x00 dword size of block 12
0x04 - start of block 12, data below
Offset Type Description
0x00 dword size of subblock (constant 0x8BE0)
0x04 - start of subblock, data below
Offset Type Description
0x0000 char[4] "ZNS\0"
0x0004 dword size of subblock
0x08 - start of subblock, data below
Offset Type Description
0x0010 56 bytes[20] navig.zon structures (see below)
0x0470 56 bytes[169] info.zon structures (see below)
0x2968 68 bytes[338] ped/car/gang info zone structures
0x8330 word
0x8332 word
0x8338 dword
0x833C 56 bytes[39] map.zon structures (see below)
0x8BC4 2 bytes[14] crime report audio
Zone (navig, info, map) structure:
Offset Type Description
0x00 string name
0x08 float[3] x1,y1,z1 coordinates
0x14 float[3] x2,y2,z2 coordinates
0x20 dword type
0x24 dword island number
0x28 word zone info id night
0x2A word zone info id day
0x2C dword
0x30 dword
0x34 dword

Block 13: Gangs

Offset Type Description
0x00 dword size of block 13
0x04 - start of block 13, data below
Offset Type Description
0x00 dword size of subblock
0x04 - start of subblock, data below
Offset Type Description
0x00 char[4] "GNG\0"
0x04 dword total size of gang structures
0x08 24 bytes[9] gang structures (see below)
Gang structure:
Offset Type Description
0x00 dword car model (0236)
0x04 dword ped model 1
0x08 dword ped model 2
0x10 dword weapon number 1 (0237)
0x14 dword weapon number 2

Block 14: Car Generators

Offset Type Description
0x00 dword size of block 14
0x04 - start of block 14, data below
Offset Type Description
0x00 dword size of subblock
0x04 - start of subblock, data below
Offset Type Description
0x00 char[4] "CGN\0"
0x04 dword size of subblock
0x08 - start of subblock, data below
Offset Type Description
0x04 dword number of active generators
0x10 dword total size of car generator structures
0x14 44 bytes[185] car generator structures (see below)
Car generator structure:
Offset Type Description
0x00 dword model ID
0x04 float[3] x,y,z coordinates
0x10 float z angle rotation
0x14 word primary color
0x16 word secondary color
0x18 byte force spawn
0x19 byte alarm
0x1A byte lock
0x20 dword timer
0x28 word 014C
0x2A byte has recently been stolen

Block 15: Particles

Offset Type Description
0x00 dword size of block 15
0x04 - start of block 15, data below
Offset Type Description
0x00 dword size of subblock
0x04 dword number of particle objects
0x08 132 bytes[n] particle structures (see below)
Offset Type Description
0x30 float[3] x,y,z coordinates
0x58 dword particle type
0x5C dword particle type
0x60 byte visibility
0x61 byte sparsity
0x62 word sparsity counter
0x68 float[3] x,y,z strength
0x78 float scale

Block 16: Audio Script Objects

Offset Type Description
0x00 dword size of block 16
0x04 - start of block 16, data below
Offset Type Description
0x00 dword size of subblock
0x04 - start of subblock, data below
Offset Type Description
0x00 char[4] "AUD\0"
0x04 dword size of all data below
0x08 dword number of audio objects (n)
0x12 24 bytes[n] audio structures (see below)
Audio structure:
Offset Type Description
0x04 word audio index
0x08 float[3] x,y,z coordinates

Block 17: Script Paths

Offset Type Description
0x0000 dword size of block 17
0x0004 - start of block 17, data below
Offset Type Description
0x0000 dword size of subblock
0x0004 - start of subblock, data below
Offset Type Description
0x0000 dword total number of nodes on script path
0x0008 float total distance of path
0x000C float path speed
0x0010 float distance along path
0x0014 float some sort of offset
0x001C - object handle, up to 6 supported

Block 18: Player Info

Offset Type Description
0x0000 dword size of block 18
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 (02ED)
0x001B byte never gets tired
0x001C byte fast reload (0331)
0x001D byte fireproof (055D)
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

Block 19: Stats

Offset Type Description
0x00 dword size of block 19
0x04 - start of block 19, data below
Offset Type Description
0x00 dword size of subblock
0x04 - start of subblock, data below
Offset Type Description
0x00 dword people wasted by player
0x04 dword people wasted by others
0x08 dword road vehicles destroyed
0x0C dword boats destroyed
0x10 dword tires popped with gunfire
0x14 dword bullets fired
0x18 dword[23] peds of ped type wasted
0x74 dword planes and helicopters destroyed
0x78 float current progress (030C)
0x7C float total progress (030D)
0x80 dword kilograms of explosives used
0x84 dword bullets that hit
0x88 dword number of headshots
0x8C dword total number of wanted stars attained
0x90 dword total number of wanted stars evaded
0x94 dword times busted
0x98 dword hospital visits
0x9C dword days passed in game
0xA0 dword safehouse visits
0xA4 dword sprayings
0xA8 float max insane stunt jump distance (030E)
0xAC float max insane stunt jump height (030F)
0xB0 dword max insane stunt flips (0310)
0xB4 dword max insane stunt rotation (0311)
0xB8 dword best insane stunt so far (0312)
0xBC dword unique jumps completed (0313)
0xC0 dword total unique jumps (0314)
0xC4 dword mission attempts (0317)
0xC8 dword passengers dropped off (0315)
0xCC dword cash made in taxi (0316)
0xD0 dword unused stat
0xD4 dword unused stat
0xD8 dword unused stat
0xDC dword porn leaflet rubbish visibility (055A)
0xE0 dword allows hurricane weather (057C)
0xE4 float distance traveled foot
0xE8 float distance traveled car
0xEC float distance traveled bike
0xF0 float distance traveled boat
0xF4 float distance traveled golf cart
0xF8 float distance traveled helicopter
0xFC float distance traveled plane
0x100 dword people saved in an ambulance (0401)
0x104 dword criminals killed on vigilante mission (0402)
0x108 dword total fires extinguished (0404)
0x10C dword highest vigilante mission level (0578)
0x110 dword highest paramedic mission level (0403)
0x114 dword fire truck mission level (0599)
0x118 dword photographs taken
0x11C dword rampages passed
0x120 dword total number of rampages (0408)
0x124 dword total number of missions (042C)
0x128 dword flight hours
0x12C dword fishes fed (number of times drowned)
0x130 dword seagulls sniped
0x134 float weapon budget (0528)
0x138 float fashion budget (04CF)
0x13C float visits from loan sharks (unused)
0x140 float stores knocked off (0531)
0x144 float movie stunts (unused)
0x148 float assassination contracts completed (0533)
0x14C float pizzas delivered (0534)
0x150 float garbage pickups made (unused)
0x154 float 'ice cream' sold (0536)
0x158 float top shooting range score (unused, see 0x1FF)
0x15C float shooting range rank (unused, see 0x1FF)
0x160 dword longest wheelie time (04FC)
0x164 dword longest stoppie time (04FC)
0x168 dword longest 2wheel time (04FC)
0x16C dword longest wheelie distance (04FC)
0x170 dword longest stoppie distance (04FC)
0x174 dword longest 2wheel distance (04FC)
0x178 dword property budget (0529)
0x17C dword auto repair and painting budget
0x180 dword property destroyed
0x184 dword number of properties owned (0542)
0x188 dword bloodring kills (0543)
0x18C dword longest time in bloodring (0544)
0x190 byte[15] properties owned (0542)
0x19F dword highest media attention
0x1A3 dword[23] best times for races/vehicle missions in seconds (042E)
0x1FF dword[5] minigame records (042F)
  • 0 - Highest score for Shooter
  • 1 - Best Percentage of hits for Shooter
  • 2 - Number of drug deals made
  • 3 - Highest score with Keepie-Uppy beach ball
  • 4 - Unused
0x213 dword Hotring Best Result (0582)
0x217 dword peds killed recently (always zero while saving)
0x21B dword total peds killed (used for calculating rating)
0x21F char[8] last passed mission GXT entry name (0318)
0x227 dword cheat rating
0x22B float[10] listening time per radio station in milliseconds

Block 20: Set Pieces

Offset Type Description
0x00 dword size of block 20
0x04 - start of block 20, data below
Offset Type Description
0x00 dword size of subblock
0x04 - start of subblock, data below
Offset Type Description
0x00 dword number of trigger zones (04F8)
0x04 [96] 56 bytes each, trigger zone structures (see below)
Trigger zone structure:
Offset Type Description
0x00 dword type
0x08 float timer
0x08 float trigger area x1
0x0C float trigger area y2
0x10 float trigger area x2
0x14 float trigger area y1
0x18 float[2] policeA spawn x,y
0x20 float[2] policeB spawn x,y
0x28 float[2] policeA heading x,y
0x30 float[2] policeB heading x,y

Block 21: Streaming

Offset Type Description
0x00 dword size of block 21
0x04 - start of block 21, data below
Offset Type Description
0x00 dword size of subblock (constant 0x12C)
0x04 - start of subblock, data below
Offset Type Description
0x00 20 bytes[15] streaming structures

Block 22: Ped Types

Offset Type Description
0x00 dword size of block 22
0x04 - start of block 22, data below
Offset Type Description
0x00 dword size of subblock (constant 0x2E8)
0x04 - start of subblock, data below
Offset Type Description
0x00 char[4] "PTP\0"
0x04 dword total size of pedtype structures
0x08 32 bytes[23] pedtype structures (see below)
Pedtype structure:
Offset Type Description
0x00 dword bitstring (each associated to an entry in ped.dat)
0x04 float first value/50.0
0x08 float second value/50.0
0x0C float third value/50.0
0x10 float fourth value
0x14 float fifth value
0x18 dword threat flags
0x1C dword avoid flags

Padding

Following the last data block is a variable amount of padding. Since every save file is exactly 0x31464 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. There could be up to 4 padding blocks, each one is up to 55,000 bytes in length.

Checksum

The last four bytes of the save file is the checksum value. It is the sum of all preceding bytes in the file. If the checksum does not match that sum, the game will consider the save file to be "corrupted" and refuse to load it. For any change in the save file, make sure the checksum value is updated.

External links