OBJS: Difference between revisions

No edit summary
mNo edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Research}}
{{Research}}
{{IdeSection
{{IdeSection
| game        = [[GTA III]], [[GTA VC]], [[GTA SA]], [[GTA IV]]
|game        = {{Icon|t}} {{Icon|4}}
| description = Used to define standard static map objects
|description = Defines simple objects
}}
}}
'''OBJS''' is a section in the [[IDE|item definition]] file. It is used to define standard static map objects.
'''<code>objs</code>''' is a section in the [[Item Definition|item definition]] file in [[Grand Theft Auto III]], [[Grand Theft Auto: Vice City]], [[Grand Theft Auto: San Andreas]], and [[Grand Theft Auto 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 ingame 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.


{|{{subst:Prettytable}} width="100%"
== Format ==
!width="250px"|Identifier
=== GTA III, GTA Vice City, and GTA San Andreas ===
{{Pre|
objs
# [[#Type 1|type 1]] (III/VC/SA)
Id, ModelName, TxdName, MeshCount, DrawDistance, Flags
# [[#Type 2|type 2]] (III/VC/SA)
Id, ModelName, TxdName, MeshCount, DrawDistance1, DrawDistance2, Flags
# [[#Type 3|type 3]] (III/VC/SA)
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: 4em;" |{{Icon|t}}
!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 <code>.dff</code> model file without extension.
|-
|-
|<center>TextureName</center>||name of the .txd [[texture dictionary]], without extension (string)
|C ||TxdName ||string ||Name of the <code>.txd</code> [[Texture Archive|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: 4em;" |{{Icon|t}}
 
!style="width: 12em;" |Identifier
List of all known flags for San Andreas:
!style="width: 6em;" |Type
 
{|{{subst:Prettytable}} width="100%" class="collapsible collapsed"
!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 <code>.dff</code> model file without extension.
|-
|-
|0000000000000000000000000000100||4||ALPHA Transparency 1
|C ||TxdName ||string ||Name of the <code>.txd</code> [[Texture Archive|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: 4em;" |{{Icon|t}}
!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 <code>.dff</code> model file without extension.
|-
|-
|0000000000000000000000001000000||64||Disable Shadow Mesh
|C ||TxdName ||string ||Name of the <code>.txd</code> [[Texture Archive|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 <code>.dff</code> model file without extension.
|-
|-
|0000000000000000001000000000000||4096||2-Clump-Object ** (Switches from Clump 2 to 1 after Collision)
|C ||TxdName ||string ||Name of the <code>.txd</code> [[Texture Archive|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</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 ||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..  


1 + 2 + 16 = 19
== 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==
:GTA 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
:GTA San Andreas: 14052
::Type 1: 1
::Type 4: 14051


{|{{subst: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
|}


{{fdl}}
{{fdl}}
[[Category:GTA III Modifications]]
{{3-navi}}
[[Category:GTA VC]]
{{VC-navi}}
[[Category:Modifications]]

Latest revision as of 04:48, 27 August 2018

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

objs is a section in the item definition file in Grand Theft Auto III, Grand Theft Auto: Vice City, Grand Theft Auto: San Andreas, and Grand Theft Auto 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.

Format

GTA III, GTA Vice City, and GTA San Andreas

objs
# type 1 (III/VC/SA)
Id, ModelName, TxdName, MeshCount, DrawDistance, Flags
# type 2 (III/VC/SA)
Id, ModelName, TxdName, MeshCount, DrawDistance1, DrawDistance2, Flags
# type 3 (III/VC/SA)
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 GTA Vice City GTA San Andreas Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the .dff model file without extension.
C TxdName string Name of the .txd 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 GTA Vice City GTA San Andreas Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the .dff model file without extension.
C TxdName string Name of the .txd 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 GTA Vice City GTA San Andreas Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the .dff model file without extension.
C TxdName string Name of the .txd 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.

GTA San Andreas Identifier Type Description
A Id integer Unique object identifier.
B ModelName string Name of the .dff model file without extension.
C TxdName string Name of the .txd 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
GTA Vice City: 3800 (max 3885)
Type 1: 3761
Type 2: 38
Type 3: 1
GTA San Andreas: 14052
Type 1: 1
Type 4: 14051
GTA IV: 24820
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.