Difference between revisions of "Weapon.dat"
(added iii/vc flags) |
(→GTA III and Vice City) |
||
Line 50: | Line 50: | ||
| <center>R</center> || <center>Animation Fire Point</center> || float || Point in animation to fire weapon, value has to be between values in columns P and Q | | <center>R</center> || <center>Animation Fire Point</center> || float || Point in animation to fire weapon, value has to be between values in columns P and Q | ||
|- | |- | ||
− | | <center>S</center> || <center>Animation2 Loop Start</center> || float || | + | | <center>S</center> || <center>Animation2 Loop Start</center> || float || Start point of crouching animation to be looped for shooting |
|- | |- | ||
− | | <center>T</center> || <center>Animation2 Loop End</center> || float || | + | | <center>T</center> || <center>Animation2 Loop End</center> || float || End point of crouching animation to be looped for shooting |
|- | |- | ||
− | | <center>U</center> || <center>Animation2 Fire Point</center> || float || | + | | <center>U</center> || <center>Animation2 Fire Point</center> || float || Point in crouching animation to fire weapon, value has to be between values in columns S and T |
|- | |- | ||
| <center>V</center> || <center>Breakout Animation</center> || float || | | <center>V</center> || <center>Breakout Animation</center> || float || | ||
Line 62: | Line 62: | ||
| <center>X</center> || <center>Model2 ID</center> || integer || IDE model of the weapon attachment, only Minigun model shows an effect | | <center>X</center> || <center>Model2 ID</center> || integer || IDE model of the weapon attachment, only Minigun model shows an effect | ||
|- | |- | ||
− | | <center>Y</center> || <center>Flags</center> || hex || | + | | <center>Y</center> || <center>Flags</center> || hex || see below |
|- | |- | ||
| <center>Z</center> || <center>Weapon Slot</center> || integer || 0: Fist<br>1: Melee<br>2: Thrown<br>3: Pistol<br>4: Shotgun<br>5: Submachine gun<br>6: Assault rifle<br>7: Heavy<br>8: Sniper rifle<br>9: Special | | <center>Z</center> || <center>Weapon Slot</center> || integer || 0: Fist<br>1: Melee<br>2: Thrown<br>3: Pistol<br>4: Shotgun<br>5: Submachine gun<br>6: Assault rifle<br>7: Heavy<br>8: Sniper rifle<br>9: Special |
Revision as of 23:25, 23 January 2011
The weapon.dat
is a file located in the data/
directory of all GTA games. 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.
Contents
File format
This section is incomplete. You can help by fixing and expanding it.
GTA III and Vice City
This section is incomplete. You can help by fixing and expanding it.
Identifier | Type | Description | |
---|---|---|---|
string | |||
string | Available types include: MELEE , INSTANT_HIT , PROJECTILE , AREA_EFFECT , and CAMERA
| ||
float | The range of the bullet in units | ||
integer | |||
integer | The time to reload in milliseconds, constrained by the animation being played | ||
integer | The number of ammo per clip | ||
integer | Damage done to damageable objects; damage done to characters are within the range of the value while to others are accurate to the value | ||
float | |||
float | |||
float | |||
float | |||
float[3] | The x,y,z offset of the gunflash | ||
string | |||
float | Start point of animation to be looped for shooting | ||
float | End point of animation to be looped for shooting | ||
float | Point in animation to fire weapon, value has to be between values in columns P and Q | ||
float | Start point of crouching animation to be looped for shooting | ||
float | End point of crouching animation to be looped for shooting | ||
float | Point in crouching animation to fire weapon, value has to be between values in columns S and T | ||
float | |||
integer | IDE model of the weapon | ||
integer | IDE model of the weapon attachment, only Minigun model shows an effect | ||
hex | see below | ||
integer | 0: Fist 1: Melee 2: Thrown 3: Pistol 4: Shotgun 5: Submachine gun 6: Assault rifle 7: Heavy 8: Sniper rifle 9: Special |
Byte | Value | Column Name | Description |
---|---|---|---|
1 | 1 | USE_GRAVITY | |
2 | SLOWS_DOWN | ||
4 | DISSIPATES | ||
8 | RAND_SPEED | ||
2 | 1 | EXPANDS | |
2 | EXPLODES | ||
4 | CANAIM | Can auto-aim, "Classic" controls only Small guns only | |
8 | CANAIM_WITHARM | Can run while auto-aiming, "Classic" controls only Small guns only | |
3 | 1 | 1ST_PERSON | |
2 | HEAVY | Disables jumping and sprinting | |
4 | THROW | ||
8 | RELOAD_LOOP2START | ||
4 | 1 | USE_2ND | Will use a second animation after the main one played Recommended for melee weapons only because it looks odd for others |
2 | GROUND_2ND | ||
4 | FINISH_3RD | Will use a third finishing animation after the second one played, only works when USE_2ND flag is used | |
8 | RELOAD | Reload animation will play | |
5 | 1 | FIGHTMODE | Will go into a fighting stance after attacking, can crash the game if no such animation exists Melee weapons only |
2 | CROUCHFIRE | Allows firing while crouching; for weapons without a crouching animation, character will stand up to attack and crouch back down | |
4 | COP3_RD | ||
8 | GROUND_3RD | ||
6 | 1 | PARTIALATTACK | Can attack while running for melee weapons Recommended for melee weapons only because it looks odd for others |
2 | ANIMDETONATE |
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.
GTA IV
This section is incomplete. You can help by fixing and expanding it.
See also
- OBJS – IDE section to define weapons in GTA III
- WEAP – IDE section to define weapons in Vice City and San Andreas
- List of all data files
Grand Theft Auto IV | |
---|---|
File Formats | .dat • .gxt • .ide • .img • .ipl • .nod • .sco • .rpf • .rrr • .wad • .wbd/.wbn • .wdd • .wdr • .wft • .whm • .wpl • .wtd |
Documentation | Audio • Bink Video • Cryptography • Cutscenes • GXT Text • Image listing • Keycodes • Map Listing • Native functions • Paths • Radar Blips • Radio Stations • Saves • Scenarios • VTable • Weapons |
Tools | ASI Loader • ENBSeries • G-Texture • GIMS IV • Ingame WPL Editor • IV Needle • OpenIV • SparkIV • XLiveLess • WPL Manager • X Mod Installer Alice • C++ Script Hook • .NET Script Hook • Scocl |
Tutorials | Importing Textures with OpenIV • Importing Textures with SparkIV |
Modifications | GTA Connected • Gostown IV • Four Multiplayer • IV Multiplayer • CitizenMP:IV Reloaded |
Useful links | Community portal • Discussion forums • Modding forums • Mods on GTAGarage.com |