Difference between revisions of "OBJS"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Research}}
 
 
{{IdeSection
 
{{IdeSection
| game        = [[GTA III]], [[GTA VC]], [[GTA SA]], [[GTA IV]]
+
|game        = {{Icon|t}} {{Icon|LCS}} {{Icon|4}}
| description = Used to define standard static map objects
+
|description = Defines simple objects
 
}}
 
}}
'''OBJS''' is a section in the [[item definition]] file. It is used to define standard static map objects.
+
'''<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:
  
==GTA III - San Andreas==
+
* <code>[[TOBJ|tobj]]</code> for defining an additional in-game time range the object gets rendered in.
===Format===
+
* <code>[[ANIM|anim]]</code> which links an animation to an object.
ID, ModelName, TextureName, ObjectCount, DrawDist, [DrawDist2, ...], Flags
+
* <code>[[TANM|tanm]]</code> which does both of the previously mentioned sections.
  
{|{{Prettytable}} width="100%"
+
== Format ==
!width="250px"|Identifier
+
=== 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
 +
}}
 +
 
 +
====Type 1====
 +
This is used for non-breakable objects.
 +
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 +
!style="width: 3em;" |{{Icon|3}} {{Icon|VC}}<br>{{Icon|SA}} {{Icon|LCS}}
 +
!style="width: 12em;" |Identifier
 +
!style="width: 6em;" |Type
 
!Description
 
!Description
 
|-
 
|-
|<center>ID</center>||unique object ID (integer)
+
|A ||Id ||integer ||Unique object identifier.
 
|-
 
|-
|<center>ModelName</center>||name of the .dff [[model file]], without extension (string)
+
|B ||ModelName ||string ||Name of the [[model file]] without extension.
 
|-
 
|-
|<center>TextureName</center>||name of the .txd [[texture dictionary]], without extension (string)
+
|C ||TxdName ||string ||Name of the [[texture dictionary]] without extension.
 
|-
 
|-
|<center>ObjectCount</center>||amount of sub objects, e.g. damaged parts, usually 1 (integer) - '''''optional for SA, default 1'''''
+
|D ||MeshCount ||integer ||Number of meshes. 1 for this type.
 
|-
 
|-
|<center>DrawDist</center>||[[draw distance]] in [[unit]]s, one for each sub object (float)
+
|E ||DrawDistance ||float ||[[Draw distance]] in [[unit]]s.
 
|-
 
|-
|<center>Flags</center>||object flags, defining special behavior, default 0 (integer)
+
|F ||Flags ||integer ||[[Item Definition#IDE Flags|Object flags]]
 
|}
 
|}
  
===Object Flags===
+
====Type 2====
Object Flags in SA are text formatted UInt32-Values (Like nearly all other Flags).
+
This is used for breakable objects.
To understand them better you have to calculate them to binary numbers. Then You will get the Bitsets of the Flags.
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
1 means Enabled, 0 disabled.
+
!style="width: 3em;" |{{Icon|3}} {{Icon|VC}}<br>{{Icon|SA}} {{Icon|LCS}}
 
+
!style="width: 12em;" |Identifier
List of all known flags for San Andreas:
+
!style="width: 6em;" |Type
 
 
{|{{Prettytable}} width="100%"
 
!width="25%"|Binary
 
!width="5%"|Decimal
 
 
!Description
 
!Description
 
|-
 
|-
|0000000000000000000000000000001||1||Wet Effect
+
|A ||Id ||integer ||Unique object identifier.
 
|-
 
|-
|0000000000000000000000000000010||2||Time Object Night Flag
+
|B ||ModelName ||string ||Name of the [[model file]] without extension.
 
|-
 
|-
|0000000000000000000000000000100||4||ALPHA Transparency 1
+
|C ||TxdName ||string ||Name of the [[texture dictionary]] without extension.
 
|-
 
|-
|0000000000000000000000000001000||8||ALPHA Transparency 2 *
+
|D ||MeshCount ||integer ||Number of meshes. 2 for this type.
 +
|-
 +
|E,F ||DrawDistance1, DrawDistance2 ||float[2] ||[[Draw distance]] in [[unit]]s (one for each mesh, only the first is actually used).
 +
|-
 +
|G ||Flags ||integer ||[[Item Definition#IDE Flags|Object flags]]
 +
|}
 +
 
 +
====Type 3====
 +
This is used for complex breakable objects.
 +
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 +
!style="width: 3em;" |{{Icon|3}} {{Icon|VC}}<br>{{Icon|SA}} {{Icon|LCS}}
 +
!style="width: 12em;" |Identifier
 +
!style="width: 6em;" |Type
 +
!Description
 
|-
 
|-
|0000000000000000000000000010000||16||Time Object Day Flag
+
|A ||Id ||integer ||Unique object identifier.
 
|-
 
|-
|0000000000000000000000000100000||32||Interior-Object **
+
|B ||ModelName ||string ||Name of the [[model file]] without extension.
 
|-
 
|-
|0000000000000000000000001000000||64||Disable Shadow Mesh
+
|C ||TxdName ||string ||Name of the [[texture dictionary]] without extension.
 
|-
 
|-
|0000000000000000000000010000000||128||Excludes object from culling
+
|D ||MeshCount ||integer ||Number of meshes. 3 for this type.
 
|-
 
|-
|0000000000000000000000100000000||256||Disable Draw Distance for LODs
+
|E,F,G ||DrawDistance1, DrawDistance2, DrawDistance3 ||float[3] ||[[Draw distance]] in [[unit]]s (one for each mesh, only the first is actually used).
 
|-
 
|-
|0000000000000000000001000000000||512||Breakable Glass **
+
|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
 
|-
 
|-
|0000000000000000000010000000000||1024||Breakable Glass with crack **
+
|A ||Id ||integer ||Unique object identifier.
 
|-
 
|-
|0000000000000000000100000000000||2048||Garage door **
+
|B ||ModelName ||string ||Name of the [[model file]] without extension.
 
|-
 
|-
|0000000000000000001000000000000||4096||2-Clump-Object ** (Switches from Clump 2 to 1 after Collision)
+
|C ||TxdName ||string ||Name of the [[texture dictionary]] without extension.
 
|-
 
|-
|0000000000000000010000000000000||8192||Small Vegetation. Object sways in strong wind  (?)
+
|D ||DrawDistance ||float ||[[Draw distance]] in [[unit]]s.
 
|-
 
|-
|0000000000000000100000000000000||16384||Standard Vegetation **  (Palms in Hotels, etc.) (?)
+
|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
 
|-
 
|-
|0000000000000001000000000000000||32768||Use timecycle PoleShadow flag
+
|A ||ModelName ||string ||Name of the <code>[[WDR|.wdr]]</code> model file without extension.
 
|-
 
|-
|0000000000000010000000000000000||65536||Explosive-Flag **
+
|B ||TxdName ||string ||Name of the <code>[[WTD|.wtd]]</code> texture dictionary without extension.
 
|-
 
|-
|0000000000000100000000000000000||131072||UNKNOWN (Seems to be an SCM Flag) (?)
+
|C ||DrawDistance ||float ||Draw distance in units.
 
|-
 
|-
|0000000000001000000000000000000||262144||UNKNOWN (1 Object in Jizzy`s Club) (?)
+
|D ||Flag ||integer ||[[Item Definition#IDE Flags|Object flag]]
 
|-
 
|-
|0000000000010000000000000000000||524288||UNKNOWN (?)
+
|E ||''unknown'' ||float ||Unknown integer (usually 0 but uses other values as high as 32).
 
|-
 
|-
|0000000000100000000000000000000||1048576||Graffiti Flag
+
|F,G,H ||MinX, MinY, MinZ ||float[3] ||Lower left corner of the bounding box for the object.
 
|-
 
|-
|0000000001000000000000000000000||2097152||Disable backface culling
+
|I,J,K ||MaxX, MaxY, MaxZ ||float[3] ||Upper right corner of the bounding box for the object.
 
|-
 
|-
|0000000010000000000000000000000||4194304||UNKNOWN (Parts of a statue in Atrium) (?)
+
|L,M,N ||SphereX, SphereY, SphereZ ||float[3] ||Center of the bounding sphere for the object.
 
|-
 
|-
|...||||All flags in this range are unused/unknown
+
|O ||Radius ||float ||Radius of the bounding sphere into all dimensions.
 
|-
 
|-
|1000000000000000000000000000000||1073741824||Unknown
+
|P ||LODModel ||string ||Name of the <code>[[WDD|.wdd]]</code> file that contains the ''lod model'' for the defined modelname; otherwise ''null''.
 
|}
 
|}
  
* If there's no Interior the Texture behind the object changes to black (=> IPL | Interior-value)
+
[[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.
** Objects needs to be activated using Object.dat
 
(?) Not 100 % known
 
 
 
To connect different flags you have to add the bit which belongs to the flag. Its the same as adding one value to another..  
 
  
01 + 10 = 11
+
== Statistics ==
1 2 = 3
+
Total number of <code>objs</code> entries in:
 +
:GTA III: 2908 (max 5000)
 +
::Type 1: 2844
 +
::Type 2: 63
 +
::Type 3: 1
  
==GTA IV==
+
:Vice City: 3800 (max 3885)
ModelName, TextureName, DrawDistance, Flag1, Flag2, (Bounds min)X,Y,Z, (Bounds max)X,Y,Z, (Bounds Sphere)X, Y, Z, Radius, WDD
+
::Type 1: 3761
 +
::Type 2: 38
 +
::Type 3: 1
  
Note that GTA IV does not use any unique object ID numbers
+
:San Andreas: 14052
 +
::Type 1: 1
 +
::Type 4: 14051
  
{|{{Prettytable}} width="100%"
+
:GTA IV: 24820
!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
 
|}
 
  
[[Category:GTA 3]][[Category:GTA VC]]
+
{{N|4|LCS|SA|VC|3}}
{{N|4|SA}}
+
[[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