PrefabHammer
An advanced tool to save, name, manage, and build custom multi-piece structures in Valheim using manual green pulsating highlights or radius selections.Prefab Hammer
Prefab Hammer is an advanced construction utility for Valheim. It allows players to capture custom build combinations (prefabs/blueprints) directly from their existing structures, name them, manage them in a catalog, and build them using standard resource calculations.
Features
- Manual Component Selection: Aim at built pieces and press
Jto select them one-by-one with a pulsating green outline. - Selection Clearing: Hold
ShiftorControlwhile pressing the select key (J), or press the select key while aiming at empty air, to instantly clear all selected pieces. - Exact Geometry Outlines: Selection highlights clone the piece's actual visual meshes, making the green transparent overlay conform precisely to floors, sloped roofs, beams, and custom shapes.
- Name & Save Dialog: Press
Kto open the solid-colored popup manager, name your creation, and save it. - Prefab Library Catalog: View your blueprints in a scrollable list, delete them safely with confirm prompts, or open the catalog using
DeleteorShift + K. - Batched Placement: Large blueprints are built in small batches across multiple frames — no freezes, even with 1000+ piece structures. Progress messages display during placement.
- Undo Placement: Press
Shift + Uto open the Undo History tab and remove recently placed blueprints. Materials are refunded by dropping them at the original piece locations. - Structural Integrity: Placed structures correctly calculate stability after construction. Hover pieces with the hammer to see support colors.
- Unequip Cleanup: Switching away from the Hammer automatically clears outlines and selections to prevent world clutter.
- Radius Fallback: Pressing the save hotkey without selecting anything falls back to saving all pieces in a radius.
- Chat Commands: Use
/prefablist,/prefabsave,/prefabreload,/prefabdelete,/prefabinspectorigin, and/prefabcleanorigin.
Compatibility with MovingDay
If you also have the MovingDay mod installed, they will automatically work together:
- Shared Selection: They share the exact same selection pool in memory. Highlighting a structure with PrefabHammer's select keys will immediately make it targetable by MovingDay's move 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.
Keybinds (Configurable)
J: Toggle manual piece selection (must hold Hammer).Shift + JorCtrl + J: Clear the current selection.K: Open save panel / Prefab Manager.DeleteorShift + K: Open Library Catalog directly.Shift + U: Open Undo History tab.
Chat Commands
/prefabsave [name] [radius]: Save the hovered structure (or current selection) as a new blueprint./prefablistor/prefablibrary: Open the Prefab Manager to the Library tab./prefabreload: Reload custom blueprints from disk./prefabdelete [name]: Delete a saved blueprint by name./prefabinspectorigin [radius]: Inspect and categorize all entities near world origin(0, 0, 0)with their exact distances in meters./prefabcleanorigin [radius]: Clean up orphaned dummy containers or loose item drops near world origin(0, 0, 0).
Installation
Prefab Hammer requires BepInEx to run.
- Install BepInExPack Valheim.
- Place
PrefabHammer.dllinto theBepInEx/plugins/directory (or download directly via r2modman).
Configuration
You can customize the mod's behavior by editing BepInEx/config/com.prefabhammer.cfg (or using the in-game Configuration Manager / r2modman's Config Editor).
General
Enabled: Enable or disable the mod on the fly (default:true).BuildCategory: The build menu category tab where your custom prefabs are loaded (default:Prefab). Can be set to vanilla tabs likeMisc,Crafting,Building, orFurniture.DefaultRadius: Capture radius in meters for the fallback area save (default:5.0).
Keybinds
All hotkeys use BepInEx's native click-to-bind system. In the in-game configuration manager, click the keybind button and press the key combination you want — no need to type key names.
SaveHotkey: Open the save panel (default:K).SelectHotkey: Toggle piece selection (default:J).ManagerHotkey: Open the Prefab Manager to the Library tab (default:Left Shift + K).UndoHotkey: Open the Prefab Manager to the Undo History tab (default:Left Shift + U).
Performance
PlacementBatchSize: Number of pieces placed per frame during batched building (default:10). Lower values reduce stuttering on slower hardware.MaxUndoHistory: How many recent placements are kept in the undo history (default:5).
Upgrading from v1.0.7 or earlier: Delete your old
com.prefabhammer.cfgfile to let BepInEx regenerate it with the new keybind format. The old string-based key entries are not compatible.
Discord
Join our Discord Server for discussion, suggestions, and bug reports!
