DoNotTheHammer
Only the player who placed a build piece can remove or damage it. Protects a prebuilt world from accidental demolition and unwanted recipe unlocks.
About this mod Author’s original text
DoNotTheHammer
Only the player who placed a build piece can remove or damage it.
Built for people who prepared a world in advance — a spawn town, a quest dungeon, a shared hub, a
progression-gated base — and do not want it dismantled by a guest with a hammer.
Works retroactively on worlds you already built. Nothing needs tagging or migrating.
Built and verified against Valheim 1.0 (Unity 6000.0.75) and BepInEx 5.4.2350.
How it works
Valheim already records which character placed every build piece, in the object's networked save
record. This mod reads that value and enforces a rule on it. Because the data is already in your
world file, protection applies to everything you have ever built, immediately.
The creator is a character, not a Steam account. Two characters on the same account have
different IDs, so your dedicated builder character is distinguishable from the character you play.
Installation
Install on the server and on every client.
Clients matter because Valheim gives object ownership to whichever machine is nearby, so a player
without the mod can still act on objects their own game owns. See Limitations.
Using a mod manager (r2modman Mod Manager), just install the package. Manually, drop
the DLL into BepInEx/plugins.
Setup
Nothing is protected until you configure it. Out of the box the protected list is empty, so
installing the mod changes nothing at all.
- Load your world, stand in the middle of the build you want to protect.
- Open the console with F5 and run:
cprot scan
This counts loaded build pieces by creator. The ID with by far the most pieces is your builder.
- Protect it:
cprot add 123456789
- Confirm with cprot list.
- Set the same ID in the server's config and restart the server. Config does not sync between
machines.
Alternatives for finding the ID: cprot look reports the creator of the piece under your crosshair,
and cprot id prints the ID of the character you are currently playing.
Console commands
| Command | Does |
| --- | --- |
| cprot id | Print the character ID you are playing as |
| cprot look | Print the creator ID of the piece under your crosshair |
| cprot scan | Count loaded pieces per creator, marking which are protected |
| cprot list | Show current settings |
| cprot add | Start protecting pieces built by that character |
| cprot remove | Stop protecting that character |
Configuration
The config file is BepInEx/config/creatorprotect.cfg, created on first launch. It can also be
edited live in game with BepInEx ConfigurationManager (F1).
Who is protected
| Setting | Default | Meaning |
| --- | --- | --- |
| ProtectedCreatorIds | empty | Comma-separated character IDs whose pieces are protected. This is the main setting. |
| ProtectAllCreators | false | Protect every piece from everyone except whoever placed it. Ignores the list above. Also stops players wrecking each other's builds. |
| BypassPlayerIds | empty | Characters allowed through regardless. Put your admin character here so you can still make repairs. |
| ProtectUnownedPieces | false | Also protect pieces with creator ID 0. Those are usually world-generated structures, so this protects a great deal. |
What is blocked
| Setting | Default | Meaning |
| --- | --- | --- |
| BlockRemoval | true | Block hammer deconstruction. This is the setting that stops material refunds, and therefore unintended recipe unlocks. |
| BlockPlayerDamage | true | Block pickaxe, weapon, stray arrow and fire damage from players. |
| BlockAllDamage | false | Block enemies, raids, weather and decay too. Leave off to keep trolls dangerous. |
| BlockResourceDrops | true | Protected pieces drop no materials unless their own creator removed them. In 1.0 a piece destroyed by damage still drops its resources, so without this an enemy smashing a wall would hand out materials the players should not have yet. |
| PreventCollapse | true | Protected pieces ignore lost structural support, so someone removing their own piece cannot
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: