Valheim
Install with App

Details

Latest version
0.1.0
Last Updated
First Uploaded
Downloads
146
Likes
0
Size
52KB
Dependants
ADDatHost Valheim hosting
30% off

Flametal Hammer

By Adam Robichaud.

A BepInEx mod for Valheim that adds a Flametal Hammer: the normal building hammer with a bluish-grey Flametal head that always counts as having a Stonecutter in range. Build, repair and deconstruct stone pieces anywhere, without hauling a stonecutter around.

  • Builds exactly like the vanilla hammer, with the same build menu.
  • While it is in your hand, every "Stonecutter required" check passes, and the build menu shows the Stonecutter as present. Equipping it also teaches you the Stonecutter if you had never stood next to one.
  • Crafting stations other than the Stonecutter (Workbench, Forge, Black Forge, ...) still need to be in range.
  • Same model and icon as the hammer, with the head recolored bluish-grey.

Recipe

Forged, upgraded and repaired at a level 4 Black Forge. It costs the same Wood as the vanilla hammer, at the same per-level rate, plus Flametal (no Stone):

Quality Wood Flametal Black Forge level
1 (craft) 3 5 4
2 1 10 4
3 2 15 4
4 4 20 4

Vanilla recipes need one more station level per quality; this one stays at level 4 for every quality, since counting up from 4 would put quality 4 past the Black Forge's maximum level of 6.

The Flametal amounts and the forge level can be changed in BepInEx/config/com.puhpuhburr.flametalhammer.cfg (FlametalCraftAmount, FlametalPerLevel, BlackForgeLevel).

Multiplayer

Every player who will hold the hammer, or see someone else hold it, needs the mod. Building checks run on the builder's own game, so the server does not need it unless it should also hand out the item. Remove the mod and any Flametal Hammer in your inventory is lost when the character loads.

Building

Requirements: .NET SDK 6 or newer, Valheim installed, BepInEx 5.4.x installed (plain or via a mod manager).

  1. Copy Paths.props to Paths.local.props and point the three properties at your install:

    • ValheimManaged: .../Valheim/valheim_Data/Managed
    • BepInExCore: the folder holding BepInEx.dll and 0Harmony.dll
    • PluginsDir: the BepInEx/plugins folder to deploy into (leave empty to skip deployment)
  2. Build:

    dotnet build -c Release
    

The DLL lands in bin/Release/FlametalHammer.dll and is copied to <PluginsDir>/PuhPuhBurr-FlametalHammer/ (or into an existing install of the mod, wherever the mod manager put it). A Release build also writes thunderstore/PuhPuhBurr-FlametalHammer-<version>.zip, which Thunderstore Mod Manager / r2modman can import via Settings → Profile → Import local mod.

How it works

  • The item is a copy of the vanilla Hammer prefab, registered with ZNetScene and every ObjectDB, so it shares the hammer's piece table, animations and sounds.
  • The head is recolored at load time. The icon's head is a fixed outline; on the model, the triangles at the top of the mesh are found and only their part of a private copy of the weapon texture atlas is repainted.
  • CraftingStation.HaveBuildStationInRange is the single check behind building, the build-menu indicator, repairing and deconstructing. When the local player holds the hammer and asks about the Stonecutter, it returns an inert stand-in station instead of nothing.
  • Flametal's upgrade cost is set directly, because vanilla per-level costs jump at quality 4.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.