Making your first mod
As a first test, we’ll create a simple example mod that changes the requirements of the blue science pack factory. It will “automate” the process by requiring less workers, but in turn consume more energy and resources.
1. Folder setup
Go to the mods folder at C:\Users\YOUR_USER_NAME\AppData\LocalLow\Dionic Software\InfraSpace\mods
and create a folder for your mod. Call it something interesting, like “Automated Blue Science Factory”
2. config.json file
In this folder, create a file called config.json
. Open the file using any text editor and paste the following:
{
"name": "Automated Blue Science Factory",
"version": "1.0",
"author": "Your name",
"website": "https://your.website.or.forum.post.or.steamworks.page.com",
"description": "This mod automates the first step of your scientific journey on this unknown planet. It automates the process of blue science pack creation so that less human resources are required to run the facility. Though running such complicated AI requires a lot more energy and more resources."
}
These infos are used by the game and by Steam to display your mod properly
3. The mod itself
Make your change to the game using a patch.json
file.
It’s only important the file name begins with patch
and ends with .json
, so for organisation purposes, you can also name it something like patch_auto_science.json
if you want.
Paste the following in the patch file:
{
"replaceOperations": {
"buildings/sciencePack1Factory/productionLogic/productionDefinition/maxWorkers": 1,
"buildings/sciencePack1Factory/productionLogic/productionDefinition/powerNeeded": 2,
"buildings/sciencePack1Factory/productionLogic/productionDefinition/consumables": [
{"resourceName": "ironOre", "amount": 3 },
{"resourceName": "carbon", "amount": 2 },
]
},
"removeOperations": [
],
}
These lines will the change the behaviour of the blue science pack factory.
The way it works is basically this: Most types of objects in InfraSpace are defined in json files. Factories, and other types of nodes (such as buildings and intersections) are defined in buildings.json
, that’s why the replaceOperation
begins with buildings
. Next, we simply follow the structure in the buildings.json
file until we get to the parameter we want to change.
For more info on how this works, check out the tutorial on InfraSpace configuration files and how to patch them .
4. Done!
Start the game and you should be able to see your mod and have it active to play.
Start a game and see if it all works!
Once you tested it thoroughly, and are ready to publish it, you can hit the Upload button to push it to the Steam Workshop. To enable the Upload button you need to enable Developer Mode in the settings.