-
Notifications
You must be signed in to change notification settings - Fork 5
Config editing system
Learn how to define advanced config edits. These modifications can change the same file at the same time, seamlessly support game updates, and more.
This tutorial is available directly in the SDK under
PB Mod SDK/Getting Started/Tutorials/Config edits. The SDK version can include interactive elements such as buttons automatically selecting project assets. Make sure you are in the right scene (game_main_sdk or game_extended_sdk). You should see DataModel and ModManager in the Hierarchy window. If you're unsure how to find the right scene, use the scene buttons in the Getting Started window.

If you have completed the Config Overrides tutorial and are familiar with the databases you'd like to modify, let's begin.
Start by adding a new section to your mod project config. Click "configEdits" in the bottom right component dropdown.

The new section contains two collections: edits to global databases and edits to collection databases. To decide which one you need, explore the Hierarchy tab under the DataModel object.

Every database under Collections will be a collection based (multi file) database, while everything under Global will typically be a unique database (single file). When you're ready, click the dropdown in the mod manager and select the DB you want to edit.

For each database config, you can create a list of edits. These edits consist of a path to the field as well as a value or operation you need to perform.
For example, here, after studying what Simulation settings database holds, we decided to edit the stat increases that occur per level. We know the field is called "partLevelIncrease", so we enter that to the "Path" field and enter a new value below.
Refer to the link below for detailed overview of possible operations, accessing collections and more.

Edits to multi-linker databases include another layer (selecting the config key you're modifying) and include removing a config entirely.
While these edits are more time consuming to create, they enable the users to easily combine your mod with other mods and remove the need to redo the mod on every official update. Consider making a mod using config edits, especially if you need to modify a config that could be of interest to many different modifications.
You can import config edits from an existing mod. Copy the ConfigEdits folder into your mod project folder and press the "Load from files" button in the Config Edits block. Please note that this operation will delete everything entered into this block before importing your files.
This wiki is a work in progress. Please make sure to check the built-in tutorials within the SDK or the modding articles on the game wiki to supplement this page. If you get stuck or experience a bug, please don't hesitate to ask questions in the #phantom-modding channel of the official Discord server. We can't wait to see what you create!