Difference between revisions of "MODIFY CHAR MOVE STATE"

From GTAMods Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{Cleanup-rewrite}}
 
{{Cleanup-rewrite}}
 
{{IplSection
 
{{IplSection
| game        = [[GTA 3]] [[GTA VC]] [[GTA SA]] [[GTA LCS]] [[GTA VCS]] [[GTA IV]]
+
| name        = OCCL
| description =
+
| game        = [[GTA VC]], [[GTA SA]], [[GTA IV]]
 +
| description = Creates zones for separated rendering
 
}}
 
}}
A '''zone''' is an area in the game used to show the text of the zone being entered, to load islands, and to create locations to spawn specific vehicles and pedestrians. It is controlled by <code>.zon</code> files, which use the [[IPL]] format.
+
'''Occlusion''' is a feature in Vice City and San Andreas that helps make the game run smoother in certain parts of the map. The occlusions are created using invisible boxes. These boxes disable models that are behind the boxes from rendering. This feature is not really effective and Rockstar did not use this feature efficiently. There are not much improvements on occlusions in San Andreas compared to Vice City. Deleting all entries in the occlu section does not have any major effects on the game.
  
==Structure==
+
==Location==
 +
Occlusions are controlled by the <code>occl</code> section of the [[IPL]] files. Rockstar created the occlusions through the <code>occlu.ipl</code> in Vice City and the <code>occlu.ipl</code>, <code>occluint.ipl</code>, <code>occluLA.ipl</code>, <code>occlusf.ipl</code>, and the <code>occluveg.ipl</code> in San Andreas. You can open these files using Microsoft Notepad. You do not need to use these files to create your own occlusions as long as the entry is in a defined IPL file.
  
All the <code>.zon</code> files start with a section identifier and ends with the keyword "end", both in a single line.
+
==Format==
 
+
''Section identifier:''
Example:
+
  occl
  zone
 
 
  ...
 
  ...
 
  end
 
  end
  
==Format==
+
''Format of the occlu section of the IPL file:''
The basic format for a <code>.zon</code> file for GTA3 and Vice City is:
+
  mid x, mid y, bottom height z, width x, width y, height from bottom height to top, rotation
  Name, Type, X1, Y1, Z1, X2, Y2, Z2, Island
+
*'''mid x, mid y:''' The middle of the occlusion box in X and Y coordinates.
And for San Andreas and GTA IV:
+
*'''bottom height z:''' The bottom Z coordinate of the occlusion box.
Name, Type, X1, Y1, Z1, X2, Y2, Z2, Island, Text
+
*'''width x, width y:''' The width of the occlusion box in units.
;Name: Name and text of zone used from the <code>.gxt</code> file
+
*'''height from bottom height to top:''' The difference in height from the top of the occlusion box to the bottom.
;Type: Type of zone
+
*'''rotation:''' The rotation of the occlusion box in angles.
;X1, Y1, Z1: The bottom left corner of the zone
 
;X2, Y2, Z2: The top right corner of the zone
 
;Island: The island number
 
;Text: Text of the zone used from the [[GXT]] file<br>
 
Note that for San Andreas, the text of the zone to be displayed is also related to by an internally hardcoded table which links that zone name to its respective audio description for the police radio. This is actually the cause of a bug in the game - the zone 'SUN' (which is correctly named 'Temple' in the GXT file) gets announced as 'Sunnyside' on the police radio. This is because the internal table has two consecutive entries called 'SUN' and only the second one gets used, meaning whenever the player is in a zone named and defined as 'SUN' in this file, the police will always announce this as 'Sunnyside' since 'SUN' points to that audio entry.
 
 
 
===GTA3===
 
Island number 1: Portland<br>
 
Island number 2: Staunton<br>
 
Island number 3: Shoreside Vale
 
====Gta3.zon====
 
Type: 0, 1, or 2<br>
 
The <code>gta3.zon</code> controls the text of the zone that shows up in the game as you enter a new zone. The <code>main.scm</code> uses this to check if you are in the zone. The <code>gta3.zon</code> can be viewed through [[KEd]] but it can be only edited by hand. The <code>main.scm</code> uses this file so you cannot just delete the lines in from popping up in the game without editing the <code>main.scm</code>.
 
 
 
