Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
yesterday
Downloads
49
Size
165KB
ADDatHost Valheim hosting
30% off

Paired Drawbridges 0.1.2

Operate an opposing pair of Valheim drawbridges from either bank. When their free ends meet in the lowered position, using either bridge requests the same raised or lowered position for both.

This is a standalone SmeagsMods mod. It does not require Tunnelheim Companion.

Pairing

  • Supports the vanilla large drawbridge (piece_drawbridge) and log drawbridge (piece_drawbridge_log). Pair two of the same type.
  • The bridges must face one another, with both ends and their edges aligned: up to 25 cm horizontal and 15 cm vertical tolerance, within 3 degrees of directly opposing and 2 degrees of upright. These limits are conservative; they are not a general nearby-door link.
  • Pairing uses fixed lowered-pose geometry, so raising the leaves does not break the pair.
  • Each bridge must have exactly one matching partner, and that partner must also have exactly one match. Ambiguous groups are not linked. There are no chains.
  • Parallel, stacked, offset, differently sized, scaled, and unrelated pieces remain independent. Unpaired/ambiguous bridges retain native interaction behavior.
  • Existing bridges are recognized automatically. Removing a bridge removes the relationship; a correctly placed replacement is recognized on the next interaction. No rebuilding or saved pair assignments are required.

If the two leaves start in different positions, using one asks both to adopt the position opposite the leaf you used. Wait for movement to finish before interacting again. There is a three-second shared command lock.

Both bridge supports must allow you access under the normal ward rules. A ward protecting the other bank does not become remotely operable through an accessible bridge.

Build with the Free end snap point

Both vanilla drawbridge types now have one extra centerline snap point named Free end, alongside their six unchanged support points. Use Valheim's normal snap-point controls to choose it, rotate the other bridge to face the opposite bank, and connect the two free ends. Rotation remains under your control. With Free end selected, aim at the existing bridge to target its fixed free end. Both the surface you aim at and the connector must be within normal build reach; move closer if needed.

The new point stays at the lowered deck's free edge even while the leaf is raised. A drawbridge-only fallback makes that point discoverable when the raised leaf's colliders fall outside the native snap search. Native snapping takes priority, and selecting a support point manually is respected. Normal overlap, ward, resource and placement checks remain in effect.

The point is added to placement ghosts and existing bridges automatically; rebuilding is unnecessary. Mixed large/log bridges can align their snap centers but remain independently operated because their widths differ. Pair recognition still uses the geometry rules above, rather than a saved snap connection.

Requirements and installation

  • Valheim 1.0.20 is the inspected target version.
  • BepInEx 5; dependency: denikson-BepInExPack_Valheim-5.4.2351.
  • Install the same mod version on every participating client and the server/host. This is a networked interaction mod. A client-only or server-only installation is unsupported.

With Valheim closed, import the release ZIP through your mod manager, or copy BepInEx/plugins/PairedDrawbridges/PairedDrawbridges.dll into that location in the selected profile. Keep only one copy. The testing harness, game assets and evidence are not release files.

Multiplayer and validation limits

Built successfully against the installed Valheim 1.0.20 assemblies with zero warnings/errors. The production pairing/state rules passed 10,062 deterministic assertions. The same DLL passed 408 native single-player assertions (375 main checks and 33 after save/reload). This includes actual camera aiming, the full placement-preview update and native second-piece placement for both raised and lowered bridge types, alongside snap geometry, wards, pairing and repeated-interaction checks. See TESTING.md for the instrumented test scope and limitations.

The protocol routes commands to existing object owners and uses an explicit target state. It never claims ownership, broadcasts a toggle, or recursively invokes the other bridge's interaction. Duplicate and old commands are ignored. The normal native animation, effects, state replication and saving remain responsible for the leaves.

Two-client, dedicated-server and ownership-migration tests have not been completed. A change of owner, unloaded object, disconnected peer, or newly denied ward during delivery can leave one leaf unchanged. Commands expire rather than retry indefinitely; once conditions settle, another interaction reconciles the pair. This is not an atomic distributed transaction. Missing-mod peers are unsupported and may prevent an action from completing. Do not assume compatibility with mods replacing drawbridge geometry, Door interaction, wards, or network ownership.

Pair relationships are computed at interaction time and do not add new pieces or prefabs to saves. Small namespaced command timestamps are stored on existing bridge ZDOs to reject duplicate/stale operations across ownership changes and reloads. Uninstalling leaves the native bridge state intact; the extra timestamps are inert.

Feedback & Bug Reports

Visit the SmeagsMods Discord. Include the game version, mod version, bridge type, placement screenshot, and whether you were hosting or joining.

Credits and license

Created by SmeagsMods. Original mod code is MIT licensed; see LICENSE. Valheim and its assets belong to their respective owners and are not included.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.