(Created page with "Pickup 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 <code>ExternalData\DarkForces\pickups.json</code>. Altering the data in <code>pickups.json</code> will alter the way that pickup items behave in the game. If the JSON file is removed, renamed or corrupted, pickup items will not work correctly. (In this case, an error message will be logged.) Note that all text in the JSON is case i...") |
|||
Line 14: | Line 14: | ||
If a property is not defined in the JSON, it will fall back to the default shown in the table. | If a property is not defined in the JSON, it will fall back to the default shown in the table. | ||
{| border=1 cellpadding=6px | |||
|- | |||
! Property !! Type !! Default value !! Description | |||
|- | |||
| type || string || 'none' || There are 7 types of pickup. These are: | |||
* <code>objective</code> | |||
* <code>weapon</code> | |||
* <code>ammo</code> | |||
* <code>usable</code> | |||
* <code>codekey</code> | |||
* <code>powerup</code> | |||
* <code>special</code> | |||
|} |
Revision as of 04:11, 6 December 2024
Pickup 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\pickups.json
.
Altering the data in pickups.json
will alter the way that pickup items behave in the game. If the JSON file is removed, renamed or corrupted, pickup items 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 pickups and their properties can be listed in any order.
Mods
A customised version of pickups.json
can be included in a mod's ZIP file. A modded pickups.json
will take precedence over the base version.
Modded versions of pickups.json
need to include definitions for all 46 of the pickup items. If any pickup definitions are missing, those pickups will not work when the game is played.
Pickup item properties
Each pickup item can have the following properties defined. This table lists the properties and what they mean.
If a property is not defined in the JSON, it will fall back to the default shown in the table.
Property | Type | Default value | Description |
---|---|---|---|
type | string | 'none' | There are 7 types of pickup. These are:
|