You are viewing a potentially older version of this package. View all versions.
Wubarrk-TerroritySmellatory-0.4.4 icon

TerroritySmellatory

Admin-marked multiplayer territories: set the rules in a small panel, mark the ground with Infinity Hammer, and every player's game enforces them - protection, safe/war zones, no spawns or raids, sanctuary bonuses.

Date uploaded a week ago
Version 0.4.4
Download link Wubarrk-TerroritySmellatory-0.4.4.zip
Downloads 31
Dependency string Wubarrk-TerroritySmellatory-0.4.4

This mod requires the following mods to function

ValheimModding-JsonDotNET-13.0.4 icon
ValheimModding-JsonDotNET

Shared version 13.0.3 of Json.NET from Newtonsoft, net45 package for use in Valheim mods. Maintained by the ValheimModding team.

Preferred version: 13.0.4
denikson-BepInExPack_Valheim-5.4.2360 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2360

README

πŸ—ΊοΈ TerroritySmellatory

TERRORITYSMELLATORY VERSION SERVER AND CLIENTS

The jarl drove a stake into the frozen ground and said, "From here to the river is mine." Nobody argued with the stake. A great many people argued with the river. Now the river has a border you can see, a banner when you cross it, and a runic wall that turns the trolls around.

Mark the ground once. Every player's game keeps the rules.

An admin sets a territory's rules in a small panel and marks the ground with Infinity Hammer, then combines territories into any shape and nests towns inside kingdoms. The server saves them and sends them to every player.

Everyone's game then enforces them: build and chest protection for non-members, safe or war zones, no monster spawns with an optional runic barrier that holds monsters out, no raids, no skill loss, and sanctuary bonuses. Players see territories on the map and on the ground, and get an entry banner like a newly found biome.


NEW IN 0.4.1

Territories show on the map only where you have been. A territory in a part of the world you have never seen no longer paints a coloured shape over the fog and gives away where it is.

You It
Walk new ground, or read another player's shared map the territory fills in with the map, cell by cell, lined up with the edge of the fog
Have explored half of it the large map and the minimap show that half
Haven't uncovered the spot its name sits on no name yet
Want the old way turn off HideUnexploredTerritories to draw territories over the whole map

πŸ”€ The minimap name stays on one line: a long territory name shrinks to fit the label, and only past that is it cut short with dots


BEFORE YOU INSTALL

If… Then…
πŸ›‘ you run a server install it on the server and every client. Protections run in each player's own game, so a player without the mod is not bound by them; the server kicks such players by default (RequireClientMod).
πŸ”¨ you are an admin who marks territories also install Infinity Hammer, with Server Devcommands and World Edit Commands as it requires. Players don't need any of them.
🀝 you update update the server and its players together.
↩️ you ever go back to an older TerroritySmellatory a world with sub-territories cannot go back to a version that predates them: it would read every town as a territory of its own. The newer file is never saved over, so moving forward again finds it intact.
πŸ“œ your server uses an RPC whitelist regular players only ever receive this mod's traffic; only admins send requests.

I

Like a ward, and more. The owner and members are never stopped; neither are admins, unless you say so.

Rule What it does
🧱 Building only members may place, remove, repair or dig β€” a red ghost and "private zone", as with a ward
πŸšͺ Doors, chests and stations only members may use doors, chests, portals, signs, item and armour stands, fermenters, beehives and the rest of what a ward locks
🌾 Harvesting only members may pick crops, berries and other pickables β€” vanilla wards cannot do this
🏰 Buildings cannot be damaged no hit harms them β€” creatures, fire and every player, members and admins included. Weather and support still apply
πŸšͺ Doors close by themselves off by default; a door or gate left open shuts after a delay, but never on a player standing near it
πŸ“– Read the saga β€” who is stopped, and how the doors behave

Building, door and harvest protection apply to everyone who is not a member. Buildings cannot be damaged applies to everyone: take a piece down with the hammer instead. Server admins are never stopped by the protections while AdminsBypassProtection is on, and admin status comes from the server's own adminlist.txt, never from your game's opinion.

Doors close by themselves is about the door, not who opened it, so members' doors close too. A door left open shuts after AutoCloseDelay (10 s), unless a player is within AutoClosePlayerClearance (3 m) of it; then the delay keeps counting and it closes as soon as they step away. The server does the closing, so every player sees it. Drawbridges and window shutters are left alone (AutoCloseExcludedPrefabs β€” add a modded door there to leave it open), and so are doors that need a key and one-way dungeon doors. Where territories overlap, the one that governs the door's spot decides. If you press Use on a door in the moment the server is closing it, the press is dropped: press again.


II

No spawns inside, and a wall of blue runes that turns monsters back at the edge.

Rule What it does
🚫 No monster spawns no hostile world spawns, raid spawns, spawn points or nests; deer, boars, birds and fish still spawn
πŸ”· Runic barrier part of No monster spawns, on by default in a new territory: a hostile creature that reaches the edge is held outside it, and a blue rune shield flares where it pushes
πŸ›‘οΈ Keep non-members out too with the barrier, players who are not members are held at the edge as well; off by default
βš”οΈ No raids a raid never picks a player standing inside
πŸ“– Read the saga β€” what the barrier holds, and what it lets through

Tamed creatures and peaceful animals pass; bosses are held like any monster. A monster already inside is set down just outside. It is a wall for bodies, not for arrows: a ranged monster can still shoot across it. A combined territory has one barrier, around all its ground.

Keep non-members out too holds players who are not members at the edge with the same flare, and sets one already inside (or arriving by portal) down outside. Riding, sailing and sitting are left alone. Members and the owner always pass, and so do admins while AdminsBypassProtection is on.

The flare: a blue hex-cell shield wall with carved runes, a white-hot flash where something strikes with a ripple spreading out, and a burst of glowing runes rising and dissolving. Every player sees it, worked out on their own game. Switch it off with BarrierEffects and the barrier still holds; only the show goes.

Each depends on the one above it. The barrier exists only while No monster spawns is on, and Keep non-members out too only while the barrier is. In the panel each is greyed while the one above is off, and the server clears a barrier setting whose rule is off, so a hand-edited file can't leave one on by itself.


III

