No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Altering the data in <code>projectiles.json</code> 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.) | Altering the data in <code>projectiles.json</code> 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.) | ||
Note that all text in the JSON is case insensitive (uppercase, lowercase or a mixture may be used). | |||
=== Mods === | === Mods === | ||
Line 24: | Line 26: | ||
|- | |- | ||
| movable || boolean || <code>false</code> || 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. | | movable || boolean || <code>false</code> || 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. | ||
|- | |||
| updateFunc || string || <code>"standard"</code> || This defines how the projectile will travel through space. There are four options. | |||
* <code>standard</code> - The projectile will move in a straight line. | |||
* <code>arcing</code> - The projectile will be pulled downwards by gravity (thermal detonators and mortars) | |||
* <code>landmine</code> - Used for landmines | |||
* <code>homing</code> - A homing projectile. | |||
|- | |||
| damage || number (integer) || 0 || Maximum damage caused by the projectile (equivalent to hitpoints). The projectile will cause this amount of damage before any falloff occurs. | |||
|- | |||
| falloffAmount || number (decimal) || 0 || Damage falloff amount | |||
|- | |||
| nextFalloffTick || number (integer) || 0 || Number of ticks (after projectile is spawned) before first damage falloff occurs. There are 145 ticks per second. | |||
|- | |||
| damageFalloffDelta || number (integer) || 0 || Time interval (in ticks) between subsequent damage falloffs. | |||
|- | |||
| minDamage || number (integer) || 0 || Minimum damage caused by the projectile. Once the damage has fallen off to this value, no further falloff will occur. | |||
|- | |||
| | |||
|} | |} |
Revision as of 04:42, 23 November 2024
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.)
Note that all text in the JSON is case insensitive (uppercase, lowercase or a mixture may be used).
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. |
updateFunc | string | "standard" |
This defines how the projectile will travel through space. There are four options.
|
damage | number (integer) | 0 | Maximum damage caused by the projectile (equivalent to hitpoints). The projectile will cause this amount of damage before any falloff occurs. |
falloffAmount | number (decimal) | 0 | Damage falloff amount |
nextFalloffTick | number (integer) | 0 | Number of ticks (after projectile is spawned) before first damage falloff occurs. There are 145 ticks per second. |
damageFalloffDelta | number (integer) | 0 | Time interval (in ticks) between subsequent damage falloffs. |
minDamage | number (integer) | 0 | Minimum damage caused by the projectile. Once the damage has fallen off to this value, no further falloff will occur. |