Jump to content

Item Definition: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
:''Main page at [http://www.gtamodding.com/index.php?title=Item_Definition GTAModding.com]''
: ''Main page at [http://www.gtamodding.com/index.php?title=Item_Definition GTAModding.com]''
{{IdeSection
{{IdeSection
| noheader = 1
| noheader = 1
}}
}}
'''Item definition''' files, usually identified by the file extension <code>.ide</code>, are used to declare many different aspects for the map system or to specify special behaviour rules for one of the aspects. They are stored in plain text format, so that they can be opened by any text editing program (like [[Wikipedia:Notepad|Notepad]]), but there are also some tools to simplify editing.
 
'''Item definition''' files, usually identified by the file extension <code>.ide</code>, are used to declare many different aspects for the map system or to specify special behavior rules for one of the aspects. They are stored in plain text format, so that they can be opened by any text editing program (like [[wp:Notepad|Notepad]]), but there are also some tools to simplify editing.


== Overview ==
== Overview ==
Line 9: Line 10:


=== Format and syntax description ===
=== Format and syntax description ===
The basic structure of the different sections is pretty simple. Each section starts with a four-character section identifier indicating how the content of the section gets interpreted by the game. The identifier is followed by the definition entries. Each entry takes one line and every line follows certain rules which are described in the articles handling the sections in detail (see below). However, lines can also be empty or commented. If so, they get ignored by the games' parser. The end of every section are indicated by the terminating string "end". Both (section identifier and terminating string) are not case sensitive, but by default they are written in lower case.


The basic structure of the different sections is pretty simple. Each section starts with a four-character section identifier indicating how the content of the section gets interpreted by the game. The identifier is followed by the definition entries. Each entry takes one line and every line follows certain rules which are described in the articles handling the sections in detail (see below). However lines can also be empty or commented. If so they get ignored by the games' parser. The end of every section are indicated by the terminating string "end". Both (section identifier and terminating string) are not case sensitive, but by default they are written in lower case.
Comments are usually indicated by the character <code>#</code> (number sign). It is possible to add comments to the end of a line, but breaking the line format for the current section using comments may cause the game to crash during loading. It is recommended that a comment be placed on a separate line. Comments can also be placed outside of sections.


Comments are usually indicated by the character <code>#</code> (number sign). It is possible to add comments to the end of a line, but breaking the line format for the current section using comments may cause the game to crash during loading. It is recommended that a comment should be placed on a separate line. Comments can also be placed outside of sections.
Lines itself are always formatted in the same way differing only in the number of their parameters describing the semantical content of the line. Parameters are usually separated by the character <code>,</code> (comma). [[wp:Whitespace character|Whitespace characters]] at the beginning or the end of an parameter get trimmed, but they are usually used to give the content a more clear structure to make it more easier to read for humans. Strings can be encased by the character <code>"</code> (quotation mark), but this is optional and rarely used by default. Also the games' parser uses an invariant culture to parse numerical values and strings. Which means strings are [[Wikipedia:ASCII|ASCII]] encrypted and the decimal separator is <code>.</code> (period).
 
Lines itself are always formatted in the same way differing only in the number of their parameters describing the semantical content of the line. Parameters are usually separated by the character <code>,</code> (comma). [[wp:Whitespace_character|Whitespace characters]] at the beginning or the end of an parameter get trimmed but they are usually used to give the content a more clear structure to make it more easier to read for human. Strings can be encased by the character <code>"</code> (quotation mark), but this is optional and rarely used by default. Also the games' parser uses an invariant culture to parse numerical values and strings. Which means strings are [[Wikipedia:ASCII|ASCII]] encrypted and the decimal separator is <code>.</code> (period).


==== Section example ====
==== Section example ====
  objs
  objs
  ...
  ...
Line 23: Line 22:


=== Sections ===
=== Sections ===
The following table contains basic information about all known sections. For additional information read the articles itself.
The following table contains basic information about all known sections. For additional information read the articles itself.


{| class="wikitable"
{| class="wikitable"
!width="120px"|Identifier
! width="120px"| Identifier
!width="100px"|Supported games
! width="100px"| Supported games
!Description
! Description
|-
|-
|<center>[[OBJS]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Most important section: defines objects for the map.<br>Those objects get placed inside the [[INST]] section of the [[Item Placement|item placement files]].
| <center>[[OBJS]]</center >|| <center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center> || Most important section: defines objects for the map.<br>Those objects get placed inside the [[INST]] section of the [[Item Placement|item placement files]].
|-
|-
|<center>[[TOBJ]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Basicly does the same as ''OBJS'', but it has two additional parameters defining the ingame time range the object can get rendered.<br>Those objects get placed inside the ''INST'' section of the ''item placement files''.
| <center>[[TOBJ]]</center> || <center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center> || Basicly does the same as ''OBJS'', but it has two additional parameters defining the ingame time range the object can get rendered.<br>Those objects get placed inside the ''INST'' section of the ''item placement files''.
|-
|-
|<center>[[ANIM]]</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||Basicly does the same as ''OBJS'', but it has one additional parameter identicating an [[IFP]] or [[WAD]] animation file to assign an animation to the object.<br>Those objects get placed inside the ''INST'' section of the ''item placement files''.
| <center>[[ANIM]]</center> || <center>{{Icon|SA}} {{Icon|4}}</center> || Basicly does the same as ''OBJS'', but it has one additional parameter identicating an [[IFP]] or [[WAD]] animation file to assign an animation to the object.<br>Those objects get placed inside the ''INST'' section of the ''item placement files''.
|-
|-
|<center>[[PEDS]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Used to define ''"pedestrians"'' (Random [[wikipedia:Non-player_character|NPC's]]).
| <center>[[PEDS]]</center> || <center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center> || Used to define ''"pedestrians"'' (Random [[wikipedia:Non-player_character|NPC's]]).
|-
|-
|<center>[[WEAP]]</center>||<center>{{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Used to define weapons.
| <center>[[WEAP]]</center> || <center>{{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center> || Used to define weapons.
|-
|-
|<center>[[CARS_(IDE_Section)|CARS]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Used to define vehicles.
| <center>[[CARS_(IDE_Section)|CARS]] </center> || <center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center> || Used to define vehicles.
|-
|-
|<center>[[HIER]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Partly unknown. Used to define objects for interactions with [[actor|actors]] for example in cutscenes.
| <center>[[HIER]]</center> || <center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center> || Partly unknown. Used to define objects for interactions with [[actor|actors]] for example in cutscenes.
|-
|-
|<center>[[TXDP]]</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||Used to virtually extend [[TXD|texture dictionaries]].
| <center>[[TXDP]]</center> || <center>{{Icon|SA}} {{Icon|4}}</center> || Used to virtually extend [[TXD|texture dictionaries]].
|-
|-
|<center>[[2DFX]]</center>||<center>{{Icon|3}} {{Icon|VC}}</center>||Used to add particles to objects, defined in one of the sections above (except ''TXDP'').
| <center>[[2DFX]]</center> || <center>{{Icon|3}} {{Icon|VC}}</center> || Used to add particles to objects, defined in one of the sections above (except ''TXDP'').
|-
|-
|<center>[[PATH_(IDE_Section)|PATH]]</center>||<center>{{Icon|3}}</center>||Used to create waypoints for random NPC spawns ([[Paths]]).
| <center>[[PATH_(IDE_Section)|PATH]]</center> || <center>{{Icon|3}}</center> || Used to create waypoints for random NPC spawns ([[Paths]]).
|-
|-
|<center>[[TREE]]</center>||<center>{{Icon|4}}</center>||&ndash;
| <center>[[TREE]]</center> || <center>{{Icon|4}}</center> || &ndash;
|-
|-
|<center>[[TANM]]</center>||<center>{{Icon|4}}</center>||Used to combine ''TOBJ'' and ''ANIM'' sections.<br>Those objects get placed inside the ''INST'' section of the ''item placement files''.
| <center>[[TANM]]</center> || <center>{{Icon|4}}</center> || Used to combine ''TOBJ'' and ''ANIM'' sections.<br>Those objects get placed inside the ''INST'' section of the ''item placement files''.
|-
|-
|<center>[[MLO]]</center>||<center>{{Icon|4}}</center>||Used to create [[interior]]s. This section does also contain information about the entrace markers (previous [[ENEX]] connections) and dimensions of the interior which influences certain aspects, like the weather, for example. All objects are placed relative to an offset placed using [[MLO+]] inside the [[IPL]] or [[WPL]] file.
| <center>[[MLO]]</center> || <center>{{Icon|4}}</center> || Used to create [[interior]]s. This section does also contain information about the entrace markers (previous [[ENEX]] connections) and dimensions of the interior which influences certain aspects, like the weather, for example. All objects are placed relative to an offset placed using [[MLO+]] inside the [[IPL]] or [[WPL]] file.
|-
|-
|<center>[[AMAT]]</center>||<center>{{Icon|4}}</center>||&ndash;
| <center>[[AMAT]]</center> || <center>{{Icon|4}}</center> || &ndash;
|}
|}


== IDE Flags ==
== IDE Flags ==
Flags are used in order to specify the behaviour of objects. They are interpreted as signed 32-bit integer values where each bit describes a [[wp:Boolean_algebra_(logic)|boolean]] value of a different aspect. The following table shows the standard flags used for objects defined in ''OBJS'', ''TOBJ'' and ''ANIM'' section.


Flags are used in order to specify the behaviour of objects. They are interpreted as signed 32-bit integer values where each bit describes a [[wp:Boolean_algebra_(logic)|boolean]] value of a different aspect. The following table shows the standard flags used for objects defined in ''OBJS'', ''TOBJ'' and ''ANIM'' section.
{| width="100%" class="wikitable"
{|width="100%" class="wikitable"
! width="120px"| Flag
!width="120px"|Flag
! width="100px"| Supported games
!width="100px"|Supported games
! width="25%"| Binary
!width="25%"|Binary
! Description
!Description
|-
|-
|<center>-1</center>||<center>&ndash;</center>||<center><code>1111 1111 1111 1111 1111 1111</code></center>||Enables all flags. <ref>[[wp:Two%27s_complement|Two's complement]]</ref> Never used by default.
| <center>-1</center> || <center>&ndash;</center> || <center><code>1111 1111 1111 1111 1111 1111</code></center> || Enables all flags. <ref>[[wp:Two%27s_complement|Two's complement]]</ref> Never used by default.
|-
|-
|<center>1</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0001</code></center>||Wet effect (objects appear darker).
| <center>1</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 0000 0001</code></center> || Wet effect (objects appear darker).
|-
|-
|<center>2</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0010</code></center>||Indicates that the object gets rendered at night for objects defined in ''TOBJ''.
| <center>2</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 0000 0010</code></center> || Indicates that the object gets rendered at night for objects defined in ''TOBJ''.
|-
|-
|<center>4</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0100</code></center>||Alpha transparency 1
| <center>4</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 0000 0100</code></center> || Alpha transparency 1
|-
|-
|<center>8</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 1000</code></center>||Alpha transparency 2
| <center>8</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 0000 1000</code></center> || Alpha transparency 2
|-
|-
|<center>16</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0001 0000</code></center>||Opposite to flag '''2'''
| <center>16</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 0001 0000</code></center> || Opposite to flag '''2'''
|-
|-
|<center>32</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0010 0000</code></center>||Indicates an object to be used inside an interior.
| <center>32</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 0010 0000</code></center> || Indicates an object to be used inside an interior.
|-
|-
|<center>64</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0100 0000</code></center>||Disables the [[COLL#Shadow_Mesh|shadow mesh]] to project a shadow.
| <center>64</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 0100 0000</code></center> || Disables the [[COLL#Shadow_Mesh|shadow mesh]] to project a shadow.
|-
|-
|<center>128</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 1000 0000</code></center>||Object surface will not be [[Wikipedia:Hidden_surface_determination|culled]].
| <center>128</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0000 1000 0000</code></center> || Object surface will not be [[Wikipedia:Hidden_surface_determination|culled]].
|-
|-
|<center>256</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0001 0000 0000</code></center>||Disables draw distance (Only used for [[LOD]] objects with an ''LOD'' value greater than 299).
| <center>256</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0001 0000 0000</code></center> || Disables draw distance (Only used for [[LOD]] objects with an ''LOD'' value greater than 299).
|-
|-
|<center>512</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0010 0000 0000</code></center>||Object is breakable (like glass &ndash; additional parameters defined inside the [[object.dat]] file, otherwise there is no effect).
| <center>512</center> || <center>{{Icon|trilogy}} {{Icon|4}}</center> || <center><code>0000 0000 0000 0010 0000 0000</code></center> || Object is breakable (like glass &ndash; additional parameters defined inside the [[object.dat]] file, otherwise there is no effect).
|-
|-
|<center>1024</center>||<center>{{Icon|trilogy}}{{Icon|4}}</center>||<center><code>0000 0000 0000 0100 0000 0000</code></center>||Similar to flag '''512''': object first cracks on a strong collision, then it breaks (does also require ''object.dat'' registration).
| <center>1024</center> || <center>{{Icon|trilogy}}{{Icon|4}}</center> || <center><code>0000 0000 0000 0100 0000 0000</code></center> || Similar to flag '''512''': object first cracks on a strong collision, then it breaks (does also require ''object.dat'' registration).
|-
|-
|<center>2048</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 1000 0000 0000</code></center>||Indicates an object as an garage door (for more information see [[GRGE#Types_of_doors|GRGE]] &ndash; requires ''object.dat'' registration).
| <center>2048</center> || <center>{{Icon|SA}} {{Icon|4}}</center> || <center><code>0000 0000 0000 1000 0000 0000</code></center> || Indicates an object as an garage door (for more information see [[GRGE#Types_of_doors|GRGE]] &ndash; requires ''object.dat'' registration).
|-
|-
|<center>4096</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0001 0000 0000 0000</code></center>||Indicates an [[RenderWare_binary_stream_file|multiclump]] object (Object switches from clump ''2'' to clump ''1'' after collision &ndash; requires ''object.dat'' registration).
| <center>4096</center> || <center>{{Icon|SA}} {{Icon|4}}</center> || <center><code>0000 0000 0001 0000 0000 0000</code></center> || Indicates an [[RenderWare_binary_stream_file|multiclump]] object (Object switches from clump ''2'' to clump ''1'' after collision &ndash; requires ''object.dat'' registration).
|-
|-
|<center>32768</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 1000 0000 0000 0000</code></center>||Uses object brightness from the current weather definition (See [[timecyc.dat]] &ndash; ''PoleShd'').
| <center>32768</center> || <center>{{Icon|SA}} {{Icon|4}}</center> || <center><code>0000 0000 1000 0000 0000 0000</code></center> || Uses object brightness from the current weather definition (See [[timecyc.dat]] &ndash; ''PoleShd'').
|-
|-
|<center>65536</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0001 0000 0000 0000 0000</code></center>||Object explodes after getting hit (requires ''object.dat'' registration).
| <center>65536</center> || <center>{{Icon|SA}} {{Icon|4}}</center> || <center><code>0000 0001 0000 0000 0000 0000</code></center> || Object explodes after getting hit (requires ''object.dat'' registration).
|-
|-
|<center>131072</center>||<center>{{Icon|SA}}</center>||<center><code>0000 0010 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently some flag for the [[SCM|Script]].
| <center>131072</center> || <center>{{Icon|SA}}</center> || <center><code>0000 0010 0000 0000 0000 0000</code></center> || Unknown &ndash; apparently some flag for the [[SCM|Script]].
|-
|-
|<center>262144</center>||<center>{{Icon|SA}}</center>||<center><code>0000 0100 0000 0000 0000 0000</code></center>||Unknown &ndash; only used 1 time in [[Grand Theft Auto: San Andreas|San Andreas]].
| <center>262144</center> || <center>{{Icon|SA}}</center> || <center><code>0000 0100 0000 0000 0000 0000</code></center> || Unknown &ndash; only used 1 time in [[Grand Theft Auto: San Andreas|San Andreas]].
|-
|-
|<center>1048576</center>||<center>{{Icon|SA}}</center>||<center><code>0000 1000 0000 0000 0000 0000</code></center>||Object will switch from clump ''2'' to clump ''1'' after getting sprayed by the player (graffity flag).
| <center>1048576</center> || <center>{{Icon|SA}}</center> || <center><code>0000 1000 0000 0000 0000 0000</code></center> || Object will switch from clump ''2'' to clump ''1'' after getting sprayed by the player (graffity flag).
|-
|-
|<center>2097152</center>||<center>{{Icon|SA}}</center>||<center><code>0001 0000 0000 0000 0000 0000</code></center>||Disables backface culling &ndash; as an result the texture will be drawed on both sides of the model (Always enabled for GTA III and [[Grand Theft Auto: Vice City|Vice City]])
| <center>2097152</center> || <center>{{Icon|SA}}</center> || <center><code>0001 0000 0000 0000 0000 0000</code></center> || Disables backface culling &ndash; as an result the texture will be drawed on both sides of the model (Always enabled for GTA III and [[Grand Theft Auto: Vice City|Vice City]])
|-
|-
|<center>4194304</center>||<center>{{Icon|SA}}</center>||<center><code>0010 0000 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently related into physics.
| <center>4194304</center> || <center>{{Icon|SA}}</center> || <center><code>0010 0000 0000 0000 0000 0000</code></center> || Unknown &ndash; apparently related into physics.
|-
|-
|colspan="4" style="text-align: right;" |<span class="plainlinks" style="font-size: 10px;">[http://www.gtamodding.com/index.php?title=Template:Object-Flags&action=edit edit]</span>
| colspan="4" style="text-align: right;" | <span class="plainlinks" style="font-size: 10px;">[http://www.gtamodding.com/index.php?title=Template:Object-Flags&action=edit edit]</span>
|}
|}


Line 117: Line 115:


== Difference between GTA III and GTA IV engines ==
== Difference between GTA III and GTA IV engines ==
[[Grand Theft Auto IV]] not only uses different formats to the previous games, it also does not use IDs to identify objects anymore. While [[Grand Theft Auto III]] era games use an ID as an index inside an array of definitions, GTA IV uses the hashes of the model name as a key inside a hash table. For more information about this see [[Map System]].
[[Grand Theft Auto IV]] not only uses different formats to the previous games, it also does not use IDs to identify objects anymore. While [[Grand Theft Auto III]] era games use an ID as an index inside an array of definitions, GTA IV uses the hashes of the model name as a key inside a hash table. For more information about this see [[Map System]].


== Tools ==
== Tools ==
* [[KEd]] &ndash; By JernejL
* [[KEd]] &ndash; By JernejL
* [[MEd]] &ndash; By Tonywob
* [[MEd]] &ndash; By Tonywob
Line 129: Line 125:


== See also ==
== See also ==
* [[Item placement]]
* [[Item placement]]
* [[Map System]]
* [[Map System]]
Line 138: Line 133:


== External links ==
== External links ==
* [http://www.gtaforums.com/index.php?showtopic=102833 GTAVC IDE Definitions] - topic by ODIE covering specific details of IDE files in GTA VC
* [http://www.gtaforums.com/index.php?showtopic=102833 GTAVC IDE Definitions] - topic by ODIE covering specific details of IDE files in GTA VC
* [http://www.gtaforums.com/index.php?showtopic=118193 GTA3/VC Map File Documentation and Troubleshooting] - topic by Opius covering general features of IDE files in GTA3 and GTA VC
* [http://www.gtaforums.com/index.php?showtopic=118193 GTA3/VC Map File Documentation and Troubleshooting] - topic by Opius covering general features of IDE files in GTA3 and GTA VC
Line 144: Line 138:


{{fdl}}
{{fdl}}
{{modding}}


{{modding}}
[[Category:Map Formats]]
[[Category:Map Formats]]
[[Category:GTA III Modifications]]
[[Category:GTA III Modifications]]
[[Category:GTA Vice City]]
[[Category:GTA Vice City]]
[[Category:Modifications]]
[[Category:Modifications]]
1,184

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.