# Adding Constructions

Let's learn how to add brand-new constructions like new houses, roads or even trains!

## Useful links

* Checkout the Data category for the In-Game name with English Names relation
* [Temperate biome rules](https://href.li/?http://atakovat.com/urbek/reglasBioma_0.txt)

## 3D Model

Let's first make an appearance for our building, for that you'll require to first create a 3D model via MagicaVoxel, for that you just need to follow this simple guide:

{% content-ref url="/pages/RmeCrVUX8xL15GOGiLOn" %}
[Make a 3D Model](/urbek-modding/getting-started/make-a-3d-model.md)
{% endcontent-ref %}

## File Structure

You'll need to create a text file starting by `newBuildings` at the end it's going to look like that:\
`newBuilding_someName.txt`.

{% hint style="info" %}
The file is in a format named **JSON**, it's a common file format to store data in files, it may be easier if you have a JSON editor to avoid mistakes and make it easier to read.
{% endhint %}

The file start with a main attribute called `construs` which will contain every construction we wish to add.

An empty template would look like this:

```json
{
    "construs": []
}
```

### Our First Building

Let's add the minimum needed to make a building

```json
{
    "construs": [
        {
            "name": "Potato Farm",
            "codeName": "potatofarm",
            "category": "campo",
            "models": ["potato farm,1,1"]
        }
    ]
}
```

Let's review what's written there:

**Name:** The name of the building

**Code Name:** The unique ID of our building, it cannot be the same as another one.

**Category:** The building's category, it defines in which building tab we'll be able to find it.

**Models:** The visual model of our building, in this case we are selecting the model named `potato farm` and it's sized `1` x `1` tiles. But a same building could have multiples models for more variety or for specifics edges, for example (multi-tile buildings).

{% hint style="info" %}
More information about the model's format can be found there:
{% endhint %}

{% content-ref url="/pages/aUBUwpCLQSJsnEj6xkqg" %}
[Structure Model Format](/urbek-modding/in-depth-knowledge/structure-model-format.md)
{% endcontent-ref %}

## Adding Functionality

For now, our building is just pure decoration and does nothing, but we can add plenty of characteristics.

### Production

Let's define so our building will produce some food:

```json5
{
    "construs": [
        {
            "name": "Potato Farm",
            "codeName": "potatofarm",
            "category": "campo",
            "models": ["potato farm,1,1"], // do not forget the ',' !
            // New lines starting there
            "produces": [
                {
                    "rec": "comida",
                    "q": 2
                }
            ]
            // New lines ending there
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://worive.gitbook.io/urbek-modding/guides/adding-constructions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
