Difference between revisions of "Saves (GTA 3)"
(→Block 17: Stats) |
m (→Block 2: Garages) |
||
(42 intermediate revisions by 6 users not shown) | |||
Line 8: | Line 8: | ||
The save files themselves are named in the format '''GTA3sfX.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 '''GTA3sfX.b''' where '''X''' represents the in-game slot number. There are 8 slots available in the game (1-8). | ||
− | ==Format Details== | + | ==Format Details (PC)== |
− | * Save files are | + | * Save files are always 0x3145C (201820) bytes long. |
− | * Byte order is little endian. For example, the number 3452 (0x0D7C) is represented | + | * Byte order is [https://en.wikipedia.org/wiki/Endianness#Little-endian little endian]. For example, the number 3452 (0x0D7C) is represented as 0x7C 0x0D in little endian. |
− | * File is divided into 20 blocks, followed by [[#Padding|padding]] and | + | * File is divided into 20 blocks, followed by [[#Padding|padding]] and ends with a 4-byte [[#Checksum|checksum]]. |
===Data Blocks=== | ===Data Blocks=== | ||
− | + | A DWORD value precedes each block of data that indicates the size of the block. | |
− | ====Block 0: | + | ====Block 0: Simple Vars==== |
Game "meta-information" giving the overall state of things. Also includes 'TheScripts' sub-block. | Game "meta-information" giving the overall state of things. Also includes 'TheScripts' sub-block. | ||
Line 53: | Line 53: | ||
|0x003E ||word ||SYSTEMTIME wMilliseconds | |0x003E ||word ||SYSTEMTIME wMilliseconds | ||
|- | |- | ||
− | |0x0040 ||dword ||unknown | + | |0x0040 ||dword ||unknown (constant 0x031401) |
|- | |- | ||
|0x0044 ||enum ||current island (1=Portland; 2=Staunton; 3=Shoreside Vale) | |0x0044 ||enum ||current island (1=Portland; 2=Staunton; 3=Shoreside Vale) | ||
Line 77: | Line 77: | ||
|0x0068 ||dword ||time in milliseconds (global timer) | |0x0068 ||dword ||time in milliseconds (global timer) | ||
|- | |- | ||
− | |0x006C ||float ||time scale | + | |0x006C ||float ||[[015D|time scale]] |
|- | |- | ||
|0x0070 ||float ||time step (frame delta time) | |0x0070 ||float ||time step (frame delta time) | ||
Line 164: | Line 164: | ||
!DESCRIPTION | !DESCRIPTION | ||
|- | |- | ||
− | |0x0000 || dword || | + | |0x0000 || dword || [[0181|mission flag]] |
|- | |- | ||
− | |0x0004 || dword || | + | |0x0004 || dword || [[0182|base brief]] |
|} | |} | ||
</div> | </div> | ||
Line 252: | Line 252: | ||
|0x0010 || dword || current ip | |0x0010 || dword || current ip | ||
|- | |- | ||
− | |0x0014 || dword[ | + | |0x0014 || dword[6] || return stack |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|0x002C || word || stack counter | |0x002C || word || stack counter | ||
|- | |- | ||
− | |0x002E || word || ( | + | |0x002E || word || (align) |
|- | |- | ||
|0x0030 || dword[16] || local variables | |0x0030 || dword[16] || local variables | ||
Line 270: | Line 266: | ||
|0x0078 || byte || if result | |0x0078 || byte || if result | ||
|- | |- | ||
− | |0x0079 || byte || ( | + | |0x0079 || byte || is mission script ([[00D7]],[[0417]]) |
|- | |- | ||
− | |0x007A || byte || | + | |0x007A || byte || is active |
|- | |- | ||
|0x007B || byte || (align) | |0x007B || byte || (align) | ||
Line 280: | Line 276: | ||
|0x0080 || word || if number | |0x0080 || word || if number | ||
|- | |- | ||
− | |0x0082 || byte || ( | + | |0x0082 || byte || not flag (negative condition) |
− | |||
− | |||
|- | |- | ||
− | | | + | |0x0083 || byte || wasted_busted check enabled ([[0111]]) |
|- | |- | ||
− | | | + | |0x0084 || byte || wasted_busted check result |
|- | |- | ||
− | | | + | |0x0085 || byte || mission flag ([[0417]]) |
|- | |- | ||
− | | | + | |0x0086 || byte[2] || (align) |
|} | |} | ||
</div> | </div> | ||
Line 297: | Line 291: | ||
</div> | </div> | ||
− | ====Block 1: Player | + | ====Block 1: Player Peds==== |
{|class="wikitable" | {|class="wikitable" | ||
!OFFSET | !OFFSET | ||
Line 357: | Line 351: | ||
|0x0034 ||float[3] ||position (X, Y, Z) | |0x0034 ||float[3] ||position (X, Y, Z) | ||
|- | |- | ||
− | |0x0040 ||byte[ | + | |0x0040 ||byte[640] ||unknown |
+ | |- | ||
+ | |0x02C0 ||float ||player health | ||
+ | |- | ||
+ | |0x02C4 ||float ||player armor | ||
+ | |- | ||
+ | |0x02C8 ||byte[148] ||unknown | ||
+ | |- | ||
+ | |0x035C ||WeaponSlot[13] ||weapon slots (0x18 bytes each) | ||
+ | |} | ||
+ | |||
+ | <div style="margin-left: 3em;"> | ||
+ | {|class="wikitable" | ||
+ | |+WeaponSlot | ||
+ | !OFFSET | ||
+ | !TYPE | ||
+ | !DESCRIPTION | ||
+ | |- | ||
+ | |0x0000 ||dword ||weapon ID | ||
+ | |- | ||
+ | |0x0004 ||dword ||unknown | ||
+ | |- | ||
+ | |0x0008 ||dword ||bullets in clip | ||
+ | |- | ||
+ | |0x000C ||dword ||bullets total | ||
+ | |- | ||
+ | |0x0010 ||dword ||unknown | ||
+ | |- | ||
+ | |0x0014 ||dword ||unknown | ||
+ | |} | ||
+ | </div> | ||
+ | |||
+ | {|class="wikitable" | ||
+ | |0x0494 ||byte[348] ||unknown | ||
|} | |} | ||
</div> | </div> | ||
Line 402: | Line 429: | ||
|0x0000 ||dword ||garages count (n) | |0x0000 ||dword ||garages count (n) | ||
|- | |- | ||
− | |0x0004 ||dword || | + | |0x0004 ||dword ||[[021D|free bombs]] |
|- | |- | ||
− | |0x0008 ||dword || | + | |0x0008 ||dword ||[[0335|free resprays]] |
|- | |- | ||
− | |0x000C ||dword ||( | + | |0x000C ||dword ||cars collected (unused) |
|- | |- | ||
− | |0x0010 ||dword ||( | + | |0x0010 ||dword ||bank vans collected ([[Garage#GTA_III|Securicar garage]]) |
|- | |- | ||
− | |0x0014 ||dword ||( | + | |0x0014 ||dword ||police cars collected (unused) |
|- | |- | ||
− | |0x0018 ||dword ||Portland IE status (bitstring) | + | |0x0018 ||dword ||[[03D4#GTA_III|Portland IE status (bitstring)]] |
|- | |- | ||
|0x001C ||dword ||Shoreside IE status | |0x001C ||dword ||Shoreside IE status | ||
Line 418: | Line 445: | ||
|0x0020 ||dword ||unused IE status | |0x0020 ||dword ||unused IE status | ||
|- | |- | ||
− | |0x0024 ||dword ||time when 'GA_21' was last shown | + | |0x0024 ||dword ||time when [[Text#Hardcoded_messages|'GA_21']] was last shown |
|- | |- | ||
|0x0028 ||StoredCar[18] ||40 bytes each, stored cars | |0x0028 ||StoredCar[18] ||40 bytes each, stored cars | ||
Line 465: | Line 492: | ||
!DESCRIPTION | !DESCRIPTION | ||
|- | |- | ||
− | |0x0000 ||byte ||garage | + | |0x0000 ||byte ||garage [[Garage#GTA_III|type ID]] |
|- | |- | ||
− | |0x0001 ||byte || | + | |0x0001 ||byte ||garage state |
|- | |- | ||
|0x0002 ||byte ||(unknown) | |0x0002 ||byte ||(unknown) | ||
|- | |- | ||
− | |0x0003 ||byte || | + | |0x0003 ||byte ||closing without target car |
|- | |- | ||
− | |0x0004 ||byte || | + | |0x0004 ||byte ||deactivated |
|- | |- | ||
− | |0x0005 ||byte || | + | |0x0005 ||byte ||respray happened |
|- | |- | ||
|0x0006 ||byte[2] ||(align) | |0x0006 ||byte[2] ||(align) | ||
|- | |- | ||
− | |0x0008 ||dword || | + | |0x0008 ||dword ||target vehicle model index |
|- | |- | ||
− | |0x000C ||dword || | + | |0x000C ||dword ||door 1 pointer |
|- | |- | ||
− | |0x0010 ||dword || | + | |0x0010 ||dword ||door 2 pointer |
|- | |- | ||
− | |0x0014 ||byte || | + | |0x0014 ||byte ||is door 1 pool index |
|- | |- | ||
− | |0x0015 ||byte || | + | |0x0015 ||byte ||is door 2 pool index |
|- | |- | ||
− | |0x0016 ||byte || | + | |0x0016 ||byte ||is door 1 object |
|- | |- | ||
− | |0x0017 ||byte || | + | |0x0017 ||byte ||is door 2 object |
|- | |- | ||
|0x0018 ||byte ||(unknown) | |0x0018 ||byte ||(unknown) | ||
|- | |- | ||
− | |0x0019 ||byte || | + | |0x0019 ||byte ||rotated door |
|- | |- | ||
− | |0x001A ||byte || | + | |0x001A ||byte ||camera follows player |
|- | |- | ||
|0x001B ||byte ||(align) | |0x001B ||byte ||(align) | ||
Line 507: | Line 534: | ||
|0x0038 ||float ||door open (z coord) (how far door can open) | |0x0038 ||float ||door open (z coord) (how far door can open) | ||
|- | |- | ||
− | |0x003C ||float || | + | |0x003C ||float[2] ||door 1 x,y coord |
− | |||
− | |||
|- | |- | ||
− | |0x0044 ||float || | + | |0x0044 ||float[2] ||door 2 x,y coord |
|- | |- | ||
− | | | + | |0x004C ||float ||door 1 position (z coord) |
|- | |- | ||
− | | | + | |0x0050 ||float ||door 2 position (z coord) |
|- | |- | ||
− | | | + | |0x0054 ||dword ||door last open time |
|- | |- | ||
− | + | |0x0058 ||byte ||collected cars state | |
− | |||
− | |0x0058 ||byte || | ||
|- | |- | ||
|0x0059 ||byte[3] ||(align) | |0x0059 ||byte[3] ||(align) | ||
|- | |- | ||
− | |0x005C ||dword ||( | + | |0x005C ||dword ||target vehicle pointer (used during missions) |
|- | |- | ||
|0x0060 ||dword ||(unknown) | |0x0060 ||dword ||(unknown) | ||
|- | |- | ||
− | |0x0064 || | + | |0x0064 ||StoredCar ||(unknown) |
− | + | |} | |
− | + | </div> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |} | ||
− | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
Line 781: | Line 776: | ||
</div> | </div> | ||
− | ====Block 5: Path | + | ====Block 5: Path Find==== |
{|class="wikitable" | {|class="wikitable" | ||
!OFFSET | !OFFSET | ||
Line 811: | Line 806: | ||
|0x0000 ||dword ||number of entries (n) | |0x0000 ||dword ||number of entries (n) | ||
|- | |- | ||
− | |0x0004 ||byte[n] || | + | |0x0004 ||byte[n/2] ||[[022B|disabled ped path nodes]] |
+ | |- | ||
+ | |0x4 + n/2 ||byte[n/2] ||[[01E8|disabled car path nodes]] | ||
|} | |} | ||
</div> | </div> | ||
+ | * Note: each byte in these arrays represents 8 path nodes with a bitmask. If a bit is set, the node is disabled, otherwise it is enabled. | ||
</div> | </div> | ||
Line 846: | Line 844: | ||
|0x0000 ||dword ||number of cranes (n) | |0x0000 ||dword ||number of cranes (n) | ||
|- | |- | ||
− | |0x0004 ||dword ||cars collected by military crane | + | |0x0004 ||dword ||[[03EC|cars collected by military crane]] |
|- | |- | ||
− | |0x0008 ||Crane[8] ||Crane data | + | |0x0008 ||Crane[8] ||[[Crane]] data |
|} | |} | ||
Line 858: | Line 856: | ||
!DESCRIPTION | !DESCRIPTION | ||
|- | |- | ||
− | |0x0000 ||dword ||index in static objects pool | + | |0x0000 ||dword || index in static objects pool |
+ | |- | ||
+ | |0x0004 ||dword || crane hook object index in objects pool | ||
|- | |- | ||
− | | | + | |0x0008 ||dword || audio entity index |
|- | |- | ||
− | | | + | |0x000C ||float ||pickup zone x1 ([[01EE|crane opcode]] parameter 3) |
|- | |- | ||
− | | | + | |0x0010 ||float ||pickup zone x2 (crane opcode parameter 5) |
|- | |- | ||
− | | | + | |0x0014 ||float ||pickup zone y1 (crane opcode parameter 6) |
|- | |- | ||
− | | | + | |0x0018 ||float ||pickup zone y2 (crane opcode parameter 4) |
|- | |- | ||
− | | | + | |0x001C ||float ||drop off point x (crane opcode parameter 7) |
|- | |- | ||
− | | | + | |0x0020 ||float ||drop off point y (crane opcode parameter 8) |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | |0x0024 ||float ||drop off point z (crane opcode parameter 9) |
|- | |- | ||
− | | | + | |0x0028 ||float ||drop off heading in radians (crane opcode parameter 10) |
+ | |- | ||
+ | |0x002C ||float ||crane arm pick up rotation in radians | ||
+ | |- | ||
+ | |0x0030 ||float ||crane arm drop off rotation in radians | ||
+ | |- | ||
+ | |0x0034 ||float ||crane arm pick up distance from center of crane | ||
+ | |- | ||
+ | |0x0038 ||float ||crane arm drop off distance from center of crane | ||
+ | |- | ||
+ | |0x003C ||float ||crane arm pick up height | ||
+ | |- | ||
+ | |0x0040 ||float ||crane arm drop off height | ||
+ | |- | ||
+ | |0x0044 ||float ||crane arm current rotation in radians | ||
+ | |- | ||
+ | |0x0048 ||float ||crane arm current distance from center of crane | ||
+ | |- | ||
+ | |0x004C ||float ||crane arm current height | ||
+ | |- | ||
+ | |0x0058 ||float[3] ||crane hook initial x, y, z | ||
+ | |- | ||
+ | |0x005C ||float[3] ||crane hook current x, y, z | ||
+ | |- | ||
+ | |0x0068 ||float[2] ||unknown | ||
+ | |- | ||
+ | |0x0070 ||dword ||pointer to vehicle to pick up | ||
+ | |- | ||
+ | |0x0074 ||dword ||current game time + 10000 (only updates when crane has finished lifting car) | ||
+ | |- | ||
+ | |0x0078 ||byte ||crane activity | ||
+ | * 0 = idle crane | ||
+ | * 1 = crusher/military crane active | ||
+ | * 2 = crane inactive | ||
+ | |- | ||
+ | |0x0079 ||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 | ||
+ | |- | ||
+ | |0x007A ||byte ||number of vehicles collected | ||
+ | |- | ||
+ | |0x007B ||byte ||is [[02FB|crusher crane]] | ||
+ | |- | ||
+ | |0x007C ||byte ||is [[0368|military crane]] | ||
+ | |- | ||
+ | |0x007D ||byte ||unknown | ||
+ | |- | ||
+ | |0x007E ||byte ||model is not doc_crane_cab | ||
+ | |- | ||
+ | |0x007F ||byte ||(align) | ||
|} | |} | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
− | + | ====Block 7: Pickups==== | |
{|class="wikitable" | {|class="wikitable" | ||
!OFFSET | !OFFSET | ||
Line 906: | Line 952: | ||
!DESCRIPTION | !DESCRIPTION | ||
|- | |- | ||
− | |0x0000 ||Pickup[336] ||[[pickup]]s structures -- each is 0x1C bytes in size; see details below | + | |0x0000 ||dword ||block size |
+ | |- | ||
+ | |0x0004 ||- ||start of block, data below | ||
+ | |} | ||
+ | |||
+ | <div style="margin-left: 3em;"> | ||
+ | {|class="wikitable" | ||
+ | !OFFSET | ||
+ | !TYPE | ||
+ | !DESCRIPTION | ||
+ | |- | ||
+ | |0x0000 ||Pickup[336] ||[[pickup]]s structures -- each is 0x1C bytes in size; see details below | ||
|} | |} | ||
<div style="margin-left: 6em;"> | <div style="margin-left: 6em;"> | ||
Line 917: | Line 974: | ||
|0x0000 ||byte ||[[0213#Pickup types|type]] | |0x0000 ||byte ||[[0213#Pickup types|type]] | ||
|- | |- | ||
− | |0x0001 ||byte || | + | |0x0001 ||byte ||has been picked up |
|- | |- | ||
|0x0002 ||word ||ammo (for [[032B|weapon pickups]]) | |0x0002 ||word ||ammo (for [[032B|weapon pickups]]) | ||
Line 933: | Line 990: | ||
</div> | </div> | ||
{|class="wikitable" | {|class="wikitable" | ||
− | |0x24C0 ||word || | + | |0x24C0 ||word ||collected index for below, always between 0 and 19 |
|- | |- | ||
|0x24C2 ||byte[2] ||(align) | |0x24C2 ||byte[2] ||(align) | ||
|- | |- | ||
− | |0x24C4 || | + | |0x24C4 ||PickupsCollected[20] ||pickup index, latest collected pickup pointed by collected index from above |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
</div> | </div> | ||
</div> | </div> | ||
− | ====Block 8: Phone | + | ====Block 8: Phone Info==== |
{|class="wikitable" | {|class="wikitable" | ||
!OFFSET | !OFFSET | ||
Line 1,005: | Line 1,043: | ||
|0x0000 ||float[3] ||position (X, Y, Z) | |0x0000 ||float[3] ||position (X, Y, Z) | ||
|- | |- | ||
− | |0x000C ||dword[6] ||phone | + | |0x000C ||dword[6] ||pointer to phone message string |
|- | |- | ||
− | |0x0024 ||dword || | + | |0x0024 ||dword ||game time when phone message ends for states 5 and 6 |
|- | |- | ||
|0x0028 ||dword ||static index | |0x0028 ||dword ||static index | ||
|- | |- | ||
− | |0x002C ||dword || | + | |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 || | + | |0x0030 ||byte ||is player within range of phone |
|- | |- | ||
|0x0031 ||byte[3] ||(align) | |0x0031 ||byte[3] ||(align) | ||
Line 1,020: | Line 1,065: | ||
</div> | </div> | ||
</div> | </div> | ||
+ | |||
====Block 9: Restarts==== | ====Block 9: Restarts==== | ||
Line 1,070: | Line 1,116: | ||
|0x0102 ||word ||busted restart points count | |0x0102 ||word ||busted restart points count | ||
|- | |- | ||
− | |0x0104 ||byte ||override next restart flag ( | + | |0x0104 ||byte ||override next restart flag ([[016E]], [[0255]]) |
|- | |- | ||
|0x0105 ||byte[3] ||(align) | |0x0105 ||byte[3] ||(align) | ||
|- | |- | ||
− | |0x0108 ||RestartPoint ||overriden restart point ( | + | |0x0108 ||RestartPoint ||overriden restart point ([[016E]], [[0255]]) |
|- | |- | ||
− | |0x0118 ||byte || fade in after next death | + | |0x0118 ||byte || [[040F|fade in after next death]] flag |
|- | |- | ||
− | |0x0119 ||byte || fade in after next arrest | + | |0x0119 ||byte || [[040E|fade in after next arrest]] flag |
|- | |- | ||
− | |0x011A ||byte || override hospital level | + | |0x011A ||byte || [[041F|override hospital level]] flag |
|- | |- | ||
− | |0x011B ||byte || override police level | + | |0x011B ||byte || [[0420|override police level]] flag |
|} | |} | ||
Line 1,153: | Line 1,199: | ||
|+RadarBlip | |+RadarBlip | ||
|- | |- | ||
− | |0x0000 ||dword || | + | |0x0000 ||dword || [[0165|color]] |
|- | |- | ||
|0x0004 ||dword || type | |0x0004 ||dword || type | ||
+ | *0 = none | ||
+ | *1 = car | ||
+ | *2 = char | ||
+ | *3 = object/pickup | ||
+ | *4 = coord | ||
+ | *5 = contact point | ||
|- | |- | ||
− | |0x0008 ||dword || entity (car, | + | |0x0008 ||dword || entity ([[0161|car]], [[0162|char]], [[0163|object]]) handle (0 = not an entity) |
|- | |- | ||
− | |0x000C ||float | + | |0x000C ||float[2] || position x,y |
− | |||
− | |||
|- | |- | ||
|0x0014 ||float[3] || position x,y,z | |0x0014 ||float[3] || position x,y,z | ||
|- | |- | ||
− | |0x0020 ||word || | + | |0x0020 ||word || index |
|- | |- | ||
− | |0x0022 ||byte || | + | |0x0022 ||byte || [[0166|brightness]] |
|- | |- | ||
− | |0x0023 ||byte || | + | |0x0023 ||byte || is visible |
|- | |- | ||
− | |0x0024 ||float || | + | |0x0024 ||float || debug sphere cross offset{{ref|1}} |
|- | |- | ||
− | |0x0028 ||word || | + | |0x0028 ||word || [[0168|scale]] |
|- | |- | ||
− | |0x002A ||word || | + | |0x002A ||word || [[018B|display]] |
|- | |- | ||
− | |0x002C ||word || [[ | + | |0x002C ||word || blip [[Blip#GTA_III|sprite]] |
|- | |- | ||
|0x002E ||word || (align) | |0x002E ||word || (align) | ||
Line 1,184: | Line 1,234: | ||
</div> | </div> | ||
</div> | </div> | ||
+ | |||
====Block 11: Zones==== | ====Block 11: Zones==== | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 1,358: | Line 1,409: | ||
|0x0000 ||dword || car model id | |0x0000 ||dword || car model id | ||
|- | |- | ||
− | |0x0004 ||byte || ped model override | + | |0x0004 ||byte || [[0410|ped model override]] flag |
|- | |- | ||
|0x0005 ||byte[3] || (align) | |0x0005 ||byte[3] || (align) | ||
Line 1,468: | Line 1,519: | ||
|0x0020 ||dword ||timestamp (time last stolen?) | |0x0020 ||dword ||timestamp (time last stolen?) | ||
|- | |- | ||
− | |0x0024 ||dword || | + | |0x0024 ||dword ||vehicle pool index, -1 if not spawned |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | |0x0028 ||word ||[[014C|uses remaining]] (0 = disabled) |
|- | |- | ||
− | | | + | |0x002A ||byte ||is blocking (used internally to prevent two cars spawning close to each other) |
|- | |- | ||
− | | | + | |0x002B ||byte || (align) |
|- | |- | ||
− | | | + | |0x002C ||float[3] ||vecInf (unused) |
|- | |- | ||
− | | | + | |0x0038 ||float[3] ||vecSup (unused) |
|- | |- | ||
− | |0x0044 ||dword ||(unknown) | + | |0x0044 ||dword ||(unknown) (unused) |
|} | |} | ||
</div> | </div> | ||
Line 1,532: | Line 1,579: | ||
|+Particle | |+Particle | ||
|- | |- | ||
− | |0x0000 ||dword || unknown | + | |0x0000 ||dword || unknown (probably CPlaceable vtable) |
|- | |- | ||
− | |0x0004 || | + | |0x0004 ||CMatrix || Stores the position and rotation of the particle (see {{ref|matrix}}) |
|- | |- | ||
− | | | + | |0x004C ||pNext || pointer to the next particle struct |
|- | |- | ||
− | | | + | |0x0050 ||pPrev || pointer to the prev particle struct |
|- | |- | ||
− | | | + | |0x0054 ||dword || pointer to explosion particle |
+ | * It is used internally in the particles loop to create smoke only after an explosion has happened | ||
+ | * Used only when the type (see ''particle type'' below) is either 15 or 16 | ||
|- | |- | ||
− | | | + | |0x0058 ||dword || lifespan (at this time, the particle will be destroyed) |
|- | |- | ||
− | | | + | |0x005C ||dword || [[039D#List_of_particle_effects | particle effect]] |
|- | |- | ||
− | | | + | |0x0060 ||dword || [[Particle.cfg#List_of_particles | particle type]] |
|- | |- | ||
− | | | + | |0x0064 ||byte || number to generate (these many particles are generated at once) |
|- | |- | ||
− | | | + | |0x0065 ||byte || delay between two effects |
|- | |- | ||
− | | | + | |0x0066 ||word || delay counter (used initially to count the frames skipped) |
|- | |- | ||
− | | | + | |0x0068 ||word || status |
+ | * 1 - rendering (close to player) | ||
+ | * 2 - not rendering (far from player) | ||
+ | * 3 - deleted | ||
|- | |- | ||
− | | | + | |0x006A ||byte[2] || (align) |
|- | |- | ||
− | | | + | |0x006C ||float[3] || strength of particle (x,y,z) |
|- | |- | ||
− | | | + | |0x0078 ||float || spread |
+ | * Only used in particle type 13 (see ''particle type'' above) | ||
+ | * Used to randomize the position of multiple particles (see ''number to generate'' above) | ||
|- | |- | ||
− | | | + | |0x007C ||float || scale |
|- | |- | ||
− | | | + | |0x0080 ||dword || color of the particle (RGBA) |
|- | |- | ||
− | | | + | |0x0084 ||byte || destroy when far (the particle is destroyed if the player gets far) |
|- | |- | ||
− | | | + | |0x0085 ||byte || randomness |
+ | * 0 - always generate | ||
+ | * >0 - 1 in ''randomness'' chances of '''NOT''' generating | ||
+ | * <0 - 1 in ''randomness'' changes of generating | ||
|- | |- | ||
− | | | + | |0x0086 ||byte[2] || (align) |
− | + | |} | |
− | + | <div style="margin-left: 6em;"> | |
− | + | {|class="wikitable" | |
− | + | !OFFSET | |
− | + | !TYPE | |
− | + | !DESCRIPTION | |
− | + | |+CMatrix (0x48 bytes) | |
− | |||
− | | | ||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
|- | |- | ||
− | | | + | |0x0000 ||float[3] || right |
|- | |- | ||
− | | | + | |0x000C ||dword || flags |
|- | |- | ||
− | | | + | |0x0010 ||float[3] || up |
|- | |- | ||
− | | | + | |0x001C ||dword || (align) |
|- | |- | ||
− | | | + | |0x0020 ||dword || at |
|- | |- | ||
− | | | + | |0x002C ||dword || (align) |
|- | |- | ||
− | | | + | |0x0030 ||dword || position (x,y,z) |
|- | |- | ||
− | | | + | |0x003C ||dword || (align) |
|- | |- | ||
− | | | + | |0x0040 ||dword || pointer to attached RwMatrix |
|- | |- | ||
− | | | + | |0x0044 ||byte || has an attached RwMatrix |
|- | |- | ||
− | | | + | |0x0045 ||byte[3] || (align) |
|} | |} | ||
+ | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
− | ====Block 15: Audio | + | ====Block 15: Audio Script Objects==== |
{|class="wikitable" | {|class="wikitable" | ||
!OFFSET | !OFFSET | ||
Line 1,671: | Line 1,718: | ||
|0x0000 ||dword || index? | |0x0000 ||dword || index? | ||
|- | |- | ||
− | |0x0004 ||word || | + | |0x0004 ||word || [[018D#GTA_III|audio index]] |
|- | |- | ||
|0x0006 ||byte[2] || (align) | |0x0006 ||byte[2] || (align) | ||
Line 1,682: | Line 1,729: | ||
</div> | </div> | ||
</div> | </div> | ||
− | ====Block 16: Player | + | |
+ | ====Block 16: Player Info==== | ||
{|class="wikitable" | {|class="wikitable" | ||
!OFFSET | !OFFSET | ||
Line 1,712: | Line 1,760: | ||
|0x0000 ||dword || player money | |0x0000 ||dword || player money | ||
|- | |- | ||
− | |0x0004 ||byte || | + | |0x0004 ||byte || wasted/busted state |
|- | |- | ||
− | |0x0005 ||dword || | + | |0x0005 ||dword || wasted/busted time |
|- | |- | ||
− | |0x0009 ||word || | + | |0x0009 ||word || [[gta3.ini|traffic multiplier]] |
|- | |- | ||
− | |0x000B ||float || | + | |0x000B ||float || [[gta3.ini|road density]] |
|- | |- | ||
|0x000F ||dword || money amount on screen | |0x000F ||dword || money amount on screen | ||
Line 1,724: | Line 1,772: | ||
|0x0013 ||dword || number of [[hidden package]]s picked up | |0x0013 ||dword || number of [[hidden package]]s picked up | ||
|- | |- | ||
− | |0x0017 ||dword || total number of hidden packages | + | |0x0017 ||dword || [[02ED|total number of hidden packages]] |
|- | |- | ||
− | |0x001B ||byte || player never gets tired | + | |0x001B ||byte || [[0330|player never gets tired]] flag |
|- | |- | ||
− | |0x001C ||byte || player fast reload | + | |0x001C ||byte || [[0331|player fast reload]] flag |
|- | |- | ||
− | |0x001D ||byte || get out of jail free | + | |0x001D ||byte || [[0413|get out of jail free]] flag |
|- | |- | ||
− | |0x001E ||byte || free health care | + | |0x001E ||byte || [[0414|free health care]] flag |
|- | |- | ||
|0x001F ||byte[70] || unknown | |0x001F ||byte[70] || unknown | ||
Line 1,777: | Line 1,825: | ||
|0x0010 ||dword[23] || peds of [[pedtype|type]] wasted | |0x0010 ||dword[23] || peds of [[pedtype|type]] wasted | ||
|- | |- | ||
− | |0x006C ||dword || | + | |0x006C ||dword || helicopters destroyed |
|- | |- | ||
− | |0x0070 ||dword || player progress | + | |0x0070 ||dword || [[030C|player progress]] |
|- | |- | ||
− | |0x0074 ||dword || | + | |0x0074 ||dword || [[030D|progress total]] |
|- | |- | ||
|0x0078 ||dword || kgs explosives used | |0x0078 ||dword || kgs explosives used | ||
Line 1,811: | Line 1,859: | ||
|0x00AC ||dword || best stunt so far (see table below) | |0x00AC ||dword || best stunt so far (see table below) | ||
|- | |- | ||
− | |0x00B0 ||dword || unique stunt jumps found | + | |0x00B0 ||dword || [[0313|unique stunt jumps found]] |
|- | |- | ||
− | |0x00B4 ||dword || unique stunt jumps total | + | |0x00B4 ||dword || [[0314|unique stunt jumps total]] |
|- | |- | ||
− | |0x00B8 ||dword || | + | |0x00B8 ||dword || [[0317|missions attempts]] |
|- | |- | ||
− | |0x00BC ||dword || missions passed | + | |0x00BC ||dword || [[0318|missions passed]] |
|- | |- | ||
− | |0x00C0 ||dword || passengers dropped off | + | |0x00C0 ||dword || [[0315|passengers dropped off]] |
|- | |- | ||
− | |0x00C4 ||dword || cash made in taxi | + | |0x00C4 ||dword || [[0316|cash made in taxi]] |
|- | |- | ||
− | |0x00C8 ||dword || Portland passed | + | |0x00C8 ||dword || [[034A|Portland passed]] |
|- | |- | ||
− | |0x00CC ||dword || Staunton Island passed | + | |0x00CC ||dword || [[034B|Staunton Island passed]] |
|- | |- | ||
− | |0x00D0 ||dword || Shoreside Vale passed | + | |0x00D0 ||dword || [[034C|Shoreside Vale passed]] |
|- | |- | ||
− | |0x00D4 ||dword || | + | |0x00D4 ||dword || [[03E2|Best 'Turismo' time in secs]] |
|- | |- | ||
|0x00D8 ||float || distance travelled on foot | |0x00D8 ||float || distance travelled on foot | ||
Line 1,835: | Line 1,883: | ||
|0x00DC ||float || distance travelled in car | |0x00DC ||float || distance travelled in car | ||
|- | |- | ||
− | |0x00E0 ||dword || | + | |0x00E0 ||dword || [[03FD|'Patriot Playground' in secs]] |
|- | |- | ||
− | |0x00E4 ||dword || | + | |0x00E4 ||dword || [[03FE|'A Ride In The Park' in secs]] |
|- | |- | ||
− | |0x00E8 ||dword || | + | |0x00E8 ||dword || [[03FF|'Gripped!' in secs]] |
|- | |- | ||
− | |0x00EC ||dword || | + | |0x00EC ||dword || [[0400|'Multistorey Mayhem' in secs]] |
|- | |- | ||
− | |0x00F0 ||dword || people saved in an ambulance | + | |0x00F0 ||dword || [[0401|people saved in an ambulance]] |
|- | |- | ||
− | |0x00F4 ||dword || criminals killed on vigilante mission | + | |0x00F4 ||dword || [[0402|criminals killed on vigilante mission]] |
|- | |- | ||
− | |0x00F8 ||dword || highest paramedic mission level | + | |0x00F8 ||dword || [[0403|highest paramedic mission level]] |
|- | |- | ||
− | |0x00FC ||dword || total fires extinguished | + | |0x00FC ||dword || [[0404|total fires extinguished]] |
|- | |- | ||
− | |0x0100 ||dword || longest flight in dodo | + | |0x0100 ||dword || [[0406|longest flight in dodo]] |
|- | |- | ||
− | |0x0104 ||dword || best time bomb defusal | + | |0x0104 ||dword || [[0407|best time bomb defusal]] |
|- | |- | ||
− | |0x0108 ||dword || | + | |0x0108 ||dword || [[041B|rampages passed]] |
|- | |- | ||
− | |0x010C ||dword || total number rampages | + | |0x010C ||dword || [[0408|total number rampages]] |
|- | |- | ||
− | |0x0110 ||dword || total number missions | + | |0x0110 ||dword || [[042C|total number missions]] |
|- | |- | ||
− | |0x0114 ||dword[16] || fastest time record | + | |0x0114 ||dword[16] || [[042E|fastest time record]] (unused) |
|- | |- | ||
− | |0x0154 ||dword[16] || highest score record | + | |0x0154 ||dword[16] || [[042F|highest score record]] |
|- | |- | ||
|0x0194 ||dword || people killed since last checkpoint | |0x0194 ||dword || people killed since last checkpoint | ||
Line 1,878: | Line 1,926: | ||
!Description | !Description | ||
|- | |- | ||
− | |0 || | + | |0 ||no insane stunts completed |
|- | |- | ||
|1 ||insane stunt | |1 ||insane stunt | ||
Line 1,890: | Line 1,938: | ||
|5 ||triple insane stunt | |5 ||triple insane stunt | ||
|- | |- | ||
− | | | + | |6 ||perfect triple insane stunt |
|- | |- | ||
− | | | + | |7 ||[[quadruple insane stunt]] |
|- | |- | ||
− | | | + | |8 ||perfect quadruple insane stunt |
|} | |} | ||
</div> | </div> | ||
Line 1,929: | Line 1,977: | ||
!DESCRIPTION | !DESCRIPTION | ||
|- | |- | ||
− | |0x0000 ||byte[200] || | + | |0x0000 ||byte[200] || streaming flags for first 200 model indices (0-199) (-1 if model is not loaded) |
|} | |} | ||
</div> | </div> | ||
Line 1,935: | Line 1,983: | ||
</div> | </div> | ||
− | ====Block 19: Ped | + | ====Block 19: Ped Types==== |
{|class="wikitable" | {|class="wikitable" | ||
!OFFSET | !OFFSET | ||
Line 1,987: | Line 2,035: | ||
|+PedType | |+PedType | ||
|- | |- | ||
− | |0x0000 | + | |0x0000 ||dword ||bitstring (each associated to an entry in ped.dat) |
|- | |- | ||
− | |0x0004 | + | |0x0004 ||float ||first value/50.0 |
|- | |- | ||
− | |0x0008 | + | |0x0008 ||float ||second value/50.0 |
|- | |- | ||
− | |0x000C | + | |0x000C ||float ||third value/50.0 |
|- | |- | ||
− | |0x0010 | + | |0x0010 ||float ||flee distance |
|- | |- | ||
− | |0x0014 | + | |0x0014 ||float ||heading change rate |
|- | |- | ||
− | |0x0018 | + | |0x0018 ||dword ||threat flags |
|- | |- | ||
− | |0x001C | + | |0x001C ||dword ||avoid flags |
|} | |} | ||
</div> | </div> | ||
Line 2,012: | Line 2,060: | ||
=== Checksum === | === Checksum === | ||
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x3145C bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be "corrupted" and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished. | The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x3145C bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be "corrupted" and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished. | ||
+ | |||
+ | == Tools == | ||
+ | * {{GTAF|784598|GTA III Save File Editor}} – by {{U|thehambone}} | ||
+ | |||
+ | ==Notes== | ||
+ | {{Note|1}} {{GTAF|post|871359|1069163696}} – a post by {{U|Seemann}} describing debug spheres | ||
==External links== | ==External links== | ||
* {{GTAF|758692|GTA III Save File Documentation}} | * {{GTAF|758692|GTA III Save File Documentation}} | ||
− | * [https://github.com/ | + | * [https://github.com/thehambone93/FileFormats/blob/master/gta/saves/gta-III_save_multi.bt 010 Editor binary template for the GTA III save file format] |
+ | * {{Note|matrix}} http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm | ||
+ | * {{Note|matrix}} [https://stackoverflow.com/a/15029416 Stack Overflow question regarding matrix conversion to euler angles] | ||
{{Savegame-navi}} | {{Savegame-navi}} | ||
{{N|3}} | {{N|3}} |
Latest revision as of 03:59, 27 March 2020
This article deals with the format of a save game file for the PC version of GTA 3.
Location
By default, the game places its save game files into the folder "GTA3 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 GTA3sfX.b where X represents the in-game slot number. There are 8 slots available in the game (1-8).
Format Details (PC)
- Save files are always 0x3145C (201820) bytes long.
- Byte order is little endian. For example, the number 3452 (0x0D7C) is represented as 0x7C 0x0D in little endian.
- File is divided into 20 blocks, followed by padding and ends with a 4-byte checksum.
Data Blocks
A DWORD value precedes each block of data that indicates the size of the block.
Block 0: Simple Vars
Game "meta-information" giving the overall state of things. Also includes 'TheScripts' sub-block.
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | wchar_t[24] | save name (long names are truncated on the save/load screen) |
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 (constant 0x031401) |
0x0044 | enum | current island (1=Portland; 2=Staunton; 3=Shoreside Vale) |
0x0048 | float[3] | camera coordinates (x,y,z) |
0x0054 | dword | length (ms) of in-game minute |
0x0058 | dword | last clock tick (weather timer) |
0x005C | byte | game hour |
0x005D | byte[3] | (align) |
0x0060 | byte | game minute |
0x0061 | byte[3] | (align) |
0x0064 | word | current pad mode |
0x0066 | byte[2] | (align) |
0x0068 | dword | time in milliseconds (global timer) |
0x006C | float | time scale |
0x0070 | float | time step (frame delta time) |
0x0074 | float | time step (not clipped) |
0x0078 | dword | number of the frames processed from the beginning of the game |
0x007C | float | time step #2 (constant 1.0, unused) |
0x0080 | float | frames per update (constant 1.0, unused) |
0x0084 | float | time scale (constant 1.0, unused) |
0x0088 | word | old weather type |
0x008A | byte[2] | (align) |
0x008C | word | new weather type |
0x008E | byte[2] | (align) |
0x0090 | word | forced weather type |
0x0092 | byte[2] | (align) |
0x0094 | float | weather interpolation value |
0x0098 | byte[24] | compilation date and time (unused, always 0) |
0x00B0 | dword | weather type in list |
0x00B4 | float | (unknown, camera related) |
0x00B8 | float | (unknown, camera related) |
0x00BC | dword | block size |
0x00C0 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'SCR\0' signature |
0x0004 | dword | block size |
0x0008 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | script global variable space size (n) |
0x0004 | dword[n/4] | script global variables dump |
0x0004 + n | dword | block size (always 0x03C8) |
0x0008 + n | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | $onmission offset in global variable space |
0x0004 | ContactInfo[16] | 8 bytes each, contact info |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | mission flag |
0x0004 | dword | base brief |
0x0084 | Unknown[4] | (unknown) |
0x0184 | dword | last mission passed time |
0x0188 | BuildingSwap[25] | 16 bytes each, building model replacements |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | type |
0x0004 | dword | building handle |
0x0008 | dword | new model |
0x000C | dword | old model |
0x0318 | InvisibliltySetting[20] | 8 bytes each, invisible objects |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | type |
0x0004 | dword | handle |
0x03B8 | byte | already running a mission script flag (0 = false, 1 = true) |
0x03B9 | byte[3] | (align) |
0x03BC | dword | size of the MAIN section in the main.scm |
0x03C0 | dword | size of largest mission |
0x03C4 | word | number of exclusive mission scripts |
0x03C6 | byte[2] | (align) |
0x03D0 + n | dword | number of active scripts (n2) |
0x03D4 + n | CRunningScript[n2] | 136 bytes each, active scripts |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | CRunningScript * | next script pointer |
0x0004 | CRunningScript * | previous script pointer |
0x0008 | char[8] | name |
0x0010 | dword | current ip |
0x0014 | dword[6] | return stack |
0x002C | word | stack counter |
0x002E | word | (align) |
0x0030 | dword[16] | local variables |
0x0070 | dword | timerA |
0x0074 | dword | timerB |
0x0078 | byte | if result |
0x0079 | byte | is mission script (00D7,0417) |
0x007A | byte | is active |
0x007B | byte | (align) |
0x007C | dword | wake time |
0x0080 | word | if number |
0x0082 | byte | not flag (negative condition) |
0x0083 | byte | wasted_busted check enabled (0111) |
0x0084 | byte | wasted_busted check result |
0x0085 | byte | mission flag (0417) |
0x0086 | byte[2] | (align) |
Block 1: Player Peds
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | players count (n) |
0x0004 | PlayerPed[n] | player peds array |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | unknown |
0x0004 | word | unknown |
0x0006 | dword | (unknown) ped reference |
0x000A | CPed | CPed dump (0x05F0 bytes) |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | byte[52] | unknown |
0x0034 | float[3] | position (X, Y, Z) |
0x0040 | byte[640] | unknown |
0x02C0 | float | player health |
0x02C4 | float | player armor |
0x02C8 | byte[148] | unknown |
0x035C | WeaponSlot[13] | weapon slots (0x18 bytes each) |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | weapon ID |
0x0004 | dword | unknown |
0x0008 | dword | bullets in clip |
0x000C | dword | bullets total |
0x0010 | dword | unknown |
0x0014 | dword | unknown |
0x0494 | byte[348] | unknown |
0x05FA | dword | max wanted level |
0x05FE | dword | max chaos level |
0x0602 | char[24] | model name |
0x061A | byte[2] | (align) |
Block 2: Garages
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | garages count (n) |
0x0004 | dword | free bombs |
0x0008 | dword | free resprays |
0x000C | dword | cars collected (unused) |
0x0010 | dword | bank vans collected (Securicar garage) |
0x0014 | dword | police cars collected (unused) |
0x0018 | dword | Portland IE status (bitstring) |
0x001C | dword | Shoreside IE status |
0x0020 | dword | unused IE status |
0x0024 | dword | time when 'GA_21' was last shown |
0x0028 | StoredCar[18] | 40 bytes each, stored cars |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | model ID |
0x0004 | float[3] | position (X, Y, Z) |
0x0010 | float[3] | vector rotation |
0x001C | dword | immunities (bitstring) (see below) |
0x0020 | byte | primary color ID |
0x0021 | byte | secondary color ID |
0x0022 | byte | radio station ID (see below) |
0x0023 | byte | model variation A |
0x0024 | byte | model variation B |
0x0025 | byte | bomb type ID (see below) |
0x0026 | byte[2] | (align) |
0x02F8 | Garage[n] | 140 bytes each, garages |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | byte | garage type ID |
0x0001 | byte | garage state |
0x0002 | byte | (unknown) |
0x0003 | byte | closing without target car |
0x0004 | byte | deactivated |
0x0005 | byte | respray happened |
0x0006 | byte[2] | (align) |
0x0008 | dword | target vehicle model index |
0x000C | dword | door 1 pointer |
0x0010 | dword | door 2 pointer |
0x0014 | byte | is door 1 pool index |
0x0015 | byte | is door 2 pool index |
0x0016 | byte | is door 1 object |
0x0017 | byte | is door 2 object |
0x0018 | byte | (unknown) |
0x0019 | byte | rotated door |
0x001A | byte | camera follows player |
0x001B | byte | (align) |
0x001C | float[6] | position (x1, x2, y1, y2, z1, z2) |
0x0034 | float | door open start (z coord) (how far door is open when garage is loaded into view) |
0x0038 | float | door open (z coord) (how far door can open) |
0x003C | float[2] | door 1 x,y coord |
0x0044 | float[2] | door 2 x,y coord |
0x004C | float | door 1 position (z coord) |
0x0050 | float | door 2 position (z coord) |
0x0054 | dword | door last open time |
0x0058 | byte | collected cars state |
0x0059 | byte[3] | (align) |
0x005C | dword | target vehicle pointer (used during missions) |
0x0060 | dword | (unknown) |
0x0064 | StoredCar | (unknown) |
Vehicle immunities:
- 0b00000001 = bulletproof
- 0b00000010 = fireproof
- 0b00000100 = explosion-proof
- 0b00001000 = collision-proof
- 0b00010000 = ?
Radio stations:
- 0 = Head Radio
- 1 = Double Clef FM
- 2 = Jah Radio
- 3 = Rise FM
- 4 = Lips 106
- 5 = Game FM
- 6 = MSX FM
- 7 = Flashback 95.6
- 8 = Chatterbox 109
- 9 = User track player (if user tracks loaded, random station otherwise)
- 10 = Police radio
- 11 = Radio off
Bomb types:
- 0 = no bomb
- 1 = timer bomb
- 2 = ignition bomb
- 3 = remote bomb
- 4 = timer bomb (armed)
- 5 = ignition bomb (armed)
Block 3: Vehicles
TYPE | OFFSET | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
TYPE | OFFSET | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
TYPE | OFFSET | DESCRIPTION |
---|---|---|
0x0000 | dword | number of vehicles (n) |
0x0004 | dword | number of boats (n2) |
0x0008 | Vehicle[n] | 1458 bytes each, vehicles array |
TYPE | OFFSET | DESCRIPTION |
---|---|---|
0x0000 | dword | unknown |
0x0004 | word | model ID |
0x0006 | dword | unknown |
0x000A | CVehicle | CVehicle dump |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | byte[52] | unknown |
0x0034 | float[3] | position (X, Y, Z) |
0x0040 | byte[1384] | unknown |
0x0000 + (1458 * n) | Boat[n2] | 1166(?) bytes each, boats array |
TYPE | OFFSET | DESCRIPTION |
---|---|---|
0x0000 | dword | unknown |
0x0004 | word | model ID |
0x0006 | dword | unknown |
0x000A | CBoat | CBoat dump |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | byte[52] | unknown |
0x0034 | float[3] | position (X, Y, Z) |
0x0040 | byte[1092] | unknown |
Block 4: Objects
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | number of objects (n) |
0x0004 | CObject[n] | Objects |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | word | model id |
0x0002 | dword | object reference |
0x0006 | float[3] | pos |
0x0012 | byte[12] | unknown |
0x001E | float | unknown |
0x0022 | float[3] | unknown |
0x002E | byte[12] | unknown |
0x003A | byte | unknown |
0x003B | byte | unknown |
0x003C | byte | unknown |
0x003D | byte | unknown |
0x003E | byte | unknown |
0x003F | byte | unknown |
0x0040 | byte | unknown |
0x0041 | byte | unknown |
0x0042 | float | unknown |
0x0046 | byte | unknown |
0x0047 | byte | unknown |
0x0048 | dword | unknown |
0x004C | dword | unknown |
0x0050 | dword | unknown |
Block 5: Path Find
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | number of entries (n) |
0x0004 | byte[n/2] | disabled ped path nodes |
0x4 + n/2 | byte[n/2] | disabled car path nodes |
- Note: each byte in these arrays represents 8 path nodes with a bitmask. If a bit is set, the node is disabled, otherwise it is enabled.
Block 6: Cranes
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | number of cranes (n) |
0x0004 | dword | cars collected by military crane |
0x0008 | Crane[8] | Crane data |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | index in static objects pool |
0x0004 | dword | crane hook object index in objects pool |
0x0008 | dword | audio entity index |
0x000C | float | pickup zone x1 (crane opcode parameter 3) |
0x0010 | float | pickup zone x2 (crane opcode parameter 5) |
0x0014 | float | pickup zone y1 (crane opcode parameter 6) |
0x0018 | float | pickup zone y2 (crane opcode parameter 4) |
0x001C | float | drop off point x (crane opcode parameter 7) |
0x0020 | float | drop off point y (crane opcode parameter 8) |
0x0024 | float | drop off point z (crane opcode parameter 9) |
0x0028 | float | drop off heading in radians (crane opcode parameter 10) |
0x002C | float | crane arm pick up rotation in radians |
0x0030 | float | crane arm drop off rotation in radians |
0x0034 | float | crane arm pick up distance from center of crane |
0x0038 | float | crane arm drop off distance from center of crane |
0x003C | float | crane arm pick up height |
0x0040 | float | crane arm drop off height |
0x0044 | float | crane arm current rotation in radians |
0x0048 | float | crane arm current distance from center of crane |
0x004C | float | crane arm current height |
0x0058 | float[3] | crane hook initial x, y, z |
0x005C | float[3] | crane hook current x, y, z |
0x0068 | float[2] | unknown |
0x0070 | dword | pointer to vehicle to pick up |
0x0074 | dword | current game time + 10000 (only updates when crane has finished lifting car) |
0x0078 | byte | crane activity
|
0x0079 | byte | crane status
|
0x007A | byte | number of vehicles collected |
0x007B | byte | is crusher crane |
0x007C | byte | is military crane |
0x007D | byte | unknown |
0x007E | byte | model is not doc_crane_cab |
0x007F | byte | (align) |
Block 7: Pickups
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | Pickup[336] | pickups structures -- each is 0x1C bytes in size; see details below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | byte | type |
0x0001 | byte | has been picked up |
0x0002 | word | ammo (for weapon pickups) |
0x0004 | dword | index in objects pool |
0x0008 | dword | regeneration time |
0x000C | word | model id |
0x000E | word | flags |
0x0010 | float[3] | x,y,z position |
0x24C0 | word | collected index for below, always between 0 and 19 |
0x24C2 | byte[2] | (align) |
0x24C4 | PickupsCollected[20] | pickup index, latest collected pickup pointed by collected index from above |
Block 8: Phone Info
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | number of phones (n) |
0x0004 | dword | number of active phones |
0x0008 | PhoneInfo[n] | 52 bytes each, phone info structs |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | float[3] | position (X, Y, Z) |
0x000C | dword[6] | pointer to phone message string |
0x0024 | dword | game time when phone message ends for states 5 and 6 |
0x0028 | dword | static index |
0x002C | dword | phone state
|
0x0030 | byte | is player within range of phone |
0x0031 | byte[3] | (align) |
Block 9: Restarts
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size (constant 0x128) |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size (constant 0x124) |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'RST\0' signature |
0x0004 | dword | block size |
0x0008 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | RestartPoint[8] | restart point after wasted |
0x0080 | RestartPoint[8] | restart point after busted |
0x0100 | word | wasted restart points count |
0x0102 | word | busted restart points count |
0x0104 | byte | override next restart flag (016E, 0255) |
0x0105 | byte[3] | (align) |
0x0108 | RestartPoint | overriden restart point (016E, 0255) |
0x0118 | byte | fade in after next death flag |
0x0119 | byte | fade in after next arrest flag |
0x011A | byte | override hospital level flag |
0x011B | byte | override police level flag |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | float[3] | x,y,z coordinates |
0x000C | float | z_angle |
Block 10: Radar
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'RDR\0' signature |
0x0004 | dword | block size |
0x0008 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | RadarBlip[32] | radar blips structures -- each is 0x30 bytes in size, see below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | color |
0x0004 | dword | type
|
0x0008 | dword | entity (car, char, object) handle (0 = not an entity) |
0x000C | float[2] | position x,y |
0x0014 | float[3] | position x,y,z |
0x0020 | word | index |
0x0022 | byte | brightness |
0x0023 | byte | is visible |
0x0024 | float | debug sphere cross offset[1] |
0x0028 | word | scale |
0x002A | word | display |
0x002C | word | blip sprite |
0x002E | word | (align) |
Block 11: Zones
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'ZNS\0' signature |
0x0004 | dword | block size |
0x0008 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | current zone index |
0x0004 | dword | current level (1: Portland, 2: Staunton Island, 3: Shoreside Vale) |
0x0008 | word | find index (index of last search invoked by a script) |
0x000A | word | (align) |
0x000C | Zone[50] | navigation zones (from gta3.zon) |
0x0AFC | ZoneInfo[100] | day/night pairs for each Zone |
0x21A4 | word | total number of navigation zones |
0x21A6 | word | total number of zone infos |
0x21A8 | Zone[25] | map zones (from map.zon) |
0x2720 | AudioZone[36] | audio zones |
0x2768 | word | total number of map zones |
0x276A | word | total number of audio zones |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[8] | zone name |
0x0008 | float[3] | zone coord A |
0x0014 | float[3] | zone coord B |
0x0020 | dword | zone type (0, 1, 2 or 3 for MapZone) |
0x0024 | dword | zone level (1: Portland, 2: Staunton Island, 3: Shoreside Vale) |
0x0028 | word | zone info id night |
0x002A | word | zone info id day |
0x002C | dword | child zone index |
0x0030 | dword | parent zone index |
0x0034 | dword | sibling zone index |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | word | density |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | word | zone id |
Block 12: Gangs
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'GNG\0' signature |
0x0004 | dword | block size |
0x0008 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | Gang[9] | gang structures -- each is 0x14 bytes in size, see below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | car model id |
0x0004 | byte | ped model override flag |
0x0005 | byte[3] | (align) |
0x0008 | dword | primary weapon id |
0x0010 | dword | secondary weapon id |
Block 13: Car Generators
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'CGN\0' signature |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size (constant 0x0C) |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | car generators count (n) |
0x0004 | dword | active car generators count |
0x0008 | byte | process counter |
0x0009 | byte | generate even if player is close counter |
0x000A | byte[2] | (align) |
0x0010 | dword | size of car generator structs |
0x0014 | CarGenerator[n] | 72 bytes each, car generator structs |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | model ID |
0x0004 | float[3] | position (X, Y, Z) |
0x0010 | float | z angle |
0x0014 | word | primary color ID |
0x0016 | word | secondary color ID |
0x0018 | byte | force spawn |
0x0019 | byte | alarm (percentage) |
0x001A | byte | locked (percentage) |
0x001B | byte | (align) |
0x001C | word | min delay |
0x001E | word | max delay |
0x0020 | dword | timestamp (time last stolen?) |
0x0024 | dword | vehicle pool index, -1 if not spawned |
0x0028 | word | uses remaining (0 = disabled) |
0x002A | byte | is blocking (used internally to prevent two cars spawning close to each other) |
0x002B | byte | (align) |
0x002C | float[3] | vecInf (unused) |
0x0038 | float[3] | vecSup (unused) |
0x0044 | dword | (unknown) (unused) |
Block 14: Particles
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | number of particles (n); |
0x0004 | Particle[n] | particle structures -- each is 0x88 bytes in size, see below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | unknown (probably CPlaceable vtable) |
0x0004 | CMatrix | Stores the position and rotation of the particle (see [matrix]) |
0x004C | pNext | pointer to the next particle struct |
0x0050 | pPrev | pointer to the prev particle struct |
0x0054 | dword | pointer to explosion particle
|
0x0058 | dword | lifespan (at this time, the particle will be destroyed) |
0x005C | dword | particle effect |
0x0060 | dword | particle type |
0x0064 | byte | number to generate (these many particles are generated at once) |
0x0065 | byte | delay between two effects |
0x0066 | word | delay counter (used initially to count the frames skipped) |
0x0068 | word | status
|
0x006A | byte[2] | (align) |
0x006C | float[3] | strength of particle (x,y,z) |
0x0078 | float | spread
|
0x007C | float | scale |
0x0080 | dword | color of the particle (RGBA) |
0x0084 | byte | destroy when far (the particle is destroyed if the player gets far) |
0x0085 | byte | randomness
|
0x0086 | byte[2] | (align) |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | float[3] | right |
0x000C | dword | flags |
0x0010 | float[3] | up |
0x001C | dword | (align) |
0x0020 | dword | at |
0x002C | dword | (align) |
0x0030 | dword | position (x,y,z) |
0x003C | dword | (align) |
0x0040 | dword | pointer to attached RwMatrix |
0x0044 | byte | has an attached RwMatrix |
0x0045 | byte[3] | (align) |
Block 15: Audio Script Objects
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'AUD\0' signature |
0x0004 | dword | block size |
0x0008 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | number of audio script objects (n); |
0x0004 | AudioScriptObject[n] | audio script object structures -- each is 0x18 bytes in size, see below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | index? |
0x0004 | word | audio index |
0x0006 | byte[2] | (align) |
0x0008 | float[3] | position x,y,z |
0x0014 | dword | (unknown) |
Block 16: Player Info
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | player money |
0x0004 | byte | wasted/busted state |
0x0005 | dword | wasted/busted time |
0x0009 | word | traffic multiplier |
0x000B | float | road density |
0x000F | dword | money amount on screen |
0x0013 | dword | number of hidden packages picked up |
0x0017 | dword | total number of hidden packages |
0x001B | byte | player never gets tired flag |
0x001C | byte | player fast reload flag |
0x001D | byte | get out of jail free flag |
0x001E | byte | free health care flag |
0x001F | byte[70] | unknown |
Block 17: Stats
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | people wasted by player |
0x0004 | dword | people wasted by others |
0x0008 | dword | cars exploded |
0x000C | dword | shots made |
0x0010 | dword[23] | peds of type wasted |
0x006C | dword | helicopters destroyed |
0x0070 | dword | player progress |
0x0074 | dword | progress total |
0x0078 | dword | kgs explosives used |
0x007C | dword | bullets fired |
0x0080 | dword | bullets that hit |
0x0084 | dword | cars crushed |
0x0088 | dword | headshots made |
0x008C | dword | times busted |
0x0090 | dword | hospital visits |
0x0094 | dword | days passed |
0x0098 | dword | mm rain fallen |
0x009C | float | max insane jump distance |
0x00A0 | float | max insane jump height |
0x00A4 | dword | max insane jump flips |
0x00A8 | dword | max insane jump rotation |
0x00AC | dword | best stunt so far (see table below) |
0x00B0 | dword | unique stunt jumps found |
0x00B4 | dword | unique stunt jumps total |
0x00B8 | dword | missions attempts |
0x00BC | dword | missions passed |
0x00C0 | dword | passengers dropped off |
0x00C4 | dword | cash made in taxi |
0x00C8 | dword | Portland passed |
0x00CC | dword | Staunton Island passed |
0x00D0 | dword | Shoreside Vale passed |
0x00D4 | dword | Best 'Turismo' time in secs |
0x00D8 | float | distance travelled on foot |
0x00DC | float | distance travelled in car |
0x00E0 | dword | 'Patriot Playground' in secs |
0x00E4 | dword | 'A Ride In The Park' in secs |
0x00E8 | dword | 'Gripped!' in secs |
0x00EC | dword | 'Multistorey Mayhem' in secs |
0x00F0 | dword | people saved in an ambulance |
0x00F4 | dword | criminals killed on vigilante mission |
0x00F8 | dword | highest paramedic mission level |
0x00FC | dword | total fires extinguished |
0x0100 | dword | longest flight in dodo |
0x0104 | dword | best time bomb defusal |
0x0108 | dword | rampages passed |
0x010C | dword | total number rampages |
0x0110 | dword | total number missions |
0x0114 | dword[16] | fastest time record (unused) |
0x0154 | dword[16] | highest score record |
0x0194 | dword | people killed since last checkpoint |
0x0198 | dword | people killed no wasted/busted |
0x019C | char[8] | last mission passed gxt key |
Id | Description |
---|---|
0 | no insane stunts completed |
1 | insane stunt |
2 | perfect insane stunt |
3 | double insane stunt |
4 | perfect double insane stunt |
5 | triple insane stunt |
6 | perfect triple insane stunt |
7 | quadruple insane stunt |
8 | perfect quadruple insane stunt |
See also: List_of_statistics_(III)
Block 18: Streaming
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | byte[200] | streaming flags for first 200 model indices (0-199) (-1 if model is not loaded) |
Block 19: Ped Types
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | dword | block size (constant 0x2E8) |
0x0004 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | char[4] | 'PTP\0' signature |
0x0004 | dword | block size |
0x0008 | - | start of block, data below |
OFFSET | TYPE | DESCRIPTION |
---|---|---|
0x0000 | PedType[23] | PedType structures -- each is 0x20 bytes in size, see below |
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 | flee distance |
0x0014 | float | heading change rate |
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 0x3145C 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 final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x3145C bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be "corrupted" and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.
Tools
- GTAForums: GTA III Save File Editor – by thehambone
Notes
^ Post on GTAForums – a post by Seemann describing debug spheres
External links
- GTAForums: GTA III Save File Documentation
- 010 Editor binary template for the GTA III save file format
- ^ http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
- ^ Stack Overflow question regarding matrix conversion to euler angles
Savegame | |
---|---|
Formats | Saves (GTA 3) • Saves (GTA VC) • Saves (GTA SA) • Saves (GTA LCS) • Saves (GTA 4) |
Tools | GTASnP - Save File Sharing • GTAForums: GTASum Gamesave Checksum Calculator |
Resources | GTAForums: GTA III Save File Documentation • GTAForums: Vice City Save File Format • Savegames Formats Description |