Difference between revisions of "Project X/Weapon file block"
From Worms Knowledge Base
m |
m (Make table colors work in IE (yeah some hillbilly's still use this)) |
||
(16 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ParentArticle|[[Project X]]}} | {{ParentArticle|[[Project X]]}} | ||
− | A weapon block describes of what kind a weapon is, how it reacts, its physical parameters, how much initial ammunition is available and much more. Because of the many different weapon | + | A weapon block describes of what kind a weapon is, how it reacts, its physical parameters, how much initial ammunition is available and much more. Because of the many different weapon styles, different sub-blocks have to be read depending on the type. However, the "header" is always the same, being explained at first, and following the other sub-blocks. If not further explained, data at offsets not listed is empty (0-bytes). |
+ | |||
+ | The data types are in [http://msdn.microsoft.com/en-us/library/s1ax56ch.aspx C# notation]. | ||
== Header == | == Header == | ||
Line 18: | Line 20: | ||
| 4 | | 4 | ||
| int | | int | ||
− | | | + | | Version |
− | | 0x5ABBDD06 | + | | 0x5ABBDD05 (default.pxs), 0x5ABBDD06 (others) |
− | | | + | | Version of the weapon block. default.pxs ships with a slightly older version than the one used in schemes saved by the editor. |
|- | |- | ||
| 4 | | 4 | ||
| 8 | | 8 | ||
− | | | + | | long |
| Checksum | | Checksum | ||
| | | | ||
Line 32: | Line 34: | ||
== General Settings == | == General Settings == | ||
− | Following the header are some general settings (configured in the first window of the Project X Weapon Editor). Additional settings follow | + | Following the header are some general settings (configured in the first window of the Project X Weapon Editor). Additional settings follow at offset 468, and between this are weapon style specific sub-blocks (so there's space between the first group of settings and the second group, used differently for each weapon style). |
{| border="1" cellspacing="0" class="wikitable" | {| border="1" cellspacing="0" class="wikitable" | ||
Line 66: | Line 68: | ||
| 4 | | 4 | ||
| int | | int | ||
− | | | + | | Shots |
| | | | ||
− | | The number of | + | | The number of shots which can be done before the turn ends. |
|- | |- | ||
| 28 | | 28 | ||
Line 82: | Line 84: | ||
| Retreat time | | Retreat time | ||
| | | | ||
− | | The retreat time in | + | | The retreat time in milliseconds after the weapon has been fired (and shoot ends turn is true). |
|- | |- | ||
| 36 | | 36 | ||
Line 179: | Line 181: | ||
** 0x03: Canister | ** 0x03: Canister | ||
* If the activation type is "Airstrike" or "Space", this int does not exist and the offset is already used for other information (s. below). | * If the activation type is "Airstrike" or "Space", this int does not exist and the offset is already used for other information (s. below). | ||
+ | |- bgcolor="#ddffdd" | ||
+ | | colspan="6" align="center" | | ||
+ | '''Weapon style specific sub-blocks (s. below)''' | ||
+ | |||
|- | |- | ||
| 468 | | 468 | ||
Line 230: | Line 236: | ||
|- | |- | ||
| diff. | | diff. | ||
− | | | + | | diff. |
− | | | + | | string |
− | | | + | | GFX file path |
+ | | data\gfx\gfx.dir | ||
+ | | The path to the GFX directory file to use. Obsolete and not visible in the editor anymore, but still set in default.pxs. | ||
+ | |- bgcolor="#ffeeee" | ||
+ | | diff. | ||
+ | | diff. | ||
+ | | string[5] | ||
+ | | Sprite index names | ||
| | | | ||
− | | | + | | It is possible to store not only numerical sprite indices in Sprite structures (s. below), but also strings to file names. If a file name is used in a Sprite structure, 100000 is stored as the numerical index, but the actual value is a string from this array. Depending on the Sprite use, one of the following indices has to be used to access the right file name out of this array: |
+ | * 0: Unknown | ||
+ | * 1: Launcher | ||
+ | * 2: Cluster | ||
+ | * 3: Homing | ||
+ | * 4: Unknown | ||
|- | |- | ||
| diff. | | diff. | ||
Line 256: | Line 274: | ||
| | | | ||
| True to use the weapon block as specified in the library with the following name. Renders other settings of this weapon block useless. The following two strings "Library name" and "Library weapon name" do not exist if this bool is false. | | True to use the weapon block as specified in the library with the following name. Renders other settings of this weapon block useless. The following two strings "Library name" and "Library weapon name" do not exist if this bool is false. | ||
− | |- | + | |- bgcolor="#ddddff" |
+ | | colspan="6" align="center" | '''If ''Use from library'' is set''' | ||
+ | |- bgcolor="#eef" | ||
| diff. | | diff. | ||
| diff. | | diff. | ||
Line 262: | Line 282: | ||
| Library name | | Library name | ||
| | | | ||
− | | The name of the library from which the weapon block with the following name should be used | + | | The name of the library from which the weapon block with the following name should be used. |
− | |- | + | |- bgcolor="#eeeeff" |
| diff. | | diff. | ||
| diff. | | diff. | ||
Line 269: | Line 289: | ||
| Library weapon name | | Library weapon name | ||
| | | | ||
− | | The name of the weapon in the library with the name specified above | + | | The name of the weapon in the library with the name specified above. |
|- | |- | ||
| diff. | | diff. | ||
Line 360: | Line 380: | ||
| Utility | | Utility | ||
| | | | ||
− | | True if this weapon appears at the bottom right above the wind indicator if activated. | + | | True if this weapon appears at the bottom right above the wind indicator if activated. Only in weapon block versions 0x5ABBDD06 (e.g. missing in unmodified default.pxs). |
|} | |} | ||
Line 603: | Line 623: | ||
| 100 | | 100 | ||
| 24 | | 24 | ||
− | | | + | | Sprite |
| Animation | | Animation | ||
| | | | ||
− | | S. below for the | + | | S. below for the Sprite structure. |
|- | |- | ||
| 124 | | 124 | ||
Line 669: | Line 689: | ||
| Explosion action | | Explosion action | ||
| | | | ||
− | | Can be one of the following values, providing | + | | Can be one of the following values, providing the type of the following action block: |
* 0x00: None | * 0x00: None | ||
* 0x01: Home | * 0x01: Home | ||
Line 675: | Line 695: | ||
* 0x03: Roam | * 0x03: Roam | ||
* 0x04: Dig | * 0x04: Dig | ||
+ | |- bgcolor="#ddffdd" | ||
+ | | colspan="6" align="center" | '''Explosion action specific sub-block (s. below)''' | ||
|- | |- | ||
− | | | + | | 244 |
| 4 | | 4 | ||
| int | | int | ||
− | | Explosion | + | | Explosion target |
| | | | ||
− | | | + | | Can be one of the following values, providing the type of the following explosion target block: |
* 0x00: Nothing | * 0x00: Nothing | ||
* 0x01: Clusters | * 0x01: Clusters | ||
* 0x02: Fire | * 0x02: Fire | ||
+ | |- | ||
+ | | 248 | ||
+ | | 4 | ||
+ | | int | ||
+ | | Unused | ||
+ | | | ||
+ | | Does not seem to be used by ProjectX. | ||
+ | |- bgcolor="#ddffdd" | ||
+ | | colspan="6" align="center" | '''Explosion target specific sub-block (s. below)''' | ||
|} | |} | ||
Line 717: | Line 748: | ||
| | | | ||
| Can be one of the following values: | | Can be one of the following values: | ||
− | * 0x00: | + | * 0x00: None (don't home) |
− | * 0x01: | + | * 0x01: Straight (like homing missile) |
− | * 0x02: | + | * 0x02: Intelligent (like pigeon) |
|- | |- | ||
| 204 | | 204 | ||
Line 1,182: | Line 1,213: | ||
* 0x03: Roam | * 0x03: Roam | ||
* 0x04: Dig | * 0x04: Dig | ||
+ | |- bgcolor="#ddffdd" | ||
+ | | colspan="6" align="center" | '''Explosion action specific sub-block (s. above)''' | ||
|} | |} | ||
Line 1,243: | Line 1,276: | ||
=== Mine === | === Mine === | ||
− | The mine structure is also reused for a mine strike. | + | The mine structure is also reused for a mine strike. See below for the structure details. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
=== Canister === | === Canister === | ||
Line 1,402: | Line 1,377: | ||
=== Spacebar === | === Spacebar === | ||
− | The actions started with the "Spacebar" weapon | + | The actions started with the "Spacebar" weapon style are configured with a list of int parameters (except for Armageddon which follows a Launcher structure to describe each falling "meteorit"), which have different meanings for each action. The following table lists the meanings for each spacebar action. |
Remember that the spacebar parameters start at offset 60. | Remember that the spacebar parameters start at offset 60. | ||
Line 1,508: | Line 1,483: | ||
|} | |} | ||
− | == General | + | == General Structures == |
The following structures are used at several places. The offsets are relative to the start of the block to give a meaningful value. | The following structures are used at several places. The offsets are relative to the start of the block to give a meaningful value. | ||
Line 1,523: | Line 1,498: | ||
!Default value | !Default value | ||
!Remarks | !Remarks | ||
− | |- | + | |- bgcolor="#ffeeee" |
| 0 | | 0 | ||
| 4 | | 4 | ||
Line 1,529: | Line 1,504: | ||
| Sprite number | | Sprite number | ||
| | | | ||
− | | | + | | If this value is 100000, a file name is used, which is stored in the ''Sprite index names'' array of the main block. |
|- | |- | ||
| 4 | | 4 | ||
Line 1,642: | Line 1,617: | ||
|- | |- | ||
| 4 | | 4 | ||
− | | | + | | 4 |
| int | | int | ||
| Time before on | | Time before on |
Latest revision as of 20:19, 2 June 2017
A weapon block describes of what kind a weapon is, how it reacts, its physical parameters, how much initial ammunition is available and much more. Because of the many different weapon styles, different sub-blocks have to be read depending on the type. However, the "header" is always the same, being explained at first, and following the other sub-blocks. If not further explained, data at offsets not listed is empty (0-bytes).
The data types are in C# notation.
Header
Each weapon block has a small header and a checksum (which isn't actually checked, so it can be anything).
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
0 | 4 | int | Version | 0x5ABBDD05 (default.pxs), 0x5ABBDD06 (others) | Version of the weapon block. default.pxs ships with a slightly older version than the one used in schemes saved by the editor. |
4 | 8 | long | Checksum | Generation unknown, can be anything, not checked by Project X. |
General Settings
Following the header are some general settings (configured in the first window of the Project X Weapon Editor). Additional settings follow at offset 468, and between this are weapon style specific sub-blocks (so there's space between the first group of settings and the second group, used differently for each weapon style).
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
12 | 4 | int | Table Row | Row of the weapon table in which the weapon will appear. 0 = Utility row, max. is 12, higher rows cannot be accessed in-game. | |
16 | 4 | bool | Remembered | If true, the weapon will be automatically selected for the next shot after the first one. | |
20 | 4 | bool | Usable in cavern | Useful to disable airstrikes on cavern maps. | |
24 | 4 | int | Shots | The number of shots which can be done before the turn ends. | |
28 | 4 | bool | Shoot ends turn | If true, retreat time is started after the weapon has been fired. | |
32 | 4 | int | Retreat time | The retreat time in milliseconds after the weapon has been fired (and shoot ends turn is true). | |
36 | 4 | int | "Unknown" | ||
40 | 4 | int | Crate Chance | The chance that this weapon will appear in crates. This is shared between all weapons, so using a percentage value from 0-100 is a good idea rather than using any value up to 2^16. | |
44 | 4 | int | Count in Crate | The additonal ammunition a team will get when collecting a crate with this weapon in it, normally 1. | |
48 | 4 | bool | Unknown Setting | This boolean is randomly set by Project X, but the meaning has not yet been discovered. | |
52 | 4 | int | Activation by | Sets the activation type this weapon has. The following values are valid:
| |
56 | 4 | int | Activation flag |
| |
60 | 4 | int | Weapon Style |
| |
Weapon style specific sub-blocks (s. below) | |||||
468 | 4 | bool | Custom count | If true, the start ammunition overrides the ones defined in the used WSC scheme. This is only required for the first table as the weapons in the second table always use the following count. | |
472 | 4 | int | Count | The start ammunition of this weapon. | |
476 | 4 | int | Unknown setting | Probably has to do with the appearance. | |
480 | 4 | int | Weapon sprite | ||
484 | diff. | string | Long weapon name | None | |
diff. | diff. | string | Short weapon name | None | |
diff. | diff. | string | Grid IMG | hi/bazooka.img | The image of the weapon to be displayed in its table cell. hi/... references images in the sprite directory of Worms. Otherwise, a filename in the scheme or any attached library can be used, like "omgwtfbbq.png". |
diff. | diff. | string | GFX file path | data\gfx\gfx.dir | The path to the GFX directory file to use. Obsolete and not visible in the editor anymore, but still set in default.pxs. |
diff. | diff. | string[5] | Sprite index names | It is possible to store not only numerical sprite indices in Sprite structures (s. below), but also strings to file names. If a file name is used in a Sprite structure, 100000 is stored as the numerical index, but the actual value is a string from this array. Depending on the Sprite use, one of the following indices has to be used to access the right file name out of this array:
| |
diff. | 4 | bool | Custom delay | True to override the WSC delay of weapons in the first weapon table. Not required for any additional table. | |
diff. | 4 | int | Delay | The number of turns which have to be completed by each team before this weapon becomes available. | |
diff. | 1 | bool | Use from library | True to use the weapon block as specified in the library with the following name. Renders other settings of this weapon block useless. The following two strings "Library name" and "Library weapon name" do not exist if this bool is false. | |
If Use from library is set | |||||
diff. | diff. | string | Library name | The name of the library from which the weapon block with the following name should be used. | |
diff. | diff. | string | Library weapon name | The name of the weapon in the library with the name specified above. | |
diff. | diff. | string | Aim sprite name even | ||
diff. | diff. | string | Aim sprite name uphill | ||
diff. | diff. | string | Aim sprite name downhill | ||
diff. | diff. | string | Pick sprite name even | ||
diff. | diff. | string | Pick sprite name uphill | ||
diff. | diff. | string | Pick sprite name downhill | ||
diff. | diff. | string | Fire sprite name even | ||
diff. | diff. | string | Fire sprite name uphill | ||
diff. | diff. | string | Fire sprite name downhill | ||
diff. | 1 | bool | Custom aim sprite | True to use the custom aim sprite names. | |
diff. | 1 | bool | Custom pick sprite | True to use the custom pick sprite names. | |
diff. | 1 | bool | Custom fire sprite | True to use the custom fire sprite names. | |
diff. | 1 | bool | Utility | True if this weapon appears at the bottom right above the wind indicator if activated. Only in weapon block versions 0x5ABBDD06 (e.g. missing in unmodified default.pxs). |
Weapon Style Blocks
Depending on the Weapon style setting, the following blocks appear in the file.
Flamethrower
This block is not configurable in the Project X editors as its editing window has not been implemented, but loaded correctly in-game.
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
64 | 4 | int | Amount of fuel | ||
68 | 4 | int | Fire intensity | ||
72 | 4 | int | Amount of fire | ||
76 | 4 | int | Burn time | In millseconds. | |
80 | 4 | bool | Remain on terrain | If true, fire stays between turns, as introduced with the Petrol Bomb in WA. |
Gun
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
64 | 4 | int | Bullet count | ||
68 | 4 | int | Reload time | ||
72 | 4 | int | Bullet spread | ||
76 | 4 | int | Burst | ||
80 | 4 | int | Burst spread | ||
84 | 4 | CollisionFlags | Collision flags | S. below for the enumeration of collision flags. | |
88 | 4 | int | Bias | ||
92 | 4 | int | Power | ||
96 | 4 | int | Max. damage | ||
100 | 4 | int | Damage spread | ||
104 | 4 | int | Exp. effect | ||
108 | 4 | int | Range 1 | ||
112 | 4 | int | Range 2 | ||
116 | 4 | int | Range 3 |
Launcher
The complex launcher structure is reused not only for the weapon style, but also for the bomb parameters of an airstrike, with the corresponding offsets then. The offsets here are the same as if the weapon style is "Launcher".
Depending on the actions and explosion targets the weapons are subclassed in, child blocks are possible, explained afterwards.
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
64 | 4 | int | Sprite size | ||
68 | 4 | int | Fixed speed | ||
72 | 4 | bool | Run away! | ||
76 | 4 | CollisionFlags | Explosion collision flags | ||
80 | 4 | int | Explosion bias | ||
84 | 4 | int | Explosion push power | ||
88 | 4 | int | Explosion damage | ||
92 | 4 | int | Explosion damage variation | ||
96 | 4 | int | Explosion "Unknown" | ||
100 | 24 | Sprite | Animation | S. below for the Sprite structure. | |
124 | 4 | int | Variable speed | ||
128 | 4 | int | Wind factor | ||
132 | 4 | int | Randomness of motion | ||
136 | 4 | int | Gravity factor | ||
140 | 4 | int | Explosion countdown from | In milliseconds. | |
144 | 4 | int | Explosion timer | In milliseconds. | |
148 | 16 | Sound | Sound | S. below for the sound structure | |
164 | 4 | bool | Explosion on spacebar | ||
168 | 4 | int | Explosion action | Can be one of the following values, providing the type of the following action block:
| |
Explosion action specific sub-block (s. below) | |||||
244 | 4 | int | Explosion target | Can be one of the following values, providing the type of the following explosion target block:
| |
248 | 4 | int | Unused | Does not seem to be used by ProjectX. | |
Explosion target specific sub-block (s. below) |
Homing action
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
172 | 4 | int | Unused | This byte is never used by Project X and can be handled as a placeholder. | |
176 | 24 | Sprite | Sprite | ||
200 | 4 | int | Homing style | Can be one of the following values:
| |
204 | 4 | int | Homing after | In milliseconds. | |
208 | 4 | int | Homing duration | In milliseconds. |
Bounce action
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
172 | 4 | CollisionFlags | Bounce off | ||
176 | 4 | int | Bounciness | ||
180 | 4 | int | Acceleration | ||
184 | 4 | int | Bounce sound | ||
188 | 4 | int | "Unknown" 1 | ||
192 | 4 | int | "Unknown" 2 | ||
196 | 4 | int | Explosion bias | ||
200 | 4 | int | Explosion power | ||
204 | 4 | int | Explosion damage | ||
208 | 4 | int | Randomness of damage | ||
212 | 4 | int | Number of bounces |
Roam action
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
172 | 4 | CollisionFlags | Roam off | ||
176 | 4 | CollisionFlags | Exploding on | ||
180 | 4 | int | Walk speed | ||
184 | 4 | int | "Unknown" | ||
188 | 4 | int | Jump angle at edge | ||
192 | 4 | int | Jump velocity at edge | ||
196 | 4 | int | Jump sound at edge | ||
200 | 4 | int | Jump angle | ||
204 | 4 | int | Jump velocity | ||
208 | 4 | int | Jump sound | ||
212 | 4 | int | Terrain offset | ||
216 | 4 | bool | Fart | ||
220 | 4 | int | Disease power | ||
224 | 4 | int | Sprite when farting | ||
228 | 4 | int | Sprite when flying | ||
232 | 4 | int | Sprite when flying 2 | ||
236 | 4 | int | Sprite when taking off | ||
240 | 4 | int | Sprite during flight |
Dig action
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
172 | 4 | int | "Unknown" 1 | ||
176 | 4 | int | "Unknown" 2 | ||
180 | 4 | int | Digging sound | ||
184 | 4 | int | Sprite while jumping | ||
188 | 4 | int | Sprite 1 | ||
192 | 4 | int | Sprite 2 | ||
196 | 4 | int | Sprite 3 |
Cluster explosion target
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
172 | 4 | int | Number of clustlets | ||
176 | 4 | int | Dispersion power | ||
180 | 4 | int | Speed | ||
184 | 4 | int | Ejection angle | ||
188 | 4 | int | Dispersion angle | ||
192 | 4 | CollisionFlags | Explosion flags | ||
196 | 4 | int | Explosion bias | ||
200 | 4 | int | Explosion push power | ||
204 | 4 | int | Explosion damage | ||
208 | 4 | int | Explosion damage variation | ||
212 | 4 | int | Number of used sprites | Overrides "Unknown" which can be configured in the Project X editor. | |
216 | 24 | Sprite | Animation | ||
240 | 4 | int | Acceleration | ||
244 | 4 | int | Wind response | ||
248 | 4 | int | Randomness of motion | ||
252 | 4 | int | Gravity factor | ||
256 | 4 | int | Unused | ||
260 | 4 | int | Unused | ||
264 | 16 | Sound | Sound | ||
280 | 4 | bool | Explode on spacebar | ||
284 | 4 | int | Action | Can be one of the following values, providing information about the following action block:
| |
Explosion action specific sub-block (s. above) |
Fire explosion target
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
172 | 4 | int | Fire power | ||
176 | 4 | int | Fire spread | ||
180 | 4 | int | Fire time | ||
184 | 4 | bool | Stay between turns |
Bow
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
64 | 4 | int | Damage |
Mine
The mine structure is also reused for a mine strike. See below for the structure details.
Canister
Not enabled officially, this canister structure was intended to be used for a small dropable weapon which infects nearby worms with green smoke. It should be noted that this kind of weapon lacks object limit because it was not implemented (due to the weapon not being officially present in the game).
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
64 | 4 | int | Sprite when inactive | ||
68 | 4 | int | Sprite when active | ||
72 | 4 | int | Disease points | ||
76 | 4 | int | Max. damage |
Airstrike
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
60 | 4 | int | Plane sprite | ||
64 | 4 | int | Bombs count | ||
68 | 4 | int | Distance between drops | ||
72 | 4 | int | Horizontal speed | ||
76 | 4 | int | Sound | ||
80 | 4 | int | Airstrike action | Can be one of the following values, determining which block follows:
|
Spacebar
The actions started with the "Spacebar" weapon style are configured with a list of int parameters (except for Armageddon which follows a Launcher structure to describe each falling "meteorit"), which have different meanings for each action. The following table lists the meanings for each spacebar action.
Remember that the spacebar parameters start at offset 60.
Action | Parameter 1 | Parameter 2 | Parameter 3 | Parameter 4 | Parameter 5 | Parameter 6 | Parameter 7 |
---|---|---|---|---|---|---|---|
None | |||||||
Fire punch | Damage | Angle | Push power | Height of jump | |||
Baseball bat | Damage | Push power | |||||
Dragon ball | Firing sound | Impact sound | Ball sprite | Damage | Angle | Force | Flying time |
Kamikaze | Flying time | Explosion damage | Fire sound | Damage | Force of impact | Angle of impact | |
Suicide bomber | Disease points | Damage | |||||
Ninja rope | Number of shoots (255 = infinite) | Length | Angle restriction | ||||
Bungee | |||||||
Pneumatic drill | Damage | Push power | Impact angle | Tunelling time | |||
Prod | Damage | Force | Angle | ||||
Teleport | |||||||
Blowtorch | Damage | Push power | Impact angle | Tunelling time | |||
Parachute | Wind response | ||||||
Surrender | |||||||
Skip go | |||||||
Select worm | |||||||
Nuclear test | Water rise | Disease points | |||||
Girder | |||||||
Battle axe | Percent taken off | ||||||
Utility | |||||||
Freeze | |||||||
Earthquake | |||||||
Scales of justice | |||||||
Jet pack | Fuel | ||||||
Armageddon | Bombs - this is a launcher structure instead of an int. |
General Structures
The following structures are used at several places. The offsets are relative to the start of the block to give a meaningful value.
Sprite
Describes how an animation is... animated.
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
0 | 4 | int | Sprite number | If this value is 100000, a file name is used, which is stored in the Sprite index names array of the main block. | |
4 | 4 | int | Animation type | Can be one of the following values:
| |
8 | 4 | int | Sprite for trail | ||
12 | 4 | int | Amount of trail | ||
16 | 4 | int | Trail vanish speed | ||
20 | 4 | int | "Unknown" |
Sound
Describes a sound.
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
0 | 2 | short | Sound | ||
2 | 2 | bool | Repeat sound | ||
4 | 4 | bool | Use explosion sound | ||
8 | 4 | int | Sound before explosion | ||
12 | 4 | int | Delay before explosion | In milliseconds. |
Mine
Describes how a mine behaves.
Offset | Size | Type | Description | Default value | Remarks |
---|---|---|---|---|---|
0 | 4 | int | Sensitivity | ||
4 | 4 | int | Time before on | In milliseconds. | |
8 | 4 | CollisionFlags | Sensitive to | ||
12 | 4 | int | Fuse time | In milliseconds. | |
16 | 4 | int | Explosion bias | ||
20 | 4 | int | Blast power | ||
24 | 4 | int | Max. damage |
Collision flags
These combinable flags set to what kinds of objects weapon collide or mines are sensitive.
Bit index | Description |
---|---|
0 | None |
1 | Terrain |
2 | Worms on terrain |
3 | Worms using weapon |
4 | Worms in mid-air |
5 | Worms on rope/bungee |
6 | Frozen worms |
7 | Unused |
8 | Kamikaze/suicide bomber |
9 | Gas canisters |
10 | Mines |
11 | Crates |
12 | Donor cards |
13 | Gravestones |
14 | Unused |
15 | Other weapons |
16 | Longbow arrows |
17 | Oil drums |
18 | Unused |
19 | Unused |
20 | Unused |
21 | Unused |
22 | Skimming |
23 | Unused |
24 | Unused |
25 | Unused |
26 | Unused |
27 | Unused |
28 | Unused |
29 | Unused |
30 | Unknown |
31 | Unused |