12,236
edits
No edit summary |
(contributions from myself and Aschratt) |
||
Line 1: | Line 1: | ||
{{IplSection | {{IplSection | ||
| game = | |game = {{Icon-square|t}} {{Icon-square|4}} | ||
| description = | |description = Places objects in the world | ||
}} | }} | ||
''' | '''<code>inst</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 place [[OBJS|static]], dynamic, [[TOBJ|time controlled]] and [[ANIM|animated]] objects in the world. It is supported by all major PC versions of the GTA 3D series but its format differs slightly between the games. | ||
== Format == | == Format == | ||
===GTA III | === GTA III and GTA Vice City === | ||
{{Pre| | |||
inst | |||
Id, ModelName, PosX, PosY, PosZ, ScaleX, ScaleY, ScaleZ, RotX, RotY, RotZ, RotW | |||
end | |||
}} | |||
{|class=" | {|class="wikitable center-col-1 center-col-2" style="width: 100%;" | ||
!width=" | !style="width: 3em;" |{{Icon-square|3}} {{Icon-square|vc}} | ||
!style="width: 12em;" |Identifier | |||
!style="width: 6em;" |Type | |||
!Description | !Description | ||
|- | |- | ||
| | |A ||Id ||integer ||A number which is used to identify the object as defined in the [[IDE]] file inside the map system. | ||
|- | |- | ||
| | |B ||ModelName ||string ||The name of the model inside an image file which is defined in the [[gta.dat]] file without extension (<code>.[[DFF|dff]]</code>) | ||
|- | |- | ||
| | |C,D,E ||PosX, PosY, PosZ ||float[3] ||The position of the object in the world as floating point values.<br>''Note:'' the decimal seperator must be ".", not ",". | ||
|- | |- | ||
| | |F,G,H ||ScaleX, ScaleY, ScaleZ ||float[3] ||The scaling of the object as floating point values. By default each value is ''1.0'', which means the object is not scaled at all.<br>''Note:'' the decimal seperator must be ".", not ",". | ||
|- | |- | ||
| | |I,J,K,L ||RotX, RotY, RotZ, RotW ||float[4] ||The rotation of the object as [[Wikipedia:Quarternion|quarternion]].<br>''Note:'' the decimal seperator must be ".", not ",". | ||
|} | |} | ||
Note that if this format is used in Vice City, the interior of the object defaults to 0. | |||
=== GTA Vice City === | |||
{{Pre| | |||
inst | |||
Id, ModelName, Interior, PosX, PosY, PosZ, ScaleX, ScaleY, ScaleZ, RotX, RotY, RotZ, RotW | |||
end | |||
}} | |||
{|class=" | {|class="wikitable center-col-1 center-col-2" style="width: 100%;" | ||
!width=" | !style="width: 3em;" |{{Icon-square|vc}} | ||
!style="width: 12em;" |Identifier | |||
!style="width: 6em;" |Type | |||
!Description | !Description | ||
|- | |- | ||
| | |A ||Id ||integer ||A number which is used to identify the object as defined in the [[IDE]] file inside the map system. | ||
|- | |- | ||
| | |B ||ModelName ||string ||The name of the model inside an image file which is defined in the [[gta.dat]] file without extension (<code>.[[DFF|dff]]</code>) | ||
|- | |- | ||
| | |C ||Interior ||float ||A number defining the [[interior]] (render-level) the object is located in. | ||
|- | |- | ||
| | |D,E,F ||PosX, PosY, PosZ ||float[3] ||The position of the object in the world as floating point values.<br>''Note:'' the decimal seperator must be ".", not ",". | ||
|- | |- | ||
| | |G,H,I ||ScaleX, ScaleY, ScaleZ ||float[3] ||The scaling of the object as floating point values. By default each value is ''1.0'', which means the object is not scaled at all.<br>''Note:'' the decimal seperator must be ".", not ",". | ||
|- | |- | ||
| | |J,K,L,M ||RotX, RotY, RotZ, RotW ||float[4] ||The rotation of the object as [[Wikipedia:Quarternion|quarternion]].<br>''Note:'' the decimal seperator must be ".", not ",". | ||
|} | |} | ||
===GTA | === GTA San Andreas === | ||
{{Pre| | |||
inst | |||
Id, ModelName, Interior, PosX, PosY, PosZ, RotX, RotY, RotZ, RotW, LOD | |||
end | |||
}} | |||
{|class=" | {|class="wikitable center-col-1 center-col-2" style="width: 100%;" | ||
!width=" | !style="width: 3em;" |{{Icon-square|sa}} | ||
!style="width: 12em;" |Identifier | |||
!style="width: 6em;" |Type | |||
!Description | !Description | ||
|- | |- | ||
| | |A ||Id ||integer ||A number which is used to identify the object as defined in the [[IDE]] inside the map system. | ||
|- | |- | ||
| | |B ||ModelName ||string ||The name of the model inside an image file which is defined in the [[gta.dat]] file without extension (<code>.[[DFF|dff]]</code>). The parameter doesn't seem to function in the game. Any name used will not affect the rendering of the model. | ||
|- | |- | ||
| | |C ||Interior ||integer ||A number defining the [[interior]] (render-level) the object is located in. | ||
|- | |- | ||
| | |D,E,F ||PosX, PosY, PosZ ||float[3] ||The position of the object in the world as floating point values. | ||
|- | |- | ||
| | |G,H,I,J ||RotX, RotY, RotZ, RotW ||float[4] ||The rotation of the object as [[Wikipedia:Quarternion|quarternion]].<br>''Note:'' the decimal seperator must be ".", not ",". | ||
|- | |- | ||
|K ||LOD ||integer ||The number of the LOD which is located inside the same instance block as the current model.<br>By default this is ''-1'' which means no LOD is defined.<ref>[http://www.gtaforums.com/index.php?showtopic=188549&view=findpost&p=3177288 Explanation of GTA SA LOD System], post by steve-m explaining the LOD system for IPL files in GTA SA.</ref> | |||
|} | |} | ||
==== Binary Format ==== | ==== Binary Format ==== | ||
''INST'' is also one of the known sections which can be used in binary format inside | ''INST'' is also one of the known sections which can be used in binary format inside streaming files. Its format is similar to the plain text format: | ||
4b - FLOAT - Position X | |||
4b - FLOAT - Position Y | |||
4b - FLOAT - Position Z | |||
4b - FLOAT - Rotation X | |||
4b - FLOAT - Rotation Y | |||
4b - FLOAT - Rotation Z | |||
4b - FLOAT - Rotation W | |||
4b - INT32 - Object ID (as an index to the ''IDE'') | |||
4b - INT32 - Interior | |||
4b - INT32 - ''LOD'' index | |||
==Limitations== | ==Limitations== | ||
Line 78: | Line 103: | ||
Each game has different limitations. The most important limit for the instance section is the so-called ''map boundary'', which is a notional boundary around the map. Outside those borders no objects will be visible. If an object is intersecting the bounds it may be displayed incorrectly. | Each game has different limitations. The most important limit for the instance section is the so-called ''map boundary'', which is a notional boundary around the map. Outside those borders no objects will be visible. If an object is intersecting the bounds it may be displayed incorrectly. | ||
{|class=" | {|class="wikitable" | ||
! Game | !Game | ||
! Mapping Boundary | !Mapping Boundary | ||
|- | |- | ||
| | |style="text-align: center;" |{{Icon-square|sa}} ||GTA San Andreas has a square (or cube) as the major limit. Its dimension is ''3000.0'' [[unit]]s away from the origin point.<br>''This limit can be increased using the SA Limit Adjuster by Sacky'' | ||
|} | |} | ||
==Related tools== | ==Related tools== | ||
* | * [http://www.gtaforums.com/index.php?showtopic=315944 IPL Helper], by Xmen | ||
* [http://www.gta.ocram-net.de/index_all.php?downloadsa=11 Binary (De-)Compiler] | * [http://www.gta.ocram-net.de/index_all.php?downloadsa=11 Binary (De-)Compiler], by ocram88 | ||
== Reference == | |||
<references /> | |||
== External links == | |||
[ | * [http://www.gtaforums.com/index.php?showtopic=202532 Documentation of San Andreas IPL file format] | ||
[ | * [http://www.gtaforums.com/index.php?showtopic=118193 GTA III/Vice City mapping formats] | ||