Modding - Production Recipes

## Production Recipes

Production recipes are defined in the `Productions.json` file. A production recipe is anything that can be produced automatically and repeatedly in a building, including those recipes that don't have any costs (such as harversters or the City Core).

To define which buildings produce each recipe see Modding - Buildings.

## Base Types

There are a few pre-defined base types for production recipes that the actual recipes inherit from. These base types are used to define common attributes that apply to several production recipes, such as their category (power production, flux production, etc). You can find the base types in the Productions.json file that is supplied with the Reference Configuration Files

## Format

Production recipes are defined using the standard Entity Format.

## Production Recipe Parameters

This is a list of the different paramters that can be applied to production recipes. Some are optional, while others are always required.

### Sprite

The sprite parameter is optional. By default, it will search for a sprite called `production_[recipe entity ID]`, but you can define a different one using the following format:

```
sprite: "my_prod_recipe"

```

If the specific sprite file for the production recipe cannot be found, it will default to the icon of the first item produced in the recipe. In most cases you can just use that, unless your recipe is an alternative mode to produce a resource and then you may want a unique icon to be more descriptive.

See Adding Sprites for more information on adding your own image files.

### Produced Items

Each production recipe can produce one or more resources. Resources themselves are defined in the Items section. Most production recipes produce a single item (with the exception of the city core), but there is no such restriction, production recipes may produce multiple items as output.

To define the items and amounts produced in the recipe, use the following format. The value assigned to each item is the amount that is produced every cycle (40 real-time seconds).

```
                "produced": {
                    "funds": 50,
                    "worker": 3,
                    "power": 15
                }

```

This is the example for the city core, that produces 50 Flux, 3 workers and 15 power every cycle.

### Consumed Items

Production recipes may require raw materials. This parameter is optional, some recipes like farms do not require any raw materials.

Defining consumed items works the same way as produced items, and the amounts are also per-cycle. Remember that production in Dream Engines is continuous, it does not work in batches, so the consumed and produced materials do not need to hold a specific ratio or anything of the sort. Items are consumed and produced one at a time, the production/consumption amounts only determine the rate at which they are consumed.

```
                "costs": {
                    "carbonmix": 1,
                    "startar": 4
                }

```

Harvesters are a special case in which they consume and produce the same item, but the consumed item is taken from the resource node instead of the harvester's inventory. Harvester recipes should only be used in buildings with `MapObjectComponentResourceHarvester`, not with `MapObjectComponentProduction`. See Modding - Buildings for more information.

### Requires Unlock

```
requires-unlock: true

```

Whether or not you need to unlock this production recipe (through Research or some other method) before you can build it.

To unlock a production recipe, use an unlock Modifier with the "ProductionType" entry.

## Special Parameters

There are a few more parameters that are only used in special cases. These are all optional and have default values.

```
suppress-full-warning: true
is-research: true
is-harvest: true
show-gamepedia: true
show-new: true
show-research-unlock: true
missions-on-unlock: {
  tesla-production: true
}
modifier-specifiers: {
  prodgroup-power: true
}

```

**supress-full-warning** - default false. When true, this building will not show generate a warning icon when output is full. Useful for items that you expect to be full at times, like Power and Flux.

**is-research** / **is-harvest** - default false. Set to true if the recipe produces research or harvests a raw material for the respective productions to function correctly.

**show-gamepedia / show-new / show-research-unlock** - default true. When set to false, this production recipe won't appear in some places. If show-gamepedia is false, the recipe will not appear in the Dream Archives at all. If show-new is false, the item will appear in the Dream Archives, but will not be marked as "New". Useful for starting recipes so the player is not overwhelmed with tens of recipes that are marked New when the game starts. If show-research-unlock is set to false, this recipe won't appear in the list of unlocks under the research that unlocks it. When unlocking a new harvester, for example, it may be enough to show the unlocked building and there is no need to show the recipe that is unlocked with it.

**missions-on-unlock** - You can use this to configure tutorials that will be shown when this production recipe is unlocked for the first time. See Modding - Tutorials for more information.

**modifier-specifiers** - Use this to define modifier specifiers that will affect this recipe. This is usually used to define a production group such as power-production, research-production, etc - so that the recipe will receive bonuses/penalties that are applied to these categories. See Modding - Modifiers for more information.