Difference between revisions of "WEAP"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with '{{IdeSection | game = GTA VC, GTA SA, GTA IV | description = Used to define weapons }} '''WEAP''' is a section in the item definition file. It is used to d…')
 
m
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{IdeSection
 
{{IdeSection
| game        = [[GTA VC]], [[GTA SA]], [[GTA IV]]
+
|game        = {{Icon|VC}} {{Icon|SA}} {{Icon|LCS}} {{Icon|4}}
| description = Used to define weapons
+
|description = Defines weapon objects
 
}}
 
}}
'''WEAP''' is a section in the [[item definition]] file. It is used to define weapons. The format is similar to [[OBJS]]. However [[GTA 3]] defined weapons inside the ''OBJS'' section, so this section can be seen as an extented objects section.
+
'''WEAP''' is a section in the [[item definition]] file in [[Vice City]], [[San Andreas]], [[Liberty City Stories]], and [[GTA IV]]. It is used to define weapon objects. In [[GTA III]] weapon objects are defined inside the [[OBJS]] section, so this section can be seen as an extension of that section. Additional weapon information are defined inside the [[weapon.dat]] file.
  
 
== Format ==
 
== Format ==
 +
=== Vice City – Liberty City Stories ===
 +
{{Pre|
 +
weap
 +
Id, ModelName, TxdName, AnimationName, MeshCount, DrawDistance
 +
end
 +
}}
  
=== Vice City and San Andreas ===
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
!style="width: 4em;" |{{Icon|VC}} {{Icon|SA}} {{Icon|LCS}}
ID, ModelName, TextureName, AnimationName, ObjectCount, DrawDistance, [DrawDistance2, ...], Flags
+
!style="width: 12em;" |Identifier
 
+
!style="width: 6em;" |Type
{|{{Prettytable}} width="100%"
 
!width="250px"|Identifier
 
 
!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>AnimationName</center>||Name of the <code>.ifp</code> [[animation file]] without extension.
+
|D ||AnimationName ||string ||Name of the <code>.ifp</code> [[animation file]] without extension.
 
|-
 
|-
|<center>ObjectCount</center>||Number of [[RenderWare_binary_stream_file|clumps]]. 1 by default and optional for ''San Andreas''.
+
|E ||MeshCount ||integer ||Number of meshes, always 1.
 
|-
 
|-
|<center>DrawDistance</center>||[[Draw distance]] in [[unit]]s (one for each clump).
+
|F ||DrawDistance ||float ||[[Draw distance]] in [[unit]]s.
|-
 
|<center>Flags</center>||Object flags (see [[WEAP#Object_Flags|below]]).
 
 
|}
 
|}
 +
 +
The games' data files for this section have entries with an additional column G that doesn't seem to be read by the game.
  
 
=== GTA IV ===
 
=== GTA IV ===
 +
{{Pre|
 +
weap
 +
ModelName, TxdName, AnimationName, ObjectCount, DrawDistance, Flag
 +
end
 +
}}
  
ModelName, TextureName, AnimationName, ObjectCount, DrawDistance, [DrawDistance2, ...], Flags
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
!style="width: 3em;" |{{Icon|4}}
{|{{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 ||ModelName ||string ||Name of the <code>[[WDR|.wdr]]</code> model file without extension.
 
|-
 
|-
|<center>TextureName</center>||name of the <code>.wtd</code> ''texture dictionary'' without extension.
+
|B ||TxdName ||string ||Name of the <code>[[WTD|.wtd]]</code> texture dictionary without extension.
 
|-
 
|-
|<center>AnimationName</center>||Name of the <code>.wad</code> ''animation dictionary'' without extension.
+
|C ||AnimationName ||string ||Name of the <code>[[WAD|.wad]]</code> animation file without extension.
 
|-
 
|-
|<center>ObjectCount</center>||Number of [[RenderWare_binary_stream_file|clumps]] for previous games. Apparently unused for ''GTA IV''.
+
|D ||ObjectCount ||integer ||Number of [[RenderWare_binary_stream_file|clumps]]? Apparently unused.
 
|-
 
|-
|<center>DrawDistance</center>||[[Draw distance]] in [[unit]]s (one for each clump).
+
|E ||DrawDistance ||float ||Draw distance in units.
 
|-
 
|-
|<center>Flags</center>||Object flags (see [[WEAP#Object_Flags|below]]).
+
|F ||Flag ||integer ||Object flag (seems to be unused).
 
|}
 
|}
  
== Object Flags ==
+
== Statistics ==
 
+
Total number of WEAP entries in:
Flags are used to specify the behaviour of objects. They are signed 32-bit integer values where each bit descripes a [[wikipedia:Boolean_algebra_(logic)|boolean]] value of an special aspect.
+
:Vice City: 37 (max 37)
 
+
:San Andreas: 50
{|{{Prettytable}} width="100%" class="collapsible"
+
:GTA IV: 80
!width="120px"|Flag
 
!width="100px"|Supported games
 
!width="25%"|Binary
 
!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.
 
|-
 
|<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>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>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>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>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>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.
 
|-
 
|<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>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>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>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>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>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>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>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'').
 
|-
 
|<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>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>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>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>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>4194304</center>||<center>{{Icon|SA}}</center>||<center><code>0010 0000 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently related into physics.
 
|}
 
  
 
== See also ==
 
== See also ==
 
* [[Item definition]]
 
 
* [[weapon.dat]]
 
* [[weapon.dat]]
  
[[Category:GTA VC]]
+
{{N|4|LCS|SA|VC}}
{{N|4|SA}}
+
[[Category:GTA LCS]]

Latest revision as of 23:37, 11 January 2019

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

WEAP is a section in the item definition file in Vice City, San Andreas, Liberty City Stories, and GTA IV. It is used to define weapon objects. In GTA III weapon objects are defined inside the OBJS section, so this section can be seen as an extension of that section. Additional weapon information are defined inside the weapon.dat file.

Format

Vice City – Liberty City Stories

weap
Id, ModelName, TxdName, AnimationName, MeshCount, DrawDistance
end
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 AnimationName string Name of the .ifp animation file without extension.
E MeshCount integer Number of meshes, always 1.
F DrawDistance float Draw distance in units.

The games' data files for this section have entries with an additional column G that doesn't seem to be read by the game.

GTA IV

weap
ModelName, TxdName, AnimationName, ObjectCount, DrawDistance, Flag
end
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 AnimationName string Name of the .wad animation file without extension.
D ObjectCount integer Number of clumps? Apparently unused.
E DrawDistance float Draw distance in units.
F Flag integer Object flag (seems to be unused).

Statistics

Total number of WEAP entries in:

Vice City: 37 (max 37)
San Andreas: 50
GTA IV: 80

See also