You are viewing a potentially older version of this package. View all versions.
DrakosDJ-MovingDay-1.0.8 icon

MovingDay

Relocate entire buildings and structures in Valheim with safety checks, container metal cargo dropping, and terrain replication.

Date uploaded 3 weeks ago
Version 1.0.8
Download link DrakosDJ-MovingDay-1.0.8.zip
Downloads 155
Dependency string DrakosDJ-MovingDay-1.0.8

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 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.2333

README

MovingDay

MovingDay is an advanced structure relocation mod for Valheim that allows players to select, rotate, and move anything from individual build pieces to entire buildings and structures in real-time, complete with safety checks, container metal cargo handling, tamed animal transport, and automated terrain replication.


Features

  • Structure Selection & Smart Anchor: Select individual pieces (G) or target an entire building using connected BFS flood-fill selection (H). The first piece selected (or the piece aimed at when entering Move Mode) acts as your anchor point for placement. World-generated structures and dungeons are automatically protected and cannot be targeted.
  • Move Mode (L): Relocate the selected building in real-time using a blueprint ghost preview with exact orientation preservation—no more 180-degree flips when facing containers or furniture.
  • Height Adjustment: Smoothly raise or lower the structure placement height in Move Mode using configurable hotkeys (defaults: UpArrow / DownArrow), scroll wheel steps (Alt + Scroll), or snap it flush back to the aimed surface (Home).
  • Grid-Snapped Rotations: Relocations are locked to standard Valheim 22.5 degree world-space increments, ensuring placed structures align perfectly with standard Hammer build snaps and center correctly.
  • Terrain Cloning & Reversion (Held LeftControl): Replicates and rotates excavations and terrain leveling to the destination, and restores the source terrain to its natural state.
  • Dynamic Surface & Multi-Story Tracking: The placement ghost tracks the exact surface your crosshair points at (terrain, rock, floor pieces, or stone foundations). Upper-floor objects and multi-story buildings maintain proper elevation without floating.
  • Anchor Piece Bottom Alignment: Automatically calculates the physical bottom bounds of the anchor piece so that center-origin pieces (like 2m walls, 1m walls, or poles) sit flush on the targeted surface rather than sinking half-way into the floor, while preserving the relative depth of underground cellars and basements.
  • Safety & Metal Cargo Handling:
    • Blocks placement if other players are in the footprint (or teleports them along with the building).
    • Blocks movement or drops metal cargo into cargo crates depending on configurations.
  • Tamed Animal Transport: Scans and teleports tamed animals in a 6.0m radius of the structure safely to the destination.
  • ZDO Network Authority: Claims authority for ZDOs during relocation to ensure network synchronization without duplication or data loss.

How to Use

  1. Equip your Build Tool (Hammer).
  2. Select Pieces: Hover over pieces and press G (to select/deselect individual pieces) or H (to select the entire connected structure). The first piece selected (or the piece you aim at when entering Move Mode) acts as your anchor point. Selected pieces will pulsate with a green highlight. (Hold Shift or Control while pressing G or H to instantly clear the entire selection).
  3. Enter Move Mode: While standing near the selected structure, press L to enter Move Mode. A blue-green ghost preview of the structure will spawn.
  4. Relocate:
    • Walk or Teleport to your destination. The preview ghost will follow you (even through portals!).
    • Rotate the structure with the mouse scroll wheel.
    • Adjust Height using Up/Down Arrows or Alt + Scroll Wheel (holding Left Shift enables fine-tuning). Press Home to instantly snap the height flush back to the targeted surface.
    • Hold Left Control to copy the modified terrain at the source and automatically replicate it at the destination.
  5. Place: Left-click to place the structure at the destination. Right-click or press Escape to cancel.

[!IMPORTANT] You must enter Move Mode (Step 3) prior to teleporting or moving away from the structure. If you teleport before entering Move Mode, the source area will unload from memory, and the mod will not be able to cache the structure's layout or generate its preview ghost.


Compatibility with Prefab Hammer

If you also have the Prefab Hammer mod installed, they will automatically work together:

  • Shared Selection: They share the exact same selection pool in memory. Highlighting a structure with MovingDay's select keys will immediately make it targetable by Prefab Hammer's save keys, and vice versa.
  • Coordinated Highlights: Selecting pieces in one mod keeps them visually highlighted, and clearing the selection in either mod cleans up both mods' highlight overlays.

