Difference between revisions of "CULL"

From GTAMods Wiki
Jump to navigation Jump to search
m (cosmetic fixes)
(updates)
Line 1: Line 1:
 
{{IplSection
 
{{IplSection
| game        = [[GTA 3]] [[GTA VC]] [[GTA SA]] [[GTA IV]]
+
| game        = {{Icon|t}} {{Icon|4}}
| description = Create a culling zone
+
| description = Creates culling zones
 
}}
 
}}
'''CULL''' is a section in the [[IPL]] file. It is used to create zones with different behaviour like mirrors {{ref|1}} or fixed camera positions. It can also influence the environment like disable rain within the zone and certain police behaviors.
+
'''CULL''' is a section in the [[item placement]] file in [[GTA III]], [[Vice City]], [[San Andreas]], and [[GTA IV]]. It is used to create zones affecting the different behaviour of the world, like mirrors,{{ref|1}} fixed camera positions, disabling rain, and police behaviors, when the player is within the zone.
  
 
== Format ==
 
== Format ==
 
===GTA III and Vice City===
 
===GTA III and Vice City===
Cull zones in GTA III and Vice City are built by a box which is controlled by various flags{{ref|2}}. By default, most of the cull zones are located in <code>data\maps\cull.ipl</code> for both games.
+
Cull zones in GTA III and Vice City are built by a box which is controlled by various flags. By default, most of the cull zones are located in <code>data\maps\cull.ipl</code> for both games, although GTA III doesn't seem to use this file. Instead it uses the [[cullzone.dat]] file to define these zones.
  
