Confirm with your password

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.

· Website

Stars
1
Downloads
134
Version
0.3.1
Updated
Author
Wubarrk
Virus scan
✓ Scan successful
Runs on
Server-only

Compatibility

Pairs well with 1

Not required, but they work well together.

Description

🚫 Get Off My Lawn

Valheim Mod Server Side Framework Crossplay Version Valheim 1.0

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 DespawnAfterBounces times within BounceWindowSeconds is 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).
  • WardRadius sets the effective barrier radius in metres (default 32m, exactly matching vanilla guard stone range; set to 0 to use each prefab's native radius). RadiusBonus adds extra metres on top; MaxVerticalDistance stops a hilltop ward policing a cave below it.

[!NOTE] How Ward Radius Control Works:

  • Default 32m: Matches vanilla Valheim's native guard_stone radius so the creature barrier lines up with your build boundary out of the box.
  • Custom Sizing: Set WardRadius to any desired radius (e.g. 50m, 100m) or use RadiusBonus for extra margin. Setting WardRadius = 0 automatically 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:

  1. 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.
  2. To move a creature (or close a door) it takes ownership of the ZDO for OwnershipHandBackDelay seconds, 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.
  3. A vanilla ownership sweep that would grab the object back mid-correction is held off by a one-line Harmony guard on ZDO.SetOwner for 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 ScanInterval for 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

📥 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

0.3.1 Latest

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() and ButtonSfx.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 WardRadius to [2 - Creature Blocking] with a 32m default matching vanilla guard stones (set to 0 to use each prefab's native radius). Governs creature barrier reach and door auto-close perimeter. RadiusBonus continues to work on top.
  • Continuous shield shimmer pulse option. Added AlwaysVisible (default false) and AlwaysVisibleInterval (default 1.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 AlwaysVisible is 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 (see MIGRATE-1.0.md). It now reads "built for Valheim 1.0+".

2 older entries, full version history & downloads →

Manual installation instructions
1

Install BepInExPack Valheim

BepInExPack Valheim is required to run mods in Valheim.

Download BepInExPack Valheim 5.4.2351 · View mod page

Check out the mod page for detailed installation instructions.

2

Install GetOffMyLawn

This mod only needs to be installed on the server.

Download GetOffMyLawn 0.3.1

Extract the ZIP and place the file(s) into the BepInEx/plugins/ folder inside your Valheim game folder.