Home › For server admins

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.

building/

One file per building. What the fields mean:

FieldMeaning
translation_key, description_keyThe keys of its name and of the text shown in the build list
build_listOptional: 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_keyThe drawing it is built from
construction.goodsWhat it costs
construction.work, segments, max_buildersWork 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_slotsWork places, builder's posts and beds
catchment_radiusA 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_toolThe tool each worker needs
work_soundOptional: 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_roleworker, or soldier for a post that fights in raids — see Soldiers and gear
work_priorityWhere 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
recipesWhat 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_shareOptional: 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_thresholdThe defaults of the two numbers on the buildings tab: what it keeps in stock, and at what it is fetched from
placementmax_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, fieldWhat 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
orchardThe 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, hearthWhat 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
tavernThe good it pours, its reach and how much faster its guests work, in per cent
tradeThe 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_gateThe village gate: link_reach, how far its link road may run to a village path, in blocks
garrisonA 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_capacitySlots it adds to the store
claim_radius, claim_spacing, claim_strengthLand 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)
tiersThe 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_goodsThe charter: who and what it brings
immigrationThe 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
shortageThe 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
villageThe 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
defenceThe 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_loadThe charter: residents per carrier, and slots a carrier carries
carrier_waitersThe 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_costThe 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_graphThe 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/

FieldMeaning
storage_weightSlots one unit takes
item_mapping.acceptsThe items the goods port takes for it; a tag with # takes the whole tag
item_mapping.basictrue 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
priceWhat a village pays for it: units for emeralds. A good without one is not taken in trade and never carried off by raiders
gearA 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_userThe ceiling above which nobody makes it: the reserve, and so much more per user
durability, malusA tool: how many jobs it lasts, and how many times as long a job takes without it
loadThe cart: slots a carrier moves with it
substitution_classGoods that stand in for each other — bread, fish and fruit as food
store_listOptional: 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_shareOptional: 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.

FieldMeaning
tierThe grade, 1 for the earth road; only grade 1 is drawn, each higher one is laid over the grade below
block, materialThe surface: a fixed block, or a material (class, rank, form of a material class) taken by biome, with block as the fallback
rimOptional: 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
widthColumns across
work_per_column, work_per_moved_blockIts building work
goods_per_columnIts material, per column along the route (the middle; the rim is free)
travel_costHow 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_columnsThe length of a stretch the builders lay at a time
traffic_days, traffic_thresholdAbove 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_percentHow 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.

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 }
  }
}

The log says at loading what it took: Loaded the sapling table: a default, 31 biomes and 16 tags.