You are viewing a potentially older version of this package. View all versions.
SmeagsMods-PairedDrawbridges-0.2.0 icon

PairedDrawbridges

Paired vanilla drawbridges; optional More Gates by Lord_Hayze support. Free end snaps. Matching client/server installs required; multiplayer untested. Feedback/support: https://discord.gg/bfbb4yY6pt

Date uploaded 3 days ago
Version 0.2.0
Download link SmeagsMods-PairedDrawbridges-0.2.0.zip
Downloads 64
Dependency string SmeagsMods-PairedDrawbridges-0.2.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 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.2351

README

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.

CHANGELOG

Changelog

0.2.0

  • Adds optional compatibility with More Gates by Lord_Hayze for opposing single Drawbridge pieces (h_drawbridge01), including its offset lowered geometry and reversed native state mapping.
  • Adds one fixed centerline Free end snap to the supported single bridge while preserving its six original points. Existing instances and placement ghosts receive it automatically.
  • Leaves More Gates' self-contained Double Drawbridge, other gates, vanilla-only installations and mixed-type pairs independent.
  • Preserves mutual uniqueness, owner-directed state requests, ward checks and bounded command expiry. Changed More Gates deck geometry fails closed rather than being guessed.
  • No More Gates/Jotunn code, models, textures or other assets are included. No new required package dependency.
  • More Gates: https://www.nexusmods.com/valheim/mods/1087. Feedback/support: https://discord.gg/bfbb4yY6pt

0.1.3

  • Removes an unrelated project reference from the README.
  • Documentation-only package update: contains the unchanged, tested plugin DLL 0.1.2. Gameplay and dependencies are unchanged.

0.1.2

  • Fixes the placement preview disappearing when Free end is selected and you aim at an existing drawbridge leaf. Vanilla rejects the animated leaf's Rigidbody before snapping; this release accepts only supported drawbridge targets for that selection.
  • Aiming at the bridge targets its fixed lowered free end. Normal reach, manual rotation, intervening obstacles, alternate placement, support-point selection and native placement validation remain in control.
  • Adds regression coverage through real camera raycasts, the complete preview update and native second-piece placement; the earlier snap-only tests missed this workflow.
  • Feedback and support: https://discord.gg/bfbb4yY6pt

0.1.1

  • Adds one centerline Free end snap point to both vanilla drawbridge types, including existing bridges and placement ghosts, without rebuilding.
  • Keeps the point anchored to the lowered deck geometry in both leaf positions and preserves all six native support snaps.
  • Adds a drawbridge-only discovery fallback when a raised leaf moves its colliders outside the native snap search. Native results, manual support selection and normal placement guards retain priority.
  • Shares connector geometry between snapping and pair recognition; duplicate initialization reuses the point.
  • Feedback and support: https://discord.gg/bfbb4yY6pt

0.1.0

  • Initial standalone paired-drawbridge implementation for matching vanilla large or log drawbridges.
  • Recognizes opposing, uniquely matched free ends using stable lowered geometry.
  • Preserves native standalone behavior and requires access at both supports.
  • Uses owner-directed, expiring target-state commands with duplicate protection and a shared interaction lock.
  • Adds no placement snap points or custom world objects.
  • Multiplayer runtime coverage remains pending; see README and TESTING.