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

Details

Date Uploaded
Downloads
297
Size
166KB
ADDatHost Valheim hosting
30% off

Paired Drawbridges 0.2.0

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.

Pairing

  • Supports the vanilla large drawbridge (piece_drawbridge) and log drawbridge (piece_drawbridge_log). With More Gates installed separately, also supports its single drawbridge (h_drawbridge01). 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 and the supported More Gates single drawbridge have one extra centerline snap point named Free end, alongside their six unchanged original 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.

Optional More Gates compatibility

More Gates is created by Lord_Hayze. All More Gates models, textures, animations and original mod code belong to their creators. This package includes none of them. Install More Gates and its own requirements separately only if you want to use its pieces; it is not a required dependency for vanilla drawbridges.

  • Supported: two opposing single Drawbridge pieces (h_drawbridge01) from More Gates. Their offset deck centers and reversed open/closed animation convention are handled explicitly.
  • The More Gates Double Drawbridge (h_drawbridge02) already contains two synchronized leaves in one piece. It, other doors/gates, and mixed-type bridge pairs stay independent and unmodified.
  • Original snap points remain. A fixed centerline Free end point is added to the supported single bridge. Native corner snapping continues to work.
  • Inspected More Gates package: Pineapple-MoreGates 1.0.11 (original DLL reports 1.0.10), with Jotunn 2.30.2 and Valheim 1.0.20. Newer versions or forks require separate testing; collider matching cannot validate a changed animation controller.
  • The adapter checks the expected deck collider geometry and declines pairing if that shape has been replaced. This is not a general promise of compatibility with every fork or future More Gates release.
  • Install the same More Gates version on the participants using its pieces, in addition to matching Paired Drawbridges versions. Optional here does not mean clients can omit a mod whose custom pieces are in their world.

Requirements and installation

Package 0.2.0 contains plugin DLL 0.2.0. Install matching 0.2.0 versions on all participating clients and the server/host.

  • 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,091 deterministic assertions. Native validation for this update includes 130 More Gates checks and 375 vanilla-only checks plus 33 save/reload checks with More Gates/Jotunn absent. This covers actual aimed placement and native interaction, not just geometry. See TESTING.md for verification 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.