The datapack
Every number in this wiki is a starting value from the mod's own datapack, and a datapack
of yours can change it: a file under the same path replaces the mod's. The files live in
data/freehold/. Time in them is counted in sim ticks: one a second, twenty game
ticks, 1 200 to a Minecraft day; the game itself shows times in seconds, minutes and hours.
Changing it in a running world
A /reload takes effect at once. Change a datapack and reload, or switch one on
or off with /datapack enable and disable, and every settlement goes on under the new
values. Nothing is lost, and no restart is needed. The log confirms it for every dimension with
Freehold rebuilt the simulation of <dimension> with the reloaded definitions.
- A datapack with an error in it is not applied, and the old values stay; the server log says what is wrong. Drawings and material classes are read separately and take effect all the same.
- Neither is one that does not fit the settlements — a good is missing that still lies in a store, say. Then nothing changes in any dimension, drawings included, and every operator online is told “Freehold keeps the rules it had for X: the reloaded datapack does not fit its settlements. The reason is in the server log.”
- A building whose entry is missing rests with “has stopped: its datapack entry is missing”, and goes on as soon as a reload brings the entry back.
- A building whose drawing cannot be read rests as well, with “has stopped: its drawing could
not be loaded; the reason is in the server log.” The log names it as
Blueprint freehold:<key> is dropped: …. Nothing is lost, and the building goes on as soon as the drawing loads again. - A save that could not be read at the start is not read again by a reload; that takes a restart — see The saved data.
building/
One file per building. What the fields mean:
| Field | Meaning |
|---|---|
translation_key, description_key | The keys of its name and of the text shown in the build list |
build_list | Optional: where it stands on the build tab — group (lower-case letters, digits and underscores) and rank (a whole number from 0). The tab sorts by rank, then by id, and puts a heading wherever the group changes; the heading is the key freehold.build_group.<group>. The mod's own groups each have their hundreds: general 0–99, wood 100–199, stone 200–299, food 300–399, iron 400–499, supply 500–599, trade 600–699. A building without the block comes last, under Other (freehold.build_group.misc) |
blueprint_key | The drawing it is built from |
construction.goods | What it costs |
construction.work, segments, max_builders | Work units (a builder with a hammer adds one a second), the number of stages the material is paid in, and how many builders the site holds at once (3 when left out) |
worker_slots, builder_slots, housing_slots | Work places, builder's posts and beds |
catchment_radius | A building with beds: how far, in blocks, its residents may live from their post (1 to 1 024) — see Where people live. Every building with housing_slots above 0 needs it and one without beds may not have it; a datapack that breaks either does not load |
worker_tool | The tool each worker needs |
work_sound | Optional: a sound id played at every blow a worker of this building strikes, instead of the sound of the block worked, e.g. "work_sound": "minecraft:block.wood.hit". A recipe may name its own work_sound beside its id and effort, which goes before the building's for that recipe alone — the orchard's pick_fruit does. A value that is not an id keeps the definition from loading; an id that names no sound stays silent, so a sound from a resource pack works too. A builder always sounds like the blocks they lay |
worker_role | worker, or soldier for a post that fights in raids — see Soldiers and gear |
work_priority | Where the kind starts on the list of where a free resident goes: the highest number first, equal numbers by id. Players reorder the list on the politics tab — see Where a free resident goes |
recipes | What it makes: inputs, outputs and effort in sim ticks. A recipe makes one good at most: a definition whose recipe names two goods in outputs does not load — two goods take two recipes. A building with several recipes picks among them by what the settlement needs |
input_share | Optional: this kind's weight when a good is shared out — between several kinds of building that consume it, or between workshops and building sites. A whole number from 0 to 100, e.g. "input_share": { "freehold:raw_wood": 70 }; 10 when left out. The weights of one good need not add up to 100: the loads go in proportion. It may also name the good of the building's hearth. A weight for a good the building does not consume keeps the definition from loading. The id freehold:construction stands for the building sites, and no building may carry it — see Who gets a scarce good |
input_target, output_threshold | The defaults of the two numbers on the buildings tab: what it keeps in stock, and at what it is fetched from |
placement | max_slope (how far the ground may vary), min_distance (from the next building of its trade), hillside (rise blocks the ground reach blocks behind the working side must lie above the floor, and max_cut, how far the ground over the site may rise towards the working side — not below max_slope, and max_slope when left out), exposure (the windmill's open stand) |
harvest, water, pit, mine, field | What it works in the world: its radius, how long a planting takes to grow, how much stone, ore or water a place needs. harvest.ripen_ticks — how long an orchard tree takes to bear — only goes together with an orchard block. mine.cover (0 if left out) belongs to a mine with a rise, the adit mine: how many blocks of rock it keeps between its workings and the open air from the drift's level up, above and to each side — 2 as shipped, 0 turns the rule off. A mine without a rise that names one is refused when the datapack loads |
orchard | The orchard's plantation: trees per side of a group, blocks between two trunks and between two groups, and fruit_leaves, how many leaf blocks show apples |
upkeep, hearth | What a house eats and burns a day, and how long its people last without food. From level 2 a building with a hearth and none of its good in stock takes nobody in; that level is fixed, not a datapack value |
tavern | The good it pours, its reach and how much faster its guests work, in per cent |
trade | The trade post: currency (the emerald), reach (blocks to a village's gate, as the crow flies), load (units a trip), effort (sim ticks a trip takes on top of the way there and back) and offer, what a village sells, each good with units for emeralds |
village_gate | The village gate: link_reach, how far its link road may run to a village path, in blocks |
garrison | A watchtower or barracks: support_reach, how far from its anchor, in blocks, its soldiers fight for a target; reserve, whether they fill a fallen guard's post in a tower within that reach |
storage_capacity | Slots it adds to the store |
claim_radius, claim_spacing, claim_strength | Land in chunks around its own chunk; how far a tower has to stand from the charter and the other towers; which of two claims holds a chunk where they overlap (1 when left out) |
tiers | The levels above the first, level 2 first — see Upgrades. A level always names its blueprint_key, its construction and its surroundings: radius in blocks and threshold, how many taken posts and residents have to be within it. The first level also names streak_ticks, how long a building has to run without a problem. "unblocked": true lets the daily check ask only the surroundings and the run, not the problems — the charter has it. worker_slots, builder_slots (never fewer than the level under it), housing_slots, input_target, storage_capacity, pace (per cent; 100 when left out, and never below the level under it) and store_fill (how full the whole store has to be, in per cent; 0 for no such rule) a level takes over from the one below when it does not name them. A level's input_target, like the building's own, has to name every good its recipes consume |
initial_residents, initial_goods | The charter: who and what it brings |
immigration | The charter: points_per_day over points_per_resident is how many days a newcomer takes from the charter alone. Optional points_per_bed (0 if left out) is added every day for each bed of a house that would take somebody in — food in store, from level 2 fuel in the hearth — times that house's level; the charter's own beds do not count. A connected village's beds add village.points_per_bed each, weighted by reputation. A newcomer arrives once points_per_resident points are reached |
shortage | The charter: window_days (3), over how many days the fall of a stock is measured, and warn_days (3), under how many days of stock left the warning starts; it ends at twice that. Both at least 1 and both required once the block is there; without the block the settlement never warns. Which goods are watched follows from the upkeep and hearth of the buildings — see Running short |
village | The charter: gate_chunks, how far out a village is found, in chunks beyond the boundary; points_per_bed, what each bed of a connected village adds per day; emeralds_per_bed, how many emeralds a village trades a day per bed; and reputation — per_emerald, decay_per_day, cap and top_factor, the per cent a bed counts at full reputation. All of them are required |
defence | The charter: the numbers of a raid — soldier and raider (health, hit_chance, damage, and the raider's carry), blow_ticks, duel_pause_ticks, heal_ticks, min_hit_chance, and for settlement and village each per_day, threshold, grace_days, raiders, per_raider and lead_ticks; the village also reputation_won, reputation_lost and pause_days. See Raids. Under conquest the numbers of an attack: march_speed, blocks a sim tick; min_lead_ticks, the shortest time from the attack to the fight; grace_days, the days from its founding before a settlement can be attacked; shield_days, the days a conquered watchtower cannot be attacked again — all four required. See Attacks |
carrier_ratio, carrier_load | The charter: residents per carrier, and slots a carrier carries |
carrier_waiters | The charter: how many carriers without a job may wait at a building or crossing that is not a store (2); the rest walk back to the nearest store. 0 or left out means no limit |
road_cost | The charter: how a trip is priced over open ground — flat for half a block of level ground, climb for a block of height, obstacle for water or a scarp in the way, per_tick, the cost of one sim tick, and line, in percent, what a stretch across open ground counts of its measured cost (150; 100 counts it as measured). A step straight ahead costs twice flat, a step on the diagonal three times; a road keeps its own cost, line does not touch it. A trip adds up the cost of all its stretches and divides by per_tick once, at the end, rounding up |
road_graph | The charter: reach, how far a carrier reaches at most (256 blocks); direct_edges, how many direct links one building keeps to others besides the stores; min_node_gap, how far a road end has to keep from a building or crossing (5 blocks), and how near a crossing of the clicked road an end has to be to snap onto it; 0 switches off both;
access_reach, how far from a building's road side, in blocks measured level in a straight line, a passing road may be to give it an access, and how far apart the ends, crossings and accesses of two separate roads may be to be joined across the gap (32); access_per_building, how many accesses one building has at most, and to how many points of other roads each such point is joined (4; 0 turns both off). Neither counts against reach or direct_edges — see Walking on it |
goods/
| Field | Meaning |
|---|---|
storage_weight | Slots one unit takes |
item_mapping.accepts | The items the goods port takes for it; a tag with # takes the whole tag |
item_mapping.basic | true for a basic good, which the goods port takes while freehold:hand_in_all_goods is off; false when left out — see Handing goods in |
price | What a village pays for it: units for emeralds. A good without one is not taken in trade and never carried off by raiders |
gear | A soldier's gear: slot (weapon, shield or armor) and what it does — hit_chance and damage for a weapon, guard for a shield, health for armour. Its durability counts days |
demand_reserve, demand_per_user | The ceiling above which nobody makes it: the reserve, and so much more per user |
durability, malus | A tool: how many jobs it lasts, and how many times as long a job takes without it |
load | The cart: slots a carrier moves with it |
substitution_class | Goods that stand in for each other — bread, fish and fruit as food |
store_list | Optional: where it stands on the store tab — group (lower-case letters, digits and underscores) and rank (a whole number from 0). The tab sorts by rank, then by id, and puts a heading wherever the group changes; the heading is the key freehold.store_group.<group>. The mod's own groups each have their hundreds: wood 100–199, stone 200–299, food 300–399, iron 400–499, tools 500–599, supply 600–699, defence 700–799, trade 800–899. A good without the block comes last, under Other (freehold.store_group.misc) |
construction_share | Optional: for a good a building site costs and a workshop or a hearth takes, the per cent the building sites start with, a whole number from 0 to 100; 75 when left out. The workshops share the rest by their input_share. At 100 a workshop gets only what no site is waiting for. It counts only for a good shared in this way — see Who gets a scarce good |
road/
One file per grade: dirt.json the earth road, wood.json the wooden road,
paving.json the stone road — see Road grades.
| Field | Meaning |
|---|---|
tier | The grade, 1 for the earth road; only grade 1 is drawn, each higher one is laid over the grade below |
block, material | The surface: a fixed block, or a material (class, rank, form of a material class) taken by biome, with block as the fallback |
rim | Optional: the two outer columns, with its own block and material. With a rim the grade's own surface is the middle column; without one it covers the whole width |
width | Columns across |
work_per_column, work_per_moved_block | Its building work |
goods_per_column | Its material, per column along the route (the middle; the rim is free) |
travel_cost | How fast it is walked, per column: a block of level open ground costs twice flat of the charter's road_cost, times its line (21), lower is faster |
segment_columns | The length of a stretch the builders lay at a time |
traffic_days, traffic_threshold | Above grade 1, and there required: over how many days trips are counted (at most 8), and how many it takes to rise to this grade |
refund_percent | How much of its material comes back when it is torn up |
material_class/
Which block a building's wood and stone come out as, by biome — see
How a building goes up. The files are
wood.json (light and dark wood), stone.json, masonry.json,
ground.json, and sapling.json for the sapling bed and the pots of the forester and the
lumberjack. Each has a default and a list of biomes that differ.
- The roads take theirs from the same files. The form
pavingofmasonry.jsonis the middle of the stone road and the formcurbits edge;blockscolours the walls of the buildings. - A key under
biomesmay name a biome tag, starting with#, such as#minecraft:is_taiga. A biome takes the line with its own id first, then the first tag line it carries, in the order of the file, and only thendefault— so a narrow tag goes before a wide one. - Every line is checked at loading: its blocks must exist, every form must stand in
defaultas well, and dark wood must be darker than light. - To give the biomes of another mod their wood, file them under
#c:primary_wood_type/<wood>in a biome tag of your datapack, asdata/c/tags/worldgen/biome/primary_wood_type/cherry.json. That line wins over every climate line, here and in saplings.json. - A theme replaces a whole file with its own under
data/<theme>/material_class/— see Recolouring only.
recipe/
The crafting recipes of the five Freehold tools, of the cart and of the charter, as ordinary vanilla
recipes. Only the charter shows in the recipe book, unlocked by an emerald in the inventory through
advancement/recipes/misc/charter.json; a datapack can replace any of them like a vanilla recipe.
resident_names.json
The names your residents are given, each with the vanilla skin that goes with it — see Residents. Replace the list to give them other names or faces, or leave a skin out and keep the name.
saplings.json
Which saplings a forester plants, by the biome of the spot. A datapack replaces the file as a whole:
{
"schema_version": 1,
"default": { "minecraft:oak_sapling": 1 },
"biomes": {
"minecraft:forest": { "minecraft:oak_sapling": 4, "minecraft:birch_sapling": 1 },
"minecraft:taiga": { "minecraft:spruce_sapling": 1 },
"#c:primary_wood_type/spruce": { "minecraft:spruce_sapling": 1 }
}
}
defaultholds for every biome not underbiomes, and it is required. Without a usable one the whole file is dropped and the table before it stays in force.- Each line names saplings with a weight, a whole number from 1. An entry that is no sapling or has a wrong weight is dropped; a biome left with nothing plants the default. Every drop is a line in the server log.
- Biomes are named by their id, so biomes of other mods work too, and biome tags with
#, looked up as in a material class: the biome's own line, then the first tag line in the order of the file, thendefault. - Enter only saplings that grow on their own. A dark oak sapling is taken, but it never grows: the forester plants it, and it stays a sapling.
- Without the file every forester plants oaks.
- The sapling bed shows
material_class/sapling.json, not this file. A datapack that replaces one should replace the other, or the bed shows the old kind.
The log says at loading what it took: Loaded the sapling table: a default, 31 biomes and 16 tags.