Difference between revisions of "Item Definition"

From GTAMods Wiki
Jump to navigation Jump to search
m (2DFX)
(BAM!)
Line 3: Line 3:
 
| 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 identicated 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 <code>.ide</code> files are split up into several sections. Each section itself is optional which means there is no rule descriping in which order you use the section. Also there is no need for using all sections inside your item definition file.  
  
Example:
+
=== Format and syntax description ===
objs
 
...
 
end
 
  
===[[OBJS]]===
+
The basic structure of the different sections is pretty simple. Each section starts with an 4 character identifier indicating how the content of the section gets interpreted by the game. The identifier is followed by the definition entries. Every entry takes one line and every line follows certain rules which get descriped 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 gets indicated by the 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 '#'. It is possible to add comments to the end of an line, but breaking the line format for the current section using comments may cause hard to find game crashes during loading stage. This is why a comment should always be placed on an own line. Comments can also be placed outside of sections.
ID, ModelName, TextureName, ObjectCount, DrawDist, [DrawDist2, ...], Flags
 
  
{|{{Prettytable}} width="100%" class="collapsible collapsed"
+
The line format itself is always the same. It only differs in the number of parameters. Parameters are the semantical content of the line. Parameters are usually seperated by a comma character. Starting and ending [[wikipedia:Whitespace_character|whitespace characters]] get trimmed. However using whitespaces inside a parameter is not possible in almost every case so that they are simply used to structure the file more clearly. Strings can be encased by the character '"', but this is optional and rarely used by default.
!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
 
+
...
Note that GTA IV does not use any unique object ID numbers
+
end
 
 
{|{{Prettytable}} width="100%" class="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>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]]===
+
=== Sections ===
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:''
+
The following table contains basic information about all known sections. For additional information read the articles itself.
ID, ModelName, TextureName, ObjectCount, DrawDist, [DrawDist2, ...], Flags, TimeOn, TimeOff
 
  
{|{{Prettytable}} width="100%" class="collapsible collapsed"
+
{|{{Prettytable}} class="collapsible"
!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.
 
|-
 
|-
|<center>ModelName</center>||name of the .dff [[model file]], 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.
 
|-
 
|-
|<center>TextureName</center>||name of the .txd [[texture dictionary]], without extension (string)
+
|<center>[[ANIM]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{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.
 
|-
 
|-
|<center>ObjectCount</center>||amount of sub objects, e.g. damaged parts, usually 1 (integer) - '''''optional for SA, default 1'''''
+
|<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>DrawDist</center>||[[draw distance]] in [[unit]]s, one for each sub object (float)
+
|<center>[[WEAP]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Used to define weapons.
 
|-
 
|-
|<center>Flags</center>||object flags, defining special behavior, default 0 (integer)
+
|<center>[[CARS]]</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||Used to define vehicles.
 
|-
 
|-
|<center>TimeOn</center>||activation time in game hours (integer)
+
|<center>[[HIER]]</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||Partly unknown. Used to define objects for interactions with [[actor|actors]] for example in cutscenes.
 
|-
 
|-
|<center>TimeOff</center>||deactivation time in game hours (integer)
+
|<center>[[TXDP]]</center>||<center>{{Icon|SA}}</center>||Used to virtually extent [[TXD|texture dictionarys]].
|}
 
 
 
''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.
 
 
 
{|{{Prettytable}} width="100%" class="collapsible collapsed"
 
!width="250px"|Identifier
 
!Description
 
 
|-
 
|-
|<center>ModelName</center>||name of the .wdr [[model file]], without extension (string)
+
|<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>TextureName</center>||name of the .wtd [[texture dictionary]], without extension (string)
+
|<center>[[PATH]]</center>||<center>{{Icon|3}}</center>||Used to create waypoints for random NPC spawns ([[Paths]]).
 
|-
 
|-
|<center>DrawDistance</center>||[[draw distance]] in [[unit]]s, one for each sub object (float)
+
|<center>[[TREE]]</center>||<center>{{Icon|4}}</center>||&ndash;
 
|-
 
|-
|<center>Flag1</center>||object flag, defining special behavior
+
|<center>[[TANM]]</center>||<center>{{Icon|4}}</center>||Used to combine ''TOBJ'' and ''ANIM'' sections.
 
|-
 
|-
|<center>Flag2</center>||object flag, defining special behavior, default 0 (integer)
+
|<center>[[MLO]]</center>||<center>{{Icon|4}}</center>||&ndash;
 
|-
 
|-
|<center>Bounds Min</center>||Lower Left vertex local position of a model bounding box
+
|<center>[[AMAT]]</center>||<center>{{Icon|4}}</center>||&ndash;
|-
 
|<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
 
|-
 
|<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 to specify the behaviour of objects. They are signed 32-bit integer values where each bit descripes an [[wikipedia:Boolean_algebra_(logic)|boolean]] value of an special aspect. The following table shows the standart flags used for objects defined in ''OBJS'', ''TOBJ'' and ''ANIM'' section.
ID, ModelName, TextureName, AnimName, DrawDist, Flags
 
;ID, ModelName, TextureName, DrawDist, Flags: same as for the OBJS section
 
;AnimName: name of the [[IFP|animation archive]], without extension (string)
 
  
''GTA IV format''
+
{|{{Prettytable}} width="100%" class="collapsible"
 
+
!width="120px"|Flag
ModelName, TextureName, Wad, DrawDist, Flag1, Flag2, (Bounds min)X,Y,Z, (Bounds max)X,Y,Z, (Bounds Sphere)X,Y,Z, Radius, WDD
+
!width="100px"|Supported games
 
+
!width="25%"|Binary
;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
 
 
 
{|{{Prettytable}} width="100%" class="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|1}} Never used by default.
 
|-
 
|-
|<center>ModelName</center>||Name of the .dff [[model file]], without extension
+
|<center>1</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0001</code></center>||Wet effect (objects appear darker).
 
|-
 
|-
|<center>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
+
|<center>2</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{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>Threat</center>||The threat of the ped as defined in the ped.dat file
+
|<center>4</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0100</code></center>||Alpha transparency 1
 
|-
 
|-
|<center>Behavior</center>||The behavior of the ped as defined in the pedstats.dat file
+
|<center>8</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 1000</code></center>||Alpha transparency 2
 
|-
 
|-
|<center>AnimationType</center>||The type of animation being used on the ped for movements
+
|<center>16</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0001 0000</code></center>||Opposite to flag '''2'''
 
|-
 
|-
|<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>32</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0010 0000</code></center>||Indicates an object to be used inside an interior.
|}
 
 
 
''Vice City format''
 
ID, ModelName, TxdName, Threat, Behavior, AnimationType, VehClass, StartAnimation?, Radio1, Radio2
 
 
 
{|{{Prettytable}} width="100%" class="collapsible collapsed"
 
!width="250px"|Identifier
 
!Description
 
 
|-
 
|-
|<center>ID</center>||Unique model ID
+
|<center>64</center>||<center>{{Icon|SA}} {{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>ModelName</center>||Name of the .dff [[model file]], without extension
+
|<center>128</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 1000 0000</code></center>||Object surface will not be [[Wikipedia:Hidden_surface_determination|culled]].
 
|-
 
|-
|<center>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
+
|<center>256</center>||<center>{{Icon|SA}} {{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>Threat</center>||The threat of the ped as defined in the ped.dat file
+
|<center>512</center>||<center>{{Icon|SA}} {{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>Behavior</center>||The behavior of the ped as defined in the pedstats.dat file
+
|<center>1024</center>||<center>{{Icon|SA}} {{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>AnimationType</center>||The type of animation being used on the ped for movements
+
|<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>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>4096</center>||<center>{{Icon|SA}}</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>Radio1, Radio2</center>||Ped's preferred radio station
+
|<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'').
|}
 
 
 
===WEAP===
 
''GTA III and VC format:''
 
ID, ModelName, TextureName, Animation, ?, DrawDistance, ?
 
;Animation: From ped.ifp, animation used to wield and shoot the weapon
 
 
 
===[[CARS (IDE Section)|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
 
 
 
{|{{Prettytable}} width="100%" class="collapsible collapsed"
 
!width="250px"|Identifier
 
!Description
 
 
|-
 
|-
|<center>ID</center>||Unique model ID
+
|<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>ModelName</center>||Name of the .dff [[model file]], without extension
+
|<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>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
+
|<center>262144</center>||<center>{{Icon|SA}}</center>||<center><code>0000 0100 0000 0000 0000 0000</code></center>||Unknown &ndash; only used 1 time in [[GTA SA|San Andreas]].
 
|-
 
|-
|<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>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>HandlingID</center>||Name corresponding to its handling data in the [[handling.cfg]] file
+
|<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 [[GTA VC|Vice City]])
 
|-
 
|-
|<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>4194304</center>||<center>{{Icon|SA}}</center>||<center><code>0010 0000 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently related into physics.
|-
 
|<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, 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>LODModel</center>||ID number of LOD model, can be any valid vehicle model<br>Only available for type ''plane''
 
 
|}
 
|}
  
''Vice City formats''
+
For flags defining different aspects of different definitions read the articles about their sections.
 
 
''Car''
 
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, WheelID, WheelScale
 
 
 
''Bike''
 
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, Unknown, WheelScale
 
  
''Boat and Heli''
+
== Difference between GTA III and GTA IV engines ==
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules
 
  
''Plane''
+
[[GTA IV]] not only uses different formats to the previous games, it also does not use ID's any longer in order to identify objects. While [[GTA 3|GTA III]] era games are using an ID as an index inside an array of definitions GTA IV uses the hashes of the model name as an key inside an hashtable. For more information about this see [[Map System]].
ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, LODModel
 
 
 
{|{{Prettytable}} width="100%" class="collapsible collapsed"
 
!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), 0, Corona, Shadow, Distance, Outer range, Size, Inner range, IDE flag, Flash, Wet, Flare, Dust
 
 
 
{|{{Prettytable}} width="100%" class="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>||color of the light and everything associated with it in RGB format, also affects the intensity of the light so that darker the color the dimmer the light (meaning black (0,0,0) will yield a light so dim that it's not visible)
 
|-
 
|<center>Corona</center>||corona texture associated to the light, texture defined in <code>particle.txd</code>, usually "coronastar" for lights
 
|-
 
|<center>Shadow</center>||light texture that is cast on the ground, texture defined in <code>particle.txd</code>, usually "shad_exp" for lights
 
|-
 
|<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>||[[OBJS#Object_Flags|IDE flag]], only the time-dependent flags are usable
 
|-
 
|<center>Flash</center>||sets the [[2DFX#Types of Flashes|type of flashing]]
 
|-
 
|<center>Wet</center>||sets the particle to be "reflective" on wet grounds, will only work if the ground around the light is set to wet when raining<br>0 - not reflective when wet, 1 - reflective when wet
 
|-
 
|<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 - yellow lens flare, 2 - white lens flare
 
|-
 
|<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), 1, Particle, unk1, unk2, unk3, Size
 
 
 
{|{{Prettytable}} width="100%" class="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
 
|-
 
|<center>Particle</center>||[[2DFX#Types of Particles|particle type]]
 
|-
 
|<center>unk1, unk2, unk3</center>||unknown, rotation of particle?
 
|-
 
|<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
 
 
 
{|{{Prettytable}} width="100%" class="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
 
|-
 
|<center>Behavior</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
 
 
 
{|{{Prettytable}} width="100%" class="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
 
|}
 
 
 
The 2dfx section has been completely moved into the [[DFF]] file structure for ''San Andreas''. It uses one of Rockstars [[2dfx_(RW_Section)|custom section ID's]]. For ''GTA IV'' the light section is located inside the [[WDR]] file structure for 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===
 
''GTA4 only''
 
 
 
===AMAT===
 
''GTA4 only''
 
 
 
Modelname, Flag1, Flag2
 
 
 
==Procobj.ide==
 
 
 
===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==
 
==Tools==
 
* {{GTAG|4817|IDEditor}} - By {{U|Xmen}}
 
* {{GTAG|4817|IDEditor}} - By {{U|Xmen}}
* {{GTAF|402942|IDE-IV in GTA-IV script centre }} - by {{U|Gforce}}
+
* {{GTAF|402942|IDE-IV in GTA-IV script centre}} - by {{U|Gforce}}
* [http://www.aschratt.com/fileview.php?file=1004 FlagValue Calculator] - By {{U|Aschratt}} - Calculates all Flagvalues (even those unknown)
+
* [http://www.aschratt.com/fileview.php?file=1004 FlagValue Calculator] - By {{U|Aschratt}} - Calculates all flagvalues (even those unknown).
 +
 
 +
== References ==
 +
* {{note|1}} [[wikipedia:Two%27s_complement|Two's complement]]
  
 
==External Links==
 
==External Links==

Revision as of 11:24, 26 July 2010

40px-Ambox rewrite orange.svg.png This article may need to be rewritten.
Please help improve this article. The discussion page may contain suggestions.
Item Definition
IDE Sections:
2DFX AMAT ANIM CARS HIER HAND MLO OBJS
PATH PEDS TANM TOBJ TREE TXDP WEAP

Item definition files, usually identicated 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 .ide files are split up into several sections. Each section itself is optional which means there is no rule descriping in which order you use the section. Also there is no need for using all sections inside your item definition file.

Format and syntax description

The basic structure of the different sections is pretty simple. Each section starts with an 4 character identifier indicating how the content of the section gets interpreted by the game. The identifier is followed by the definition entries. Every entry takes one line and every line follows certain rules which get descriped 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 gets indicated by the 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 '#'. It is possible to add comments to the end of an line, but breaking the line format for the current section using comments may cause hard to find game crashes during loading stage. This is why a comment should always be placed on an own line. Comments can also be placed outside of sections.

The line format itself is always the same. It only differs in the number of parameters. Parameters are the semantical content of the line. Parameters are usually seperated by a comma character. Starting and ending whitespace characters get trimmed. However using whitespaces inside a parameter is not possible in almost every case so that they are simply used to structure the file more clearly. Strings can be encased by the character '"', but this is optional and rarely used by default.

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 Vice City San Andreas GTA IV
Most important section: defines objects for the map.
TOBJ
GTA III Vice City 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.
ANIM
GTA III Vice City 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.
PEDS
GTA III Vice City San Andreas GTA IV
Used to define "pedestrians" (Random NPC's).
WEAP
GTA III Vice City San Andreas GTA IV
Used to define weapons.
CARS
GTA III Vice City San Andreas GTA IV
Used to define vehicles.
HIER
San Andreas GTA IV
Partly unknown. Used to define objects for interactions with actors for example in cutscenes.
TXDP
San Andreas
Used to virtually extent texture dictionarys.
2DFX
GTA III 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.
MLO
GTA IV
AMAT
GTA IV

IDE Flags

Flags are used to specify the behaviour of objects. They are signed 32-bit integer values where each bit descripes an boolean value of an special aspect. The following table shows the standart 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 III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 0001
Wet effect (objects appear darker).
2
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 0010
Indicates that the object gets rendered at night for objects defined in TOBJ.
4
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 0100
Alpha transparency 1
8
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 1000
Alpha transparency 2
16
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0001 0000
Opposite to flag 2
32
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0010 0000
Indicates an object to be used inside an interior.
64
San Andreas GTA IV
0000 0000 0000 0000 0100 0000
Disables the shadow mesh to project a shadow.
128
San Andreas GTA IV
0000 0000 0000 0000 1000 0000
Object surface will not be culled.
256
San Andreas GTA IV
0000 0000 0000 0001 0000 0000
Disables draw distance (Only used for LOD objects with an LOD value greater than 299).
512
San Andreas 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
San Andreas 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
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
San Andreas
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
San Andreas GTA IV
0000 0000 1000 0000 0000 0000
Uses object brightness from the current weather definition (See timecyc.datPoleShd).
65536
San Andreas GTA IV
0000 0001 0000 0000 0000 0000
Object explodes after getting hit (requires object.dat registration).
131072
San Andreas
0000 0010 0000 0000 0000 0000
Unknown – apparently some flag for the Script.
262144
San Andreas
0000 0100 0000 0000 0000 0000
Unknown – only used 1 time in San Andreas.
1048576
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
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
San Andreas
0010 0000 0000 0000 0000 0000
Unknown – apparently related into physics.

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

Difference between GTA III and GTA IV engines

GTA IV not only uses different formats to the previous games, it also does not use ID's any longer in order to identify objects. While GTA III era games are using an ID as an index inside an array of definitions GTA IV uses the hashes of the model name as an key inside an hashtable. For more information about this see Map System.

Tools

References

External Links