Item Definition: Difference between revisions

m (moved Item Definition to IDE)
No edit summary
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{cleanup}}
:''Main page at [http://www.gtamodding.com/index.php?title=Item_Definition GTAModding.com]''
{{IdeSection
{{IdeSection
| noheader = 1
| noheader = 1
}}
}}
'''Item definition''' files, known by the extension '''.ide''', are usually used to assign a model and texture file to a unique object ID, along with many parameters depending on the section. These files are in human readable text format, and allow the # character to comment lines out. IDE files can easily be opened and edited using any text-editing program like [[Wikipedia:Notepad|Notepad]].
'''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.


==Structure==
== Overview ==
The .ide files are split up into many sections. How many of them you use in your file is optional, they can even be empty. Each section starts with a section identifier and ends with the keyword "end", both in a single line.
The ''item definition'' files are split up into several sections. There is no order on how you arrange the sections. Also you do not need to use all the sections in a file.


Example:
=== Format and syntax description ===
objs
...
end


===OBJS===
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.
Used to define standard static map objects.


''GTA III, VC and SA format''
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.
ID, ModelName, TextureName, ObjectCount, DrawDist, [DrawDist2, ...], Flags


{| width="100%" class="prettytable collapsible collapsed"
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).
!width="250px"|Identifier
!Description
|-
|<center>ID</center>||unique object ID (integer)
|-
|<center>ModelName</center>||name of the .dff [[model file]], without extension (string)
|-
|<center>TextureName</center>||name of the .txd [[texture dictionary]], without extension (string)
|-
|<center>ObjectCount</center>||amount of sub objects, e.g. damaged parts, usually 1 (integer) - '''''optional for SA, default 1'''''
|-
|<center>DrawDist</center>||[[draw distance]] in [[unit]]s, one for each sub object (float)
|-
|<center>Flags</center>||[[OBJS#Object Flags|object flags]], defining special behavior, default 0 (integer)
|}


''GTA IV format''
==== Section example ====


  ModelName, TextureName, DrawDistance, Flag1, Flag2, (Bounds min)X,Y,Z, (Bounds max)X,Y,Z, (Bounds Sphere)X, Y, Z, Radius, WDD
  objs
...
end


Note that GTA IV does not use any unique object ID numbers
=== Sections ===


{| width="100%" class="prettytable collapsible collapsed"
The following table contains basic information about all known sections. For additional information read the articles itself.
!width="250px"|Identifier
!Description
|-
|<center>ModelName</center>||name of the .wdr [[model file]], without extension (string)
|-
|<center>TextureName</center>||name of the .wtd [[texture dictionary]], without extension (string)
|-
|<center>DrawDistance</center>||[[draw distance]] in [[unit]]s, one for each sub object (float)
|-
|<center>Flag1</center>||object flag, defining special behavior
|-
|<center>Flag2</center>||object flag, defining special behavior, default 0 (integer)
|-
|<center>Bounds Min</center>||Lower Left vertex local position of a model bounding box
|-
|<center>Bounds Max</center>||Upper Right vertex local position of a model bounding box
|-
|<center>Radius</center>||Radius dimensions of the bounding Sphere
|-
|<center>WDD</center>||the model dictionary file that contains the LOD model for the defined Modelname
|}
 
===TOBJ===
Used to define timed map objects. All but the last two columns are the same as the OBJS section.
 
''GTA III, VC and SA format:''
ID, ModelName, TextureName, ObjectCount, DrawDist, [DrawDist2, ...], Flags, TimeOn, TimeOff


{| width="100%" class="prettytable collapsible collapsed"
{| class="wikitable"
!width="250px"|Identifier
!width="120px"|Identifier
!width="100px"|Supported games
!Description
!Description
|-
|-
|<center>ID</center>||unique object ID (integer)
|<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>ModelName</center>||name of the .dff [[model file]], without extension (string)
|-
|-
|<center>TextureName</center>||name of the .txd [[texture dictionary]], without extension (string)
|<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>ObjectCount</center>||amount of sub objects, e.g. damaged parts, usually 1 (integer) - '''''optional for SA, default 1'''''
|<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>DrawDist</center>||[[draw distance]] in [[unit]]s, one for each sub object (float)
|<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>Flags</center>||object flags, defining special behavior, default 0 (integer)
|<center>[[WEAP]]</center>||<center>{{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Used to define weapons.
|-
|-
|<center>TimeOn</center>||activation time in game hours (integer)
|<center>[[CARS_(IDE_Section)|CARS]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Used to define vehicles.
|-
|-
|<center>TimeOff</center>||deactivation time in game hours (integer)
|<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.
|}
 
''GTA IV format''
 
ModelName, TextureName, DrawDist, Flag1, Flag2, (Bounds min)X,Y,Z, (Bounds max)X,Y,Z, (Bounds Sphere)X,Y,Z, Radius, WDD, NightFlag
 
Note that GTA IV does not use any unique object ID numbers.
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
|-
|<center>ModelName</center>||name of the .wdr [[model file]], without extension (string)
|-
|<center>TextureName</center>||name of the .wtd [[texture dictionary]], without extension (string)
|-
|-
|<center>DrawDistance</center>||[[draw distance]] in [[unit]]s, one for each sub object (float)
|<center>[[TXDP]]</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||Used to virtually extend [[TXD|texture dictionaries]].
|-
|-
|<center>Flag1</center>||object flag, defining special behavior
|<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>Flag2</center>||object flag, defining special behavior, default 0 (integer)
|<center>[[PATH_(IDE_Section)|PATH]]</center>||<center>{{Icon|3}}</center>||Used to create waypoints for random NPC spawns ([[Paths]]).
|-
|-
|<center>Bounds Min</center>||Lower Left vertex local position of a model bounding box
|<center>[[TREE]]</center>||<center>{{Icon|4}}</center>||&ndash;
|-
|-
|<center>Bounds Max</center>||Upper Right vertex local position of a model bounding box
|<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>Radius</center>||Radius dimensions of the bounding Sphere
|<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>WDD</center>||the model dictionary file that contains the LOD model for the defined Modelname
|<center>[[AMAT]]</center>||<center>{{Icon|4}}</center>||&ndash;
|-
|<center>NightFlag</center>||assumed to be hardcoded time flags
|}
|}


===ANIM===
== IDE Flags ==
'''Animated Map Objects''', used to define objects whose sub objects are animated. Note: There must be animation frames for each sub object, also the collision model remains static - no solid animations.


''GTA SA only:''
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.
ID, ModelName, TextureName, AnimName, DrawDist, Flags
{|width="100%" class="wikitable"
;ID, ModelName, TextureName, DrawDist, Flags: same as for the OBJS section
!width="120px"|Flag
;AnimName: name of the [[IFP|animation archive]], without extension (string)
!width="100px"|Supported games
 
!width="25%"|Binary
''GTA IV format''
 
ModelName, TextureName, Wad, DrawDist, Flag1, Flag2, (Bounds min)X,Y,Z, (Bounds max)X,Y,Z, (Bounds Sphere)X,Y,Z, Radius, WDD
 
;ModelName, TextureName, DrawDistance, Flags, Bounds min, Bounds max, Bounds Sphere X,Y,Z, Radius, WDD: same as for the OBJS section
 
;Wad: name of the (.wad) animation archive, without extension (string)
 
===PEDS===
Used to define characters and pedestrians
 
''GTA III format:''
ID, ModelName, TxdName, Threat, Behavior, AnimationType, VehClass
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
!Description
|-
|-
|<center>ID</center>||Unique model ID
|<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>ModelName</center>||Name of the .dff [[model file]], without extension
|-
|<center>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
|-
|-
|<center>Threat</center>||The threat of the ped as defined in the ped.dat file
|<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>Behavior</center>||The behavior of the ped as defined in the pedstats.dat file
|<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>AnimationType</center>||The type of animation being used on the ped for movements
|<center>4</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0100</code></center>||Alpha transparency 1
|-
|-
|<center>VehClass</center>||The class of vehicle that the ped will drive<br>The value is in hex! It needs to be converted into decimal and back
|<center>8</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 1000</code></center>||Alpha transparency 2
|}
 
''Vice City format''
ID, ModelName, TxdName, Threat, Behavior, AnimationType, VehClass, StartAnimation?, Radio1, Radio2
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
|-
|-
|<center>ID</center>||Unique model ID
|<center>16</center>||<center>{{Icon|trilogy}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0001 0000</code></center>||Opposite to flag '''2'''
|-
|-
|<center>ModelName</center>||Name of the .dff [[model file]], without extension
|<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>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
|<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>Threat</center>||The threat of the ped as defined in the ped.dat file
|<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>Behavior</center>||The behavior of the ped as defined in the pedstats.dat file
|-
|<center>AnimationType</center>||The type of animation being used on the ped for movements
|-
|<center>VehClass</center>||The class of vehicle that the ped will drive<br>The value is in hex! It needs to be converted into decimal and back
|-
|<center>Radio1, Radio2</center>||Ped's preferred radio station
|}
 
===WEAP===
''GTA III and VC format:''
ID, ModelName, TextureName, Animation, ?, DrawDistance, ?
;Animation: From ped.ifp, animation used to wield and shoot the weapon
 
===CARS===
Used to define vehicles
 
''GTA III formats''
 
''Car''
ID, ModelName, TxdName, Type, HandlingID, GameName, Class, Frequency, Level, Comprules, WheelID, WheelScale
 
''Boat and Train''
ID, ModelName, TxdName, Type, HandlingID, GameName, Class, Frequency, Level, Comprules
 
''Plane''
ID, ModelName, TxdName, Type, HandlingID, GameName, Class, Frequency, Level, Comprules, LODModel
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
|-
|-
|<center>ID</center>||Unique model ID
|<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>ModelName</center>||Name of the .dff [[model file]], without extension
|<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>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
|<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>Type</center>||Type of vehicle, which includes ''car'', ''boat'', ''train'', and ''plane''<br>This data is related to hardcoded functions and must not be changed or else it might crash the game
|<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>HandlingID</center>||Name corresponding to its handling data in the [[handling.cfg]] file
|<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>GameName</center>||Name corresponding to its [[GXT]] entry, case sensitive and must be seven characters or less!<br>Invalid name will show up as ''NAME missing''
|<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>Class</center>||Class of the vehicle
|<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>Frequency</center>||Frequency of the vehicle spawning randomly on the streets
|<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>Level</center>||unknown
|<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>Comprules</center>||unknown
|<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>WheelID</center>||ID number of wheel model<br>Only available for type ''car'', has no effect if used on type ''boat''
|<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>WheelScale</center>||Scale of wheel and [[Collision File|collision]] models, 1.0 for original size of wheel and collision models<br>Only available for type ''car'', has no effect if used on type ''boat''
|<center>4194304</center>||<center>{{Icon|SA}}</center>||<center><code>0010 0000 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently related into physics.
|-
|-
|<center>LODModel</center>||ID number of LOD model, can be any valid vehicle model<br>Only available for type ''plane''
|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>
|}
|}


''Vice City formats''
For flags defining different aspects of different definitions read the articles about their sections.


''Car''
== Difference between GTA III and GTA IV engines ==
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, WheelID, WheelScale


''Bike''
[[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]].
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, Unknown, WheelScale


''Boat and Heli''
== Tools ==
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules


''Plane''
* [[KEd]] &ndash; By JernejL
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, LODModel
* [[MEd]] &ndash; By Tonywob
* [http://www.gtagarage.com/mods/show.php?id=4817 IDEditor] &ndash; By Xmen
* [http://www.gtaforums.com/index.php?showtopic=402942 IDE-IV in GTA-IV script centre] &ndash; by Gforce
* [http://www.aschratt.com/fileview.php?file=1004 FlagValue Calculator] &ndash; By Aschratt - Calculates all flagvalues (even those unknown).


{| width="100%" class="prettytable collapsible collapsed"
== See also ==
!width="250px"|Identifier
!Description
|-
|<center>ID</center>||Unique model ID
|-
|<center>ModelName</center>||Name of the .dff [[model file]], without extension
|-
|<center>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
|-
|<center>Type</center>||Type of vehicle, which includes ''car'', ''bike'', ''boat'', ''plane'', and ''heli''; flyable helicopters are type ''car''
|-
|<center>HandlingID</center>||Name corresponding to its handling data in the [[handling.cfg]] file.
|-
|<center>GameName</center>||Name corresponding to its [[GXT]] entry, case sensitive and must be seven characters or less!<br>Invalid name will not show up in the game
|-
|<center>Anims</center>||Appropriate animation file mainly used on bikes
|-
|<center>Class</center>||Class of the vehicle
|-
|<center>Frequency</center>||Frequency of the vehicle spawning randomly on the streets
|-
|<center>Level</center>||unknown
|-
|<center>Comprules</center>||unknown
|-
|<center>WheelID</center>||ID number of wheel model<br>Only available for type ''car'', has no effect if used on type ''boat''
|-
|<center>WheelScale</center>||Scale of wheel and [[Collision File|collision]] models for type ''car'', scale of wheel collision model for type ''bike'', 1.0 for original size of wheel and collision models<br>Only available for types ''car'' and ''bike'', has no effect if used on type ''boat''
|-
|<center>LODModel</center>||ID number of LOD model, can be any valid vehicle model<br>Only available for type ''plane''
|}
 
''SA Format comming soon''
 
===HIER===
 
''SA Format only''
 
This is (e.g.) used in default.ide in the 'data\'-folder
Normal structure is like this:
 
  ID, model, texture, null, float (normally 2000.00)
 
The meaning of these lines isn't known yet, but it seems to be a kind of bodyparts for the player.
 
===TXDP===
;Texture Archive Parent
''SA and GTA 4 format''
TextureName, TextureParentName
Both parameters are names of texture archives (<code>.txd</code>). The second archive (the "parent") virtually extends the first one. Practically, the game looks up a texture in the primary archive, and if it's not there and a parent txd has been assigned, it checks for the texture in the parent archive. This way shared archives can be created, which contain often used textures, without the need to create duplicates or split up a model just for that purpose.
 
===2DFX===
Used to place lights, particles, and ped behaviors on objects
 
''GTA III and VC format''
 
''Type 0: Lights''
ID, X, Y, Z, R, G, B, unknown (0 or 200), 1, Corona, Shadow, Distance, Outer range, Size, Inner range, IDE flag, Wet, Flare, Dust
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
|-
|<center>ID</center>||associated to existing object ID defined in [[OBJS]] section
|-
|<center>X, Y, Z</center>||X, Y, and Z coordinates relative to the center of the object
|-
|<center>R, G, B</center>||color of the light and everything associated it in RGB format
|-
|<center>Corona</center>||corona associated to the light defined in <code>particle.txd</code>, usually "coronastar" for lighta
|-
|<center>Shadow</center>||shadow associated to the light?, usually "shad_exp"
|-
|<center>Distance</center>||view distance of the light, is limited by the draw distance of the host object
|-
|<center>Outer range</center>||the range the light can cast on objects, cars, and peds
|-
|<center>Size</center>||the size of the corona, can be a float or integer, size 0 means no visible corona but effect of light still visible
|-
|<center>Inner range</center>||the range the light can cast on the ground
|-
|<center>IDE flag</center>||IDE flag, only the time-dependent flags are useable
|-
|<center>Flash</center>||sets the [[2DFX#Types of Flashes|type of flashing]]
|-
|<center>Wet</center>||sets the particle to be "reflective" on wet grounds
|-
|<center>Flare</center>||sets the particle to create a lens flare on the screen, similar to what the sun does<br>0 - no lens flare, 1 - lens flare effect
|-
|<center>Dust</center>||sets the intensity of light reflecting off dust, values 4 to 7 have visible effects
|}
 
''Type 1: Particle''
ID, X, Y, Z, R, G, B, unknown (63 or 200), 2, Particle, unk1, unk2, unk3, Size
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
|-
|<center>ID</center>||associated to existing object ID defined in [[OBJS]] section
|-
|<center>X, Y, Z</center>||X, Y, and Z coordinates relative to the center of the object
|-
|<center>R, G, B</center>||useless values
|-
|<center>Particle</center>||[[2DFX#Types of Particles|particle type]]
|-
|<center>Size</center>||the size of the particle
|}
 
''Type 3: Peds (Vice City only)''
ID, X, Y, Z, R, G, B, unknown (200), 3, Behavior, unk1, unk2, unk3, RotX, RotY, RotZ
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
|-
|<center>ID</center>||associated to existing object ID defined in [[OBJS]] section
|-
|<center>X, Y, Z</center>||X, Y, and Z coordinates relative to the center of the object
|-
|<center>R, G, B</center>||useless values
|-
|<center>Animation</center>||[[2DFX#Types of Behaviors|behavior type]]
|-
|<center>unk1, unk2, unk3</center>||unknown, useless values?
|-
|<center>RotX, RotY, RotZ</center>||rotation of ped when animation is playing
|}
 
''Type 4: Sun Reflections (Vice City only)''
ID, X, Y, Z, R, G, B, unknown (120), 4
 
{| width="100%" class="prettytable collapsible collapsed"
!width="250px"|Identifier
!Description
|-
|<center>ID</center>||associated to existing object ID defined in [[OBJS]] or [[TOBJ]] section
|-
|<center>X, Y, Z</center>||X, Y, and Z coordinates relative to the center of the object
|-
|<center>R, G, B</center>||useless values
|}
 
Please note that the 2dfx Section is moved to the DFF Files by using R*'s custom section IDs in SA!
 
Please also note that the 2dfx Lights Section is present within GTA-IV [[WDR]] map models
 
===PATH===
'''Ped and Car Paths''', defines paths relative to the objects. Only used in ''GTA III'', quite complicated format and hardly usable without a editing program (such as [[Ked]]).
 
===TREE===
''GTA4 only''
 
===TANM===
''GTA4 only''


===MLO===
* [[Item placement]]
''GTA4 only''
* [[Map System]]
* [[Dynamic Object]]


===AMAT===
== References ==
''GTA4 only''
<references />


Modelname, Flag1, Flag2
== External links ==


==Procobj.ide==
* [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
===OBJS===
 
''GTA IV format''
 
ModelName, TextureName, DrawDistance, Flag1, Flag2, (Bounds min)X, Y, Z, (Bounds max)X, Y, Z, (Bounds Sphere)X,Y,Z, Radius, WDD
 
;ModelName: name of the .wdr [[model file]], without extension (string)
;TextureName: set to 'null' by default in procobj.ide
;DrawDistance: [[draw distance]] in [[unit]]s, one for each sub object (float)
;Flag1: object flag, defining special behavior
;Flag2: object flag, defining special behavior, default 0 (integer)
;Bounds Min: Lower Left vertex of a model bounding box
;Bounds Max: Upper Right vertex of a model bounding box
;Bounds Sphere: X,Y,Z Coords
;Radius: Of Bounds Sphere
;WDD: set to 'null' by default in procobj.ide
 
==Tools==
* {{GTAG|4817|IDEditor}} - By {{U|Xmen}}
- by {{U|Gforce}}
* [http://www.aschratt.com/fileview.php?file=1004 FlagValue Calculator] - By {{U|Aschratt}} - Calculates all Flagvalues (even those unknown)
 
==External links==
* [http://gta-worldmods.t-n-network.de/forum/thread.php?threadid=3382 ID Flagvalue Decoding Project] - project to decode all missing flag values
* [http://gta-worldmods.t-n-network.de/forum/thread.php?threadid=3382 ID Flagvalue Decoding Project] - project to decode all missing flag values


{{fdl}}
{{fdl}}

Revision as of 22:48, 19 February 2011

Main page at GTAModding.com
Item Definition
IDE Sections:
2DFX AMAT ANIM CARS HIER MLO OBJS
PATH PEDS TANM TOBJ TREE TXDP WEAP

Item definition files, usually identified by the file extension .ide, 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 Notepad), but there are also some tools to simplify editing.

Overview

The item definition files are split up into several sections. There is no order on how you arrange the sections. Also you do not need to use all the sections in a file.

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.

Comments are usually indicated by the character # (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 , (comma). 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 " (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 ASCII encrypted and the decimal separator is . (period).

Section example

objs
...
end

Sections

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

Identifier Supported games Description
OBJS
GTA III GTA Vice City GTA San Andreas GTA IV
Most important section: defines objects for the map.
Those objects get placed inside the INST section of the item placement files.
TOBJ
GTA III GTA Vice City GTA San Andreas GTA IV
Basicly does the same as OBJS, but it has two additional parameters defining the ingame time range the object can get rendered.
Those objects get placed inside the INST section of the item placement files.
ANIM
GTA San Andreas GTA IV
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.
Those objects get placed inside the INST section of the item placement files.
PEDS
GTA III GTA Vice City GTA San Andreas GTA IV
Used to define "pedestrians" (Random NPC's).
WEAP
GTA Vice City GTA San Andreas GTA IV
Used to define weapons.
CARS
GTA III GTA Vice City GTA San Andreas GTA IV
Used to define vehicles.
HIER
GTA III GTA Vice City GTA San Andreas GTA IV
Partly unknown. Used to define objects for interactions with actors for example in cutscenes.
TXDP
GTA San Andreas GTA IV
Used to virtually extend texture dictionaries.
2DFX
GTA III GTA Vice City
Used to add particles to objects, defined in one of the sections above (except TXDP).
PATH
GTA III
Used to create waypoints for random NPC spawns (Paths).
TREE
GTA IV
TANM
GTA IV
Used to combine TOBJ and ANIM sections.
Those objects get placed inside the INST section of the item placement files.
MLO
GTA IV
Used to create interiors. 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.
AMAT
GTA IV

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 boolean value of a different aspect. The following table shows the standard flags used for objects defined in OBJS, TOBJ and ANIM section.

Flag Supported games Binary Description
-1
1111 1111 1111 1111 1111 1111
Enables all flags. [1] Never used by default.
1
GTA IV
0000 0000 0000 0000 0000 0001
Wet effect (objects appear darker).
2
GTA IV
0000 0000 0000 0000 0000 0010
Indicates that the object gets rendered at night for objects defined in TOBJ.
4
GTA IV
0000 0000 0000 0000 0000 0100
Alpha transparency 1
8
GTA IV
0000 0000 0000 0000 0000 1000
Alpha transparency 2
16
GTA IV
0000 0000 0000 0000 0001 0000
Opposite to flag 2
32
GTA IV
0000 0000 0000 0000 0010 0000
Indicates an object to be used inside an interior.
64
GTA IV
0000 0000 0000 0000 0100 0000
Disables the shadow mesh to project a shadow.
128
GTA IV
0000 0000 0000 0000 1000 0000
Object surface will not be culled.
256
GTA IV
0000 0000 0000 0001 0000 0000
Disables draw distance (Only used for LOD objects with an LOD value greater than 299).
512
GTA IV
0000 0000 0000 0010 0000 0000
Object is breakable (like glass – additional parameters defined inside the object.dat file, otherwise there is no effect).
1024
GTA IV
0000 0000 0000 0100 0000 0000
Similar to flag 512: object first cracks on a strong collision, then it breaks (does also require object.dat registration).
2048
GTA San Andreas GTA IV
0000 0000 0000 1000 0000 0000
Indicates an object as an garage door (for more information see GRGE – requires object.dat registration).
4096
GTA San Andreas GTA IV
0000 0000 0001 0000 0000 0000
Indicates an multiclump object (Object switches from clump 2 to clump 1 after collision – requires object.dat registration).
32768
GTA San Andreas GTA IV
0000 0000 1000 0000 0000 0000
Uses object brightness from the current weather definition (See timecyc.datPoleShd).
65536
GTA San Andreas GTA IV
0000 0001 0000 0000 0000 0000
Object explodes after getting hit (requires object.dat registration).
131072
GTA San Andreas
0000 0010 0000 0000 0000 0000
Unknown – apparently some flag for the Script.
262144
GTA San Andreas
0000 0100 0000 0000 0000 0000
Unknown – only used 1 time in San Andreas.
1048576
GTA San Andreas
0000 1000 0000 0000 0000 0000
Object will switch from clump 2 to clump 1 after getting sprayed by the player (graffity flag).
2097152
GTA San Andreas
0001 0000 0000 0000 0000 0000
Disables backface culling – as an result the texture will be drawed on both sides of the model (Always enabled for GTA III and Vice City)
4194304
GTA San Andreas
0010 0000 0000 0000 0000 0000
Unknown – apparently related into physics.
edit

For flags defining different aspects of different definitions read the articles about their sections.

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.

Tools

See also

References

External links

Copyrighted

This page is licensed under the GNU Free Documentation Licence. This page has a separate license to the CC-BY-SA that applies to most of Grand Theft Wiki.

The full text of the GNU FDL v1.2 is here. Click the "History" button to see the full list of authors. See Grand Theft Wiki:Copyright for more detail on our copyright policy.

GNU Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
See Grand Theft Wiki:Copyright for more information.