Configuration & Default Keybindings

  • SelectHotkey (Default: G): Toggle selection of a hovered piece.
  • SelectConnectedHotkey (Default: H): Select all connected pieces of a structure.
  • MoveHotkey (Default: L): Enter Move Mode once pieces are selected.
  • HeightUpHotkey (Default: UpArrow): Raise the structure placement height in Move Mode.
  • HeightDownHotkey (Default: DownArrow): Lower the structure placement height in Move Mode.
  • HeightResetHotkey (Default: Home): Reset structure height adjustment back to 0 (snaps flush to aimed surface).
  • TerrainModifierKey (Default: LeftControl): Hold during placement to copy/revert terrain.
  • ConnectionRadius (Default: 2.0 meters): Maximum distance between pieces to consider them connected.
  • PlayerSafetyAction (Default: Block): Handling for other players inside the footprint (Block, Teleport, Ignore).
  • PlayerMetalAction (Default: BlockMove): Handling for players carrying metal (Allow, BlockMove, LeaveBehind).
  • ChestSafetyAction (Default: Block): Handling for open/active containers (Block, Ignore).
  • ContainerMetalAction (Default: Block): Handling for container metal cargo (Allow, Block, Drop).
  • MoveTamedAnimals (Default: true): Teleport tamed animals inside the footprint.

Changelog

1.0.8

  • Updated to comply with the Valheim v1.0 (1.0.7) update.
  • Added smart anchor point logic: The first piece selected (or the piece aimed at when entering Move Mode) serves as the placement anchor for cursor tracking and height alignment.
  • Preserved initial build orientation relative to the player upon entering Move Mode, preventing 180-degree rotation flipping on front-facing furniture and chests.
  • Added dynamic surface and multi-story tracking, allowing structures to be placed flush on upper-floor rooms, foundations, and ground surfaces without floating.
  • Implemented anchor piece bottom alignment to ensure walls, poles, and center-origin pieces rest flush on the surface rather than sinking half-way into the floor.
  • Preserved relative elevation for underground structures (cellars, basements, excavated foundations) when relocating.
  • Fixed multi-material ghost preview rendering for complex pieces like chests and banners.
  • Simplified the configured HeightResetHotkey (default: Home) to instantly snap the structure flush back to the targeted surface.

1.0.7

  • Added chat command /movingdayclean (alias /mdclean [radius, default 150m]) to scan ZDOMan database objects near the world origin and delete them directly, bypassing Unity physics colliders. Features a vertical limit check (y < 2m) to safely delete only buried/corrupted ZDOs while preserving player surface bases.
  • Fixed relocated building pieces spawning at the world origin (0,0,0) (the Forsaken Stones) when the player teleports away to place them. The mod now claims ZDO ownership immediately on entering Move Mode and explicitly registers position changes with ZDOMan.ClientChanged during relocation.
  • Fixed ghost preview prefabs creating and leaking database ZDOs during Move Mode (resolved the portal/teleport screen infinite load lock) by bypassing ZNetView initialization on preview instantiations.

1.0.6

  • Migrated keybind settings to KeyboardShortcut configurations for click-to-bind BepInEx GUI support.
  • Added PlayerCanTakeInput check to prevent selections/hotkeys from triggering while typing in chat or menus.
  • Added modifier-key check (Shift or Control) to instantly clear selections when pressing selection hotkeys (G or H).
  • Resolved input system shortcut triggers by querying key status via ZInput / Input System directly on the shortcut's MainKey.
  • Improved selection logic to be more compatible with PrefabHammer.

1.0.5

  • Added persistent ZDOID selection logic, allowing players to teleport or walk far away without losing selection state.
  • Added auto-scanning and highlight restoration when re-equipping the build tool.
  • Fixed custom ghost preview destruction during teleports by marking preview objects with DontDestroyOnLoad.
  • Fixed placement issues where unloaded structures were only moved in the ZDO database, forcing immediate GameObject instantiation at placement via reflection.
  • Added selection clearing by pressing select hotkeys (G or H) while looking at empty space.
  • Snapped ghost preview to ground level on Move Mode entry, and added custom height reset key config (HeightResetHotkey) supporting both ground level reset (Home) and original height reset (Shift + Home).

1.0.4

  • Migrated hotkey configuration types from text-based strings to direct KeyCode settings, allowing interactive keybind assignment via the BepInEx Configuration Manager GUI.

