Valheim
Install with App

Details

Latest version
1.0.1
Last Updated
First Uploaded
Downloads
43
Likes
0
Size
237KB
Dependants
ADDatHost Valheim hosting
30% off

Changelog

All notable changes to MassFixStructure will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.0.1] - 2026-11-30

Fixed

  • Dedicated Server Ward Check (CheckServerWardAccess): Replaced PrivateArea.CheckAccess on the server (which relied on Player.m_localPlayer and returned false on headless servers, blocking all repairs inside wards) with a dedicated server-safe permission check using playerId.
  • ZDO Ownership & Sync Fix: Clients now authoritatively update ZDOVars.s_health for ZDOs they own both before sending and inside RPC_HandleSyncRepairs, preventing repairs from reverting on the next network sync tick.
  • Hammer Health Bar & Visual Sync: Updated WearNTear.m_healthPercentage, ClearCachedSupport(), and normalized SetHealthVisual percentage (health / m_health) so the hammer crosshair HP bar immediately updates to 100% green.
  • Robust Server RPC Routing: Switched batch RPCs to ZRoutedRpc's native server routing with automatic fallback to MassRepairRunner / vanilla if routing is unavailable.
  • Handshake Timing Fix: Reset ServerHasMod in ZRoutedRpc constructor instead of Game.Start to prevent race conditions on fast servers.
  • Graph Search & Workbench Fixes: Used absolute lossyScale for mirrored BoxCollider bounds, expanded piece layer mask (Default, static_solid, Default_small), fixed RequireWorkbench = false, and silenced false "missing station" HUD spam for distant building parts.
  • Coroutine Safety: Wrapped MassRepairRunner.RunBatched in try ... finally so IsRunning can never stay stuck true.

[1.0.0] - 2026-11-16

Initial Release

🌐 Dedicated Server & Multiplayer Architecture

  • Headless Server Compatibility:
    • 100% clean execution on headless Linux/Windows dedicated servers (-batchmode -nographics).
    • Zero crashes: UI, audio, camera, and HUD logic are strictly guarded against server execution.
  • Atomic Batched RPC Protocol (MassFix_BatchRepair & MassFix_SyncRepairs):
    • Reduces 500–1000 individual vanilla repair and health RPCs down to 1 single compact UDP packet (over 99.8% network traffic reduction).
    • Client packs all target ZDOIDs into a single ZPackage; server updates ZDOMan memory atomically and broadcasts 1 consolidated sync packet.
  • Server Anti-Spam & Rate Limiting:
    • Enforces a per-player cooldown (0.8s minimum interval) on the server to neutralize macro or auto-clicker spam.
  • Server-Side Ward & Territory Security:
    • Server strictly re-validates PrivateArea.CheckAccess before applying health updates to any ZDO.
  • Server-Authoritative Configuration Sync:
    • Server broadcasts authoritative ceilings (MaxRepairsPerSwing, SearchRadius, RequireWorkbench) upon player connection (MassFix_ServerHello). Client limits automatically conform to server policy.
  • Graceful Vanilla Server Fallback:
    • If connected to a server without MassFixStructure installed, the client automatically falls back to local staggered coroutine repairs without desync.

🔨 Core Repair Features & Modes

  • Smart Connected Structure Repair (Default Mode):
    • Targets the struck piece and traverses all contiguous, touching, and overlapping pieces belonging to the same building via non-allocating Breadth-First Search (BFS).
    • Repairs entire castles, roofs, palisades, and complex architectural assemblies in one strike.
  • Radius-Based Repair Mode:
    • Configurable spherical radius search to quickly restore all damaged structures within range.
  • Connected Same Category Mode:
    • BFS traversal restricted to the same piece category (e.g. only Building or only Furniture).
  • Zero-Lag Coroutine Batching (Client / Vanilla Fallback):
    • Frame-budgeted asynchronous repair runner (StaggerBatchesOverFrames).
    • Spreads repair operations across successive frames when repairing mega-structures, eliminating framerate hitches.
  • Intelligent Audio & Visual Throttling:
    • Replaces hundreds of simultaneous deafening repair sounds with a single throttled audio trigger at the origin piece.
    • Suppresses screen-blinding particle spam while providing clean visual feedback.
  • Ward & Private Area Grief Protection:
    • Strictly validates player ward permission (PrivateArea.CheckAccess) on every piece prior to repairing.
  • Configurable Economy & Tool Balance:
    • DurabilityDrainRatio: Multiplier for hammer durability consumption (from 0% free to custom multipliers).
    • StaminaDrainRatio: Configurable stamina cost per repaired item.
    • PreventToolBreak: Automatically halts repair pulse if tool durability drops <= 1.0, protecting valuable equipment.
    • MaxRepairsPerSwing: Hard safety cap per repair pulse (default: 200 pieces).
  • Comprehensive Hot-Reloadable Config:
    • All settings fully managed via BepInEx config file and synchronized in real-time.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.