You are viewing a potentially older version of this package. View all versions.
sighsorry-STU_Ward-1.1.2 icon

STU Ward

Simple Tidy and Unique Ward to protect your base from other players without pushing them out. Auto closing doors within ward area. Best to use with Guild mod

Date uploaded 3 months ago
Version 1.1.2
Download link sighsorry-STU_Ward-1.1.2.zip
Downloads 86
Dependency string sighsorry-STU_Ward-1.1.2

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 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.2333
ValheimModding-Jotunn-2.29.0 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.29.0

README

STU Ward

Simple Tidy and Unique Ward to protect your base efficiently on your server

It adds a clone of vanilla ward but with more server-side features such as diverse protections, permission control, guild integration, ward count limits, and compatibility handling for common utility mods.

Registration is same with vanilla ward.
There is blacklist config to block certain items inside ward area.


Ward Settings UI

Ward area cannot be overlapped unless there is guild or one player built all the wards.


Good old auto closing door inside ward area

What It Blocks

Inside a foreign enabled Ward, unauthorized players are blocked from:

  • Interacting with containers, doors, carts, ships, signs, item stands, beehives, crafting stations, fermenters, sap collectors, traps, portals, and tamed creatures
  • Building, repairing, and removing pieces
  • Modifying terrain
  • Damaging or destroying protected structures and objects
  • Picking up items, including auto-pickup
  • Using or equipping blocked item prefabs configured by the server
  • Using creature-catching items on tamed animals inside the ward
  • Using TargetPortal map teleport and portal toggle mode on protected portals
  • Pulling crafting materials from protected containers through supported crafting mods
  • Damaging protected trees (TreeBase)
  • No push players feature

Optional Compatibility

If installed, STUWard adds extra integration or blocking for:

  • Guilds (guild-based trust and overlap behavior)

Following mod's feature would be blocked on other's wards

  • TargetPortal
  • AzuCraftyBoxes
  • kg_TameableCollector
  • PortablePals

How To Use

  1. Select Ward with the hammer and place it.
  2. A newly placed ward starts with an actual radius of 8m.
  3. Look at your ward and use the default shortcut Alt+E to open Ward Settings.
  4. Adjust radius, range display settings, and door auto-close delay.
  5. Player registration works like vanilla wards:
    • turn the ward off
    • the player to be registered interacts with it using E

While placing a ward, the placement preview shows the current maximum configurable radius.

Permission Model

A player is treated as trusted inside a ward if they are:

  • The ward owner
  • In the same guild as the ward owner (The mod Guild is required)
  • Listed under Registered players

Notes:

  • Guild trust and registered-player access are similar for most interactions, but they are not fully identical
  • Ward overlap trust behaves more like a guild/shared-group rule than a simple registered-player rule
  • Being in the same guild usually grants the same practical interaction access as being registered, but guild membership is treated more like a shared trust group for ward-to-ward behavior
  • A registered player can use a ward they are allowed in, but registration alone does not make separate wards behave like shared guild wards

Misc

  • By default, each Steam/platform account can place up to 3 wards. (Set to -1 for unlimited)
  • Specific accounts can override ward limit withBepInEx/config/STUWard.WardNumberOverride.yml
  • If an account is listed in this file, that value overrides Max Wards Per Steam ID.
  • command stuw_wardreport generates BepInEx/config/STUWard.WardCountReport.yml
  • Admin in debugmode have acess to any ward

Localization

  • There should be STUWard.English.yml in BepInEx/plugins/STUWard.
  • Translate it to your language and name the file STUWard.YourLanguageName.yml and put it in plugins folder.

Config

  • Check also STUWard.WardNumberOverride.yml and STUWard.ItemPrefabs.yml in the config folder
[1 - General]

## If on, the configuration is locked and can be changed by server admins only. Synced with server.
# Setting type: Toggle
# Default value: On
# Acceptable values: Off, On
Lock Configuration = On

## Maximum number of managed Wards allowed per Steam/platform account. Set to -1 for unlimited. Synced with server.
# Setting type: Int32
# Default value: 3
Max Wards Per Steam ID = 3

## Maximum configurable Ward radius. Valid range: 8 to 64. Synced with server.
# Setting type: Single
# Default value: 32
Max Ward Radius = 32

## Pickup rule inside a foreign enabled ward. BlockAllExceptWhitelist blocks every item pickup except pickup_whitelist. AllowAllExceptBlacklist allows item pickup except pickup_blacklist. Synced with server.
# Setting type: PickupBlockRule
# Default value: BlockAllExceptWhitelist
# Acceptable values: BlockAllExceptWhitelist, AllowAllExceptBlacklist
Pickup Block Mode = AllowAllExceptBlacklist

## If on, building pieces inside an enabled ward ignore damage from MonsterAI-controlled attackers while no trusted player is nearby. Synced with server.
# Setting type: Toggle
# Default value: On
# Acceptable values: Off, On
Protect Unattended Ward Structures From Hostile Creatures = On

## Additional distance beyond the ward radius used when checking for nearby trusted players before hostile-creature structure protection turns off. Synced with server.
# Setting type: Single
# Default value: 16
Unattended Ward Trusted Player Range Buffer = 16

