Difference between revisions of "Cullzone.dat"
Jump to navigation
Jump to search
(tabulated information + links) |
(section names) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
{{Research}} | {{Research}} | ||
− | The '''cullzone.dat''' is a binary file containing zoning information in [[GTA III]] and [[Vice City]]. The file is located in the <code>\data</code> folder of the game's directory | + | The '''cullzone.dat''' is a binary file containing zoning information in [[GTA III]] and [[Vice City]]. The file is located in the <code>\data</code> folder of the game's directory. |
== GTA III == | == GTA III == | ||
− | The file consists of | + | [[File:III cullzone 2.jpg|thumb|300px|A map of all cull zones in Section 2]] |
+ | [[File:III cullzone.jpg|thumb|300px|A map of all cull zones in Section 4]] | ||
+ | The '''CULLZONE.DAT''' file consists of seven distinct sections. Many of the zones closely mimic the <code>[[cull.ipl]]</code> file, which does not seem to be used by the game. Ignoring rounding errors, all but one section 4 zone matches all zones with nonzero flags in the <code>cull.ipl</code> file. The only zone that differs is at the Shoreside Vale subway station. | ||
{|class="wikitable" | {|class="wikitable" | ||
− | ! style="width: 4em;" |Offset | + | !style="width: 4em;" |Offset |
− | ! style="width: 8em;" |Type | + | !style="width: 8em;" |Type |
− | ! style="width: | + | !style="width: 32em;" |Description |
|- | |- | ||
− | ! colspan="3" |Section 1 | + | !colspan="3" |Section 1: Number of cull zones |
|- | |- | ||
− | |0x00000 ||dword ||number of entries | + | |0x00000 ||dword ||number of entries in section 2 |
+ | |- | ||
+ | !colspan="3" |Section 2: Zones | ||
|- | |- | ||
|0x00004 ||52 bytes[512] ||structures (see below) | |0x00004 ||52 bytes[512] ||structures (see below) | ||
Line 19: | Line 23: | ||
<div style="margin-left: 3em;"> | <div style="margin-left: 3em;"> | ||
{|class="wikitable" | {|class="wikitable" | ||
− | ! style="width: 4em;" |Offset | + | !style="width: 4em;" |Offset |
− | ! style="width: 4em;" |Type | + | !style="width: 4em;" |Type |
− | ! style="width: | + | !style="width: 24em;" |Description |
|- | |- | ||
|0x00 ||float ||x center | |0x00 ||float ||x center | ||
Line 57: | Line 61: | ||
</div> | </div> | ||
{|class="wikitable" | {|class="wikitable" | ||
− | ! colspan="3" |Section | + | !colspan="3" |Section 3: Number of attribute zones |
|- | |- | ||
|style="width: 4em;" |0x06804 | |style="width: 4em;" |0x06804 | ||
|style="width: 8em;" |dword | |style="width: 8em;" |dword | ||
− | |style="width: | + | |style="width: 32em;" |number of entries in section 4 |
|- | |- | ||
− | |0x06808 ||28 bytes[288] || | + | !colspan="3" |Section 4: Attribute zones |
+ | |- | ||
+ | |0x06808 ||28 bytes[288] ||variety of behaviors for camera control, police, and map visibility (see below for structure) | ||
|} | |} | ||
<div style="margin-left: 3em;"> | <div style="margin-left: 3em;"> | ||
{|class="wikitable" | {|class="wikitable" | ||
− | ! style="width: 4em;" |Offset | + | !style="width: 4em;" |Offset |
− | ! style="width: 4em;" |Type | + | !style="width: 4em;" |Type |
− | ! style="width: | + | !style="width: 24em;" |Description |
|- | |- | ||
|0x00 ||float ||x bottom left | |0x00 ||float ||x bottom left | ||
Line 83: | Line 89: | ||
|0x14 ||float ||z top right | |0x14 ||float ||z top right | ||
|- | |- | ||
− | |0x18 ||word || | + | |0x18 ||word ||[[#Attributes|attribute]] |
|- | |- | ||
|0x1A ||word ||? | |0x1A ||word ||? | ||
Line 91: | Line 97: | ||
|style="width: 4em;" |0x08788 | |style="width: 4em;" |0x08788 | ||
|style="width: 8em;" |? | |style="width: 8em;" |? | ||
− | |style="width: | + | |style="width: 32em;" |Section 5: Indices |
+ | |- | ||
+ | |0x23538 ||? ||Section 6: Pointers to big buildings for buildings | ||
+ | |- | ||
+ | |0x26030 ||? ||Section 7: Pointers to big buildings for treadables | ||
+ | |} | ||
+ | |||
+ | === Attributes === | ||
+ | {|class="wikitable center-col-1 center-col-2" | ||
+ | !style="width: 4em;" |Flag ||style="width: 8em;" |Binary ||Description | ||
+ | |- | ||
+ | |1 ||<code>0000 0001</code> | ||
+ | |Both on foot using classic controls and in car, when you are in the zone in third person camera modes, the camera is stuck to a close in view. Once you leave the zone, the camera returns to its former distance. If the camera is already in cinematic or GTA 2 camera mode when you enter the zone, nothing changes. The camera mode can be changed to first person, but then afterwards changing camera modes remains stuck in third person. Once you leave the zone, it will automatically switch to cinematic mode. | ||
+ | |- | ||
+ | |2 ||<code>0000 0010</code> | ||
+ | |When on foot, the camera is stuck in place as it remotely follows the player. The position where the camera is stuck seems to depend on the zone geometry and point of entry. The player is best controlled when in classic controls; the zone was not designed for standard controls. If you are in GTA 2 camera mode, it will leave that mode until you leave the zone. The flag has no effect on cars. | ||
+ | |- | ||
+ | |4 ||<code>0000 0100</code> | ||
+ | |When in a vehicle, GTA 2 camera mode is disabled and becomes first person. When on foot, GTA 2 camera mode is just disabled. Once you leave the zone, the camera returns to normal. | ||
+ | |- | ||
+ | |8 ||<code>0000 1000</code> | ||
+ | |Rubbish is limited on the ground and there are no raindrops when it is raining. The weather can still be rainy though, like dark skies, reflective ground, etc. | ||
+ | |- | ||
+ | |16 ||<code>0001 0000</code> | ||
+ | |Cops in vehicles will ignore you but you can still attain wanted level as usual. They will not chase you or use their siren. Police cars still spawn as usual when you are wanted. Cops on foot seem to be stuck in a spot when spawned but sometimes they can move to a limited extent. They will still shoot at you like normal. Once you leave the zone, they will resume chasing you down. | ||
+ | |- | ||
+ | |32 ||<code>0010 0000</code> || | ||
|- | |- | ||
− | | | + | |64 ||<code>0100 0000</code> ||When traveling under z = -4.0, by default all [[ZONE#map.zon|level transitions]] are disabled. Entering the zone resumes any level transitions. This flag is redundant on zones above that height as level transitions are also resumed when you travel above that height. |
|- | |- | ||
− | | | + | |128 ||<code>1000 0000</code> |
+ | |An interior system like Vice City and onwards was implemented for GTA III's subway system and tunnels. They are by default invisible. When you are in the zone, they will become visible. | ||
|} | |} | ||
== Vice City == | == Vice City == | ||
− | Vice City has | + | In addition to '''Cullzone.dat''', Vice City has a file called '''Cullzoneempty.dat'''. Both of these files are not used by the game at all. The game uses the <code>cull.ipl</code> file instead. |
== External links == | == External links == | ||
* {{GTAF|763409|Discussion of file format}} | * {{GTAF|763409|Discussion of file format}} | ||
− | * {{Icon|3}} [http://spaceeinstein.altervista.org/cullzone.htm Table of entries from sections 1 | + | * {{Icon|3}} [http://spaceeinstein.altervista.org/cullzone.htm Table of entries from sections 1 through 4] |
− | * {{Icon|3}} [http://spaceeinstein.altervista.org/binary.php?file=cullzone_iii | + | * {{Icon|3}} [http://spaceeinstein.altervista.org/cullzone_map.htm Section 2 zones exploration], by {{U|spaceeinstein}} |
+ | * {{Icon|3}} {{Icon|VC}} [http://spaceeinstein.altervista.org/binary.php?file=cullzone_iii cullzone.dat reader (JavaScript)], by {{U|spaceeinstein}} | ||
* {{Icon|3}} [http://gta-modz.3dn.ru/load/0-0-0-120-20 Cullzone decompiler/compiler], by {{U|Majestic}} | * {{Icon|3}} [http://gta-modz.3dn.ru/load/0-0-0-120-20 Cullzone decompiler/compiler], by {{U|Majestic}} | ||
− | |||
{{N|VC|3}} | {{N|VC|3}} | ||
[[Category:Map Formats]] | [[Category:Map Formats]] |
Latest revision as of 18:18, 2 April 2017
The cullzone.dat is a binary file containing zoning information in GTA III and Vice City. The file is located in the \data
folder of the game's directory.
GTA III
The CULLZONE.DAT file consists of seven distinct sections. Many of the zones closely mimic the cull.ipl
file, which does not seem to be used by the game. Ignoring rounding errors, all but one section 4 zone matches all zones with nonzero flags in the cull.ipl
file. The only zone that differs is at the Shoreside Vale subway station.
Offset | Type | Description |
---|---|---|
Section 1: Number of cull zones | ||
0x00000 | dword | number of entries in section 2 |
Section 2: Zones | ||
0x00004 | 52 bytes[512] | structures (see below) |
Offset | Type | Description |
---|---|---|
0x00 | float | x center |
0x04 | float | y center |
0x08 | float | z center |
0x0C | float | x bottom left |
0x10 | float | x top right |
0x14 | float | y bottom left |
0x18 | float | y top right |
0x1C | float | z bottom left |
0x20 | float | z top right |
0x24 | dword | ? |
0x28 | word | ? |
0x2C | word | ? |
0x2E | word | ? |
0x30 | word | ? |
0x32 | word | ? |
0x34 | word | ? |
Section 3: Number of attribute zones | ||
---|---|---|
0x06804 | dword | number of entries in section 4 |
Section 4: Attribute zones | ||
0x06808 | 28 bytes[288] | variety of behaviors for camera control, police, and map visibility (see below for structure) |
Offset | Type | Description |
---|---|---|
0x00 | float | x bottom left |
0x04 | float | x top right |
0x08 | float | y bottom left |
0x0C | float | y top right |
0x10 | float | z bottom left |
0x14 | float | z top right |
0x18 | word | attribute |
0x1A | word | ? |
0x08788 | ? | Section 5: Indices |
0x23538 | ? | Section 6: Pointers to big buildings for buildings |
0x26030 | ? | Section 7: Pointers to big buildings for treadables |
Attributes
Flag | Binary | Description |
---|---|---|
1 | 0000 0001
|
Both on foot using classic controls and in car, when you are in the zone in third person camera modes, the camera is stuck to a close in view. Once you leave the zone, the camera returns to its former distance. If the camera is already in cinematic or GTA 2 camera mode when you enter the zone, nothing changes. The camera mode can be changed to first person, but then afterwards changing camera modes remains stuck in third person. Once you leave the zone, it will automatically switch to cinematic mode. |
2 | 0000 0010
|
When on foot, the camera is stuck in place as it remotely follows the player. The position where the camera is stuck seems to depend on the zone geometry and point of entry. The player is best controlled when in classic controls; the zone was not designed for standard controls. If you are in GTA 2 camera mode, it will leave that mode until you leave the zone. The flag has no effect on cars. |
4 | 0000 0100
|
When in a vehicle, GTA 2 camera mode is disabled and becomes first person. When on foot, GTA 2 camera mode is just disabled. Once you leave the zone, the camera returns to normal. |
8 | 0000 1000
|
Rubbish is limited on the ground and there are no raindrops when it is raining. The weather can still be rainy though, like dark skies, reflective ground, etc. |
16 | 0001 0000
|
Cops in vehicles will ignore you but you can still attain wanted level as usual. They will not chase you or use their siren. Police cars still spawn as usual when you are wanted. Cops on foot seem to be stuck in a spot when spawned but sometimes they can move to a limited extent. They will still shoot at you like normal. Once you leave the zone, they will resume chasing you down. |
32 | 0010 0000 |
|
64 | 0100 0000 |
When traveling under z = -4.0, by default all level transitions are disabled. Entering the zone resumes any level transitions. This flag is redundant on zones above that height as level transitions are also resumed when you travel above that height. |
128 | 1000 0000
|
An interior system like Vice City and onwards was implemented for GTA III's subway system and tunnels. They are by default invisible. When you are in the zone, they will become visible. |
Vice City
In addition to Cullzone.dat, Vice City has a file called Cullzoneempty.dat. Both of these files are not used by the game at all. The game uses the cull.ipl
file instead.
External links
- GTAForums: Discussion of file format
- Table of entries from sections 1 through 4
- Section 2 zones exploration, by spaceeinstein
- cullzone.dat reader (JavaScript), by spaceeinstein
- Cullzone decompiler/compiler, by Majestic