You are viewing a potentially older version of this package. View all versions.
Zephyrfit-SimpleAccessControl-1.0.9 icon

SimpleAccessControl

Configurable public/private/whitelist access for doors, gates, storage, beds, crafting/cooking, cartography, carts and ships. TargetPortal-safe.

Date uploaded a week ago
Version 1.0.9
Download link Zephyrfit-SimpleAccessControl-1.0.9.zip
Downloads 72
Dependency string Zephyrfit-SimpleAccessControl-1.0.9

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 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.2350

README

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 CraftingStation component.
  • 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

  1. Look at a supported player-built object or one of its interaction controls.
  2. Hold Left Shift and press Valheim's Use key (E, F, etc.) to cycle Public → Private → Whitelist → Public without opening a window.
  3. Hold Left Shift + A when Valheim is in French, or Left Shift + Q in every other language, to open the detailed Access Control window.
  4. Select Public / Private / Whitelist and set individual players to Default / Allow / Deny.
  5. In Whitelist mode, set every permitted player to Allow.
  6. 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.

Installation

Gale or another Thunderstore mod manager (recommended)

  1. Search for SimpleAccessControl by Zephyrfit in your mod manager.
  2. Install it in the Valheim profile used to join the server.
  3. Install the same package version on the dedicated server and every client.
  4. Restart Valheim and the server after installation or configuration changes.

The mod manager downloads the precompiled plugin and installs the declared BepInEx dependency automatically. Normal players do not need the .NET SDK, the source code or the Windows build installer.

Manual installation

  1. Install BepInExPack Valheim 5.4.2350 or later.
  2. Download the Thunderstore package and extract it.
  3. Copy BepInEx/plugins/SimpleAccessControl/SimpleAccessControl.dll into the matching BepInEx/plugins/SimpleAccessControl directory on the client or dedicated server.
  4. Use the same SimpleAccessControl version on the server and every client.

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.

Maintainer / source build

This section is only for developers and package maintainers. It is not required when installing through Gale or Thunderstore.

The separate source archive includes INSTALLER_SimpleAccessControl.cmd. On Windows it detects the local Valheim installation, BepInEx core and Gale profiles, compiles against the currently installed Valheim assemblies, builds a local package and can install it into Gale or a local dedicated server. Its transcript is written to installer_logs; it can offer to install the Microsoft .NET SDK 8 through Windows Package Manager when the SDK is missing.

For a tested release, PUBLISH_Thunderstore.cmd rebuilds the package and publishes it under the Zephyrfit namespace. The Thunderstore service-account token is requested through masked local input and is not stored.

Configuration

Generated file: BepInEx/config/zephyrfit.simpleaccesscontrol.cfg

  • ManageModifier = LeftShift
  • PanelKey = None (automatic: A in French, Q in other languages)
  • AssignedBedsForcePrivate = true
  • ProtectConfiguredPieces = true
  • AdminOverride = true
  • ShowHoverStatus = true
  • ShowDestructionOnlyWithBuildTool = true
  • DetailedLogging = false
  • Containers = true
  • DoorsAndGates = true
  • Beds = true
  • CraftingStations = true
  • CookingStations = true
  • CartographyTables = true
  • Carts = true
  • Ships = 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

CHANGELOG

Changelog

1.0.9

  • Reworked the public installation documentation to make Gale/Thunderstore the recommended end-user method.
  • Clarified that Gale installs the precompiled plugin and BepInEx dependency automatically; the .NET SDK and local compilation are not required for normal users.
  • Moved the source-build installer and publication launcher to a maintainer/developer section.
  • No access-control behaviour changed from 1.0.8.

1.0.8

  • Fixed the automatic French panel shortcut on AZERTY keyboards: the key physically labelled A now opens the panel.
  • Kept the automatic shortcut exclusive: A is displayed in French and Q in every other Valheim language, while both use the matching physical keyboard position.
  • Explicit PanelKey configuration continues to override automatic keyboard handling.

1.0.7

  • Made the automatic detailed-panel shortcut language-exclusive: A for French; Q for English and every other Valheim language.
  • Explicit PanelKey configuration still overrides the automatic language choice.