Decide how a place feels the moment you walk into it.

Rule What it does
βš”οΈ PvP Players choose, Forced off (a safe zone) or Forced on (a war zone). Your PvP toggle locks inside, and your own choice returns when you leave
πŸ•―οΈ Sanctuary effect a status effect named after the territory: health, stamina and eitr regen, bonus carry weight and bonus armour
πŸ’€ No skill loss on death dying inside doesn't lower your skills
πŸ“― Entry and exit banner the territory's name as the big title, like a new biome, with your own text beneath and the discovery sound the first time; leaving shows "Leaving Hrafnborg", or your own text
πŸ“– Read the saga β€” banners that never spam

The entry text can name the territory and its owner ({name} and {owner} are filled in). A small gem on the banner's lower braid shows the PvP state: green where PvP is forced off, red where it is forced on, none where players keep their own choice. The simple banner style and the goodbye show the same state as one coloured line, and a forced zone names its state on every entry.

No spam at an edge. You count as inside until you are 3 m past it, re-entering within 90 seconds is silent, and dying inside is not leaving. Prefer one quiet line? Set EntryBannerStyle to Simple.


IV

Players see where the border runs, on the map and under their feet.

Rule What it does
πŸ—ΊοΈ Show on the map the territory's real outline and name on the large map and the minimap β€” a combined territory as one shape β€” only over ground you have uncovered
🏷️ Name only with Show on the map: just the name, no outline or tint β€” for a continent or region that would otherwise wash the whole map in one colour
🧭 Name above the minimap while you are inside, its name replaces the biome name, on one line
〰️ Show its border players near the edge see the border on the ground
πŸ“– Read the saga β€” borders and very big territories

The ground border draws exactly the stretch within BorderRange of you: a small territory shows its whole ring, and a big one shows a stretch that grows as you walk up. It runs only along the outside edge of a combined territory. A territory whose edges add up to more than 100 km gets no border on the ground, and keeps its name on the map. When borders show at all is yours to choose with ShowBorders.


V

Circles, squares and rectangles, combined into one territory. An L-shaped keep, a road with a market at its end, a ring of towers.

You It
Territory combine (hammer tool) place it inside the territory to keep, then within 15 seconds inside the one to join into it; placing in the first again cancels
Place β†’ Ground β†’ Combine β†’ Join into this (panel) the same, without the hammer (click twice)
terr_combine <into> <from> the same, from the console
Place β†’ Ground while editing lists the parts: Move one with the hammer, Split off one into its own territory, Remove one, Add ground with the hammer, or Add a circle here
πŸ“– Read the saga β€” one territory everywhere

Protections, PvP, Sanctuary and the banner treat all the parts as one area: walking from one part into another is not leaving. The map draws one outline round the whole shape, with no seams where parts overlap. The territory you combine into keeps its name, rules and owner; the other's owner and members become its members, and the other's own name and rules are dropped. Split off and Remove ask for a second click.

Overlaps. Where two separate territories overlap, the smaller one rules its own ground (its real covered area, overlaps counted once), so a public market drawn inside a protected kingdom works with no setup. Priority lets the bigger one win when you want that instead.


VI

A continent with its towns. Each town says only what makes it different.

You It
Mark a territory inside another it becomes a sub-territory: it starts as a copy of the big one's settings and keeps following them
Change one setting on the town that setting becomes its own (own); everything else still follows
Click own that setting follows again; Follow all of … takes everything back (click twice)
Change the continent every town that follows it changes too
Delete the continent each town keeps the rules it had and moves up a level; Delete with everything inside takes them too
πŸ“– Read the saga β€” what follows, and how nesting feels to a player