{| class="wikitable" style="width: 100%;"
+
<pre<includeonly></includeonly> style="overflow-x: auto;">
 +
cull
 +
CenterX, CenterY, CenterZ, X1, Y1, Z1, X2, Y2, Z2, Flag, unknown
 +
end
 +
</pre>
 +
 
 +
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
! style="width: 3em;"| {{Icon|3}} {{Icon|VC}}
 
! style="width: 3em;"| {{Icon|3}} {{Icon|VC}}
 
! style="width: 12em;" | Identifier
 
! style="width: 12em;" | Identifier
Line 15: Line 21:
 
! Description
 
! Description
 
|-
 
|-
| {{a|c}} | A,B,C || {{a|c}} | CenterX, CenterY, CenterZ || float[3] || A point which defines the center of the box in real world coordinates.
+
| A,B,C || CenterX, CenterY, CenterZ || float[3] || A point which defines the center of the box in real world coordinates.
 
|-
 
|-
| {{a|c}} | D,E,F || {{a|c}} | LowerLeftX, LowerLeftY, LowerLeftZ || float[3] || A point which corresponds to the ''lower left'' corner of the box.
+
| D,E,F || X1, Y1, Z1 || float[3] || A point which corresponds to the corner of the box, usually the lower left.
 
|-
 
|-
| {{a|c}} | G,H,I || {{a|c}} | UpperRightX, UpperRightY, UpperRightZ || float[3] || A point which corresponds to the ''upper right'' corner of the box.
+
| G,H,I || X2, Y2, Z2 || float[3] || A point which corresponds to the opposite corner of the box, usually the upper right.
 
|-
 
|-
| {{a|c}} | J || {{a|c}} | Flags || integer || The behaviour of the cull zone &ndash; ''see [[CULL#Flags|below]]''.
+
| J || Flag || integer || The behaviour of the cull zone (see [[CULL#Flags|below]]).
 
|-
 
|-
| {{a|c}} | K || {{a|c}} | Unknown || integer || Always 0
+
| K || ''unknown'' || integer || Usually 0
 
|}
 
|}
  
Line 38: Line 44:
 
Coordinates are always rounded to the nearest world [[unit]] so that they are no longer floating point values, they are non-decimal integers.
 
Coordinates are always rounded to the nearest world [[unit]] so that they are no longer floating point values, they are non-decimal integers.
  
{| class="wikitable collapsible"
+
{| class="wikitable center-col-1"
 
!width="25%"|Value
 
!width="25%"|Value
 
!Description
 
!Description
 
|-
 
|-
| {{a|c}} | CenterX, CenterY, CenterZ||Vector to the center of the cull zone.
+
| CenterX, CenterY, CenterZ||Vector to the center of the cull zone.
 
|-
 
|-
| {{a|c}} | Unknown1, Unknown2, Unknown3||Allways 0.
+
| Unknown1, Unknown2, Unknown3||Allways 0.
 
|-
 
|-
| {{a|c}} | Length||Dimensions of the zone along y-axis.
+
| Length||Dimensions of the zone along y-axis.
 
|-
 
|-
| {{a|c}} | Width||Dimensions of the zone along x-axis.
+
| Width||Dimensions of the zone along x-axis.
 
|-
 
|-
| {{a|c}} | Top, Bottom||Absolute Z coordinate of the top and bottom of the box.
+
| Top, Bottom||Absolute Z coordinate of the top and bottom of the box.
 
|-
 
|-
| {{a|c}} | Flag||The behaviour of the cull zone &ndash; ''see [[CULL#Flags|below]]''
+
| Flag||The behaviour of the cull zone &ndash; ''see [[CULL#Flags|below]]''
 
|-
 
|-
| {{a|c}} | Vx, Vy, Vz, Cm||Mirror parameters {{Ref|4}}.
+
| Vx, Vy, Vz, Cm||Mirror parameters {{Ref|3}}.
 
|-
 
|-
 
|}
 
|}
Line 67: Line 73:
 
Flags are numbers which are build out of a collection of numbers formed by the ''[[Wikipedia:Power_of_2|power of 2]]''-numbers lower than 2<sup>30</sup>. Some are defining various behaviours of the zone. They can be combined by simply adding one flag value to another (see [[binary to decimal conversion]]).
 
Flags are numbers which are build out of a collection of numbers formed by the ''[[Wikipedia:Power_of_2|power of 2]]''-numbers lower than 2<sup>30</sup>. Some are defining various behaviours of the zone. They can be combined by simply adding one flag value to another (see [[binary to decimal conversion]]).
  
{| class="wikitable collapsible"
+
{|class="mw-collapsible wikitable center-col-1 center-col-2 center-col-3" style="width: 100%;"
! style="width: 9em;" | Flag
+
!style="width: 7em;"|Flag
! style="width: 7em;" | Supported games
+
!style="width: 8em;"|Supported games
! style="width: 25%;" | Binary
+
!width="25%"|Binary
! Description
+
!Description
 
|-
 
|-
|{{a|c}} | -1 ||{{a|c}} | &ndash; ||{{a|c}} | <code>1111 1111 1111 1111</code> ||Enables all flags. {{ref|3}}
+
| -1 || &ndash; || <code>1111 1111 1111 1111</code> ||Enables all flags.{{ref|2}} Never used by default.
 
|-
 
|-
|{{a|c}} | 1 ||{{a|c}} | {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||{{a|c}} | <code>0000 0000 0000 0001</code> ||Camera close in into player using closest third-person view camera mode, does not close in if in first person or cinematic mode, camera mode cannot be changed while in the zone
+
| 1 || {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} || <code>0000 0000 0000 0001</code> ||Camera close in into player using closest third-person view camera mode, does not close in if in first person or cinematic mode, camera mode cannot be changed while in the zone
 
|-
 
|-
|{{a|c}} | 2 ||{{a|c}} | {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||{{a|c}} | <code>0000 0000 0000 0010</code> ||Camera remotely placed outside the zone, no control of camera, camera mode cannot be changed while in the zone
+
| 2 || {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} || <code>0000 0000 0000 0010</code> ||Camera remotely placed outside the zone, no control of camera, camera mode cannot be changed while in the zone
 
|-
 
|-
|{{a|c}} | 4 ||{{a|c}} | {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||{{a|c}} | <code>0000 0000 0000 0100</code> ||Lowers the camera angle on boats
+
| 4 || {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} || <code>0000 0000 0000 0100</code> ||Lowers the camera angle on boats
 
|-
 
|-
|{{a|c}} | 8 ||{{a|c}} | {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||{{a|c}} | <code>0000 0000 0000 1000</code> ||Rain-free, police helicopter-free zone
+
| 8 || {{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} || <code>0000 0000 0000 1000</code> ||Rain-free, police helicopter-free zone
 
|-
 
|-
|{{a|c}} | 16 ||{{a|c}} | {{Icon|3}} {{Icon|VC}} ||{{a|c}} | <code>0000 0000 0001 0000</code> ||Police will not exit their vehicles voluntarily. They will only exit if you do something to them (like shoot it). Cops both on foot and in vehicles will not chase you but can shoot at you.
+
| 16 || {{Icon|3}} {{Icon|VC}} || <code>0000 0000 0001 0000</code> ||Police will not exit their vehicles voluntarily. They will only exit if you do something to them (like shoot it). Cops both on foot and in vehicles will not chase you but can shoot at you.
 
|-
 
|-
|{{a|c}} | 256 ||{{a|c}} | {{Icon|3}} {{Icon|VC}} ||{{a|c}} | <code>0000 0001 0000 0000</code> ||Police will always exit their vehicles once they are spawned ONLY IF you have a wanted level. If you don't, they'll drive normally.
+
| 256 || {{Icon|3}} {{Icon|VC}} || <code>0000 0001 0000 0000</code> ||Police will always exit their vehicles once they are spawned ONLY IF you have a wanted level. If you don't, they'll drive normally.
 
|-
 
|-
|{{a|c}} | 512 ||{{a|c}} | {{Icon|VC}} ||{{a|c}} | <code>0000 0010 0000 0000</code> ||
+
| 512 || {{Icon|VC}} || <code>0000 0010 0000 0000</code> ||
 
|-
 
|-
|{{a|c}} | 1024 ||{{a|c}} | {{Icon|VC}} ||{{a|c}} | <code>0000 0100 0000 0000</code> ||Some visual ocean water effects are removed like the transparent waves and sparkles on the water
+
| 1024 || {{Icon|VC}} || <code>0000 0100 0000 0000</code> ||Some visual ocean water effects are removed like the transparent waves and sparkles on the water
 
|-
 
|-
|{{a|c}} | 4096 ||{{a|c}} | {{Icon|SA}} {{Icon|4}} ||{{a|c}} | <code>0001 0000 0000 0000</code> ||5-Star Military zone.
+
| 4096 || {{Icon|SA}} {{Icon|4}} || <code>0001 0000 0000 0000</code> ||5-Star Military zone.
 
|}
 
|}
  
Line 98: Line 104:
 
== References ==
 
== References ==
 
* {{note|1}} {{GTAF|203741|8 Track Screen}}
 
* {{note|1}} {{GTAF|203741|8 Track Screen}}
* {{note|2}} {{GTAF|106678|GTA VC cullzones deciphered}}
+
* {{note|2}} [[wikipedia:Two%27s_complement|Two's complement]]
* {{note|3}} [[wikipedia:Two%27s_complement|Two's complement]]
+
* {{note|3}} {{GTAF|post|202532|3875562|SA Mirrors}}
* {{note|4}} {{GTAF|post|202532|3875562|SA Mirrors}}
 
  
 
== External links ==
 
== External links ==
 +
* {{GTAF|106678|GTA VC cullzones deciphered}}
 
* {{GTAF|209163|Karma contest with cullzones as topic}}
 
* {{GTAF|209163|Karma contest with cullzones as topic}}
 
* {{GTAF|202532|IPL documentation topic}}
 
* {{GTAF|202532|IPL documentation topic}}
Line 108: Line 114:
 
{{N|4|SA|VC|3}}
 
{{N|4|SA|VC|3}}
  
[[Category:Map Formats]][[Category:GTA LCS]][[Category:GTA VCS]]
+
[[Category:GTA LCS]][[Category:GTA VCS]]

Revision as of 17:07, 12 December 2015

CULL (IPL section)
Short description:Creates culling zones
Supported games:GTA III Vice City San Andreas GTA IV
IPL Sections:
2DFX AUZO BLOK CARS CULL ENEX GRGE
INST JUMP LINK LODM MLO+ MULT OCCL
PATH PICK RTFX SLOW TCYC VNOD ZONE

CULL is a section in the item placement file in GTA III, Vice City, San Andreas, and GTA IV. It is used to create zones affecting the different behaviour of the world, like mirrors,[1] fixed camera positions, disabling rain, and police behaviors, when the player is within the zone.

Format

GTA III and Vice City

Cull zones in GTA III and Vice City are built by a box which is controlled by various flags. By default, most of the cull zones are located in data\maps\cull.ipl for both games, although GTA III doesn't seem to use this file. Instead it uses the cullzone.dat file to define these zones.

cull
CenterX, CenterY, CenterZ, X1, Y1, Z1, X2, Y2, Z2, Flag, unknown
end
GTA III Vice City Identifier Type Description
A,B,C CenterX, CenterY, CenterZ float[3] A point which defines the center of the box in real world coordinates.
D,E,F X1, Y1, Z1 float[3] A point which corresponds to the corner of the box, usually the lower left.
G,H,I X2, Y2, Z2 float[3] A point which corresponds to the opposite corner of the box, usually the upper right.
J Flag integer The behaviour of the cull zone (see below).
K unknown integer Usually 0

Changing the zones center coordinates does not directly affect the zone itself. Anyway this vector should always point to the real center of the zone since those values are used to calculate the distance of several instances (e.g. the player) to the zone itself.

GTA San Andreas / IV

San Andreas has two different major formats in the game:

CenterX, CenterY, CenterZ, Unknown1, Length, Bottom, Width, Unknown2, Top, Flag, Unknown3
CenterX, CenterY, CenterZ, Unknown1, Length, Bottom, Width, Unknown2, Top, Flag, Vx, Vy, Vz, Cm

Coordinates are always rounded to the nearest world unit so that they are no longer floating point values, they are non-decimal integers.

Value Description
CenterX, CenterY, CenterZ Vector to the center of the cull zone.
Unknown1, Unknown2, Unknown3 Allways 0.
Length Dimensions of the zone along y-axis.
Width Dimensions of the zone along x-axis.
Top, Bottom Absolute Z coordinate of the top and bottom of the box.
Flag The behaviour of the cull zone – see below
Vx, Vy, Vz, Cm Mirror parameters [3].

This section is incomplete. You can help by fixing and expanding it.

Mirrors

Flags

Flags are numbers which are build out of a collection of numbers formed by the power of 2-numbers lower than 230. Some are defining various behaviours of the zone. They can be combined by simply adding one flag value to another (see binary to decimal conversion).

Flag Supported games Binary Description
-1 1111 1111 1111 1111 Enables all flags.[2] Never used by default.
1 GTA III Vice City San Andreas GTA IV 0000 0000 0000 0001 Camera close in into player using closest third-person view camera mode, does not close in if in first person or cinematic mode, camera mode cannot be changed while in the zone
2 GTA III Vice City San Andreas GTA IV 0000 0000 0000 0010 Camera remotely placed outside the zone, no control of camera, camera mode cannot be changed while in the zone
4 GTA III Vice City San Andreas GTA IV 0000 0000 0000 0100 Lowers the camera angle on boats
8 GTA III Vice City San Andreas GTA IV 0000 0000 0000 1000 Rain-free, police helicopter-free zone
16 GTA III Vice City 0000 0000 0001 0000 Police will not exit their vehicles voluntarily. They will only exit if you do something to them (like shoot it). Cops both on foot and in vehicles will not chase you but can shoot at you.
256 GTA III Vice City 0000 0001 0000 0000 Police will always exit their vehicles once they are spawned ONLY IF you have a wanted level. If you don't, they'll drive normally.
512 Vice City 0000 0010 0000 0000
1024 Vice City 0000 0100 0000 0000 Some visual ocean water effects are removed like the transparent waves and sparkles on the water
4096 San Andreas GTA IV 0001 0000 0000 0000 5-Star Military zone.

This section is incomplete. You can help by fixing and expanding it.

References

External links