
StonePortalControl
Gives you control over how stone portals work and look.Stone Portal Control 1.0.1
Server-controlled restrictions and sizing for Valheim's stone portals. Install the same DLL on the server and every client. Requires BepInEx 5 for Valheim; no Jotunn or separate ServerSync dependency is required.
Install
- Extract the
BepInExfolder from this archive into the Valheim dedicated server installation and into each player's Valheim installation (or mod-manager profile). - The resulting plugin path is:
BepInEx/plugins/StonePortalControl/dannanboi_StonePortalControl.dll. - Start the game or server once. It creates:
BepInEx/config/dannanboi.stoneportalcontrol.cfg. - Offline play uses your local file. When joining a server, its settings override and lock the active values. Your local file is never overwritten by the server.
- Remove the old
StonePortalControl.dllfrom server and clients before installing 1.0.1, so the renamed DLL is the only copy loaded. Install the same version everywhere. - Existing configs in
BepInEx/config/StonePortalControlmove automatically intoBepInEx/config, preserving all values. An existing root-level config with the current GUID takes precedence. Older GUID filenames are also migrated. Fresh installs create no mod-specific config subfolder.
-
Item restrictions:
trueblocks inventory items withm_teleportable = falsethrough stone portals, including items added by other mods. This check remains active even if the world's portal modifier allows all cargo.falserestores the stone portal's original item allowance. Wooden portals are never changed. This only toggles item restrictions; it does not disable the plugin, scaling, hover options or version enforcement. -
Portal scale: a decimal number from
0.5through1, using a decimal point.1is 100% and0.5is 50% of the original scale on each axis. Scale remains active independently of Item restrictions. -
Show enabled text:
trueaddsItem restrictions: EnabledorItem restrictions: Disabledbelow the vanilla portal text. Default: true. -
Show scale text:
trueaddsScale: 50%,Scale: 75%,Scale: 100%, etc., using the active scale value. Default: true.
The two text options are independent and server-synchronized. When both are true, each appears on its own line. When both are false, only vanilla text remains. Vanilla portal name, tag and interaction text are always preserved.
On upgrade, Enabled becomes Item restrictions with its true/false value preserved.
The obsolete key is removed from the generated config. If both exist, the new key wins.
Save the file while playing offline or hosting. It is checked every second. On a server, valid changes are also pushed to connected clients. No reconnect or restart is needed. While connected to a remote server, local file edits cannot change the active settings; they take effect after you leave that server.
What is resized
Loaded stone portal instances, newly created stone portals and instantiated construction previews are scaled uniformly at their root, including child models and colliders. Portals register at Awake, with one check after native initialization. Settings changes update registered portals immediately; native network-scale changes are also handled. No recurring global scan or per-frame transform rewrite is used.
The original scale is retained as the baseline, so repeated updates do not keep shrinking the portal. Asset templates and saved-world scale values are not changed. A session change restores the original runtime values. Portal link tags and locations remain unchanged. The normal exit distance is retained so players do not arrive too close to a tiny portal. Very small sizes need an in-game usability check because the player is not resized.
Required versions and disconnect messages
Admission requires the exact mod version on both sides, including the patch number. Missing, older and newer clients are rejected before PeerInfo admission. This remains enforced when Item restrictions is false. The initial server settings must also arrive before a modded client accepts admission.
A client running this mod receives a message such as:
This server requires Stone Portal Control 1.0.1. Your version is 1.0.0. Install the matching version to join.
Valheim limitation: a client with no copy of this mod cannot render our custom error message. It is rejected with the game's standard incompatible-version error; the server log identifies the required mod and version. Displaying that custom message on a missing-mod client would require a separate installed client component. No extra component is required or included in this package.
This is normal mod compatibility enforcement, not anti-cheat protection against clients deliberately modified to lie about their version or bypass local game rules.
Dedicated servers, local hosts and single-player
Dedicated servers, listen hosts and closed single-player worlds use their own local configuration. Offline restrictions are enabled by default. Joining clients use the remote server's settings for that session. On disconnect, local preferences are restored, including any valid file edits made while connected. No server values are written to the client's config file.
A client with this mod also rejects a multiplayer server that lacks the matching mod. Remove/disable the mod in that profile to join a server without it.