Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
SimpleAccessControl
Configurable public/private/whitelist access for doors, gates, storage, beds, crafting/cooking, cartography, carts and ships. TargetPortal-safe.
By Zephyrfit
| Date uploaded | a week ago |
| Version | 1.0.8 |
| Download link | Zephyrfit-SimpleAccessControl-1.0.8.zip |
| Downloads | 7 |
| Dependency string | Zephyrfit-SimpleAccessControl-1.0.8 |
This mod requires the following mods to function
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.2350README
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
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
PanelKeyconfiguration 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
PanelKeyconfiguration 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 +
Ain French, modifier +Qin other languages by default;PanelKeycan 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
AssignedBedsForcePrivateandShowDestructionOnlyWithBuildToolconfiguration switches. - Documented that
ManageModifiercombines 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
KeyCoderemains 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
Doorintegration. - Added independent
.cfgswitches 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_Usehover 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.Interactpatching 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
ZNetViewfrom components instead of removed publicm_nviewfields, 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.