OBJS

From GTAMods Wiki
Revision as of 20:06, 12 August 2009 by Spaceeinstein (talk | contribs) (New page: {{Research}} {{IdeSection | game = GTA III, GTA VC, GTA SA, GTA IV | description = Used to define standard static map objects }} '''OBJS''' is a section in the [[ite...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
OBJS (IDE section)
Supported games:GTA III, GTA VC, GTA SA, GTA IV
Brief description:Used to define standard static map 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. It is used to define standard static map objects.

GTA III - San Andreas

Format

ID, ModelName, TextureName, ObjectCount, DrawDist, [DrawDist2, ...], Flags
Identifier Description
ID
unique object ID (integer)
ModelName
name of the .dff model file, without extension (string)
TextureName
name of the .txd texture dictionary, without extension (string)
ObjectCount
amount of sub objects, e.g. damaged parts, usually 1 (integer) - optional for SA, default 1
DrawDist
draw distance in units, one for each sub object (float)
Flags
object flags, defining special behavior, default 0 (integer)

Object Flags

Object Flags in SA are text formatted UInt32-Values (Like nearly all other Flags). To understand them better you have to calculate them to binary numbers. Then You will get the Bitsets of the Flags. 1 means Enabled, 0 disabled.

List of all known flags for San Andreas:

0000000000000000000000000000001 = 1 - Wet Effect
0000000000000000000000000000010 = 2 - Time Object Night Flag
0000000000000000000000000000100 = 4 - ALPHA Transparency 1
0000000000000000000000000001000 = 8 - ALPHA Transparency 2 *
0000000000000000000000000010000 = 16 - Time Object Day Flag
0000000000000000000000000100000 = 32 - Interior-Object **
0000000000000000000000001000000 = 64 - Disable Shadow Mesh (?)
0000000000000000000000010000000 = 128 - Disables Collision Mesh (?)
0000000000000000000000100000000 = 256 - Disable Draw Distance (?)
0000000000000000000001000000000 = 512 - Breakable Glass **
0000000000000000000010000000000 = 1024 - Breakable Glass with crack **
0000000000000000000100000000000 = 2048 - Garage door ** 
0000000000000000001000000000000 = 4096 - 2-Clump-Object ** (Switches from Clump 2 to 1 after Collision)
0000000000000000010000000000000 = 8192 - Small Vegetation. Object sways in strong wind  (?)
0000000000000000100000000000000 = 16384 - Standard Vegetation **  (Palms in Hotels, etc.) (?)
0000000000000001000000000000000 = 32768 - Use timecycle PoleShadow flag
0000000000000010000000000000000 = 65536 - Explosive-Flag **
0000000000000100000000000000000 = 131072 - UNKNOWN (Seems to be an SCM Flag) (?)
0000000000001000000000000000000 = 262144 - UNKNOWN (1 Object in Jizzy`s Club) (?)
0000000000010000000000000000000 = 524288 - UNKNOWN (?)
0000000000100000000000000000000 = 1048576 - Graffiti Flag 
0000000001000000000000000000000 = 2097152 - No backface culling 
0000000010000000000000000000000 = 4194304 - UNKNOWN (Parts of a statue in Atrium) (?) 
...
1000000000000000000000000000000 = 1073741824 - Unknown

* If there's no Interior the Texture behind the object changes to black (=> IPL | Interior-value)
** Objects needs to be activated using Object.dat
(?) Not 100 % known
... All Flags in a special interval are unknown

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
1  +  2 = 3

GTA IV

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

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

Identifier Description
ModelName
name of the .wdr model file, without extension (string)
TextureName
name of the .wtd texture dictionary, without extension (string)
DrawDistance
draw distance in units, 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 local position of a model bounding box
Bounds Max
Upper Right vertex local position of a model bounding box
Radius
Radius dimensions of the bounding Sphere
WDD
the model dictionary file that contains the LOD model for the defined Modelname