Difference between revisions of "OBJS"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{IdeSection
 
{{IdeSection
| game        = [[GTA III]], [[GTA VC]], [[GTA SA]], [[GTA IV]]
+
|game        = {{Icon|t}} {{Icon|LCS}} {{Icon|4}}
| description = Used to define standard map objects
+
|description = Defines simple objects
 
}}
 
}}
'''OBJS''' is a section in the [[item definition]] file. It is used to define standard map objects. There are also sections to extend default object definitions:
+
'''<code>objs</code>''' is a section in the [[item definition]] file in [[GTA III]], [[Vice City]], [[San Andreas]], [[Liberty City Stories]], and [[GTA IV]]. It is used to define simple objects. There are also sections to extend default object definitions:
 
 
* [[TOBJ]] for defining an additional ingame time range the object gets rendered in.
 
* [[ANIM]] which links an animation to an object.
 
* [[TANM]] which does both of the previously mentioned sections.
 
  
 +
* <code>[[TOBJ|tobj]]</code> for defining an additional in-game time range the object gets rendered in.
 +
* <code>[[ANIM|anim]]</code> which links an animation to an object.
 +
* <code>[[TANM|tanm]]</code> which does both of the previously mentioned sections.
  
 
== Format ==
 
== Format ==
 +
=== GTA III &ndash; Liberty City Stories ===
 +
{{Pre|
 +
objs
 +
# [[#Type 1|type 1]] (III/VC/SA/LCS)
 +
Id, ModelName, TxdName, MeshCount, DrawDistance, Flags
 +
# [[#Type 2|type 2]] (III/VC/SA/LCS)
 +
Id, ModelName, TxdName, MeshCount, DrawDistance1, DrawDistance2, Flags
 +
# [[#Type 3|type 3]] (III/VC/SA/LCS)
 +
Id, ModelName, TxdName, MeshCount, DrawDistance1, DrawDistance2, DrawDistance3, Flags
 +
# [[#Type 4|type 4]] (SA)
 +
Id, ModelName, TxdName, DrawDistance, Flags
 +
end
 +
}}
  
=== GTA III, Vice City and San Andreas ===
+
====Type 1====
 
