Weapon data has been externalised to a JSON file in The Force Engine. The data is located in ExternalData\DarkForces\weapons.json
.
Altering the data in weapons.json
will alter the way that weapons behave. If the JSON file is removed, renamed or corrupted, weapons will not work correctly. (In this case, an error message will be logged.)
Note that all text in the JSON is case insensitive (uppercase, lowercase or a mixture may be used). The weapons and their properties can be listed in any order.
Mods
A customised version of weapons.json
can be included in a mod's ZIP file. A modded weapons.json
will take precedence over the base version.
Modded versions of weapons.json
need to include definitions for all 10 of the weapons plus the gasmask. If any weapon definitions are missing, they will not work when the game is played.
Note about offsets
xPos and yPos offsets are based on a screen with width 320 pixels and height 200 pixels.
Gasmask
The JSON also contains data for the gasmask.
texture | The texture (BM) to use for the gasmask. |
xPos | X (horizontal) offset on the screen. |
yPos | Y (vertical) offset on the screen. |