1.0.3

  • Added configurable structure height adjustment hotkeys (HeightUpHotkey and HeightDownHotkey, defaulting to UpArrow / DownArrow) and scroll wheel steps (Alt + Scroll) in Move Mode. Press Home to reset the height offset to 0.
  • Fixed Move Mode cancellation logic to prevent premature exits when equipping tools.
  • Fixed build placement ghost visibility conflicts in Move Mode.

1.0.2

  • Fixed selection of roofs and other large building pieces by measuring physical boundary (AABB collider bounds) distance instead of center-to-center distance, ensuring touching pieces are always selected regardless of size.
  • Increased selection spatial search radius to 250m to support massive structures.
  • Cached relative offsets and persistent ZDO references at Move Mode entry, preventing pieces from being left behind due to client-side unloading/culling during relocations.
  • Moved player/container safety checks and cargo dropping to Move Mode entry to give instant feedback and prevent culling exploits.

1.0.1

  • Fixed the BepInEx mod icon to use the correct MovingDay theme instead of PrefabHammer.
  • Updated mod version to 1.0.1.

1.0.0

  • Initial Release.

Discord

Join our Discord Server for discussion, suggestions, and bug reports!

CHANGELOG

Changelog - MovingDay

All notable changes to the MovingDay mod by DrakosDJ will be documented in this file.

[1.1.0] - 2026-09-28

Added

  • Native Console & Chat Diagnostic Commands (mdscan, mdclean):
    • Registered mdscan and mdclean as native Terminal.ConsoleCommand entries. Fully accessible from both the F5 Developer Console (with tab-autocomplete and help inclusion) and the in-game Chat window (/mdscan, /mdclean).
    • Removed legacy /movingdayclean alias in favor of the unified mdclean tool.
    • Zero-Cheat Admin Gating: Commands are protected using native host and admin checks (LocalPlayerIsAdminOrHost() on clients/hosts and IsAdmin on servers). Eliminates any requirement for devcommands, preventing character profiles from receiving persistent cheat flags.
  • Client-Side by Default (Server Install Strictly Optional):
    • MovingDay does not require a server-side installation. All moving, building, and local scan/clean tools function completely client-side in singleplayer and when connected to unmodded dedicated/hosted servers.
    • Server-side installation is only required if server admins want to perform world-wide scans and cleanups (mdscan and mdclean all) across distant, unloaded sectors.
  • Comprehensive Orphaned ZDO Detection & Diagnosis (mdscan):
    • Automatically identifies all common forms of orphaned or corrupted world objects:
      • [Void]: Objects that fell below the world boundary ($y \le -100\text{m}$).
      • [Deep Underground]: Pieces buried $>15\text{m}$ underneath the surface terrain mesh.
      • [Missing Prefab]: Leftover database entries from uninstalled mods whose prefabs no longer exist.
      • [Ghost Tag]: Preview ghosts leftover from an interrupted MovingDay session.
  • Enriched Identity & Contextual Reporting:
    • Creator Attribution: Resolves human-readable player names from world player history (World.m_playerHistory), active player lists, and creator hashes, distinguishing player-built structures from "World / Natural Spawn".
    • Dynamic Metadata: Contextual details like portal tags (Portal: "..."), sign text (Text: "..."), chest item counts, and dropped item stacks are automatically displayed when present, while omitting irrelevant fields to maintain a clean console view.
  • Targeted & World-Wide Cleaning (mdclean):
    • Clean specific ZDOs (mdclean <ZDOID>), local areas (mdclean here [radius], mdclean origin [radius]), or perform a full world wipe (mdclean all). Running mdclean with no arguments performs a safe dry-run scan.
  • Asymmetric Multiplayer Safety:
    • Graceful Unmodded Fallback: Modded players connecting to unmodded servers automatically fall back to scanning/cleaning their loaded sectors locally without errors, freezes, or timeouts.
    • Non-modded players can join a modded server without requiring the mod or experiencing desyncs.

Fixed

  • Double Command Reporting: Resolved command execution conflict with ServerDevcommands by removing redundant Harmony prefixes and utilizing Valheim's native ConsoleCommand dispatch.
  • Sacrificial Stone & World Altar Safety: Removed legacy startup auto-purge loops and hardened OnZDODestroyed to eliminate crashes and prevent destruction of world-generated structures.

[1.0.9] - 2026-09-14

