[Tutorial] Modding Basic Concepts (2024)

Follow-up tutorials: Adding New Icons, Adding Items to a Store, How to Upload Mods to the Steam Workshop.

This is a text version of the video tutorial available here:

In this tutorial, I'm going to show you how to create a simple data mod for Pillars of Eternity II: Deadfire. By creating your own game data bundle files, you can create new items, abilities, classes, and other content; modify existing content; and also modify how some parts of the game work, as I'm about to do.

First, you need to create a folder to put your modified files in. Locate the Pillars of Eternity II: Deadfire folder. I've installed the game using Steam, so my game is in the steamapps folder.

Inside the folder "PillarsOfEternityII_Data", create a folder called "override", if it doesn't exist already. This is where all your mods and mods you download from the internet will go.

[Tutorial] Modding Basic Concepts (1)

Inside the "override" folder, create a folder for your mod.

[Tutorial] Modding Basic Concepts (2)

Next, you need to provide some information about your mod. Inside your mod folder, create a file called "manifest.json".

Open that file in a text editor, and type the following text into it.

{ "Title" : { "en" : "Per-Rest Resources" }, "Description" : { "en" : "Changes spells and class resources to reset on rest instead of after each encounter." }, "Author" : "BMac", "ModVersion": "1.0", "SupportedGameVersion" : { "Min" : "1.1.0", "Max" : "1.2.0" }}
  • "Title" is the name of the mod. You can provide the text in multiple languages, each identified by its standard two-letter language code. In this example, I only provide English - "en".
  • "Description" is a short, one-sentence description of the mod, and can also be provided in multiple languages.
  • "Author" is the name or handle of the mod's creator.
  • "ModVersion" is the version number of your mod. You should increase this each time you release a new version of your mod.
  • "SupportedGameVersion" specifies the minimum and maximum versions of Pillars of Eternity II: Deadfire that your mod is known to be compatible with. The game will warn your users if they are using your mod with an incompatible version, but your mod will still load if it's enabled.

Change the contents of this file to describe your mod, then save and close the file.

You may also create a thumbnail image that will represent your mod in the Mod Manager UI. This image will go in your mod's folder. It needs to be named "thumb.png" and the dimensions should be 149x84.

Now you're ready to actually modify the game's data. For this mod, I'm going to change spells and class resources from resetting after each encounter to resetting on rest.

Let's take a look at the vanilla game data, the data the unmodified game uses. This data is located at "PillarsOfEternityII_Data/exported/design/gamedata". I happen to know that the data I want is in the "global" gamedata bundle. Open that file in a text editor.

[Tutorial] Modding Basic Concepts (3)

The file is hard to read because it isn't formatted. There are many tools available for formatting JSON data. I'm using Visual Studio Code, so I just need to press Shift+Alt+F to format this document and make it easier to read (note: you'll need to associate the .gamedatabundle extension with the JSON format. link).

Now I'm going find the properties I want to edit. I'll just use my text editor's search function (Ctrl+F) and search for the text "spell".

[Tutorial] Modding Basic Concepts (4)

To learn what all of these properties do, refer to the Game Data Documentation.

I found the data. It's on the object called "GlobalGameSettings", so that's the object I need to override in my mod. I won't be changing all the values on this object, but I'm going to copy the whole thing for now, starting from the curly brace "{" shown below, all the way to the matching closing curly brace.

[Tutorial] Modding Basic Concepts (5)

Create a new .gamedatabundle file in your mod directory. Enter the text shown, and paste the object you copied.

{ "GameDataObjects":[ (PASTE OBJECT HERE) ]}

Now I'll remove the data I don't want to override. Note that I always need to leave the "$type" and "ID" properties of the object, and the "$type" property of any components I want to alter. That leaves me with this:

{ "GameDataObjects":[ { "$type": "Game.GameData.GlobalGameSettingsGameData, Assembly-CSharp", "ID": "eddfc852-ccb9-4884-b901-e77e8ca31b48", "Components": [ { "$type": "Game.GameData.CharacterStatsSettingsComponent, Assembly-CSharp", "PowerPoolUsageType": "PerEncounter" }, { "$type": "Game.GameData.SpellSettingsComponent, Assembly-CSharp", "SpellUsageType": "PerEncounter" } ] } ]}

Now I'll change all spells and class power pools to reset on rest instead of after each encounter by changing "PowerPoolUsageType" and "SpellUsageType" from "PerEncounter" to "PerRest".

{ "GameDataObjects":[ { "$type": "Game.GameData.GlobalGameSettingsGameData, Assembly-CSharp", "ID": "eddfc852-ccb9-4884-b901-e77e8ca31b48", "Components": [ { "$type": "Game.GameData.CharacterStatsSettingsComponent, Assembly-CSharp", "PowerPoolUsageType": "PerRest" }, { "$type": "Game.GameData.SpellSettingsComponent, Assembly-CSharp", "SpellUsageType": "PerRest" } ] } ]}

That's it. My mod is now ready to test.

[Tutorial] Modding Basic Concepts (6)

[Tutorial] Modding Basic Concepts (7)

[Tutorial] Modding Basic Concepts (8)

[Tutorial] Modding Basic Concepts (9)

[Tutorial] Modding Basic Concepts (10)

[Tutorial] Modding Basic Concepts (11)

[Tutorial] Modding Basic Concepts (12)

Edited by BMac
fix images for forum update

[Tutorial] Modding Basic Concepts (2024)
Top Articles
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 6327

Rating: 4.8 / 5 (68 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.