1.0.6

  • Fixed the detailed-panel shortcut not opening despite being displayed.
  • Automatic panel-key mode now accepts both A and Q to remain reliable across AZERTY/QWERTY keyboard mappings while displaying the localized default.
  • The panel hotkey now reuses Valheim's current hovered object first, with the camera raycast retained as a fallback.
  • Removed the unrelated TakeInput() gate that could silently reject the custom hotkey outside Valheim's native Use action.

1.0.5

  • Fixed the Valheim 1.0.15 build error caused by the protected Player.TakeInput() method; the panel hotkey now checks input availability through compatible reflection.

1.0.4

  • Fixed vanilla-cart ACL discovery by resolving Piece, ZNetView, storage and hitch controls across sibling branches of the same vehicle prefab.
  • Split access selection into three explicit states: Public, Private owner-only and Whitelist.
  • Changed modifier + Valheim Use (E, F, etc.) into a no-window quick cycle: Public → Private → Whitelist → Public.
  • Added a separate detailed-panel shortcut: modifier + A in French, modifier + Q in other languages by default; PanelKey can override it in the .cfg.
  • Enlarged the ACL panel and its player list so the reset and close controls remain fully visible.
  • Preserved old ACL semantics by interpreting legacy Private + Allow data as Whitelist.

1.0.3

  • Clarified whitelist setup inside the panel and reports when no other connected player can be added yet.
  • Added an always-visible top Close button while keeping the bottom button and Escape support.
  • Claimed beds are forced Private to their assigned sleeper, who becomes the access/destruction owner; admins retain their override.
  • Hidden destruction status during normal interaction; it appears while a hammer/build tool is equipped.
  • Added AssignedBedsForcePrivate and ShowDestructionOnlyWithBuildTool configuration switches.
  • Documented that ManageModifier combines with Valheim's current Use binding, automatically respecting E/F rebinding.
  • Added Shift, Alt and Ctrl modifier presets directly in the access panel; any supported KeyCode remains configurable in the .cfg.
  • Removed repeated Harmony warnings from game-language detection by using silent reflection lookups.

1.0.2

  • Removed all teleport-portal hooks. TargetPortal remains the sole owner of teleport targeting and portal access modes.
  • Clarified that wood/iron "portals" in the French request are physical gates handled by the existing Door integration.
  • Added independent .cfg switches for containers, doors/gates, beds, crafting stations, cooking stations, cartography tables, carts and ships.
  • Disabled categories are not Harmony-patched and keep any previously stored ACL data for later reactivation.
  • Interface language now follows Valheim's selected language: French for French, English for every other language.
  • Replaced the generic package icon with a dedicated Nordic gate-and-lock icon.

1.0.1

  • Fixed the Shift+E access window on Valheim 1.0.15.
  • Fixed raw $KEY_Use hover text and added localized effective-state labels.
  • Added workbench/forge/cauldron/mead-kettle coverage through CraftingStation.
  • Added cooking-station guards for both adding and collecting items.
  • Added separate guards for cartography-table map reading and discovery deposits.
  • Fixed Valheim 1.0.15 Bed.Interact patching by using positional Harmony arguments.
  • Harmony patch groups now load independently, so one changed game method cannot disable the UI and all other protections.
  • Access UI host is created before patching; Shift+E remains available even if an optional integration is skipped.

1.0.0

  • Initial release candidate.
  • Public-by-default access model for player-built doors/gates, containers, beds, crafting stations, carts and ships.
  • Private mode and whitelist behaviour through Private + Allow.
  • Per-player Default / Allow / Deny ACL entries.
  • Owner always allowed.
  • Owner/admin management UI via Shift + E.
  • Vanilla destruction for unrestricted Public objects.
  • Owner/admin-only hammer dismantling and player-damage protection for restricted objects.
  • Cart storage/attachment and ship storage/helm access checks.
  • Added a one-click Windows build/install launcher with automatic Valheim, BepInEx and Gale detection, logging, backups and optional local-server installation.
  • Updated Valheim 1.0 compatibility: resolve ZNetView from components instead of removed public m_nview fields, and use Unity system-language detection.
  • Build script now stops immediately on compiler errors.
  • ZDO-backed persistence.
  • Compatibility-oriented Container.CheckAccess(long) integration for MultiUserChest-style mods.