🚫 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.