InfraSpace Modding Tutorial: Basic Overview + Making your first example mod

Basic Overview

InfraSpace can be modded in three big ways requiring different types of skills:

1. Overriding the values that are currently in the game

You can write simple patch.json files in order to change a lot of the parameters of the game.
Any motivated player can make this kind of mods. All it takes is looking through the game’s files and changing the parameters you want to change.

2. Adding new content (furniture, equipment, etc.) to the game

You will be making 3D models and configuring their settings in their own .json files.
These kinds of mods may require some 3D art knowledge, depending on what kind of objects you’d like to add to the game.

3. Changing the gameplay through C# scripting

This is the most powerful type of mod and can change the gameplay fundamentally. There are virtually no limits on what you can do, though some things are easier than others.
This type of mod requires real programming. You will be interacting with InfraSpace and Unity C# code and use in-game debugging tools to achieve your goals.

Mods install location

There are 2 places mods can be placed in.

Self-made mods and manual installs

The base mods directory is located in

C:\Users\YOUR_USER_NAME\AppData\LocalLow\Dionic Software\InfraSpace\mods

Each folder within the mods directory belongs to a different mod. This is how you can manually install mods and this is where you will start making your own mods.

Steam Workshop Downloads

When mods are downloaded from the Steam workshop, they usually placed somewhere within the Steam folder, for example in steamapps\workshop\content\1511460\. This location is mostly relevant for automatic mod downloads when you subscribe to a mod in the workshop.

Simple Example Mod from the Devs

If you want, you can jump right in by taking a look at our Example Mods. These mods are distributed as part of the ISModKit, on GitHub: https://github.com/Ponzel/ISModKit

Check out the ISModKit Example Mods folder. Once downloaded, you can put this directly into the mods folder and it should work with your game immediately.

1 Like

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.

image

image