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.
GetOffMyLawn
Strictly server-side Valheim 1.0 mod - no client install ever. Active wards keep wild creatures (and raids) out of your base, and doors inside wards close themselves.
| Date uploaded | 2 weeks ago |
| Version | 0.3.1 |
| Download link | Wubarrk-GetOffMyLawn-0.3.1.zip |
| Downloads | 175 |
| Dependency string | Wubarrk-GetOffMyLawn-0.3.1 |
This mod requires the following mods to function
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.2350README
🚫 Get Off My Lawn
Your wards finally keep the greydwarfs out. No client install, ever. The server does the work.
A vanilla ward stops other players from building and using things inside it. It does nothing about the troll walking through the gate. Get Off My Lawn makes every active player ward a creature barrier, and closes the doors people leave open - entirely from the dedicated server, working on the world's raw ZDO data, so Steam, Xbox, PlayFab and crossplay parties all get it with nothing installed on their side.
🛡️ Creature Blocking
Every switched-on player ward (the vanilla guard stone, plus any modded ward that uses the vanilla
PrivateArea component with the player faction) keeps wild creatures out of its radius.
- Bounce (default): a creature found inside the ward is put back just outside the edge. Walk in, get pushed out - the ward visibly repels it. A monster that keeps charging gets bounced every scan.
- Despawn: the creature is removed the moment it is inside.
- Escalation (optional): in Bounce mode, a creature bounced
DespawnAfterBouncestimes withinBounceWindowSecondsis despawned - for the wolf pack that will not take the hint. - Raids are blocked by default (
IncludeEventCreatures): an active ward keeps the raid out of the base. Set it off to let raids behave as vanilla. - Never touched: tamed creatures, a tameable creature whose taming has begun (your wolf in the
warded pen stays put), player summons, training dummies, and anything on
ExcludedFactions/ExcludedPrefabs. Bosses are excluded by default (IncludeBosses). WardRadiussets the effective barrier radius in metres (default 32m, exactly matching vanilla guard stone range; set to 0 to use each prefab's native radius).RadiusBonusadds extra metres on top;MaxVerticalDistancestops a hilltop ward policing a cave below it.
[!NOTE] How Ward Radius Control Works:
- Default 32m: Matches vanilla Valheim's native
guard_stoneradius so the creature barrier lines up with your build boundary out of the box.- Custom Sizing: Set
WardRadiusto any desired radius (e.g. 50m, 100m) or useRadiusBonusfor extra margin. SettingWardRadius = 0automatically falls back to each ward prefab's native radius.- Auto-Close Doors: If
OnlyInsideWards = true, this radius also defines which doors are protected and auto-closed inside the perimeter.- Server vs Client Boundary: Because GetOffMyLawn is strictly server-side, this setting directly governs all creature detection, repelling, despawning, and door enforcement. Vanilla client building protection (
CheckAccess) is evaluated client-side against local game files (32m), so players without client mods will still see building prevented at 32m.
Only active wards count, exactly like vanilla build protection. Faction wards (the dvergr ones) stay vanilla.
🚪 Auto-Closing Doors
A door or gate standing inside an active ward that has been open for longer than Delay (default 10s)
closes itself - unless a player is within PlayerClearance metres of it, in which case it waits for them
to step away. Key doors and one-way dungeon doors are never touched. OnlyInsideWards = false turns it
into a global auto-close for every door near a player, warded or not.
🔦 Visible Shield
Active wards can continuously display their shield dome while active, and also flash reactively when repelling intruders:
- Continuous visibility (
AlwaysVisible, default off): active wards pulse their vanilla shield shimmer periodically (AlwaysVisibleInterval, default 1.3s, tightened for an overlapping shimmer wave) to keep the shield dome continuously visible while active. - Reactive shimmer: every time an active ward bounces or despawns a creature, it immediately flashes
the shield dome. Throttled per ward (
MinInterval, default 1.5s) so repeated hits don't strobe, and automatically resets the periodic timer to keep the effect seamless.
Both visual effects reuse Valheim's built-in PrivateArea FlashShield RPC triggered straight from the
dedicated server: nothing is installed on any client, vanilla clients see the dome naturally, and only
players close enough to have that ward loaded receive the RPC.
⚙️ Configuration
BepInEx/config/wubarrk.getoffmylawn.cfg, created on first boot. Edits are picked up on the running
server within 5 seconds - no restart.
| Section | Setting | Default | Notes |
|---|---|---|---|
| 1 - General | Enabled |
true | Master switch |
VerboseLogging |
false | Per-event log lines; off = a 5-minute summary when anything happened | |
ScanInterval |
0.3 | Seconds between scans. Lower = creatures get less far in | |
OwnershipHandBackDelay |
0.75 | How long the server holds a corrected object before the client resumes it | |
| 2 - Creature Blocking | Enabled |
true | |
Mode |
Bounce | Bounce or Despawn |
|
WardRadius |
32 | Effective barrier radius in metres (default 32m matches vanilla; 0 = native prefab) | |
RadiusBonus |
0 | Extra metres added on top of WardRadius | |
BounceMargin |
2 | How far outside the edge a bounced creature lands | |
MaxVerticalDistance |
30 | 0 = ignore height like vanilla | |
IncludeAnimals |
true | Deer, hares and other AnimalAI creatures | |
IncludeBosses |
false | ||
IncludeEventCreatures |
true | Raid creatures | |
SkipTamingInProgress |
true | Leave creatures being tamed alone | |
ExcludedFactions |
Players,PlayerSpawned,TrainingDummy | Character.Faction names | |
ExcludedPrefabs |
Creature prefab names, comma-separated | ||
DespawnAfterBounces |
0 | 0 = bounce forever | |
BounceWindowSeconds |
60 | ||
| 3 - Auto Close Doors | Enabled |
true | |
Delay |
10 | Seconds a door may stay open | |
PlayerClearance |
3 | Never shut a door on someone this close | |
OnlyInsideWards |
true | false = every door near a player | |
ExcludedDoorPrefabs |
piece_drawbridge,piece_drawbridge_log,Morkhalla_Drawbridge,wood_window | Never auto-closed | |
| 4 - Visible Shield | Enabled |
true | Master switch for ward shield visual effects |
AlwaysVisible |
false | Keep active ward shields continuously visible via periodic shimmer pulses | |
AlwaysVisibleInterval |
1.3 | Seconds between shield pulses when AlwaysVisible is enabled (1.2-1.4s overlaps) | |
MinInterval |
1.5 | Minimum seconds between reactive flashes on the same ward |
🧬 How it works, and what to expect
A dedicated server instantiates nothing near players: wards, doors and creatures exist there only as ZDO records owned by whichever client is simulating them, and the creature's AI runs only on that client. There is no server hook into a creature's movement. What the server can do is correct the ZDO. Doing that safely is the whole trick:
- Every scan, the server reads the ZDOs around each connected player straight from ZDOMan's sector table and sorts them into active wards, closable doors and creatures by prefab.
- To move a creature (or close a door) it takes ownership of the ZDO for
OwnershipHandBackDelayseconds, jumps the ZDO's data revision past everything the owning client still has in flight - otherwise the client rejects the write as stale and its own in-flight packets undo the claim - writes the correction, then hands ownership back. The client's own ZSyncTransform snaps the creature to the corrected position the frame it becomes owner again. - A vanilla ownership sweep that would grab the object back mid-correction is held off by a one-line
Harmony guard on
ZDO.SetOwnerfor held objects only.
Consequences worth knowing:
- A bounced creature is frozen and cannot be hit for the hand-back delay (0.75s by default).
- A bounce is a teleport of a few metres, not a wall: with the default 0.3s scan a running troll gets
roughly one stride inside the edge before it is put back. Lower
ScanIntervalfor a tighter line. - The exit height is the world's base terrain (the server has no heightmaps); on heavily raised ground a bounced creature can land a little above or below the surface and drop or pop.
- On a player-hosted world the host's own creatures are moved directly; remote players' creatures go through the same ownership path as on a dedicated server.
📦 Dependencies
- BepInExPack Valheim 5.4.2350+ on the server. Nothing on clients.
📥 Installation
Drop GetOffMyLawn.dll into the server's BepInEx/plugins/. Built and boot-tested against the current
Valheim 1.0 dedicated server. Not compatible with pre-1.0 servers.
CHANGELOG
Changelog
0.3.1
Changed
- Rebuilt against Valheim 1.0.16 (client build 25527674 / dedicated server build 25527701, network
version 40, unchanged from 1.0.15) and re-verified: a static reference check against both the client
and dedicated-server assemblies, and a headless 1.0.16 dedicated-server boot. No source changes were
needed for compatibility — 1.0.16 removed only
ObjectDB.GetAllFoodItems()andButtonSfx.Start(), and this mod calls neither. - Dropped stale references to a specific past Valheim patch (Steam build id, versioned-decompile
citation) from the csproj, README and
OwnershipHold.cs; they now read version-agnostically ("Valheim 1.0", "vanilla ZDOMan.RPC_ZDOData") since the mod targets whatever the current 1.0.x dedicated server is rather than one pinned patch.
0.3.0
Added
- Configurable ward radius. Added
WardRadiusto[2 - Creature Blocking]with a 32m default matching vanilla guard stones (set to0to use each prefab's native radius). Governs creature barrier reach and door auto-close perimeter.RadiusBonuscontinues to work on top. - Continuous shield shimmer pulse option. Added
AlwaysVisible(defaultfalse) andAlwaysVisibleInterval(default1.3s) to[4 - Visible Shield]. Tightened the default pulse timer to 1.3s so when enabled, overlapping pulses create an undulating shimmer wave rather than spaced flickers.
Fixed
- Independent reactive flash and periodic pulse throttles. Creature bounces flash immediately while automatically resetting the periodic shimmer timer, avoiding double-shimmer artifacts.
- Shield scan gate. Wards now update visual shield presence whenever
AlwaysVisibleis active even if creature blocking and auto-door closing are both disabled.
0.2.1
Changed
- Startup log line no longer pins a Valheim patch version. The
Starting GetOffMyLawn v<version>...line read "built for Valheim 1.0.7", which had gone stale now that the mod is confirmed working unchanged through 1.0.12 (seeMIGRATE-1.0.md). It now reads "built for Valheim 1.0+".
0.2.0
Added
- Visible shield. An active ward now flashes its own vanilla shield effect - the same shimmer the
game shows when a player is denied building in someone else's ward - every time it bounces or despawns
a creature. This reuses
PrivateArea's existing networkedFlashShieldeffect; nothing new is installed on any client, and only players close enough to have that ward loaded ever see it. New4 - Visible Shieldconfig section:Enabled(default on) andMinInterval(default 1.5s, minimum seconds between flashes on the same ward so a creature repeatedly charging one edge doesn't spam it).
0.1.0
Added
- Creature blocking for active wards. Any wild creature found inside a switched-on player ward is
teleported back to just outside the ward's edge (
Mode = Bounce, default) or removed (Mode = Despawn). Tamed creatures, creatures being tamed, bosses (configurable), player summons and anything on the configurable faction/prefab exclusion lists are left alone. Raid creatures are blocked by default (IncludeEventCreatures). Optional escalation: a creature bouncedDespawnAfterBouncestimes insideBounceWindowSecondsis despawned. - Auto-closing doors. A door or gate standing inside an active ward that stays open longer than
Delay(default 10s) closes itself, unless a player is withinPlayerClearancemetres of it.OnlyInsideWards = falseextends it to every door near a player. Drawbridges and window shutters are excluded by default (ExcludedDoorPrefabs); key doors and one-way dungeon doors are never touched. - Live config reload. Edits to the cfg on a running server are picked up within 5 seconds.
How it works (read this before reporting "it moved the creature back inside")
- Vanilla wards are pure client logic; a dedicated server has no ward, door or creature instances at all,
only ZDO data owned by clients. This mod scans the ZDOs around every connected player from the server's
own sector table, and corrects a creature or door by briefly taking ownership of its ZDO, jumping the
ZDO's data revision past everything the owning client still has in flight, writing the correction, and
handing ownership back a moment later so the client's own ZSyncTransform snaps the object to the new
position. The
OwnershipHandBackDelay(default 0.75s) is the window in which the corrected creature is frozen and cannot be hit. - Every fact this relies on was read from the Valheim 1.0.7 dedicated-server decompile (ZDOMan.RPC_ZDOData, ZDOMan.ReleaseNearbyZDOS, ZSyncTransform.OwnerSync/ClientSync, Door.UpdateState, PrivateArea.IsInside).