This short tutorial goes into depth on how to easily change the configurations in the games .json files, as done in the “Making your first example mod” Tutorial. Go through that tutorial first.
At the time of writing, the following internal configuration files can be changed by using patches:
-
furniture.json
contains definitions for most free standing inanimate objects in the world -
resource.json
contains definitions for all resources in the game -
construction.json
contains definitions for floors, walls, fortifications, and fences -
equipment.json
contains definitions for tools, weapons, clothes and armor -
animals.json
contains definitions for all animals in the game -
research.json
contains all technology and research in game -
profession.json
contains all skills for professions in the game -
localization.json
contains all the texts in the game -
gameConfig.json
all kinds of parameters that control gameplay, balancing, and more
For creating patches, it’s important to know the structure of these .json files. That’s why you can find the ones used in the game in the FFModKit. Let me know if you think they are too out of date and you need an update to make your mod. You can find the localization json files in the community translation GitHub.
FFModKit contains some example patches in the example Mod pasted here for your convenienve:
{
"replaceOperations": {
"furniture/crystal/constructable": true,
"furniture/crystal/modules/resource/resourcesPerRound": 20,
"construction/floors/woodFloor/costResources": ["wood", "crystal"],
"construction/floors/woodFloor/costCounts": ["8", "1"],
"localization/health/english": "Sheer Power of Will",
"config/daysChildMin": 12,
},
"removeOperations": [
"furniture/crystal/needsUpdate",
"furniture/crystal/modules/resource/workSeconds"
// You can even remove objects from the base game.
// Might cause error messages on the console, depending on the object and its usage in the game.
//"furniture/crystal",
//"furniture/appleBasket",
],
}
Find the up-to-date file here.
The patch file modifies the json files of the base game or the json files of any mods before giving them to the game to process. It was designed to be as self-explantory as possible:
-
replaceOperations
replaces values with whatever you put on the right side of the statement -
removeOperations
remove complete elements. Often, this means that the game’s default values are used instead, for example if you deletefurniture/crystal/modules/resource/resourcesPerRound
, the game will just use a default value. - However, if you delete complete objects, like
furniture/crystal
orequipment/swordWood
, they will not be accessible in the game. This can lead to bugs though. - The first word of any path is always the file that’s being modified. The rest of the path navigates through the json structure.
- You don’t need to replace single values, feel free to replace full objects.