Every FPX mod requires a patch.json file in its root directory, which defines the mod and contains the instructions on how to apply it. It does follow normal JSON formatting standards. An “empty” mod to use as a starting template can be downloaded from the link below.
The instruct file will generally start with the following information. Only the highlighted entries are required; the rest are currently unused, but will be by the GUI front-end eventually distributed with FPX. Unless otherwise mentioned, assume all elements are strings.
name | Name of your mod |
version | version of your mod. Supports semantic versioning. |
author | Mod author or team name |
web | URL where to check for updates |
description | describe your mod |
Following these elements, you provide the actual instructions that define how your mod is set up. These include the following operations:
index | key/value pairs that “index” a file under a given name, making it patchable. Most OG *.dat files are indexed by default. |
copy | given a folder destination and a series of files, copies those files into the destination. Used to provide assets which are referenced by patch data. |
patch | given a valid index, adds file contents to the end of the original indexed file, in effect adding new content to the game. |
sequence | Similar to a copy operation, but allows the file name to be sequentially generated at deployment. Used mostly when adding new music to the game. |
filter | Attaches a lua file to a given index, which is executed at the end of mod deployment. Refer to the filter script lua API. |
override | informs FPX to NOT grab the master copy of a file during the patch process. Useful if you have overwritten a file that is usually indexed. |
Below are the formatting standards of each category. Where a ellipses (…) occurs, is where something (can) continue in the given sequence.
Index:
|
Copy:
|
patch:
|
sequence:
|
filter:
|
override:
|