## How long a ward keeps counting as attended after the last nearby trusted player leaves. Synced with server.
# Setting type: Single
# Default value: 10
Unattended Ward Trusted Presence Grace Seconds = 10

## How often nearby trusted-player attendance is recalculated for unattended hostile-creature structure protection. Synced with server.
# Setting type: Single
# Default value: 0.5
Unattended Ward Presence Refresh Interval = 0.5

## If on, the vanilla guard_stone build recipe is removed from the Hammer piece table while STUWard remains available. Synced with server.
# Setting type: Toggle
# Default value: On
# Acceptable values: Off, On
Disable Vanilla Guard Stone Recipe = On

## STUWard recipe override. Format: ItemPrefab:Amount[:Recover], ... Synced with server.
# Setting type: String
# Default value: GreydwarfEye:1,BoneFragments:3,Flint:5,Wood:7
STUWard Recipe = GreydwarfEye:1,BoneFragments:3,Flint:5,Wood:7

[2 - Client]

## Shortcut used to open the ward settings UI while looking at your ward. Example values: LeftAlt + E, F7 Not synced with server.
# Setting type: KeyboardShortcut
# Default value: E + LeftAlt
Ward Settings Shortcut = E + LeftAlt

[3 - Debug]

## Local-only diagnostic logging for ward ownership/toggle flows. Use Failures for rejection paths only, or Verbose for request and state tracing. Enable separately on each client/server instance you want logs from. Not synced with server.
# Setting type: DiagnosticLogMode
# Default value: Off
# Acceptable values: Off, Failures, Verbose
Ward Diagnostic Logging = Off

Overlap Behavior

Ward overlap is not treated as "one ward allows, so access is fine".

For access checks, overlapping wards are additive:

  • if at least one overlapping foreign ward denies access, access is denied
  • if all overlapping wards allow access, access is allowed

For placement and radius expansion:

  • STUWard prevents overlap with foreign wards
  • overlap is only ignored for wards that share the same owner or the same stored guild identity
  • Registered players access does not bypass ward overlap rules

In practice:

  • same owner wards can overlap
  • same guild wards can overlap
  • a registered player cannot place their own ward overlapping yours unless owner/guild rules also allow it

Guild Edge Cases

When a ward is placed, its guild identity is stored on the ward itself.

This means:

  • the ward does not automatically change guild ownership later
  • there is no sync button
  • changing guild later does not rewrite old wards

Example:

  • Player A places a ward while in guild Red
  • Player B places a ward while also in guild Red
  • those wards can overlap because they share the same stored guild identity
  • later, Player A leaves Red

After that:

  • A still has full access to A's own ward because A is the owner
  • A no longer matches the stored guild identity on B's ward
  • B still matches the stored guild identity on A's ward as long as B remains in Red
  • in overlapping space, A can be blocked by B's ward while B can still access both areas

If you want a ward to belong to a different guild later, the intended workflow is to remove it and place a new one under the new guild.

CHANGELOG

Version Update Notes
1.2.1 - Added per-ward restriction toggles with server-side forced/not-forced controls
- Separated hammer-placed consumable and feast consumption from normal item pickup
- Simplified hostile creature structure protection config surface
- Cleaned up ConfigManager ordering, patch safety, UI layout, and diagnostic logging
1.2.0 - Refactoring and optimizations
1.1.9 - Fixed errors that could happen with floating itemdrops within the ward area
1.1.8 - Refactored some codes
1.1.7 - Added config option for hostile creature to not damage warded pieces always
1.1.6 - Fixed ward icons sometimes not showing on map on dedi
1.1.5 - tsv file is no longer needed, and ymls are integrated into one STUWard.yml
- Organized configs
- Refactored some codes for better performance
1.1.4 - Fixed wards not being able to place close enough to each other
- Fixed ward range not showing on map
- Fixed some guild related bus
1.1.3 - Fixed guild members not having authorities on guild wards on dedi
- Updated readme with more specific info
1.1.2 - Fixed some errors that would happen when placing ward
- Resolved framedrop while holding preview of the ward
- Players can view ward icons even though they didn't load the zone after server reboot
- Ward circle projection segement number is cutdown to 36 from 80
- Refactored some per check codes
1.1.1 - admin+debugmode has same authority with ward owner
- Added ward icon+range on map and minimap (guild, registered, owner)
1.1.0 - Added server-synced BepInEx/config/STUWard.ItemPrefabs.yml for item prefab policy.
- Added Pickup Block Mode config: BlockAllExceptWhitelist AllowAllExceptBlacklist
1.0.9 - Fixed some guild related behaviors
1.0.8 - Reduced some excessive logs that could happen on dedi
1.0.7 - Fixed E button not working on dedi. Fixed Guild related behaviors on dedi
1.0.6 - Improved overall performance
1.0.5 - Changed the method of E button appearing on players
1.0.4 - Fixed E button not working on server
1.0.3 - Pieces within active area don't get damage from mobs when no trusted player is near ward area
1.0.2 - Fixed guild players not having authority for the guild ward on dedi
- Fixed debugmode not working for the ward on dedi
- Made it so that players and tamed animals won't do damage on pieces within protected area
- Feasts are now not consumable too within the ward area
1.0.1 - Only owner and debug admin can remove the ward
- Ward is invulnerable to damage by itself
1.0.0 - Initial Release