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

**URL:** <https://forum.dionicsoftware.com/t/infraspace-modding-tutorial-basic-overview-making-your-first-example-mod/3135>\
**Category:** IS Mods\
**Created:** [July 11, 2022, 11:56am UTC](https://forum.dionicsoftware.com/t/infraspace-modding-tutorial-basic-overview-making-your-first-example-mod/3135 "2022-07-11T11:56:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Null3rror](https://forum.dionicsoftware.com/user_avatar/forum.dionicsoftware.com/null3rror/32/2143_2.png) [@Null3rror](https://forum.dionicsoftware.com/u/Null3rror)\
**Post date:** [July 11, 2022, 12:51pm UTC](https://forum.dionicsoftware.com/t/infraspace-modding-tutorial-basic-overview-making-your-first-example-mod/3135/2 "2022-07-11T12:51:59Z")

</div>

# 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:

```auto
{
	"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:

```auto
{
	"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](https://forum.dionicsoftware.com/t/infraspace-modding-tutorial-changing-existing-parameters/3138).

## 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](https://forum.dionicsoftware.com/t/infraspace-modding-tutorial-in-game-developer-tools/3132).

 ![image](https://forum.dionicsoftware.com/uploads/default/original/2X/7/7e3c8e934fc3deb9151ca246439d49400e41e4f5.png)

 ![image](https://forum.dionicsoftware.com/uploads/default/original/2X/9/93947be021e8da6c52e1f3533b136ec33914be30.jpeg)

---

_[View the full topic](https://forum.dionicsoftware.com/t/infraspace-modding-tutorial-basic-overview-making-your-first-example-mod/3135)._
