-
Notifications
You must be signed in to change notification settings - Fork 0
Adding your first building
Heres the tutorial for adding your first building!
It is highly encouraged to check out these pages before continuing!
We will start with the dataside of your tile. In any folder of your mod, add a new json. The json's name can be anything, but I typically set it to the building's name for simplicity.

First, Lets add in the following values to this json:
"internalname", which i will set to "newbuilding"
"displayname", which will be "cool building"
"price", which will be set to 250

Now for some less obvious stuff. We are going to add "freeinput" and "showprogress"
Set freeinput to false and showprogress to true. Freeinput, when true, will allow tiles to gain any item from all direction like conveyors. Showprogress causes the progress bars to appear over tiles.

Now that we have that, we will get to the juicy part and make a producer!
Start out by setting the values sizex and sizey to 1.
Since this is a 1x1 tile, we can format it with a single string stating the side (eg:"north")
"outputside": "west"
since this is a producer, we dont need a inputside
"inputside": "null"

set worktime to 1. Worktime is the amount of seconds it takes for a tile to do its respective action.
This next part is important, add a variable called "subtype". There are three subtypes that being "transporter", "producer", and "converter". Set it to "producer" since thats the tile we are making.

And to finish it off, add a value called "material". Its a value that only matters to producers and it choses what item the producer makes.
In this case, Im going to set the material to "def:wood", that way it makes wood. BUT if you have an item from the previous tutorial, you can simply put in the item's internal name.

In any folder, add this png to your mod. Feel free to change it however you see fit, or make your completely own texture. Proper Spriting has sources you can take from to help you create!


Now that you have your image imported, simply rename the image to the internalname in the json. So in this example, it would be "newbuilding".

In this section of the tutorial, I will go over how to change things about another tile.
Inside your own tile's json, add in the name of the tile you want to overwrite (remember the identifier syntax still applies!) and set the value of it to {}
This example I will setting it to the default one-turret drill

Now, any value you add in will overwrite that of the tile's. Im going to change the price to make it SUPER cheap!

You added your tile!
