Home › For server admins

Game rules and commands

Game rules

Freehold adds ten game rules, all in the world creation screen under Freehold.

RuleDefaultWhat it does
freehold:max_freeholds_per_player0How many freeholds one player may own at once, counted over every dimension of the server together. Only the freeholds the player owns count, not those they are a member of. 0 means no limit. A charter placed beyond it is refused: “You already own N freeholds, and this world allows no more.”
freehold:spawn_protection0No freehold boundary may reach within this many blocks of the world spawn, for charters and watchtowers alike. 0 turns the protection off. A placement that would is refused: “No boundary may reach within N blocks of the world spawn.”
freehold:raidstrueWhether raiders come for freeholds and the villages they have connected — see Raids. When off, no threat grows, no raid begins and an announced one is called off; a fight already under way is fought to its end. A vanilla raid never starts at a connected village, whatever this rule says
freehold:conquesttrueWhether freeholds of different owners may attack each other's watchtowers and charters — see Attacks. When off, no attack can be launched, an attack on the march is called off and its soldiers return home, and a fight that has begun is fought to its end. Raids hang on freehold:raids alone
freehold:duel_slots3How many duels a raid or an attack fights at once, at least 1 — see Raids. A change never ends a duel under way
freehold:first_house_boost4How many times faster newcomers arrive while a settlement fills its first house, at least 1 — see How people move in. With 1 there is no boost
freehold:theme_choicetrueWhether a founder chooses the theme of their freehold when founding it — see Themes. When off, every new freehold is founded in the world's default theme, which an operator sets with /freehold theme default
freehold:hand_in_all_goodsfalseWhether goods ports and hoppers take every good a settlement uses. When off, only the basic goods go in: axe, fishing rod, saw, hammer, hoe, food, planks and logs — see Handing goods in. It takes effect at once; nothing comes out of the store either way
freehold:protect_containerstrueWhether visitors and players without a role keep out of the chests, barrels, furnaces and other containers on a freehold's land, chest minecarts and chest boats included. When off, they open them; everything else on the land stays closed to them except doors and fence gates — see Using what stands on your land
freehold:protect_goods_portsfalseWhether only the freeholder and the members hand goods in at a freehold's goods ports. When off, anybody may give a settlement goods — see Handing goods in; nothing ever comes out of the store

Set them like any game rule, for example /gamerule freehold:spawn_protection 200 or /gamerule freehold:hand_in_all_goods true.

Commands

Freehold has no command a player needs. The charter is crafted from an emerald and eight planks; an operator can also hand it out with /give <player> freehold:charter, and in creative mode it is in the Freehold tab — see Items and blocks.

Operators set the themes with /freehold theme …: the world's default, the theme of one settlement, and the template and export with which a theme is made — every one of them is on Themes.

An operator gives a settlement another name with /freehold rename <freehold> <name> (level 2); its owner cannot. The settlement goes by its number in the dimension the command runs in — the numbers are suggested as you type, each with the settlement's name beside it. The name is the rest of the line, spaces included and without quotes, up to 32 characters; colour codes and invisible characters are left out.

AnswerWhen
Freehold 1 is now Birkenhain (was Eichenau)The name is changed; every other operator online sees it as well, and the server log keeps a line with the old name, the new one and who changed it
Nothing of that name is left once formatting codes and invisible characters are taken out; freehold 1 stays EichenauNothing is left of the name once it is cleaned
No freehold 7 in this dimensionNo settlement has that number in this dimension

/setblock and /fill on a laid road hold only while its chunk stays loaded. The next time the chunk loads, the settlement lays the surface again and clears the two blocks over it — see What the settlement repairs. To take a road away for good, tear it up in the game, sneaking and right-clicking it — see Tearing up a road.

Operators also see /freehold blueprint …. It is a tool for drawing buildings, not part of the game: it is not described here, it may change with any version, and /freehold blueprint preview sets real blocks. Leave it alone on a world you care about.

Keys

Freehold has three keys, each of which can be moved in the controls menu under Freehold: V opens the charter screen, M hides or shows the messages over buildings, and holding N shows the building names and the borders of every settlement — see Controls.

Whether the messages are shown is kept on the client, in config/freehold-client.toml, as show_alerts = true by default. Next to it stands chat_alerts, which messages also go into the chat: BLOCKADES by default, WAITING for blockades and waiting messages, or OFF; a resident leaving and a food or fuel shortage go with the blockades. The button on the overview of the charter screen sets the same value. Two more stand beside them for raids: chat_raids = true, whether the announcement and the end of a raid go into the chat, and show_raids = true, whether a raid's marker stands over its target — the two raid buttons on the overview set them. A modpack can ship any of them changed; a server never reads them.

The saved data

Freehold keeps its settlements in the world's save, one file per dimension: dimensions/<namespace>/<dimension>/data/freehold/level.dat. If it cannot read the file, it says so and changes nothing. Freehold then runs nothing in that dimension and writes nothing, and every player who joins is told: “Freehold could not read its saved data for X. Nothing on disk has been changed; the reason is in the server log.” Fix the cause or put the file back from a backup, and restart; the world is as it was. A /reload does not read the save again.

When the simulation stops

An error in Freehold's simulation stops the settlements of that dimension, not the server. Freehold writes the error to the server log and stops running and saving the settlements of that dimension, so the last good save stays on disk. The world stays playable; only Freehold stands still there until the server restarts.

Every operator is told once. An operator online gets in chat, and one who joins later gets on joining: “Freehold has stopped the settlements of X: the simulation ran into an error, and its state is no longer saved. The world stays playable and the last save stays on disk; the reason is in the server log.” X is the dimension, such as minecraft:overworld. Players who are not operators are told nothing.

Report the error from the server log. A restart loads the last save, but will most likely run into the same error again.

The server log

At INFO, Freehold logs only the warnings that stop a building; everything else is at DEBUG.