Modding

\*This article is not for Dome Keepert but for Dome Romantic for related stuff follow the link

https://codepen.io/aesereht/full/NWXbeQN

This page is about intended art of modding dome romantik, so everybody can mod it as they want :)

Here you can find some example code

Changing color pallet and background

### Location

<drive\_letter>:\Program Files (x86)\Steam\steamapps\common\Dome Romantik Demo

To start you have to locate two files: **gamedata.yaml** and **upgrades.json,** These are located in the games root folder and can be found where you installed the game. For most users this will be in the location given as an example on the right. You can always find these files by finding the game in your steam library, right click > properties > local files > browse local files.

## Upgrade.json

### What's in **upgrades.json** file?

Let's start by learning how to enable migration mode. As its a json file it contains object definitions between the "**{**" and "**}**" symbols and separated by a "**:**" symbol.

The first json object is as follow:

```
"migrate": {
 "title": "Migrate",
 "desc": "Leave this planet and save your dome.",
 "cost": "iron=40",
 "requiresReplace": [
 "dome1",
 "dome2",
 "dome3",
 "dome4",
 "dome5" ],
 "requires": "dome99",
 "special": "true"
},

```
Let me start by describing the most important elements:

* line nr 1 - Describe upgrade's incode name (and it's associated graphic if there is any). It is used also as reference for other objects
* line nr 2 - It's title shown in game when playing
* line nr 3 - It's description shown in game when playing
* line nr 4 - Setup cost of the upgrade, allowed parameters are: **iron, water, sand.**
	+ For setting multi type cost upgrade you need to use a comma as in example
	```
	"cost": "iron=0, water=0, sand=0",
	```

* You can also add negative values to receive resources instead
* line nr 5 - is a special parameter. It replace requires value at start of the run for chosen dome type.
* lin nr 12 - This describes any prerequisite upgrades which must be purchased before this upgrade. "dome99" acts as a placeholder, you should replace with "dome1"
* line nr 13 - This can be ignored in most cases. For some upgrades this is required to make the upgrade work, as for example migration upgrade because it triggers action instead of just changing values

You may notice that migrate upgrade looks different in your file. Like this:

```
"migrate": {
 "title": "Migrate",
 "desc": "Leave this planet and save your dome.",
 "cost": "iron=40",
 "requires": "dome99",
 "special": "true"
},

```
It is an un-activated version of it. You could just activate it by changing dome99 to dome1, but using parameter requiresReplace is the intended correct way if you want to make it active when other domes become available.
There are also 2 extra parameter you can add

```
"repeatable": "true"

```
This allows the upgrade to be purchased multiple times

```
"locks": [ "laserMove3", "doubleLaser" ],

```
This adds the function to choose and block other upgrade (like laser max power/dual laser/max speed upgrade). You need to add this code to every locked upgrade in group. The name listed in objects are the name of objects like "migrate" in the above example line nr 1

## Gamedata.yaml

### What's in the file?

As in upgrade.json, gamedata.yaml is also in plain text. The key diffrence is that it contains stats for varibles

Lets take a look at random code fragment

```
repellent:
 repellentWaveDelayPerUse: 14, 22, 30
 repellentGrowthTime: 90, 50
 repellentUsesPerResource: 1, 2

```
as you can guess i's about repellent gadget.

Names of the values are self explanatory. "repellentGrophTime" tell us in sec. time to create repelant charge.

First value "90" is index as 0, so in upgrades.json file an upgrade will set index to next value in this case 1

```
 "repellentGrowTime1": {
 "title": "Production Time",
 "desc": "The repellent is produced much faster.",
 "cost": "iron=2, water=1",
 "upgrade": "repellentGrowthTime=1",
 "requires": "repellent"
 },

```
The varible "upgrade" set repellentGrowthTime index to 1 (so from value 90 to 50)

for custom modes you can add more values if you want to add extra steps/