Difference between revisions of "CULL"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(37 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{IplSection
 
{{IplSection
| game        = [[GTA 3]] [[GTA VC]] [[GTA SA]] [[GTA IV]]
+
| game        = {{Icon|t}} {{Icon|4}}
| description = Create a [[Wikipedia:Culling|culling zone]]
+
| description = Creates culling zones
 
}}
 
}}
'''Cull''' is one of the major [[IPL]] sections used in plaintext map placement files. It is used to create zones with different behaviour like mirrors or fixed camera positions just as it is able to influence the environment. For example it is able to disable rain in certain areas.
+
'''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.
  
== GTA III / Vice City ==
+
== Format ==
 +
===GTA III and Vice City===
 +
Cull zones in GTA III and Vice City are built by a box which is controlled by various attributes. 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.
  
Cull zones in the first 2 parts of the GTA 3D series are built by a box which is controlled by various flags.
+
{{Pre|
 +
cull
 +
CenterX, CenterY, CenterZ, X1, Y1, Z1, X2, Y2, Z2, Attribute, WantedLevelDrop
 +
end
 +
}}
  
CenterX, CenterY, CenterZ, LowerLeftX, LowerLeftY, LowerLeftZ, UpperRightX, UpperRightY, UpperRightZ, Flags, Unknown
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
! style="width: 3em;"| {{Icon|3}} {{Icon|VC}}
{|{{Prettytable}} class="collapsible"
+
! style="width: 12em;" | Identifier
!Identifier
+
! style="width: 6em;" | Type
!Description
+
! Description
 
|-
 
|-
|<center>CenterX, CenterY, CenterZ</center>||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.
 
|-
 
|-
|<center>LowerLeftX, LowerLeftY, LowerLeftZ</center>||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.
 
|-
 
|-
|<center>UpperRightX, UpperRightY, UpperRightZ</center>||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.
 
|-
 
|-
|<center>Flags</center>||The behaviour of the cull zone &ndash; ''see [[CULL#Flags|below]]''.
+
| J || Attribute || integer || The attribute in [[flag field]] representation (see [[CULL#Attributes|below]]).
 
|-
 
|-
|<center>Unknown</center>||Allways 0
+
| K || WantedLevelDrop || integer || Usually 0
 
|}
 
|}
  
====Flags====
+
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 ===
  
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>31</sup>. Some are defining various behaviours of the zone. They can be combined by simply adding one lag value to another.
+
[[San Andreas]] has two different major formats in the game:
  
{|{{Prettytable}} class="collapsible"
+
CenterX, CenterY, CenterZ, Unknown1, Length, Bottom, Width, Unknown2, Top, Flag, Unknown3
!width="120px"|Flag
+
 
!width="25%"|Binary
+
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.
 +
 
 +
{| class="wikitable center-col-1"
 +
!width="25%"|Value
 
!Description
 
!Description
 
|-
 
|-
|<center>1</center>||<center>0000 0000 0000 0001</center>||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
+
| CenterX, CenterY, CenterZ||Vector to the center of the cull zone.
 
|-
 
|-
|<center>2</center>||<center>0000 0000 0000 0010</center>||camera remotely placed outside the zone, no control of camera, camera mode cannot be changed while in the zone
+
| Unknown1, Unknown2, Unknown3||Allways 0.
 
|-
 
|-
|<center>4</center>||<center>0000 0000 0000 0100</center>||Unknown
+
| Length||Dimensions of the zone along y-axis.
 
|-
 
|-
|<center>8</center>||<center>0000 0000 0000 1000</center>||Rain-free, police helicopter-free zone
+
| 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 &ndash; ''see [[CULL#Flags|below]]''
 +
|-
 +
| Vx, Vy, Vz, Cm||Mirror parameters {{Ref|3}}.
 
|-
 
|-
|<center>4096</center>||<center>0001 0000 0000 0000</center>||5-star military zone
 
 
|}
 
|}
  
 
{{Incomplete}}
 
{{Incomplete}}
  
== GTA SA ==
+
=== Mirrors ===
 +
{{research}}
  
== GTA IV ==
+
== Attributes ==
 +
{|class="mw-collapsible wikitable center-col-1 center-col-2 center-col-3" style="width: 100%;"
 +
!rowspan="3" |Flag
 +
![[:Category:Memory Addresses|Function name]]
 +
!rowspan="3" style="width: 8em;" |Supported games
 +
!rowspan="3" style="width: 16em;" |Binary
 +
!rowspan="3" |Description
 +
|-
 +
!Player
 +
|-
 +
!Camera
 +
|-
 +
|rowspan="2" |-1 ||&nbsp; ||rowspan="2" |&ndash; ||rowspan="2" {{a|c}} |<code>1111 1111 1111 1111</code> ||rowspan="2" |Enables all attributes.{{ref|2}} Never used by default.
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |1 ||CamCloseInForPlayer ||rowspan="2" |{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||rowspan="2" {{a|c}} |<code>0000 0000 0000 0001</code> ||rowspan="2" |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
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |2 ||CamStairsForPlayer ||rowspan="2" |{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||rowspan="2" {{a|c}} |<code>0000 0000 0000 0010</code> ||rowspan="2" |Camera remotely placed outside the zone, no control of camera, camera mode cannot be changed while in the zone
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |4 ||Cam1stPersonForPlayer ||rowspan="2" |{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||rowspan="2" {{a|c}} |<code>0000 0000 0000 0100</code> ||rowspan="2" |Lowers the camera angle on boats
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |8 ||PlayerNoRain ||rowspan="2" |{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}} ||rowspan="2" {{a|c}} |<code>0000 0000 0000 1000</code> ||rowspan="2" |Rain-free, police helicopter-free zone
 +
|-
 +
|CamNoRain
 +
|-
 +
|rowspan="2" |16 ||NoPolice ||rowspan="2" |{{Icon|3}} {{Icon|VC}} ||rowspan="2" {{a|c}} |<code>0000 0000 0001 0000</code> ||rowspan="2" |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.
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |64 ||DoINeedToLoadCollision ||rowspan="2" |{{Icon|3}} ||rowspan="2" {{a|c}} |<code>0000 0000 0100 0000</code> ||rowspan="2" |Unused in Vice City
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |128 ||&nbsp; ||rowspan="2" |{{Icon|3}} {{Icon|VC}} ||rowspan="2" {{a|c}} |<code>0000 0000 1000 0000</code> ||rowspan="2" |
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |256 ||PoliceAbandonCars ||rowspan="2" |{{Icon|3}} {{Icon|VC}} {{Icon|SA}} ||rowspan="2" {{a|c}} |<code>0000 0001 0000 0000</code> ||rowspan="2" |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.
 +
|-
 +
|&nbsp;
 +
|-
 +
|rowspan="2" |512 ||&nbsp; ||rowspan="2" |{{Icon|VC}} {{Icon|SA}} ||rowspan="2" {{a|c}} |<code>0000 0010 0000 0000</code> ||rowspan="2" |
 +
|-
 +
|InRoomForAudio
 +
|-
 +
|rowspan="2" |1024 ||&nbsp; ||rowspan="2" |{{Icon|VC}} ||rowspan="2" {{a|c}} |<code>0000 0100 0000 0000</code> ||rowspan="2" |Some visual ocean water effects are removed like the transparent waves and sparkles on the water
 +
|-
 +
|WaterFudge
 +
|-
 +
|rowspan="2" |4096 ||&nbsp; ||rowspan="2" |{{Icon|SA}} {{Icon|4}} ||rowspan="2" {{a|c}} |<code>0001 0000 0000 0000</code> ||rowspan="2" |5-Star Military zone.
 +
|-
 +
|MilitaryZone
 +
|-
 +
|rowspan="2" |16384 ||&nbsp; ||rowspan="2" |{{Icon|SA}} ||rowspan="2" {{a|c}} |<code>0100 0000 0000 0000</code> ||rowspan="2" |Doesn't allow cars to reach top speed.
 +
|-
 +
|ExtraAirResistance
 +
|-
 +
|rowspan="2" |32768 ||&nbsp; ||rowspan="2" |{{Icon|SA}} ||rowspan="2" {{a|c}} |<code>1000 0000 0000 0000</code> ||rowspan="2" |Spawn fewer cars in this area.
 +
|-
 +
|FewerCars
 +
|}
  
{{Research}}
+
{{Incomplete}}
  
== See also ==
+
== References ==
* [[IPL|Item placement file format specification]]
+
* {{note|1}} {{GTAF|203741|8 Track Screen}}
 +
* {{note|2}} [[wikipedia:Two%27s_complement|Two's complement]]
 +
* {{note|3}} {{GTAF|post|202532|3875562|SA Mirrors}}
  
== External Link ==
+
== External links ==
 +
* {{GTAF|106678|GTA VC cullzones deciphered}}
 +
* {{GTAF|209163|Karma contest with cullzones as topic}}
 
* {{GTAF|202532|IPL documentation topic}}
 
* {{GTAF|202532|IPL documentation topic}}
  
{{SA-navi}}
+
{{N|4|SA|VC|3}}
{{IV-navi}}
 
  
[[Category:Map Formats]][[Category:GTA LCS]][[Category:GTA VCS]]
+
{{LCS-navi}}
 +
[[Category:GTA VCS]]

Latest revision as of 23:14, 11 January 2019

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 attributes. 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, Attribute, WantedLevelDrop
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 Attribute integer The attribute in flag field representation (see below).
K WantedLevelDrop 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

Attributes

Flag Function name Supported games Binary Description
Player
Camera
-1   1111 1111 1111 1111 Enables all attributes.[2] Never used by default.
 
1 CamCloseInForPlayer 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 CamStairsForPlayer 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 Cam1stPersonForPlayer GTA III Vice City San Andreas GTA IV 0000 0000 0000 0100 Lowers the camera angle on boats
 
8 PlayerNoRain GTA III Vice City San Andreas GTA IV 0000 0000 0000 1000 Rain-free, police helicopter-free zone
CamNoRain
16 NoPolice 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.
 
64 DoINeedToLoadCollision GTA III 0000 0000 0100 0000 Unused in Vice City
 
128   GTA III Vice City 0000 0000 1000 0000
 
256 PoliceAbandonCars GTA III Vice City San Andreas 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 San Andreas 0000 0010 0000 0000
InRoomForAudio
1024   Vice City 0000 0100 0000 0000 Some visual ocean water effects are removed like the transparent waves and sparkles on the water
WaterFudge
4096   San Andreas GTA IV 0001 0000 0000 0000 5-Star Military zone.
MilitaryZone
16384   San Andreas 0100 0000 0000 0000 Doesn't allow cars to reach top speed.
ExtraAirResistance
32768   San Andreas 1000 0000 0000 0000 Spawn fewer cars in this area.
FewerCars

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

References

External links