====Map.zon====
 
Type: 3<br>
 
The <code>map.zon</code> controls the loading of an entire island as you travel from one island to another. It tells the game where to load. The <code>map.zon</code> can be viewed through KEd but it can be only edited by hand.
 
 
 
===Vice City===
 
Island number 1: Vice City Beach<br>
 
Island number 2: Vice City Mainland
 
====Info.zon====
 
Type: 2<br>
 
The <code>info.zon</code>, with the help of the <code>main.scm</code>, controls which pedestrian and vehicles spawn in that specific zone. The <code>info.zon</code> can be viewed through [[KEd]] but it can be only edited by hand. The <code>main.scm</code> uses this file so you cannot just delete the lines in the file without editing the <code>main.scm</code>. This zone uses island number 1.
 
 
 
====Map.zon====
 
Type: 3<br>
 
The <code>map.zon</code> controls the loading of an entire island as you travel from one island to another. It tells the game where to load. The <code>map.zon</code> can be viewed through KEd but it can be only edited by hand. You can make the loading of the islands by deleting the entire section.
 
  
====Navig.zon====
+
==Viewing It==
Type: 0 or 1<br>
+
Vice City's occlusions can only be viewed through [[KEd]]. KEd sees occlusion boxes as green, transparent boxes with a small triangular hole in the 3D View. KEd does not support editing the occlusions through the program so you have to create the boxes yourself.
The <code>navig.zon</code> controls the text of the zone that shows up in the game as you enter a new zone. The main.scm uses this to check if you are in the zone. The <code>navig.zon</code> can be viewed through KEd but it can be only edited by hand. The <code>main.scm</code> uses this file so you cannot just delete the lines in the file to prevent the .
 
  
===San Andreas===
+
For San Andreas you can use {{U|Deniska}}'s script pack {{ref|1}} that contains an small tool to import and export the occlusion section of the [[IPL]]
Island number 1: Los Santos<br>
 
Island number 2: San Fierro<br>
 
Island number 3: Las Venturas
 
====Info.zon====
 
Type: 0<br>
 
The <code>Info.zon</code> controls the text of the zone that shows up in the game as you enter a new zone. It also controls which pedestrian and vehicles spawn in that specific zone, with the help of the
 
  
====Map.zon====
+
[[Image:Occlusion.png|center|frame|Occlusion boxes in KEd]]
Type: 3<br>
 
The <code>map.zon</code> controls the island zones and also the type of cop car (LA,SF or LV) if there is no zone, it spawns the country cop car. The last value is always UNUSED for zones controlling the island-ID's. Normally you have all zone-names stored in the <code>map.zon</code> and the island-boundary-zones with their ID's in the map.zon. The last number is the Island-ID.
 
  
You can lock/unlock them using SCM.
+
==Creating It==
 +
The following way to make occlusion boxes is practiced by [[User:spaceeinstein|spaceeinstein]]. First find a building that you want to make occlusion boxes and align it to the X- and Y-axis. Get the coordinates of the lower left corner of the building and the upper right corner of the building. The coordinates for the lower left and upper right corner of the building can be inputted as X1, Y1, and Z1, and X2, Y1, and Z2, respectively, into the occlusion tool. If you are not bothered to get the lower Z coordinate of the box, you can input any number that is lower than the foundation of your building. Making the boxes with angles is pretty tough to do and probably needs some trial and error to fit it into the building.
  
==Useful Tools==
+
Using {{U|Deniska}}'s script {{ref|1}} you need only to create a box, press the Export button on the script and paste the line from the MAXScript listener to the [[IPL]] section.
* {{GTAF|410193|SA Zon script for 3DMax}} - by {{U|Jost_Vice}}
 
* {{GTAF|218318|Map IO in Kams script pack}} - by {{U|Kam}}
 
