Modding Data

From Cyber Knights: Flashpoint Wiki

Data Modification or Data Modding refers to changing the game's internal database in any way - by deleting or modifying entities (weapons, stories, etc) or adding new entities entirely.

Data modifications almost always require a SQL file to detail the changes to the game's database and a JSON file that includes any text for your modifications or additions.

  • \upload_content\_data\data.sql
  • \upload_content\_data\en-US.json (plus any extra JSON files to support translations such as de-DE.json for German translation)

It is up to your personal preference to choose your method of creating and maintaining your mod's SQL/JSON files. There are two cases detailed below - provide the required files from another tool (NotePad++, something you created, Excel, etc) or use the Data Modding JSON specification and provided parser.

To further illustrate the different methods of creating input for your mod, the Modding Use Cases include the 3 methods of producing the input for an example mod that adds and modifies a weapon.

Using the JSON Spec and Data Parser[edit | edit source]

We have provided a JSON schema and parser to help ensure you can author SQL and accompanying JSON text strings efficiently and within the rules of the game's schema. This Data Parser accepts JSON input, validates that input against the game's database schema and then creates the matching SQL and JSON text file for your mod in the upload_content\_data folder.

Key Benefits of the Data Parser[edit | edit source]

  • Single JSON source with code-driven splitting of SQL/JSON results. You can author all details for specific entities (a weapon, a line of dialog, a Casting Director match) in a single file and JSON block. The Data Parser takes care of splitting the input into the required SQL and JSON output.
  • Sparse authoring. The JSON input schema for the Data Parser allows you to author only the exact data you need. The Data Parser provides valid defaults for all skipped fields. Therefore, while an Effect has over 80 properties, if you only need to increase ActionPoints you can set that value and skip all other 79 details.
  • Parse-time validation. The Data Parser validates and enforces the rules of the game's SQL and JSON input at the time of clicking Prepare Data in the Modding Mod Uploader. This includes forcing any required field to be filled in, ensuring that fields have valid values, enforcing prefix rules and more.
  • Flexible file organization. The Data Parser allows you to register any number of JSON files into the stories.manifest file for processing. While we have organized our examples in one form, if you'd like to organize all of your dialogs in one file and all of your story Block events in another, you can handle it any way you find most efficient.
  • Built into the uploader tool. The Data Parser tool is built into the Modding Mod Uploader through the button "Prepare Mod Data" and provides a rapid way to edit your mod and then republish.

Data Parser Authoring Process[edit | edit source]

The steps to use the Data Parser as follows:

  1. Download and install the Modding Mod Uploader
  2. Use the Modding Mod Uploader to create a new mod and complete its configuration. Then use Open Folder button in the Modding Mod Uploader to navigate to the mod's root folder.
  3. Create a new file within your mod: \source_data\stories.manifest This manifest file lists all of the JSON files which should be processed by the Data Parser. If you have a larger mod, a longer story or more complex content you will want to break this into multiple modular files. Within stories.manifest, put the file system path to each JSON file on individual lines. Start a line with # to make a comment.
    # My Story mods
    Global.json
    Recruit_Jason.json
    
    # My legwork additions
    Legwork1.json
    Legwork2.json
    
  4. Create any number of JSON files (as listed in stories.manifest) for your mod, per the Data Parser JSON Schema and Modding Use Cases.
  5. When ready to test or upload, click "Prepare Mod Data". This step will validate all of the JSON files lists in stories.manifest. If there is a parsing or schema error, an alert is shown. If the parsing completes, then your prepared SQL and JSON content is written into \upload_content\_data\
  6. During the iterative development and testing of your mod, use "Local Install" to install the mod content into your local Steam Mod folder.
  7. When you are ready to share your mod publicly, upload the mod to Steam by pressing "Submit"

Directly Provide Files from Another Tool[edit | edit source]

You may use any tool to create the required SQL and JSON files. Simply place the files into the upload_ready\_data\ folder and use the Modding Mod Uploader to submit the files to Steam with your mod configuration.

  • \upload_content\_data\data.sql
  • \upload_content\_data\en-US.json
Note: Regardless of how you prepare and maintain your mod's source files, be sure to use source code revision to ensure changes are maintained and your work is not lost.

----

Modding: Home · Quick Start Guide · Modkit Uploader · Example Project · Data Modding · Data Parser Schema · Use Cases · Download Modding Resources