Difference between revisions of "Weapon.dat"

From GTAMods Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<code>weapon.dat</code> is a file located in the <code>data</code> folder from GTA 3 to San Andreas. The file contains information about the weapons of the game.
+
{{file-stub}}
  
==GTA: SA==
+
The <code>weapon.dat</code> is a file located in the <code>data/</code> directory of all GTA games from [[GTA 3|GTA III]] to [[San Andreas]]. The file contains information about the weapons properties and settings. The weapons themselfes are defined inside the [[default.ide]] file located in the same folder.
  
{| {{prettytable}} class="collapsible"
+
== File format ==
! Identifier
+
 
! Type
+
{{Incomplete}}
|-
+
<!-- general information here (like each file gets terminated by the string "ENDWEAPONDATA" -->
+
 
| Melee Weapon
+
=== GTA III & Vice City ===
|-
+
 
| $
+
{{Incomplete}}
| Gun Weapon
+
 
|}
+
=== San Andreas ===
 +
 
 +
{{Incomplete}}
 +
 
 +
''San Andreas'' knows two different weapon types. Each weapon can be only one of those types. It gets defined by the first character of a line and defines the whole lines structure. The types are:
  
===Melee Weapons===
+
Melee weapons
 +
* <code>$</code> &ndash; Guns
  
{| {{prettytable}} class="collapsible"
+
{| {{prettytable}} width="100%" class="collapsible"
! Identifier
+
!width="150px"|Identifier
! Explanation
+
! Description
 
|-
 
|-
 
| A
 
| A
| Weapon type
+
| The weapon type identifier (as descriped above).
 
|-
 
|-
 
| B
 
| B
| Fire type
+
| Fire type enumeration. Can be: ''MELEE'', ''PROJECTILE'' (for uzis and pistols), ''INSTANT_HIT'' (for rifles), ''USE'', ''AFFECT_AREA'' and ''CAMERA''.
 
|-
 
|-
 
| C
 
| C
| Target range
+
| The range a target can be aimed.
 
|-
 
|-
 
| D
 
| D
| Weapon range
+
| The range of the bullets to cause damage.
 
|-
 
|-
 
| E
 
| E
| Model ID (1)
+
| Model identifier of the primary weapon (defined inside the [[default.ide]] file).
 
|-
 
|-
 
| F
 
| F
| Model ID (2)
+
| Model identifier of the secondary weapon (apparently unused, always -1).
 
|-
 
|-
 
| G
 
| G
| Reload Time (1)
+
| The time the primary weapon requires to be reloaded.
|-
 
| H
 
| Reload Time (2)
 
 
|-
 
|-
 
| I
 
| I
| Weapon Slot
+
| The slot the weapon requires in the game.
|-
 
| J
 
| Base Combo Type
 
|-
 
| K
 
| Number of Combos??
 
|-
 
| L
 
| Hex Flags
 
|-
 
| M
 
| Extra abilities??
 
 
|}
 
|}
  
====Flags (L)====
+
==== Melee weapon parameters ====
 
 
{| {{prettytable}} class="collapsible"
 
! Value
 
! Explanation
 
|-
 
| 1
 
| Normal (Weapon in one hand)
 
|-
 
| 201
 
| Used in chainsaw
 
|-
 
| 801
 
| Dual weapon  
 
|}
 
 
 
===Gun Weapons===
 
 
 
<source lang="scm">A </source>
 
Denotes the weapon
 
 
 
<source lang="scm">B </source>
 
Denotes the weapon type
 
 
 
<source lang="scm">I </source>
 
Denotes the weapon slot.
 
  
 +
{{Incomplete}}
  
<source lang="scm">J </source>
+
==== Gun parameters ====
Denotes the weapon animations.
 
  
<source lang="scm">L </source>
+
{{Incomplete}}
Denotes the weapon damage.
 
  
Structure:
+
==== Weapon aiming offsets ====
  
# This is a Comment<br>
+
{{Incomplete}}
# Melee Weapons
 
#-----------------------ranges------modelIds----slot----baseCombo---numCombos---flags---steathanimgrp----
 
#    A            B        C      D        E    F        I        J            K            L        M
 
 
<br>
 
[...]
 
<br>
 
# Gun Weapons
 
<br>
 
[...]
 
<br>
 
ENDWEAPONDATA
 

Revision as of 13:01, 12 December 2010

The weapon.dat is a file located in the data/ directory of all GTA games from GTA III to San Andreas. The file contains information about the weapons properties and settings. The weapons themselfes are defined inside the default.ide file located in the same folder.

File format

This section is incomplete. You can help by fixing and expanding it.

GTA III & Vice City

This section is incomplete. You can help by fixing and expanding it.

San Andreas

This section is incomplete. You can help by fixing and expanding it.

San Andreas knows two different weapon types. Each weapon can be only one of those types. It gets defined by the first character of a line and defines the whole lines structure. The types are:

  • < – Melee weapons
  • $ – Guns
Identifier Description
A The weapon type identifier (as descriped above).
B Fire type enumeration. Can be: MELEE, PROJECTILE (for uzis and pistols), INSTANT_HIT (for rifles), USE, AFFECT_AREA and CAMERA.
C The range a target can be aimed.
D The range of the bullets to cause damage.
E Model identifier of the primary weapon (defined inside the default.ide file).
F Model identifier of the secondary weapon (apparently unused, always -1).
G The time the primary weapon requires to be reloaded.
I The slot the weapon requires in the game.

Melee weapon parameters

This section is incomplete. You can help by fixing and expanding it.

Gun parameters

This section is incomplete. You can help by fixing and expanding it.

Weapon aiming offsets

This section is incomplete. You can help by fixing and expanding it.