* {{GTAF|402942|(SA and IV) Zon-IO in GTA-IV script centre }} - by {{U|Gforce}}
 
  
==External Link==
+
==Problems==
* {{GTAF|140597|Map File Definitions}}
+
If you delete the buildings in Vice City or San Andreas without deleting the occlusions, you would see pop ups behind the occlusions. These occlusions had created problems for a few modifications, most notably in the Liberty City modification. In the Liberty City mod, the team experienced unexpected pop ups caused by the occlusion boxes. These boxes are loading and unloading the models behind boxes where Vice City's buildings used to be at. Someone realized that the <code>occlu.ipl</code> was the problem and deleted every line in that file. The pop ups disappeared.
  
{{N|SA|4}}
+
==References==
 +
* {{note|1}} {{GTAF|277798|Script pack for 3ds Max}} &ndash; by {{U|Deniska}}
 +
* {{GTAF|402942|(SA and IV) Occlu-IO in GTA-IV script centre }} - by {{U|Gforce}}
 +
{{N|4|SA}}
  
[[Category:Map Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA VCS]][[Category:GTA LCS]]
+
[[Category:Map Formats]][[Category:GTA VC]]

Revision as of 17:30, 6 July 2009

40px-Ambox rewrite orange.svg.png This article may need to be rewritten.
Please help improve this article. The discussion page may contain suggestions.
OCCL (IPL section)
Short description:Creates zones for separated rendering
Supported games:GTA VC, GTA SA, 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

Occlusion is a feature in Vice City and San Andreas that helps make the game run smoother in certain parts of the map. The occlusions are created using invisible boxes. These boxes disable models that are behind the boxes from rendering. This feature is not really effective and Rockstar did not use this feature efficiently. There are not much improvements on occlusions in San Andreas compared to Vice City. Deleting all entries in the occlu section does not have any major effects on the game.

Location

Occlusions are controlled by the occl section of the IPL files. Rockstar created the occlusions through the occlu.ipl in Vice City and the occlu.ipl, occluint.ipl, occluLA.ipl, occlusf.ipl, and the occluveg.ipl in San Andreas. You can open these files using Microsoft Notepad. You do not need to use these files to create your own occlusions as long as the entry is in a defined IPL file.

Format

Section identifier:

occl
...
end

Format of the occlu section of the IPL file:

mid x, mid y, bottom height z, width x, width y, height from bottom height to top, rotation
  • mid x, mid y: The middle of the occlusion box in X and Y coordinates.
  • bottom height z: The bottom Z coordinate of the occlusion box.
  • width x, width y: The width of the occlusion box in units.
  • height from bottom height to top: The difference in height from the top of the occlusion box to the bottom.
  • rotation: The rotation of the occlusion box in angles.

Viewing It

Vice City's occlusions can only be viewed through KEd. KEd sees occlusion boxes as green, transparent boxes with a small triangular hole in the 3D View. KEd does not support editing the occlusions through the program so you have to create the boxes yourself.

For San Andreas you can use Deniska's script pack [1] that contains an small tool to import and export the occlusion section of the IPL

File:Occlusion.png
Occlusion boxes in KEd

Creating It

The following way to make occlusion boxes is practiced by spaceeinstein. First find a building that you want to make occlusion boxes and align it to the X- and Y-axis. Get the coordinates of the lower left corner of the building and the upper right corner of the building. The coordinates for the lower left and upper right corner of the building can be inputted as X1, Y1, and Z1, and X2, Y1, and Z2, respectively, into the occlusion tool. If you are not bothered to get the lower Z coordinate of the box, you can input any number that is lower than the foundation of your building. Making the boxes with angles is pretty tough to do and probably needs some trial and error to fit it into the building.

Using Deniska's script [1] you need only to create a box, press the Export button on the script and paste the line from the MAXScript listener to the IPL section.

Problems

If you delete the buildings in Vice City or San Andreas without deleting the occlusions, you would see pop ups behind the occlusions. These occlusions had created problems for a few modifications, most notably in the Liberty City modification. In the Liberty City mod, the team experienced unexpected pop ups caused by the occlusion boxes. These boxes are loading and unloading the models behind boxes where Vice City's buildings used to be at. Someone realized that the occlu.ipl was the problem and deleted every line in that file. The pop ups disappeared.

References