TFE Projectile Data

From DF21 Wiki
Revision as of 04:26, 23 November 2024 by Jerethk (talk | contribs)

Projectile data is hardcoded in Dark Forces but the data has been externalised to a JSON file in The Force Engine. The data is located in ExternalData\DarkForces\projectiles.json.

Altering the data in projectiles.json will alter the way that weapon projectiles behave in the game. If the JSON file is removed, renamed or corrupted, weapons will not work correctly. (In this case, an error message will be logged to the TFE console when loading the game.)

Mods

A customised version of projectiles.json can be included in a mod's ZIP file. A modded projectiles.json will take precedence over the base version.

Projectile properties

Each projectile type can have the following properties defined. This table lists the properties and what they mean.

Property Type Default value Description
assetType string "spirit" The type of asset that the projectile uses. It must be one of the following: "spirit", "frame", "sprite" or "3d". (A spirit is an invisible object that has no asset.)
asset string A .FME, .WAX, or .3DO file. The type must match the assetType. If the assetType is spirit, this property can be left unset and will be ignored.
fullBright boolean false Whether or not the asset will be rendered fullbright.
zeroWidth boolean false If true, the projectile will not have a collision radius. Most projectiles have zero width.
autoAim boolean false If true, the player's weapons will auto-aim at the projectile. (This applies to Mohc's homing missiles because they can be shot down.
movable boolean false If true, the projectile will be moved by elevators. For example if you lay a mine on a rotating sector, the mine will rotate with it.