CULL: Difference between revisions

1,811 bytes added ,  7 July 2018
m
no edit summary
m (clean up,)
mNo edit summary
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{IplSection
{{IplSection
| game        = [[GTA 3]] [[GTA VC]] [[GTA SA]] [[GTA IV]]
| game        = {{Icon-square|t}} {{Icon-square|iv}}
| description = Create a [[Wikipedia:Culling|culling zone]]
| description = Creates zones with attributes
}}
}}
'''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.
'''<code>cull</code>''' is a section in the item placement file in [[Grand Theft Auto III]], [[Grand Theft Auto: Vice City]], [[Grand Theft Auto: San Andreas]], and [[Grand Theft Auto IV]]. It is used to create zones affecting the different behavior of the world, like mirrors,<ref>[http://www.gtaforums.com/index.php?showtopic=203741 8 Track Screen]</ref> fixed camera positions, disabling rain, and police behaviors, when the player is within the zone.


== GTA III / Vice City ==
== Format ==
===GTA III and GTA Vice City===
Cull zones in GTA III and GTA 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 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.
{{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-square|3}} {{Icon-square|VC}}
{|class="prettytable 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<br>Useless? Doesn't seem to affect the zone.
|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|flag field]] representation (see [[#Attributes|below]]).
|-
|-
|<center>Unknown</center>||Always 0
|K ||WantedLevelDrop ||integer ||Usually 0
|}
|}
The first three parameters are odd since placing any values do not have an effect on the zone. They seem to act like identifiers rather than functions.


====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 ===
 
GTA 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


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]]).
Coordinates are always rounded to the nearest world [[unit]] so that they are no longer floating point values, they are non-decimal integers.


{|class="prettytable collapsible"
{| class="wikitable center-col-1"
!width="120px"|Flag
!width="25%"|Value
!width="25%"|Binary
!Description
!Description
|-
|-
|<center>-1</center>||||Enables all flags.
| 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 [[#Attributes|below]]).
|-
| Vx, Vy, Vz, Cm||Mirror parameters.<ref>[http://www.gtaforums.com/index.php?showtopic=202532&view=findpost&p=3875562 SA Mirrors]</ref>
|-
|}
 
== Attributes ==
{|class="mw-collapsible wikitable center-col-1 center-col-2 center-col-3" style="width: 100%;"
!rowspan="3" |Flag
!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" style="text-align: center;" |<code>1111 1111 1111 1111</code> ||rowspan="2" |[[wikipedia:Two's_complement|Enables all]] attributes. Never used by default.
|-
|&nbsp;
|-
|rowspan="2" |1 ||CamCloseInForPlayer ||rowspan="2" |{{Icon-square|t}} {{Icon-square|4}} ||rowspan="2" style="text-align: center;" |<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-square|t}} {{Icon-square|4}} ||rowspan="2" style="text-align: center;" |<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-square|t}} {{Icon-square|4}} ||rowspan="2" style="text-align: center;" |<code>0000 0000 0000 0100</code> ||rowspan="2" |Lowers the camera angle on boats
|-
|&nbsp;
|-
|rowspan="2" |8 ||PlayerNoRain ||rowspan="2" |{{Icon-square|t}} {{Icon-square|4}} ||rowspan="2" style="text-align: center;" |<code>0000 0000 0000 1000</code> ||rowspan="2" |Rain-free, police helicopter-free zone
|-
|CamNoRain
|-
|rowspan="2" |16 ||NoPolice ||rowspan="2" |{{Icon-square|3}} {{Icon-square|VC}} ||rowspan="2" style="text-align: center;" |<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.
|-
|-
|<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
|&nbsp;
|-
|-
|<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
|rowspan="2" |64 ||DoINeedToLoadCollision ||rowspan="2" |{{Icon-square|3}} ||rowspan="2" style="text-align: center;" |<code>0000 0000 0100 0000</code> ||rowspan="2" |Unused in Vice City
|-
|-
|<center>4</center>||<center>0000 0000 0000 0100</center>||Lowers the camera angle on boats
|&nbsp;
|-
|-
|<center>8</center>||<center>0000 0000 0000 1000</center>||Rain-free, police helicopter-free zone
|rowspan="2" |128 ||&nbsp; ||rowspan="2" |{{Icon-square|3}} {{Icon-square|VC}} ||rowspan="2" style="text-align: center;" |<code>0000 0000 1000 0000</code> ||rowspan="2" |
|-
|-
|<center>16</center>||<center>0000 0000 0001 0000</center>||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;
|-
|-
|<center>32</center>||<center>0000 0000 0010 0000</center>||
|rowspan="2" |256 ||PoliceAbandonCars ||rowspan="2" |{{Icon-square|t}} ||rowspan="2" style="text-align: center;" |<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.
|-
|-
|<center>64</center>||<center>0000 0000 0100 0000</center>||
|&nbsp;
|-
|-
|<center>128</center>||<center>0000 0000 1000 0000</center>||
|rowspan="2" |512 ||&nbsp; ||rowspan="2" |{{Icon-square|VC}} {{Icon-square|SA}} ||rowspan="2" style="text-align: center;" |<code>0000 0010 0000 0000</code> ||rowspan="2" |
|-
|-
|<center>256</center>||<center>0000 0001 0000 0000</center>||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.
|InRoomForAudio
|-
|-
|<center>512</center>||<center>0000 0001 0000 0000</center>||
|rowspan="2" |1024 ||&nbsp; ||rowspan="2" |{{Icon-square|VC}} ||rowspan="2" style="text-align: center;" |<code>0000 0100 0000 0000</code> ||rowspan="2" |Some visual ocean water effects are removed like the transparent waves and sparkles on the water
|-
|-
|<center>1024</center>||<center>0000 0010 0000 0000</center>||Some visual water effects are removed like the transparent waves and sparkles on the water (like the water in GTA III).
|WaterFudge
|}
 
{{Incomplete}}
 
== San Andreas ==
 
[[San Andreas]] has two different major formats in the game:
 
CenterX, CenterY, CenterZ, Unknown1, WidthY, BottomZ, WidthX, Unknown2, TopZ, Flag, Unknown3
 
CenterX, CenterY, CenterZ, Unknown1, WidthY, BottomZ, WidthX, Unknown2, TopZ, 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.
 
{{Incomplete}}
 
==== Flags ====
 
Not all flags from the previous game are compatible with San Andreas.
 
{|class="prettytable collapsible"
!width="120px"|Flag
!width="25%"|Binary
!Description
|-
|-
|<center>-1</center>||||Enables all flags.
|rowspan="2" |4096 ||&nbsp; ||rowspan="2" |{{Icon-square|SA}} {{Icon-square|4}} ||rowspan="2" style="text-align: center;" |<code>0001 0000 0000 0000</code> ||rowspan="2" |5-Star Military zone.
|-
|-
|<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
|MilitaryZone
|-
|-
|<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
|rowspan="2" |16384 ||&nbsp; ||rowspan="2" |{{Icon-square|SA}} ||rowspan="2" style="text-align: center;" |<code>0100 0000 0000 0000</code> ||rowspan="2" |Doesn't allow cars to reach top speed.
|-
|-
|<center>4</center>||<center>0000 0000 0000 0100</center>||Unknown
|ExtraAirResistance
|-
|-
|<center>8</center>||<center>0000 0000 0000 1000</center>||Rain-free, police helicopter-free zone
|rowspan="2" |32768 ||&nbsp; ||rowspan="2" |{{Icon-square|SA}} ||rowspan="2" style="text-align: center;" |<code>1000 0000 0000 0000</code> ||rowspan="2" |Spawn fewer cars in this area.
|-
|-
|<center>4096</center>||<center>0001 0000 0000 0000</center>||5-star military zone
|FewerCars
|}
|}
{{Incomplete}}
== GTA IV ==
{{Research}}


== References ==
== References ==
* {{note|1}}
<references />
* {{note|2}}
 
== See also ==
* [[IPL|Item placement file format specification]]


[[Category:Map Formats]][[Category:GTA LCS]][[Category:GTA VCS]]{{fdl}}
{{fdl}}
[[Category:Modifications]]
12,236

edits