Fixed

  • Spawnpoint Build Material Drop & Orphaned Ghost Fix: Fixed ghost preview prefabs creating persistent database ZDOs at (0, 50, 0) and (0, 51, 0) under the Forsaken Altar / world spawnpoint, which collapsed due to zero structural support upon world reload and dropped wood/building materials on the ground.
    • Ghost previews are now instantiated at off-map coordinates (0, -9999, 0) and have any attached ZNetView components immediately destroyed synchronously.
    • Removed DontDestroyOnLoad from ghost previews to ensure preview GameObjects are transient and cannot persist across scene or world transitions.
    • Added an Origin Guard in ConfirmMove to prevent structures from ever being placed at the world origin (0, 0).
    • Upgraded /mdclean (and automatic world-load cleanup on player spawn) to detect and purge orphaned or deep-underground ghost pieces near (0, 0) while safely preserving legitimate player bases, dropped items (ItemDrop), and world structures.

[1.0.8] - 2026-09-11

Added

  • Updated to comply with the Valheim v1.0 (1.0.7) update.
  • Smart Anchor Point Selection: The first piece you select (or the piece you are aiming at when pressing Move) now serves as your anchor piece. Your cursor placement, crosshair tracking, and elevation adjustments directly reference this anchor piece.
  • Initial Orientation Preservation: Entering Move Mode now preserves the exact orientation of your build relative to your character, eliminating the 180-degree rotation flip when selecting chests, workbenches, or furniture you are facing front-on.
  • Dynamic Surface Alignment & Multi-Story Tracking: Moving structures to multi-story floors, stone foundations, or ground terrain now tracks the exact surface your crosshair points at. Pieces and containers selected on upper floors no longer float in the air when moved to different levels.
  • Anchor Piece Bottom Alignment: Fixed an issue where pieces with centered origins (such as 2m walls, 1m walls, or wood poles) appeared sunk half-way into the ground/floor when chosen as the anchor piece. The anchor piece's bottom edge now rests flush on the targeted surface while preserving the correct relative depth for any underground structures, including excavated cellars and basements.
  • Ghost Preview Multi-Material Fix: Preview ghosts now properly apply translucent materials across all sub-mesh renderers for complex pieces like chests and decorative items.
  • Simplified Height Reset: Pressing the configured HeightResetHotkey (default: Home) now snaps the placement ghost flush back to whatever surface the crosshair is pointing at, clearing any manual height adjustments.

[1.0.7] - 2026-07-29

Added

  • World Origin Cleanup Command: Added a chat command /movingdayclean (alias /mdclean [radius, default 150m]) to scan ZDOMan database objects in memory near the world origin and delete them directly, bypassing Unity physics and collider checks. Includes a vertical limit filter (y < 2m) so that only buried/corrupted ZDOs are deleted, leaving player-built surface bases completely safe.

Fixed

  • World Origin Spawning Fix: Fixed relocated building pieces spawning at the world origin (0,0,0) (the Forsaken Stones) when the player teleports away to place them. This was caused by the server rejecting position updates on ZDOs that the client did not own at the moment they teleported, and a lack of ZDO change notification. The mod now claims ZDO ownership immediately on entering Move Mode and explicitly registers position changes with ZDOMan.ClientChanged.
  • Ghost Preview ZDO Leak: Fixed ghost preview prefabs creating and leaking permanent database ZDOs during Move Mode by setting ZNetView.m_forceDisableInit = true during their instantiation. This resolved the subsequent teleport/portal loading screen locks.

[1.0.6] - 2026-07-14

Added

  • Interactive Click-To-Bind Configuration: Migrated all hotkeys to BepInEx KeyboardShortcut configurations. This changes the BepInEx Configuration Manager GUI from a tedious drop-down list to an interactive button where players can click and press any key combination to bind.
  • Typing Safety Checks: Added input block safety checks to prevent selections and key commands from triggering accidentally while writing in chat or navigating menus.
  • Convenient Modifier Clear Hotkey: Holding any modifier key (Shift or Control) while pressing the select keys (G or H) will now instantly clear your current selection, regardless of what you are currently targeting.
  • PrefabHammer Compatibility: Improved selection logic to be more compatible with PrefabHammer.

Fixed

  • Input System Compatibility: Resolved potential BepInEx input manager bugs and compatibility issues by querying raw key status via ZInput and the new Input System directly on the shortcut's MainKey.

[1.0.5] - 2026-07-10