+
This is used for non-breakable objects.
ID, ModelName, TextureName, ObjectCount, DrawDistance, [DrawDistance2, ...], Flags
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
!style="width: 3em;" |{{Icon|3}} {{Icon|VC}}<br>{{Icon|SA}} {{Icon|LCS}}
{|{{Prettytable}} width="100%"
+
!style="width: 12em;" |Identifier
!width="250px"|Identifier
+
!style="width: 6em;" |Type
 
!Description
 
!Description
 
|-
 
|-
|<center>ID</center>||Unique object ID.
+
|A ||Id ||integer ||Unique object identifier.
 
|-
 
|-
|<center>ModelName</center>||Name of the <code>.dff</code> [[model file]] without extension.
+
|B ||ModelName ||string ||Name of the [[model file]] without extension.
 
|-
 
|-
|<center>TextureName</center>||Name of the <code>.txd</code> [[texture dictionary]] without extension.
+
|C ||TxdName ||string ||Name of the [[texture dictionary]] without extension.
 
|-
 
|-
|<center>ObjectCount</center>||Number of [[RenderWare_binary_stream_file|clumps]]. 1 by default and optional for ''San Andreas''.
+
|D ||MeshCount ||integer ||Number of meshes. 1 for this type.
 
|-
 
|-
|<center>DrawDistance</center>||[[Draw distance]] in [[unit]]s (one for each clump).
+
|E ||DrawDistance ||float ||[[Draw distance]] in [[unit]]s.
 
|-
 
|-
|<center>Flags</center>||Object flags (see [[OBJS#Object_Flags|below]]).
+
|F ||Flags ||integer ||[[Item Definition#IDE Flags|Object flags]]
 
|}
 
|}
  
=== GTA IV ===
+
====Type 2====
 
+
This is used for breakable objects.
ModelName, TextureName, DrawDistance, Flags, Unknown, MinX, MinY, MinZ, MaxX, MaxY, MaxZ, SphereX, SphereY, SphereZ, Radius, LOD Model
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
!style="width: 3em;" |{{Icon|3}} {{Icon|VC}}<br>{{Icon|SA}} {{Icon|LCS}}
{|{{Prettytable}} width="100%"
+
!style="width: 12em;" |Identifier
!width="250px"|Identifier
+
!style="width: 6em;" |Type
 
!Description
 
!Description
 
|-
 
|-
|<center>ModelName</center>||Name of the <code>.wdr</code> ''model file'' without extension.
+
|A ||Id ||integer ||Unique object identifier.
|-
 
|<center>TextureName</center>||name of the <code>.wtd</code> ''texture dictionary'' without extension.
 
|-
 
|<center>DrawDistance</center>||''Draw distance'' in ''units''.
 
|-
 
|<center>Flag1</center>||Object flag (see [[OBJS#Object Flags|below]]).
 
 
|-
 
|-
|<center>Unknown</center>||Unknown integer (0 by default).
+
|B ||ModelName ||string ||Name of the [[model file]] without extension.
 
|-
 
|-
|<center>MinX, MinY, MinZ</center>||Lower left corner of the bounding box for the object.
+
|C ||TxdName ||string ||Name of the [[texture dictionary]] without extension.
 
|-
 
|-
|<center>MaxX, MaxY, MaxZ</center>||Upper right corner of the bounding box for the object.
+
|D ||MeshCount ||integer ||Number of meshes. 2 for this type.
 
|-
 
|-
|<center>SphereX, SphereY, SphereZ</center>||Center of the bounding sphere for the object.
+
|E,F ||DrawDistance1, DrawDistance2 ||float[2] ||[[Draw distance]] in [[unit]]s (one for each mesh, only the first is actually used).
 
|-
 
|-
|<center>Radius</center>||Radius of the bounding sphere into all dimensions.
+
|G ||Flags ||integer ||[[Item Definition#IDE Flags|Object flags]]
|-
 
|<center>LOD Model</center>||Name of the <code>.[[wdd]]</code> file that contains the ''lod model'' for the defined modelname.
 
 
|}
 
|}
  
[[GTA IV]] stores bounding informations inside the ''item definitions'' for better performance. The previous games stored bounding informations inside the [[COLL|collision]] files. Also it uses the hashes of the model names as a key of an hash table instead of the ID as an index to the definition array for previous games.
+
====Type 3====
 
+
This is used for complex breakable objects.
== Object Flags ==
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
!style="width: 3em;" |{{Icon|3}} {{Icon|VC}}<br>{{Icon|SA}} {{Icon|LCS}}
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.
+
!style="width: 12em;" |Identifier
 
+
!style="width: 6em;" |Type
{|{{Prettytable}} width="100%" class="collapsible"
 
!width="120px"|Flag
 
!width="100px"|Supported games
 
!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|1}} Never used by default.
+
|A ||Id ||integer ||Unique object identifier.
 
|-
 
|-
|<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).
+
|B ||ModelName ||string ||Name of the [[model file]] 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''.
+
|C ||TxdName ||string ||Name of the [[texture dictionary]] without extension.
 
|-
 
|-
|<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
+
|D ||MeshCount ||integer ||Number of meshes. 3 for this type.
 
|-
 
|-
|<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
+
|E,F,G ||DrawDistance1, DrawDistance2, DrawDistance3 ||float[3] ||[[Draw distance]] in [[unit]]s (one for each mesh, only the first is actually used).
 
|-
 
|-
|<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'''
+
|H ||Flags ||integer ||[[Item Definition#IDE Flags|Object flags]]
 +
|}
 +
 
 +
====Type 4====
 +
This is used for non-breakable objects and behaves equivalently to [[#Type 1|Type 1]].
 +
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 +
!style="width: 3em;" |{{Icon|SA}}
 +
!style="width: 12em;" |Identifier
 +
!style="width: 6em;" |Type
 +
!Description
 
|-
 
|-
|<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.
+
|A ||Id ||integer ||Unique object identifier.
 
|-
 
|-
|<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.
+
|B ||ModelName ||string ||Name of the [[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]].
+
|C ||TxdName ||string ||Name of the [[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).
+
|D ||DrawDistance ||float ||[[Draw distance]] in [[unit]]s.
 
|-
 
|-
|<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).
+
|E ||Flags ||integer ||[[Item Definition#IDE Flags|Object flags]]
 +
|}
 +
 
 +
=== GTA IV ===
 +
{{Pre|
 +
objs
 +
ModelName, TxdName, DrawDistance, Flag, unknown, MinX, MinY, MinZ, MaxX, MaxY, MaxZ, SphereX, SphereY, SphereZ, Radius, LODModel
 +
end
 +
}}
 +
==== Type 1 ====
 +
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 +
!style="width: 3em;" |{{Icon|4}}
 +
!style="width: 12em;" |Identifier
 +
!style="width: 6em;" |Type
 +
!Description
 
|-
 
|-
|<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).
+
|A ||ModelName ||string ||Name of the <code>[[WDR|.wdr]]</code> model file without extension.
 
|-
 
|-
|<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).
+
|B ||TxdName ||string ||Name of the <code>[[WTD|.wtd]]</code> texture dictionary without extension.
 
|-
 
|-
|<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).
+
|C ||DrawDistance ||float ||Draw distance in units.
 
|-
 
|-
|<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'').
+
|D ||Flag ||integer ||[[Item Definition#IDE Flags|Object flag]]
 
|-
 
|-
|<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).
+
|E ||''unknown'' ||float ||Unknown integer (usually 0 but uses other values as high as 32).
 
|-
 
|-
|<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]].
+
|F,G,H ||MinX, MinY, MinZ ||float[3] ||Lower left corner of the bounding box for the object.
 
|-
 
|-
|<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]].
+
|I,J,K ||MaxX, MaxY, MaxZ ||float[3] ||Upper right corner of the bounding box for the object.
 
|-
 
|-
|<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).
+
|L,M,N ||SphereX, SphereY, SphereZ ||float[3] ||Center of the bounding sphere for the object.
 
|-
 
|-
|<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]])
+
|O ||Radius ||float ||Radius of the bounding sphere into all dimensions.
 
|-
 
|-
|<center>4194304</center>||<center>{{Icon|SA}}</center>||<center><code>0010 0000 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently related into physics.
+
|P ||LODModel ||string ||Name of the <code>[[WDD|.wdd]]</code> file that contains the ''lod model'' for the defined modelname; otherwise ''null''.
 
|}
 
|}
  
[[Category:GTA 3]][[Category:GTA VC]]
+
[[GTA IV]] stores bounding information inside the ''item definitions'' for better performance. The previous games stored bounding information inside the [[COLL|collision]] files. Also it uses the hashes of the model names as a key of an hash table instead of the ID as an index to the definition array for previous games.
{{N|4|SA}}
+
 
 +
== Statistics ==
 +
Total number of <code>objs</code> entries in:
 +
:GTA III: 2908 (max 5000)
 +
::Type 1: 2844
 +
::Type 2: 63
 +
::Type 3: 1
 +
 
 +
:Vice City: 3800 (max 3885)
 +
::Type 1: 3761
 +
::Type 2: 38
 +
::Type 3: 1
 +
 
 +
:San Andreas: 14052
 +
::Type 1: 1
 +
::Type 4: 14051
 +
 
 +
:GTA IV: 24820
 +
 
 +
{{N|4|LCS|SA|VC|3}}
 +
[[Category:GTA LCS]]

Latest revision as of 06:51, 31 May 2019

OBJS (IDE section)
Supported games:GTA III Vice City San Andreas Liberty City Stories GTA IV
Brief description:Defines simple objects
IDE Sections:
2DFX AMAT ANIM CARS HIER HAND MLO OBJS
PATH PEDS TANM TOBJ TREE TXDP WEAP

objs is a section in the item definition file in GTA III, Vice City, San Andreas, Liberty City Stories, and GTA IV. It is used to define simple objects. There are also sections to extend default object definitions:

  • tobj for defining an additional in-game time range the object gets rendered in.
  • anim which links an animation to an object.
  • tanm which does both of the previously mentioned sections.

Format

GTA III – Liberty City Stories

objs
# type 1 (III/VC/SA/LCS)
Id, ModelName, TxdName, MeshCount, DrawDistance, Flags
# type 2 (III/VC/SA/LCS)
Id, ModelName, TxdName, MeshCount, DrawDistance1, DrawDistance2, Flags
# type 3 (III/VC/SA/LCS)
Id, ModelName, TxdName, MeshCount, DrawDistance1, DrawDistance2, DrawDistance3, Flags
# type 4 (SA)
Id, ModelName, TxdName, DrawDistance, Flags
end

Type 1

This is used for non-breakable objects.

GTA III Vice City
San Andreas Liberty City Stories
Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the model file without extension.
C TxdName string Name of the texture dictionary without extension.
D MeshCount integer Number of meshes. 1 for this type.
E DrawDistance float Draw distance in units.
F Flags integer Object flags

Type 2

This is used for breakable objects.

GTA III Vice City
San Andreas Liberty City Stories
Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the model file without extension.
C TxdName string Name of the texture dictionary without extension.
D MeshCount integer Number of meshes. 2 for this type.
E,F DrawDistance1, DrawDistance2 float[2] Draw distance in units (one for each mesh, only the first is actually used).
G Flags integer Object flags

Type 3

This is used for complex breakable objects.

GTA III Vice City
San Andreas Liberty City Stories
Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the model file without extension.
C TxdName string Name of the texture dictionary without extension.
D MeshCount integer Number of meshes. 3 for this type.
E,F,G DrawDistance1, DrawDistance2, DrawDistance3 float[3] Draw distance in units (one for each mesh, only the first is actually used).
H Flags integer Object flags

Type 4

This is used for non-breakable objects and behaves equivalently to Type 1.

San Andreas Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the model file without extension.
C TxdName string Name of the texture dictionary without extension.
D DrawDistance float Draw distance in units.
E Flags integer Object flags

GTA IV

objs
ModelName, TxdName, DrawDistance, Flag, unknown, MinX, MinY, MinZ, MaxX, MaxY, MaxZ, SphereX, SphereY, SphereZ, Radius, LODModel
end

Type 1

GTA IV Identifier Type Description
A ModelName string Name of the .wdr model file without extension.
B TxdName string Name of the .wtd texture dictionary without extension.
C DrawDistance float Draw distance in units.
D Flag integer Object flag
E unknown float Unknown integer (usually 0 but uses other values as high as 32).
F,G,H MinX, MinY, MinZ float[3] Lower left corner of the bounding box for the object.
I,J,K MaxX, MaxY, MaxZ float[3] Upper right corner of the bounding box for the object.
L,M,N SphereX, SphereY, SphereZ float[3] Center of the bounding sphere for the object.
O Radius float Radius of the bounding sphere into all dimensions.
P LODModel string Name of the .wdd file that contains the lod model for the defined modelname; otherwise null.

GTA IV stores bounding information inside the item definitions for better performance. The previous games stored bounding information inside the collision files. Also it uses the hashes of the model names as a key of an hash table instead of the ID as an index to the definition array for previous games.

Statistics

Total number of objs entries in:

GTA III: 2908 (max 5000)
Type 1: 2844
Type 2: 63
Type 3: 1
Vice City: 3800 (max 3885)
Type 1: 3761
Type 2: 38
Type 3: 1
San Andreas: 14052
Type 1: 1
Type 4: 14051
GTA IV: 24820