What follows: every rule, PvP, priority, colour, the owner and members (so the continent's members are members of its towns until a town sets its own people), the Sanctuary numbers, and the entry and exit texts. A sub-territory's name, ground and history are always its own. The Members tab says whose people they are; Set its own list copies the parent's and makes them the town's own.

In the panel, a new territory's Inside row says Automatic: the territory it is marked in, or none in open country. Change on that row puts an existing territory inside another or takes it out. The All tab lists territories as a tree, and the Here card names the chain (Inside: Hrafnborg > Svartland).

A sub-territory governs its own ground over everything it sits inside, whatever their sizes and priorities say. Sub-territories can have their own, up to eight levels: a continent, a region, a town, a district. Two territories that merely overlap, with no link, still follow "the smaller one governs its ground".

  • Banners. Walking into a town gives the town's banner and no goodbye to the continent. Walking out says goodbye to the town and doesn't announce the continent again, because you never left it. A continent you haven't been told about this session (you logged in inside a town) is announced the first time you step out.
  • The runic barrier guards only the ground its territory governs. A town inside a barrier territory isn't sealed in: a visitor who logs in there or arrives by portal stays put, and an arena town inside a monster-free kingdom keeps its monsters. Something walking out of the town onto the barrier's ground is held at the town's edge; something found on that ground is taken out by the nearest way out of the outer edge, never into the town.
  • The minimap shows the town's name inside the town and the continent's everywhere else.
  • The map. Give a continent Name only, or its tint colours the whole map.
  • Size. MaxRadius goes up to 100 km, so a continent can be marked in the game from a few big parts.

THE TOOLBOX

First ten minutes (admin): install on the server and every client, plus Infinity Hammer for yourself β†’ Home β†’ on Rules, name it and pick its rules β†’ on Members, pick an owner β†’ Place β†’ Pick up the hammer to mark a new territory β†’ size it and place β†’ walk out and back in for the banner.

Players: Home (or terr) opens the panel. Here shows where you are, whose land it is and what applies to you; All lists every territory with its distance.

Key Command
Home the panel terr open or close the panel
terr_whoami your player id (an admin needs it to add you while you're offline), and what you're standing in
terr_list every territory as a tree, with ids, owners and rules
terr_here [radius] mark a circle around you with the panel's rules
terr_delete <id> [tree] delete one; with tree, everything inside it too
terr_parent <id> <parent id> [follow] Β· terr_parent <id> none put a territory inside another, or back at the top level; it follows the new parent only with follow
terr_combine <into> <from> join the second territory into the first
terr_reload make the server re-read its territory file
terr_place Β· terr_remove_at Β· terr_edit_at Β· terr_combine_at what the hammer tools run
πŸ”¨ Mark a territory
  1. Open the panel (Home). On Rules, set the name, colour and rules. On Members, pick an owner and members from the players online, or add someone offline by player id.
  2. Press Place β†’ Pick up the hammer to mark a new territory, or choose Territory from the hammer's tool menu.
  3. The ruler shows the area. Scroll to resize, use Infinity Hammer's shape key for circle, square or rectangle, rotate as you would a piece, and place.

The server checks you are an admin, saves the territory and sends it to everyone. The answer shows in your console, top-left and on the panel. No hammer? Use Place β†’ Mark a circle here, or terr_here <radius>. Infinity Hammer's tools need devcommands on; the panel tells you if they are off.

🩹 Fix a bad placement
  • Territory remove (hammer tool): place it inside a territory, then again on the same one within 6 seconds. The confirmation stops a stray click deleting one.
  • Territory edit (hammer tool): place it inside a territory to open the panel on it. Change its rules and members and press Save changes, or Move / reshape to mark new ground while keeping its rules.
πŸ“œ Set a whole world's territories from a file

Territories are saved per world in BepInEx/config/TerroritySmellatory/worlds/<world name>.json on the server, with a .bak of the previous version beside it. It is plain JSON, so you can edit it by hand, or have a world-building tool write it: a continent as one territory of a few big rectangles (its "parts"), and every town as a territory of its own with "parent" set to the continent. Write it before the world first loads, or replace it and run terr_reload (members and owners added in the game live in that file too, so replacing it replaces them). Every territory needs a unique positive "id"; an unknown key is ignored.

{
  "version": 5, "worldName": "Svartland", "worldUid": 0, "nextId": 4,
  "territories": [
    { "id": 1, "name": "Svartland", "shape": "Rectangle", "x": -28414, "z": 3591, "halfX": 21000, "halfZ": 9000, "yaw": 0,
      "parts": [ { "shape": "Rectangle", "x": -8076, "z": -42619, "halfX": 4000, "halfZ": 3000, "yaw": 0 } ],
      "color": "#3fa9ff", "pvp": "ForcedOff", "enterMessage": "You are in {name}.",
      "flags": [ "BuildProtect", "StructureProtect", "NoMonsterSpawns", "NoRaids", "Announce", "ShowOnMap", "MapNameOnly" ] },
    { "id": 2, "name": "Hrafnborg", "parent": 1, "shape": "Rectangle", "x": -27100, "z": 4200, "halfX": 220, "halfZ": 180, "yaw": 0,
      "parts": [ { "shape": "Rectangle", "x": -26900, "z": 4300, "halfX": 60, "halfZ": 90, "yaw": 0 } ],
      "color": "#c9b458", "enterMessage": "Welcome to {name}.", "flags": { "MapNameOnly": false, "ShowBorder": true } },
    { "id": 3, "name": "Ulfheim", "parent": "Svartland", "shape": "Circle", "x": -25000, "z": 1000, "halfX": 150,
      "pvp": "ForcedOn", "flags": { "BuildProtect": false, "MapNameOnly": false } }
  ]
}

Hrafnborg and Ulfheim are sub-territories of Svartland ("parent" is the id, or the name when that is unique in the file). Hrafnborg follows Svartland in everything it doesn't write: the same protections, PvP and owner, but its own colour and welcome, an outline on the map and a border on the ground. Ulfheim writes three things: it is a war zone with open building, drawn on the map. A key a sub-territory writes is its own even if it matches the parent's value today, so write only what should differ.

How a sub-territory's keys read. Absent means follow the parent. "flags" as a list sets all its rules; as an object ({ "BuildProtect": false, "NoRaids": true }) it sets just those and follows the rest. owner / ownerName / members are one group: write any of them and the territory has its own people ("members": [] is its own empty list), and so are healthRegen … armorBonus for the Sanctuary numbers. pvp, priority, color, enterMessage and leaveMessage are one setting each. A territory with no "parent" takes a default for any missing key.

Rule names (any letter case): BuildProtect, AccessProtect, HarvestProtect, StructureProtect, NoMonsterSpawns, RunicBarrier, BarrierKeepsOutVisitors, NoRaids, NoSkillLoss, Sanctuary, AutoCloseDoors, Announce, ShowOnMap, MapNameOnly, ShowBorder. "pvp" is Unchanged, ForcedOff or ForcedOn. A rule whose prerequisite is off is cleared on load (the barrier needs No monster spawns, Keep non-members out too needs the barrier, Name only needs Show on the map) β€” after a sub-territory has taken what it follows.

Size. A file may hold parts up to 100 km each whatever MaxRadius says, and more parts than MaxParts and more territories than MaxTerritories; those only limit what is marked in the game.

A typo never loses territories. If the file can't be read, the server says where (line and column) and refuses to save until it is fixed, while the territories it already had stay in force. A "parent" that isn't in the file, a territory inside its own sub-territory, or a chain more than eight levels deep makes it refuse the file the same way, saying which. Older files read exactly as before. A file written by a newer version of the mod is enforced but never saved over.

Check a file before the server does. The mod's source tests build a checker that reads a file with the real reader and the server's real rules, and names what the server would take silently (a misspelt key or rule, a missing size, ground cut at 100 km, a rule cleared because its prerequisite is off, a town inside a continent with no "parent", a sub-territory writing what its parent already has): dotnet tests/bin/Release/net8.0/TerritoryTests.dll --check <file> [--at x,z]... [--tree]. --at names the territory that governs a point; --tree prints the nesting.


MULTIPLAYER

The server Each player's game Needs it on both
checks who is an admin Β· saves the territories Β· sends them to everyone Β· closes the doors enforces the protections, the barrier, PvP and the Sanctuary Β· draws the map, borders and banners everything β€” a player without the mod is not bound by the rules, which is why RequireClientMod is on

⚠️ Keep the server and players in step. Every game decides for itself which territory governs a spot, so a mismatched game could enforce different rules. A big territory list never stalls a joining player: it is sent in pieces when it needs to be.


COMPATIBILITY

Mod
Valheim 1.0 Β· BepInEx 5.4.23+ No Jotunn. Install on the server and every client.
JsonDotNET (Newtonsoft) The usual JSON dependency; the server uses it for the territory file. Mod managers install it for you.
Infinity Hammer 1.84+ Admins only, to mark territories, with Server Devcommands and World Edit Commands as it requires. A soft dependency: without it everything else works. Its own default hammer and hoe tools are kept alongside the territory tools.
Better Continents Compatible. Nothing assumes a world size, heights come from the game's own terrain, and territories are sent only once a joining player is fully in the world, well after Better Continents' own download.
Servers with RPC whitelists (such as Wonderland) Regular players only receive this mod's traffic; only admins send requests.

SETTINGS

BepInEx/config/wubarrk.terroritysmellatory.cfg, or Configuration Manager (F1) in game. Territories themselves are always the server's, whatever the settings say.

πŸ”’ Server-synced β€” set on the server
Section Setting What it does
0 – Server Sync LockConfiguration on: every 1 - Server setting is the server's for non-admins
1 – Server RequireClientMod kick players without the mod (on)
1 – Server AdminsBypassProtection admins are never stopped by protections (on)
1 – Server MaxRadius largest radius or half-width a placement may have, 5 m to 100 km (600)
1 – Server MaxTerritories territories per world (500)
1 – Server MaxParts parts per territory; 1 turns combining off (16)
1 – Server AutoCloseDelay seconds before a door closes itself, 1–600 (10)
1 – Server AutoClosePlayerClearance no closing while a player is this near, 0–30 m; 0 turns the check off (3)
1 – Server AutoCloseExcludedPrefabs door prefabs never closed (the drawbridges and window shutters)
πŸ–₯️ Local to your game β€” yours alone
Section Settings
2 – Client PanelKey (Home) Β· PanelScale Β· ShowBorders (Off, PanelOnly, PanelOrBuilding, Always) Β· BorderRange (60) Β· ShowOnMap Β· HideUnexploredTerritories Β· MinimapTerritoryName Β· EnterLeaveBanners Β· EntryBannerStyle (Epic or Simple) Β· EntrySound (FirstEntry, EveryEntry, Off) Β· BannerCooldownSeconds (90) Β· BarrierEffects
3 – Infinity Hammer WriteHammerTool (keeps infinity_tools_terroritysmellatory.yaml; delete its first line to take it over) Β· InitialRadius (20)
9 – Debug VerboseLogging

CREDITS

Needs: BepInExPack Valheim 5.4.2360 Β· JsonDotNET 13.0.4, on the server and every client. Install with a mod manager, or unzip into BepInEx/plugins. Admins who mark territories: Infinity Hammer.

  • Inspired by HanonHeim's BaseTerritory.

Made by Wubarrk β€” ravenirongames.com. Bug reports and abuse welcome on Discord. License: MIT β€” use, change and share it freely, commercially too; just keep the copyright notice. Full text in LICENSE.md.

CHANGELOG

Changelog

0.5.1

Mining inside protected territories, and no border in dungeons.

  • World pieces can be mined again inside a territory where Buildings cannot be damaged. Pieces no player built - dvergr black marble, Ashlands grausten, ruins, anything baked into the world - take a pickaxe or axe hit. Who may mine follows the territory's Harvesting rule: everyone with it off, the owner and members with it on. Everything a player built stays protected as before, and creatures, fire and other weapons still do nothing.
  • New server setting MineWorldPieces (on). Turn it off on a server whose towns are baked into the world: their pieces have no builder and count as world pieces.
  • Ore veins and rocks (copper, tin, silver, blacks7ar's OreMines nodes) were never stopped by the rule.
  • The ground border is no longer drawn inside dungeons. Its line landed on the dungeon's floor and walls and cut through modded mines.
  • Plays with 0.5.0 (ServerSync floor unchanged). A hit on a world piece is judged by the game that owns that piece, so it lands only once that player has 0.5.1 too.

0.5.0

Territory guards. Ported from ValtimaOnline's town guards.

  • New rule: Guards (panel β†’ Rules β†’ World, off by default; no existing territory gains it). The server posts guards in a ring round the middle of each part of the territory, facing out: GuardsPerPart (2) a part, at most MaxGuardsPerTerritory (8). They hold their post, fight any monster that comes into their sight and walk back afterwards. A floor built over a post is found by the first game that wakes the guard, so nobody is shut under a hall.
  • Call them. Type guards in chat inside a territory with guards (a whole word, any case; the client setting GuardCallWords chooses the words). If a monster that is after somebody is within 40 m, the nearest guard of that territory within GuardCallRadius (80 m) runs to fight it; with none that close, a guard appears beside you and leaves GuardLingerSeconds (40 s) after the fight. The server decides every call and holds each player to GuardCallCooldown (10 s). The answer shows top-left.
  • The guards are ValtimaOnline's Meshy town guards - a man's and a woman's look - carrying the game's iron atgeir, swung two-handed. The bodies are embedded in the DLL (a 12 MB guards-only bundle): nothing else to install. They cannot be hurt, never attack players or buildings, drop nothing, pass the runic barrier and are not counted as monsters by the spawn rules. Press E on one to talk.
  • Moving or reshaping a territory moves its guards; switching the rule off or deleting the territory takes them away. While the territory file cannot be read, the server takes no guard away.
  • Every player and the server need 0.5.0 (ServerSync floor 0.5.0): a 0.4.x admin's panel would strip the new rule, and a 0.4.x game has no guards to show.
  • The territory file is now version 6 (one new rule name, Guards); a 0.4.x server rolled back to will not save over it. Older files load as before.
  • New settings: GuardsPerPart, MaxGuardsPerTerritory, GuardCallRadius, GuardCallCooldown, GuardLingerSeconds (server-synced), GuardCallWords (client).
  • Two new connection messages, TerroritySmellatory_GuardCall (a player's call, up) and TerroritySmellatory_GuardNotice (the answer, down). A server with an RPC whitelist must allow them.
  • Verified: 0 warnings; refcheck OK on the client and the dedicated server against Valheim 1.0.21 (58 Harmony targets); 8,392 off-game checks including 6 new guard groups. Not yet seen in a world.

0.4.4

One store page for every store.

  • The store page was rewritten in the new layout and is now the same on every store; the website link now goes to https://ravenirongames.com/.
  • No change to the mod: TerroritySmellatory.dll is the same file as in 0.4.3.

0.4.3

Rebuilt and checked against Valheim 1.0.21 (network 41).

  • No change in behaviour. Nothing 1.0.21 changed touches the territory rules, the map fog, the banners or the Infinity Hammer tools.
  • Website link moved to https://www.rossgilsonlabs.dev.
  • Now requires BepInExPack Valheim 5.4.2360.
  • ServerSync floor remains 0.4.0 (servers and clients on 0.4.0 to 0.4.3 play together).

0.4.2

Infinity Hammer default tools coexistence fix.

  • Default Infinity Hammer tools are preserved alongside TerroritySmellatory's tools. On clean installs or fresh profiles with Infinity Hammer, TerroritySmellatory's custom tool file (infinity_tools_terroritysmellatory.yaml) was matched by Infinity Hammer's infinity_tools*.yaml wildcard search. Because Infinity Hammer only auto-generates its default infinity_tools.yaml (pipettes, hoe tools) when 0 tools are found across all matching files, TerroritySmellatory's 4 territory tools caused Infinity Hammer to skip creating its default tools, leaving the Hoe without terrain tools or the Remove tool, and the Hammer without pipettes.
  • Automatic bootstrapping: When writing its tools file, TerroritySmellatory now ensures infinity_tools.yaml exists (checking BepInEx/config/infinity_tools.yaml and BepInEx/config/tools/infinity_tools.yaml). If missing or empty, it bootstraps the file using Infinity Hammer's ToolManager.CreateFile() via reflection, with a built-in fallback to the full standard 17-tool Infinity Hammer template (Hammer pipettes and all 14 Hoe tools: Level, Raise, Pave, Grass, Dirt, Cultivate, DarkGrass, PatchyGrass, MossyPaving, DarkPaving, Reset, Slope, Remove, Tame).
  • Zero network/protocol change: Pure client-side tool integration fix; ServerSync floor remains 0.4.0 (servers on 0.4.0/0.4.1 and clients on 0.4.2 play together seamlessly).

0.4.1

The map keeps its fog, and the minimap name keeps to one line.

  • Territories are drawn on the map only over ground you have uncovered. The fill, the border and the name of a territory used to show over the whole map, so a territory in a part of the world you had never seen drew a coloured shape over fog, and gave away where it was. Now the large map and the minimap draw a territory only where the fog has been cleared: by walking the ground, or from another player's shared map (the game's own rule for what counts as explored). A territory half explored shows the explored half; as you walk, it fills in with the map. A territory's name shows only while the point it sits on has been uncovered. It is clipped cell by cell against the same cells the fog covers, so the edge of a territory and the edge of the fog line up. The new client setting [2 - Client] HideUnexploredTerritories (on by default) turns it off, to draw territories over the whole map as before.
  • The minimap's territory name stays on one line. The name that replaces the biome name above the minimap used to be set to 80% when it was too wide and left to wrap, and a long name wrapped into lines that drew on top of each other. It is now never wrapped: it is shrunk in steps until it fits the label, down to 55% of the label's own size, and below that it is cut short with dots (A Carrot Field in Britain 2 fits at 75%; a name too long for any size ends in ...). The label's own width decides, whatever skin or frame another mod draws around the minimap.
  • Nothing changes on the wire, in the territory file, or in what any rule does: this is how your own game draws its map and label. The server needs no update to match - 0.4.0 and 0.4.1 play together - though a mod list that pins the exact version (a whitelist of file hashes, such as AzuAntiCheat's) must carry the new file.
  • Under the hood: the game keeps what you have uncovered as two bit sets, and the mod keeps one alpha texture of it (one byte a cell, the same size as the game's own map texture, 4 MB at the usual 2048 x 2048), brought up to date from small hooks on the methods that uncover a cell, and put under a UI mask over the territory graphics, lined up with the map picture by the same window the picture uses. A map that is closed costs nothing; an open one costs one small copy and upload about every two seconds while you walk new ground, and a few milliseconds once when a map is loaded.
  • Verified: builds against Valheim 1.0.17 with 0 warnings; every game reference and all 48 Harmony targets resolve on both the client and the dedicated server; 7,329 off-game checks, including the copy of the explored cells (random sets, every texture size, the changed-cell box, box by box against a full copy) and the name fitting (shrinking, cutting, never wider than the room, over thousands of random names). In a game client with a graphics device: a real canvas rendered through the same clip draws white exactly on the covered cells (with the clip off as a control, with a zoomed window onto the mask, and inside the map's own rectangular clip); in a world the mask matches the game's own explored cells cell for cell, as first built and after the player was put down on new ground three times; and the minimap's real label shows names from 7 to 94 characters on one line within its width, where the 0.4.0 way wrapped the longest to 4 lines. The whole automated run (a headless dedicated server and a player, 183 checks) passes. Not yet seen by a person in a world: the clip on the real map while walking, and the name beside a skinned minimap frame.

0.4.0

Sub-territories. A territory marked inside another is now its sub-territory: it starts as a copy of the big one's settings, goes on following them, and can differ in as many settings as you like. A continent with its towns inside it needs each town to say only what makes it different, and a change to the continent reaches every town that follows it.

  • Inside, a new row under the name on the panel's Rules tab. A new territory's says Automatic: it becomes a sub-territory of whatever governs the middle of the ground you mark, or stays top level in open country. An existing territory can be put inside another, or taken out, on the same row.
  • Follows / own beside every setting of a sub-territory: the rules, PvP, priority, colour, the entry and exit texts, the Sanctuary numbers, and the owner and members. A setting that follows shows the parent's value and changes when the parent's does. Changing a setting on the sub-territory makes that one its own and leaves the rest following; click own to make it follow again, or Follow all to take everything back. A territory's name, ground and history are never followed.
  • The panel shows the nesting. The All tab lists the territories as a tree, each under the one it sits in; the Here card names the chain (Inside: Hrafnborg > Svartland); Join into this is greyed, with the reason, for a territory and one inside it. The PvP buttons and the colour chips share the room their row has, so the new column fits beside them (drawn in a test window over the main menu and checked by eye at text scales 0.7, 1.0 and 1.5; at scale 2.0 on a screen only 1024 pixels wide the PvP row is wider than the panel).
  • The continent's members are members of its towns until a town sets its own people, so adding someone to a continent adds them to every town that follows its members.
  • A sub-territory governs its own ground over everything it sits inside, whatever their sizes and priorities say, and sub-territories can have sub-territories (up to eight levels: a continent, a region, a town, a district...).
  • Taking a territory away never changes how the ones inside it behave. Delete a continent and each town keeps the rules it had and moves up a level (the answer says so); terr_delete <id> tree, and the panel's Delete with everything inside button, delete them with it (the plain Delete button then says what happens to the ones inside). Combining a territory with one inside it is refused; combining one that has sub-territories moves them under the one that stays.
  • Banners follow the link, not the ground. Walking out of a town onto the continent it belongs to says goodbye to the town and never announces the continent again, even where the town's middle lies outside the continent's ground (a harbour town reaching out to sea).
  • A PvP notch on the entry banner: a small gem on the banner's lower braid, green where PvP is forced off, red where it is forced on, and none where players keep their own choice. The Simple banner style, the goodbye and the fallback line show the same state as one coloured line (the game's own "Friendly fire enabled" in red, "Friendly fire disabled" in green), and a forced zone names its state on every entry, not only when your own setting changed.
  • Console: terr_list prints the territories as a tree, each sub-territory under the one it sits in with what it sets itself; terr_parent <id> <parent id | none> [follow] puts a territory inside another, moves it to a different parent or back to the top level (it keeps what it shows, and follows the new parent only with follow; the panel's Inside row does the same); terr_delete <id> [tree]; terr_whoami names what you are standing in and what it is inside.
  • The territory file is version 5, with one new optional key: "parent", the id (or the name) of the territory a territory is inside. A sub-territory's entry holds only what it sets: every key it leaves out follows the parent, "flags" as a list sets all its rules and as an object ({ "BuildProtect": false }) sets just those, and it is written back that way. A territory without a parent, and every file from 0.1.x to 0.3.x, is read and written exactly as before. A parent that is not in the file, a territory inside its own sub-territory, or a chain over eight levels makes the server refuse the file and keep the territories it had, saying which. The README has a worked example, and the mod's tests include a checker that reads a world file with the real reader and names what the server would take silently (including towns that lie inside a continent but are not linked to it).
  • A big territory list can no longer stall a player's connection. Steam refuses a message over 512 KiB and then keeps retrying it, which drops the player; the list goes to each player as one message only while it is small (under 64 KiB: the largest real world so far, 84 territories with all their parts, is 29 KB), and above that in pieces of up to 64 KiB on the same channel, one piece a frame, while the player's connection has room (the way Better Continents sends a world's maps). The player's game puts the pieces back together in order, checks them, and ignores a list that stops coming.
  • Under the hood: the server keeps, saves and sends only what each territory sets itself, and every game fills in what a sub-territory follows with the same code the server runs (so a continent's member list is not copied into every town on the wire); the rules themselves are unchanged. A record on the wire now carries the parent and the follow marks (record version 3; the protocol is still 2), and the server knows one new request, delete-with-everything-inside.
  • The server and every player need 0.4.0: every game decides for itself which territory governs a spot, and a 0.3.x admin who saved a sub-territory's rules would silently cut it loose from its parent. A world with sub-territories cannot be rolled back to 0.3.x: a 0.3.x server does not understand the links, so it reads each sub-territory as a top-level territory with the defaults for everything it follows, and a town that follows only some of its rules (written as a "flags" object) makes 0.3.2 refuse the whole file, so nothing is enforced. It will not save over the file (a newer version's), so going back to 0.4.0 finds it intact.
  • Verified: builds against Valheim 1.0.17 with 0 warnings; every game reference and all 43 Harmony targets resolve on both the client and the dedicated server; 5,656 off-game checks, including sub-territory resolution through three levels, the file's every shape of a sub-territory, removal and combining, and the banner by link; the dedicated server boots on a world file with sub-territories and passes its own file self-check; the automated run with a headless dedicated server and a headless player passes 181 checks, including marking a land and a town inside it through the panel's draft, editing the land and watching the town follow, the file's keys, deleting the land, deleting and combining with sub-territories, and the notch on both banners. Not yet seen by a person in a world: the panel (it has been drawn and photographed in a test window, not used), the notch (checked by its pixels and its place on the banner, not by eye), and the nested barrier in a running game.

0.3.2

Territories inside territories. A continent with its towns inside it, or a kingdom with a market, now behaves as one picture: the town runs by its own rules, announces itself once, and no longer drags the big territory's banner or barrier along with it. Nothing about how you mark a nested territory changes: draw the big one, then draw the small ones inside it, and the smaller governs its own ground, as it always did.

  • Leaving a town no longer announces the continent again. Walking out of a territory that is drawn inside a bigger one says goodbye to the small one ("Leaving Britain") and nothing more: you never left the big one. Before, every exit from a town could throw the big territory's full banner on screen again. Walking in was already right (the town's banner, no goodbye to the continent). A territory you have not yet been told about this session, because you logged in inside a town, is still announced the first time you step out of it.
  • The runic barrier holds the ground its territory governs. A town drawn inside a barrier territory is no longer sealed in with it. A visitor who logs in inside a public town, or arrives by portal, is no longer set down at the continent's far edge, and an arena town inside a monster-free kingdom keeps its monsters. A thing in the town that walks out into the barrier's ground is held at the town's edge, as it would be at the outer edge. A thing found in the ground the barrier governs is still taken out by the nearest way out of the outer edge, never into the town.
  • Name only, a new setting under Show on the map: the large map and the minimap show just the territory's name (and the minimap's biome label shows it while you are inside), with no outline and no tint. For a continent or a region, which would otherwise wash the whole map in one colour. Off by default, and in no territory you already have.
  • Continent-sized territories. [1 - Server] MaxRadius can now be set up to 100 km (it stopped at 5 km), so a continent can be marked in the game from a few parts. A territory read from the world's file may have parts up to 100 km each whatever MaxRadius says, and a file is never cut down to MaxParts or MaxTerritories, which only limit what is placed in the game. Borders are not drawn on the ground for a territory whose edges add up to more than 100 km; it keeps its name on the map.
  • Setting a world's territories from a file. The README now says how: a world-building tool writes the territory file (a continent as one territory of a few big parts, each town inside it a territory of its own, with all its rectangles as parts), and terr_reload picks it up.
  • The territory file is now version 4: one more rule name, "MapNameOnly", in the usual "flags" list. A version 3, 2 or 1 file loads unchanged. A server rolled back to 0.3.1 or earlier will not save over a version 4 file, because it would drop the name and the continent would be tinted again, so its territories are enforced as loaded and the file is left alone until 0.3.2 runs again.
  • Fixed: the comment on Buildings cannot be damaged in the mod's source still said only creatures and non-members were stopped. It has said "no hit harms them, whoever lands it" since 0.1.1, which is what the panel says and the mod does.
  • The server and every player need 0.3.2. The barrier is enforced in each player's own game, so a 0.3.1 game would still seal a town in with its kingdom, and a 0.3.1 admin's panel does not know Name only and would switch it off in any territory it saved a change to.
  • Verified: builds against Valheim 1.0.17 with 0 warnings; every game reference and all 43 Harmony targets resolve on both the client and the dedicated server; 4,964 off-game checks, including a world file of two continents and 150 towns (one of 23 parts) read, held, governed and sent the way the server does, and the example file in this README read by a test. The three new behaviours each go red when their change is taken out. A headless dedicated server loads the 152-territory file ("Loaded 152 territories") and boots clean with Better Continents. The automated run with a headless dedicated server and a headless player passes 147 checks, with none failed, as 0.3.1 did: the runic barrier still holds, flares and lets members through. Not yet seen in a running game: the nested barrier (a player's own game enforces it, which the off-game checks and a dedicated server cannot run), the name-only map label, and the banner sequence on a real walk out of a town.

0.3.1

Doors that close themselves. A territory can now shut the doors and gates that get left open in it.

  • Doors close by themselves, a new rule on the panel's Rules tab, in the World group. Off by default, and off in every territory you already have. A door or gate left open inside a territory with the rule shuts after 10 seconds, unless a player is within 3 metres of it; then it waits, and closes as soon as they step away. Nobody has a door shut in their face.
  • It is about the door, not who opened it: members' doors close too. Drawbridges and window shutters are left alone, and so are doors that need a key and one-way dungeon doors. Where territories overlap, the one that governs the door's spot decides, as for every other rule: a market inside a kingdom keeps its own doors as the market says.
  • The server does the closing, so every player sees the door close and nothing has to be installed differently. A door far from every player is looked at once someone comes near, and its ten seconds start then. Press Use on a door in the moment it is being closed and the press is dropped for under a second; press again.
  • [1 - Server] AutoCloseDelay (10, from 1 to 600 seconds), AutoClosePlayerClearance (3 metres, 0 turns it off) and AutoCloseExcludedPrefabs (the drawbridges and window shutters, plus any modded door you want left open). The panel and terr_list quote the delay.
  • The territory file stays version 3: the rule is one more name, "AutoCloseDoors", in the usual "flags" list. A 0.3.0 file loads unchanged, and gains no door closer.

The runic barrier now flares. In 0.3.0 the barrier held monsters out, but its shield never showed: the effect failed to build its texture and switched itself off. It is rebuilt on the same rendering as the Njord mod's runes:

  • the blue hex-cell shield wall with carved runes;
  • a white-hot flash where something strikes, and a ripple spreading out;
  • a burst of glowing runes rising from the impact and dissolving. Every player sees it, worked out on their own game with no network traffic. If the effect ever fails to build, it says so in the log and tries again, rather than going quiet for the whole session.
  • The server and every player need 0.3.1. A 0.3.0 admin's panel does not know the door rule, and would switch it off in any territory it saved a change to.
  • Verified: builds against Valheim 1.0.16 with 0 warnings; every game reference and all 43 Harmony targets resolve on both the client and the dedicated server; 4,694 off-game checks. An automated run with a headless dedicated server and a headless player passes 147 checks on a plain and on a Better Continents world, and 152 with graphics on. In that run an open door shuts on time and waits for a nearby player, while doors outside the rule, drawbridges, window shutters and a market without the rule all stay open. With graphics on, the barrier's flare is caught on screen and fades away. Boots clean on a 1.0.16 dedicated server, with and without Better Continents.

0.3.0

A runic barrier for territories that keep monsters out. A territory with No monster spawns can now hold monsters out as well as stop them spawning. A hostile creature that reaches the edge is held outside it, and a blue shield of glowing runes flares across the edge where it pushes, then fades.

  • Runic barrier, a new rule under No monster spawns on the panel's Rules tab. Tamed creatures and peaceful animals pass; bosses are held like any monster. A monster already inside (one that spawned before the barrier was switched on, or was carried in) is set down just outside the edge. It is a wall for bodies, not for arrows: a ranged monster can still shoot across it. A combined territory has one barrier, around all its ground. It is on by default for a territory you mark from now on; territories you already have are left exactly as they are, so turn it on in each one you want it in.
  • Keep non-members out too, under the barrier and off by default. Players who are not members are held at the edge as well, with the same flare. One who is already inside, or arrives by portal, is set down outside with "The runes of … turn you back". Riding, sailing and sitting are left alone. Members and the owner always pass, and so do admins while AdminsBypassProtection is on.
  • Each of the two is greyed, not hidden, while the rule above it is off, and the server clears a barrier setting whose rule is off, so a hand-edited file cannot leave one switched on by itself.
  • [2 - Client] BarrierEffects (true): the flare and its sound. Off, the barrier still holds monsters out; only the show goes.
  • The Here card and terr_list name the barrier beside No monster spawns.
  • The territory file is now version 3: two new rule names, "RunicBarrier" and "BarrierKeepsOutVisitors", in the usual "flags" list. A 0.2.x or 0.1.x file loads unchanged and gains no barrier. A server rolled back to 0.2.x will not save over a version 3 file, because it would drop the barrier names, so the territories are enforced as loaded and the file is left alone until 0.3.0 runs again.
  • The server and every player need 0.3.0. The barrier is enforced in each player's own game, so a 0.2.x game would let monsters walk straight through it, and would not know the new rule names.
  • Verified: builds against Valheim 1.0.16 with 0 warnings; every game reference and Harmony target resolves on both the client and the dedicated server; 2,893 off-game checks. An automated run with a headless dedicated server and a headless player passes 134 checks on a plain and on a Better Continents world: a Greyling hunting a player by its own AI is held at the edge and never gets in, one set inside is out in a moment, the barrier flares, tamed and peaceful animals pass, a non-member is held and turned back until made a member, and the barrier survives saving and a restart. Boots clean on a 1.0.16 dedicated server, with and without Better Continents.

0.2.0

Combined territories: any shape you can build from circles, squares and rectangles.

  • Combine two territories into one. Its ground becomes both grounds together, so a territory can be an L-shaped keep, a road with a market at its end, or a ring of towers. The territory you combine into keeps its name, rules and owner. The other's owner and members become its members, and the other's own name and rules are dropped.
  • Territory combine, a new hammer tool: place it inside the territory to keep, then within 15 seconds inside the one to join into it. Placing in the first one again cancels. Without the hammer, use Place β†’ Ground β†’ Combine β†’ Join into this in the panel (click twice), or terr_combine <into id> <from id>.
  • Ground section in the panel (Place, while editing a territory). It lists the territory's parts. Move a part with the hammer, split one off into a territory of its own, remove one, or add ground with the hammer or as a circle around you.
  • One territory everywhere. Protections, PvP, Sanctuary and the banner treat all parts as one area: walking from one part into another is not leaving. The map draws one outline around the whole shape, with no seams where parts overlap. The ground border runs only along the outside edge. Where territories overlap, size is the area really covered, overlaps counted once.
  • [1 - Server] MaxParts (16): the most parts one territory may have. Set it to 1 to turn combining off.

An epic entry banner. Entering a territory now announces its name the way the game announces a new biome: the big title between the braids, the admin's entry text beneath it, and the discovery sound the first time you enter each territory in a session. Leaving still shows "Leaving …" in the centre.

  • No more banner spam at an edge. You count as inside until you are 3 m past the edge, and re-entering within 90 seconds is silent (BannerCooldownSeconds). Dying inside is not leaving.
  • [2 - Client] EntryBannerStyle: Epic, or Simple for 0.1.1's centre message. [2 - Client] EntrySound: FirstEntry, EveryEntry or Off.

The territory's name on the minimap. While you stand in a territory that shows on the map, its name, in its colour, replaces the biome name above the minimap. The biome name comes back when you leave. [2 - Client] MinimapTerritoryName turns this off. The large map is unchanged.

  • Ground borders now draw exactly the stretch of border within BorderRange. A small territory shows its whole ring and a narrow one both sides; from further out, a big territory shows a shorter stretch that grows as you walk up.
  • terr_reload of a file with a typo no longer drops every territory until it is fixed: the ones already loaded stay in force. A territory file written by a newer version of the mod is enforced but never saved over.
  • Infinity Hammer: a hand-kept infinity_tools_terroritysmellatory.yaml that lacks one of the tools no longer makes the hammer run the tool's name as a command.
  • The server and every player need 0.2.0. A 0.1.x game would protect only a combined territory's first part. Territory files from 0.1.x load unchanged.
  • Verified: builds against Valheim 1.0.16 with 0 warnings; every game reference and all 42 Harmony targets resolve on both the client and the dedicated server; 1,304 off-game checks (shapes and combined ground, the wire and file formats, the banner's decisions, the map outline mesh). An automated run with a headless dedicated server and a headless player passes 114 checks on a plain and on a Better Continents world: combining, protection across parts, the epic banner, the minimap name, saving and reloading. Boots clean on a 1.0.16 dedicated server, with and without Better Continents, loading a 0.1.x territory file.

0.1.1

Fixes from the first playtest.

  • Banners and forced PvP show together. When a territory switches your PvP on or off, the entry or exit banner carries the game's PvP notice on its second line. Before, the notice replaced the banner.
  • "Buildings cannot be damaged" now means no damage at all, from anyone: creatures, fire and every player, members and admins included. Before, members' and admins' hits still landed, so an owner testing their own walls saw them take damage. Take pieces down with the hammer instead. Weather and support still apply.
  • Territories show on the minimap as well as the large map, clipped to its square. Outlines now have a rim of constant width, so a large territory no longer gets a thick band at its edge. A name shows while the territory's centre is in view.
  • Panel layout: every hint sits left-aligned under the option it explains. Every row of buttons, labels and fields is one height, and switched-on buttons no longer grow. Labels and steppers share one column. "Buildings cannot be damaged" moved to the World section.
  • The log says at start-up whether Better Continents is loaded, and which version.
  • The server and every player need 0.1.1: the building rule runs on whichever player's game owns the building.

0.1.0

First release.

  • Territories as circles, squares or rotated rectangles. Admins mark them with Infinity Hammer (the Territory tool) or around themselves (terr_here). The server saves them per world and sends them to every player.
  • Rules per territory: members-only building, doors/chests/stations and harvesting; buildings that cannot be damaged; no monster spawns; no raids; no skill loss on death; forced PvP off (safe zone) or on (war zone); a Sanctuary status effect with regen, carry and armour bonuses; entry and exit banners; map outline and name; ground border.
  • Owner and members, chosen from the players online or by player id. Admins bypass protections (configurable).
  • Overlaps: the smaller territory rules its own ground; priority overrides that.
  • Panel (Home): where you are and what applies to you, a list of every territory, and for admins the rules, members and placement.
  • Fixing mistakes with the hammer: Territory remove (place twice to confirm) and Territory edit (opens the panel on that territory, including move/reshape).
  • The territory file is readable JSON with rule names, via Newtonsoft (depends on ValheimModding-JsonDotNET). A file that fails to read is never overwritten, and the error names where it broke.
  • Verified: builds against Valheim 1.0.16; every game reference and all 40 Harmony targets resolve on both the client and the dedicated server; boots clean on a 1.0.16 dedicated server; 557 off-game checks on shapes, overlaps, the wire format, the file format and Infinity Hammer's command substitution.