
SimpleAccessControl
Configurable public/private/whitelist access for doors, gates, storage, beds, crafting/cooking, cartography, carts and ships. TargetPortal-safe.Simple Access Control
Lightweight access control for player-built doors/gates, containers, beds, crafting stations, cooking stations, cartography tables, carts and ships in Valheim 1.0.
Designed for small multiplayer servers that want object-level privacy without wards, guilds or group systems.
Behaviour
- Player-built supported objects are Public by default.
- The piece creator is the permanent owner for access-management purposes.
- Owner can switch an individual object between:
- Public — everyone may use it unless explicitly denied.
- Private — only the owner may use it; player exceptions do not grant access.
- Whitelist — owner plus explicitly allowed players may use it.
- Per-player rules:
- Default — follow the object's Public/Private/Whitelist mode.
- Allow — always allow this player.
- Deny — always deny this player.
- Public applies explicit Deny rules; Private remains owner-only; Whitelist applies Deny > Allow > denied by default.
- The owner is always allowed.
- A fully Public object with no effective restriction keeps vanilla dismantling and damage rules: another player can destroy it.
- As soon as an effective restriction exists (Private/Whitelist mode, or a Public-mode Deny), dismantling and player damage become owner/admin-only.
- Private and Whitelist objects are protected: only the owner/admin can destroy them.
- Crafting-station coverage includes the workbench, forge, cauldron and mead kettle when the prefab uses Valheim's
CraftingStationcomponent. - Cooking-station privacy blocks both adding food/fuel and collecting cooked items.
- Cartography-table privacy independently guards both controls: reading the shared map and depositing the player's discoveries.
- Cart privacy covers its storage and attaching/detaching through the cart interaction.
- Ship privacy covers onboard storage and the helm/ship controls. It cannot physically prevent a player from jumping aboard.
- Creature and environmental damage remain vanilla; this mod blocks unauthorized player destruction, not world simulation.
- World-spawned chests/doors and pieces with no player creator are ignored.
Usage
- Look at a supported player-built object or one of its interaction controls.
- Hold Left Shift and press Valheim's Use key (
E,F, etc.) to cycle Public → Private → Whitelist → Public without opening a window. - Hold Left Shift + A when Valheim is in French, or Left Shift + Q in every other language, to open the detailed Access Control window.
- Select Public / Private / Whitelist and set individual players to Default / Allow / Deny.
- In Whitelist mode, set every permitted player to Allow.
- Changes are stored in the object's ZDO and therefore persist with the world.
The player to whitelist must be connected when first added. Once configured, that player remains listed while offline. The panel now displays an explicit whitelist summary and a warning when no other player is currently detectable.
Claimed beds are a special case: when AssignedBedsForcePrivate = true, the sleeper assigned by Valheim becomes the bed's owner. The bed is forced Private, ignores whitelist exceptions, and only that sleeper can use or destroy it; server admins retain their override.
One-click Windows installer
- Extract the complete ZIP to a normal folder.
- Close Valheim.
- Double-click
INSTALLER_SimpleAccessControl.cmd. - The installer detects Valheim, BepInEx and the Gale profiles, compiles the DLL against the installed Valheim version, creates the local Thunderstore package and installs it into Gale.
- If Gale CLI is unavailable, the installer offers a safe direct-profile fallback and backs up an existing DLL before replacing it.
- The installer can optionally copy the compiled DLL to a local dedicated server.
The installer writes its transcript to installer_logs. If the Microsoft .NET SDK 8 is missing, it can install the official SDK through Windows Package Manager after confirmation.
Players already present in an object's ACL remain visible in the panel even when offline. New players must be connected to the server at least once before they can be selected. Connected players are read from the ZNet roster, even when their character is not currently loaded near you.
Multiplayer
Install on the dedicated server and every client. For a Gale-managed server, publish/install the Thunderstore package and add it to the shared Gale profile.
The mod deliberately patches Container.CheckAccess(long) rather than replacing container open logic, to remain compatible with mods such as MultiUserChest that also manage chest ownership/open sessions.
Teleport portals are intentionally outside this mod's scope. Simple Access Control does not patch TeleportWorld, portal placement or portal targeting, and therefore leaves TargetPortal fully responsible for its own Public / Private / Group / Admin / Guild rules. In this documentation, "gates" means physical doors such as the wooden gate or iron gate.
The hover text always shows the effective state (PUBLIC, PRIVÉ, LISTE BLANCHE or PUBLIC AVEC EXCEPTIONS) and both resolved shortcuts. Destruction status appears while a hammer/build tool is equipped. Raw tokens such as $KEY_Use are never shown.
The interface follows Valheim's selected language: French uses the French strings; English and every other game language use English.
Gale / Thunderstore distribution
For STAGING, build the ZIP and import it as a local mod in Gale. The included install_to_gale.ps1 can use Gale's CLI and installs into the selected profile (or Gale's currently selected profile when -Profile is omitted).
For distribution to every player, publish Zephyrfit-SimpleAccessControl on Thunderstore and add that package to the shared Gale profile. Thunderstore dependencies are then resolved by Gale when the profile/package is installed.
The repository includes thunderstore.toml, publish_thunderstore.ps1 and the one-click launcher PUBLISH_Thunderstore.cmd. After completing the staging test plan, double-click the launcher: it recompiles the plugin against the current Valheim installation, prompts locally for the Zephyrfit Thunderstore service-account token, and publishes version 1.0.8. The token is entered through masked input and is not stored in the project.
Configuration
Generated file: BepInEx/config/zephyrfit.simpleaccesscontrol.cfg
ManageModifier = LeftShiftPanelKey = None(automatic:Ain French,Qin other languages)AssignedBedsForcePrivate = trueProtectConfiguredPieces = trueAdminOverride = trueShowHoverStatus = trueShowDestructionOnlyWithBuildTool = trueDetailedLogging = falseContainers = trueDoorsAndGates = trueBeds = trueCraftingStations = trueCookingStations = trueCartographyTables = trueCarts = trueShips = true
Each object category can be disabled independently. Use the same category values on the server and every client, then restart Valheim/server after changing the file. ACL data already stored in the world is retained while a category is disabled.
ManageModifier is shared by both shortcuts (LeftShift, LeftAlt, LeftControl, right-side variants, etc.). The quick-cycle key always follows Valheim's own Use binding, so a player using F automatically gets Shift+F, Alt+F, and so on. PanelKey = None chooses A for a French game and Q otherwise; set an explicit KeyCode to override it. Shift/Alt/Ctrl presets are also available directly in the access panel.
Existing 1.0.0–1.0.3 worlds are migrated without data loss: an old Private object containing at least one Allow rule is treated as Whitelist; an old Private object without Allow rules remains Private.
The access window has Close buttons at both the top and bottom; Escape still works. Destruction status is hidden during normal interaction and appears when a hammer/build tool is equipped, unless ShowDestructionOnlyWithBuildTool is disabled.
Scope / security model
This is an object interaction/access system, not a replacement for a full anti-grief ward. It filters normal use and prevents unauthorized players from dismantling or damaging supported objects once an effective access restriction exists. Public unrestricted objects remain governed by vanilla destruction rules. Creature and environmental damage are intentionally preserved.
Requirements
- Valheim 1.0+
- BepInExPack Valheim 5.4.2350+
- Server + clients
AI disclosure
A significant portion of the initial implementation was generated with AI assistance. When publishing on Thunderstore, include the AI Generated category as required by Thunderstore policy.
License
MIT

