Weapons file

From Worms Knowledge Base

Jump to: navigation, search
(Up to File formats)

A weapons file stores Worms 2 weapon options. Unlike other games, this file does not also contain game options; those are stored in a separate file.

As in traditional Worms 2 fashion, most of the values which could be stored within one byte are stored within four. All types are little-endian. How many of these are actually read has not been tested.

Reverse engineered by Muzer, so there might be mistakes ;)

Header

Offset Size Type Description
00 0x10 Unknown 16 bytes of unknown purpose. Appears to change every time you save it even if nothing in the file is changed and I can see no pattern myself. The game does not seem to care if you edit it.
10 8 char[8] Magic number used to identify the weapons file. The string "WEPFILE", but null-terminated (unlike the one in the options file). Which is good because it means the whole file is now nicely aligned (compared to the options file at least).

Weapons

Each weapon appears to be 140 bytes long, and they appear to be directly concatenated together. Fields which do not apply to that weapon appear to be populated with 0xe0e0e0e0. The offsets are now relative to the start of that weapon (0x18 for the bazooka, etc.).

Offset Size Type Description
00 4 sint32 Initial stock of weapon. 0x0a (10) is infinite.
04 4 sint32 Delay of weapon.
08 4 sint32 Retreat time after using weapon. 0 for scheme default.
0C 4 sint32 Nonzero if the weapon is remembered (automatically equipped the next time that worm takes a turn).
10 4 sint32 Not used in any weapon.
14 4 sint32 Total ammo found in a crate.
18 4 sint32 Bullet count (in a single shot).
1C 4 sint32 Appears in crates (crate probability), measured in percent.
20 4 sint32 Weapon damage, measured in health points. Also determines blast radius.
24 4 sint32 Blast power, measured in percent. Pushing power of the weapon.
28 4 sint32 Explosion Bias, measured in percent.
2C 4 sint32 Homing delay, measured in milliseconds.
30 4 sint32 Homing time, measured in milliseconds.
34 4 sint32 Wind response, measured in percent.
38 4 sint32 Not used in any weapon.
3C 4 sint32 Number of clusters.
40 4 sint32 Cluster throw power, measured in percent.
44 4 sint32 Cluster throw angle, measured in degrees.
48 4 sint32 Cluster damage, measured in health points. Also determines blast radius.
4C 4 sint32 Override fuse, measured in seconds, 0 for default.
50 4 sint32 Amount of fire, measured in percent.
54 4 sint32 Fire spread speed, measured in percent.
58 4 sint32 Fire period, measured in percent (the time it burns for).
5C 4 sint32 Melee impact force, measured in percent.
60 4 sint32 Melee impact angle, measured in degrees.
64 4 sint32 Melee impact damage, measured in health points.
68 4 sint32 Fire Punch jump height, measured in percent.
6C 4 sint32 Dragon Ball damage, measured in health points.
70 4 sint32 Dragon Ball impact power, measured in percent.
74 4 sint32 Dragon Ball impact angle, measured in degrees.
78 4 sint32 Dragon Ball impact time, measured in milliseconds.
7C 4 sint32 Kamikaze and digging tools dig time, measured in milliseconds.
80 4 sint32 Number of strike bomblets.
84 4 sint32 Strike bomblet damage, measured in health points. Also determines blast radius.
88 4 sint32 Bullet spread, measured in degrees.

Here is the order in which the weapons appear. Note that superweapons do not appear in the file and so cannot be edited, even externally.

Position Name
0 Bazooka
1 Homing Missile
2 Grenade
3 Cluster Bomb
4 Banana Bomb
5 Holy Hand Grenade
6 Homing Cluster Bomb
7 Petrol Bomb
8 Shotgun
9 Handgun
10 Uzi
11 Minigun
12 Fire Punch
13 Dragon Ball
14 Kamikaze
15 Dynamite
16 Mine
17 Ming Vase
18 Air Strike
19 Homing Air Strike
20 Napalm Strike
21 Mail Strike
22 Girder
23 Pneumatic Drill
24 Baseball Bat
25 Prod
26 Teleport
27 Ninja Rope
28 Bungee
29 Parachute
30 Sheep
31 Mad Cow
32 Old Woman
33 Mortar
34 Blow Torch
35 Homing Pigeon
36 Super Sheep
37 Super Banana Bomb
Personal tools