Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
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.
CHANGELOG
Changelog
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) andAutoCloseExcludedPrefabs(the drawbridges and window shutters, plus any modded door you want left open). The panel andterr_listquote 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
AdminsBypassProtectionis 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_listname 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_reloadof 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.yamlthat 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.