-
Notifications
You must be signed in to change notification settings - Fork 5
Config modifications
Learn how to make a simple mod overriding some existing configs and adding some new ones. Make sure to check the "Mod projects" tutorial first.
This tutorial is available directly in the SDK under
PB Mod SDK/Getting Started/Tutorials/Config overrides. 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.

As in the last tutorial, we'll start by using the mod project manager. Let's assume we're starting where we left off in the last tutorial: you already have a mod project with a chosen ID.
Let's try to make a mod that turns some existing liveries red and adds a new livery option on top of that. After filling in the metadata, your project editor should look like the image above.

Most mods involve modifying game data. Anything from balance tweaks and color changes to entire scenarios and combat abilities is defined in files we call configs.
The SDK you download includes the configs from the game and dedicated tools for every single database. To unlock config editing, we first need to create a copy of game data in the mod project folder. To do this, click the "Setup config editing" button.

After a few moments, the operation will complete and config editing would be unlocked for this project going forward.
Click the newly available "Enter config editing" button to tell the SDK to start reading files from your mod.

You'll see the mod name turn green. With this, you've unlocked all database tools: any config can now be freely modified. Let's try opening one of these databases and changing something.

Every database in the game is available through the same scene hierarchy as the mod project manager, under the DataModel object.
Since we planned to make a modification to mech liveries, let's select DataModel/Collections/Equipment/Liveries.

Like every other database under Collections, the Livery database contains multiple configs: every YAML file in the associated folder.
Many databases can contain hundreds of entries, so we strongly recommend enabling the "filter" option and entering a query to display a subset of configs that you're after.
Let's choose one of the livery groups and enter part of their name. The rest of this tutorial will assume you enabled the filter and entered "sunset" as your query. This should leave us with 4 displayed configs.

Unfolding one of the results will show you the config editor. Let's try making use of it and turn all the colors in this livery red.

Editing data through the editors can be much faster than directly editing YAML files. Instead of typing channel values, here we could click a color field, switch the color picker to HSV mode and drag the hue all the way to the left.
Other editors offer more advanced functionality such as dropdowns, data validation, multi-type fields with custom editors for each possible payload, curve editors and more.

Once you're happy with your changes, scroll to the top of the database inspector and click Save Data. Well done! Your project now contains the first modification.

Let's learn one more thing before we try to export this mod: adding a new config instead of modifying an existing one.
We strongly recommend doing this by duplicating an existing config. While liveries are fairly straightforward, many configs in the game are highly complex and might require a precise setup to work. It's usually more effective to duplicate and modify rather than enter everything from scratch.
Try this by clicking "Duplicate" next to one of the filtered entries, like on the image above.

The duplicated entry will have an autogenerated file name you will probably want to change. This brings us to another option: renaming configs.
Type a new name in the editable field under the name, and you should see the "Rename" button appear to the right. Click it to complete the renaming.

With the renaming done, you'll see the header of the config reflect the new name, confirming the change. Configure the new livery as you see fit and hit "Save data" on top of the inspector once you're done. This should do for our first config mod: time to export it!

Time to return to the mod project manager. Use the PB Mod SDK menu on top of the screen or select it in the Hierarchy.
Make sure you have "Includes config overrides" in the metadata: this will tell the game to look for config changes, and will tell the export process to scan for config changes and will tell the game to load them. If you make any changes to the mod project, hit "Save".
Time to press "Export to user"! This might take a little longer than your first more, but once the process is done, you should see Windows Explorer open the exported folder.

You can confirm whether the changes you expect were detected and included into the mod by browsing through the files. For example, or livery changes would be in Mods/ModName/ConfigOverrides/DataDecomposed/Equipment/Liveries, like on the screenshot above.

Time to launch the game and see if your mod works! We already know how to check the metadata in the Mods tab of the main menu, so let's jump straight into mech customization and see if we can see our red liveries. Looks like they were loaded!
Congratulations, you've created your first playable mod! Try packaging it into an archive using the "Export to archive" option to the right of "Export to user" and share it with other players!
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!