Skip to content

Farming & Coops

Overview

The farming system has two asset types: Coops and Modifiers. Coops define pens that house NPC animals and produce drops over time — they specify which NPC groups can live in the coop, how many residents are allowed, and which drop table each species produces. Modifiers define environmental multipliers (water, light, fertilizer) that accelerate plant or animal growth rates.

File Location

Assets/Server/Farming/
Coops/
Coop_Chicken.json
Modifiers/
Darkness.json
Fertilizer.json
LightLevel.json
Water.json

Coop Schema

FieldTypeRequiredDefaultDescription
MaxResidentsnumberYesMaximum number of NPC residents the coop can hold simultaneously.
ProduceDropsobjectYesMap of NPC group ID → drop table ID. Each resident species has its own produce drop table.
ResidentRoamTime[number, number]YesIn-game hour range [start, end] during which residents roam freely inside the coop.
ResidentSpawnOffsetVector3NoLocal offset applied when spawning a resident inside the coop structure.
AcceptedNpcGroupsstring[]YesList of NPC group IDs that can be placed into or captured into this coop type.
CaptureWildNPCsInRangebooleanNofalseIf true, wild NPCs of accepted groups within range are automatically captured into the coop.
WildCaptureRadiusnumberNoRadius in units within which wild NPCs are auto-captured when CaptureWildNPCsInRange is true.

Vector3

FieldTypeRequiredDefaultDescription
XnumberYesLateral offset.
YnumberYesVertical offset.
ZnumberYesForward offset.

Modifier Schema

FieldTypeRequiredDefaultDescription
Type"Water" | "Fertilizer" | "LightLevel" | "Darkness"YesCategory of modifier, used to match the modifier against applicable growth systems.
ModifiernumberYesGrowth rate multiplier applied when this modifier’s conditions are satisfied (e.g. 2.5 = 2.5× faster).
Fluidsstring[]NoWater type only. Fluid block IDs whose presence satisfies the water condition.
Weathersstring[]NoWater type only. Weather IDs that also count as a water source (e.g. rain).
ArtificialLightLightRangeNoLightLevel type only. RGB channel ranges that must be met by artificial light sources.
SunlightSunlightRangeNoLightLevel type only. Sunlight level range that must be met.
RequireBothbooleanNofalseLightLevel type only. If true, both ArtificialLight and Sunlight conditions must be met simultaneously.

LightRange (per RGB channel)

FieldTypeRequiredDefaultDescription
MinnumberYesMinimum light level (0–255).
MaxnumberYesMaximum light level (0–255).

SunlightRange

FieldTypeRequiredDefaultDescription
MinnumberYesMinimum sunlight level (0–15).
MaxnumberYesMaximum sunlight level (0–15).

Examples

Chicken coop (Assets/Server/Farming/Coops/Coop_Chicken.json):

{
"MaxResidents": 6,
"ProduceDrops": {
"Chicken": "Drop_Chicken_Produce",
"Chicken_Desert": "Drop_Chicken_Produce",
"Skrill": "Drop_Chicken_Produce"
},
"ResidentRoamTime": [6, 18],
"ResidentSpawnOffset": {
"X": 0,
"Y": 0,
"Z": 3
},
"AcceptedNpcGroups": [
"Chicken",
"Chicken_Desert",
"Skrill"
],
"CaptureWildNPCsInRange": true,
"WildCaptureRadius": 10
}

Water modifier (Assets/Server/Farming/Modifiers/Water.json):

{
"Type": "Water",
"Modifier": 2.5,
"Fluids": ["Water_Source", "Water"],
"Weathers": ["Zone1_Rain", "Zone1_Rain_Light", "Zone1_Storm", "Zone3_Rain"]
}

Fertilizer modifier (Assets/Server/Farming/Modifiers/Fertilizer.json):

{
"Type": "Fertilizer",
"Modifier": 2
}

Light level modifier (Assets/Server/Farming/Modifiers/LightLevel.json):

{
"Type": "LightLevel",
"Modifier": 2,
"ArtificialLight": {
"Red": { "Min": 5, "Max": 127 },
"Green": { "Min": 5, "Max": 127 },
"Blue": { "Min": 5, "Max": 127 }
},
"Sunlight": {
"Min": 5.0,
"Max": 15.0
},
"RequireBoth": false
}