Added

  • Selection Persistence & Re-highlighting: Replaced the volatile selection cache with ZDOID ulong networking IDs. You can now teleport or walk far away, unloading the source area, and the selection will remain in memory. Re-equipping the build hammer automatically scans and re-highlights the pieces when they load back in.
  • Convenient Selection Clearing: Pressing either selection key (default G or H) while looking at empty space or nothing will instantly clear your entire selection.
  • Configurable Height Reset Key: Created HeightResetHotkey configuration setting (default: Home) to customize the height reset key.
  • Height Reset Modes: Pressing the height reset key snaps the preview ghost to ground level, while holding Shift and pressing it restores the original structure height offset.

Fixed

  • Teleported Placement Support: Used reflection to invoke ZNetScene.CreateObject when confirming a move while source pieces are unloaded. This forces Valheim to instantly instantiate the relocated pieces' GameObjects at the destination, preventing them from being moved only in the database (invisible).
  • Ghost Portal Persistence: Marked custom ghost preview GameObjects with DontDestroyOnLoad to prevent Unity from destroying them during scene transitions when teleporting.

[1.0.4] - 2026-06-30

Added

  • PrefabHammer Compatibility: Added seamless selection synchronization with the PrefabHammer mod. If both mods are installed, they will automatically share the exact same selected pieces list. Highlighting pieces in one mod allows you to use the other mod's functions (e.g. moving a PrefabHammer selection, or saving a MovingDay selection as a prefab). Both mods will correctly clean up highlight overlays when selections are cleared or deselected.
  • Interactive Configuration Manager Keybinds: Migrated all hotkey configuration types from text-based strings to direct KeyCode settings. This enables BepInEx Configuration Manager's keypress recorder, allowing you to bind keys by clicking a button and pressing the key.

[1.0.3] - 2026-06-27

Added

  • Configurable Structure Height Adjustments: Raise or lower the placement height of the relocated structure in Move Mode using hotkeys (defaults: UpArrow / DownArrow) or Alt + Scroll Wheel. Added Home key to reset height adjustment to 0.
  • Dynamic Build Tool Checks: Refined Move Mode stability to keep the placement ghost active regardless of changes to equipped tools, preventing accidental early exits from Move Mode.

[1.0.2] - 2026-06-19

Added

  • AABB-based Boundary Distance Checks: Selection connected BFS checks physical boundary distance between pieces' colliders instead of center-to-center distance, ensuring roofs and large pieces (e.g. 4x2 stone walls) connect properly.
  • ZDO Relocation Caching: Caches relative coordinates and ZDO references at Move Mode entry, resolving parts of the structure getting left behind if their sectors unload during the move.
  • Early Safety and Metal Checks: Validates safety/metal configurations at Move Mode entry (when pressing L) instead of placement, preventing unloading exploits and giving immediate feedback.
  • Early Cargo Dropping: Drops container metals immediately when entering Move Mode if ContainerMetalAction = Drop.
  • Search Radius Expansion: Increased the BFS pre-filter search radius to 250m to support massive structures.

[1.0.1] - 2026-06-18

Fixed

  • BepInEx Mod Icon: Corrected the packaged icon to use the new, custom MovingDay icon in a valid 256x256 PNG format, resolving R2ModMan validation issues.

[1.0.0] - 2026-06-17

Added

  • Initial Release of MovingDay: A distinct, standalone structure relocation mod for Valheim.
  • BFS Structure Selection: Select a structure's pieces automatically by pressing H (connected search) or G (manual selection toggle) while holding any build tool.
  • Visual Preview Ghost: Real-time translucent preview ghost showing exactly how the building aligns, rotates (using the mouse scroll wheel), and behaves relative to the terrain before confirming.
  • Terrain Replication & Footprint Reversion: Replicate structural excavations, basements, and leveling at the new location by holding LeftControl (default modifier) during placement. Restores/resets the terrain back to its natural shape at the old location footprint.
  • Player & Container Safety Checks:
    • Player safety configuration option (PlayerSafetyAction set to Block, Teleport, or Ignore). Automatically teleports the local player along with the structure if selected. Blocks or warns if other players are inside.
    • Chest safety configuration option (ChestSafetyAction set to Block or Ignore) to block moves if a chest is currently in use to prevent inventory desyncs.
  • Robust ZDO Management: Safely updates world coordinates in Valheim's local/dedicated databases, handling sector boundaries without duplicating objects or losing container contents.
  • Custom Build Script: Standalone build automation (build_movingday.bat) deploying directly to Steam BepInEx plugins and r2modman profiles.