Niflheim HoeTiers
Metal-gated upgrade levels for the hoe, on top of the ones it already has.HoeTiers
Adds metal-gated upgrade levels to the Valheim hoe, on top of the 2 upgrade levels it already has. Each metal you reach adds another level:
Tin -> Copper -> Bronze -> Iron -> Silver -> BlackMetal -> FlametalNew -> Gold
Three ingots per level, plus the hoe's own base materials. The metal is the only gate. The station requirement is pinned to the recipe's own minimum, so it never climbs out of reach.
| Level | Metal | Wood | Stone | Max durability |
|---|---|---|---|---|
| 4 | 3 Tin | 4 | 4 | 900 |
| 5 | 3 Copper | 5 | 5 | 1200 |
| 6 | 3 Bronze | 6 | 6 | 1500 |
| 7 | 3 Iron | 7 | 7 | 1800 |
| 8 | 3 Silver | 8 | 8 | 2300 |
| 9 | 3 BlackMetal | 9 | 9 | 2800 |
| 10 | 3 FlametalNew | 10 | 10 | 3300 |
| 11 | 3 Gold (Bloodgold) | 11 | 11 | 5300 |
Base materials cost BaseMaterialsPerLevel x the target quality. At the default N = 1 that is the
column above; N = 2 doubles it; N = 0 drops them and leaves metal only. Across all eight levels that is 60 Wood and 60 Stone, which is nothing.
Levels 1-3 keep their vanilla costs untouched.
The vanilla hoe
| Quality | 1 | 2 | 3 |
|---|---|---|---|
| Durability | 200 | 400 | 600 |
| Cost | 5 Wood, 2 Stone | 1 Wood, 1 Stone | 2 Wood, 2 Stone |
| Workbench level | 1 | 2 | 3 |
Those vanilla upgrade costs are reproduced exactly rather than reimplemented: the mod points levels 1-3 back at the untouched vanilla requirement array, whose own curve is what produces the 1/1 and 2/2 above.
So vanilla max quality is 3, and with the default tier list this mod puts the seven metals on levels 4 through 10, ending at 3300 durability.
The mod does not hardcode that 3. It reads m_shared.m_maxQuality from the loaded prefab at runtime
and logs it, so a game patch that adds a vanilla level shifts the metals up instead of silently
overwriting one:
Hoe base max quality: 3
durability: 200 +200/level, drain <per placement>
base: Wood x5 (+1/level)
Level 4 requires 3x Tin, 4x Wood, ... (durability 900)
...
Hoe max quality 3 -> 10 (7 metal levels from 4).
Set ReplaceVanillaUpgrades = true if you would rather metals replace the vanilla levels from
level 2 onward.
Levels stay hidden until you find the metal
The offered max quality is capped at the first tier material you have never picked up, so an upgrade for a metal you have not seen is neither shown nor craftable. Pick up your first black metal and level 9 appears on its own.
This uses the game's own discovery set, Player.m_knownMaterial, which AddKnownItem fills with
m_shared.m_name the first time you pick an item up. It is recomputed every frame the crafting
panel is open, and logged when it changes.
What the levels get you
Durability, 600 to 3300. Vanilla's ItemData.GetMaxDurability(q) is
m_maxDurability + max(0, q - 1) * m_durabilityPerLevel, one flat step per level. The metal levels
need uneven steps: 300 per level through iron, then 500 each for silver, black metal and flametal. A postfix on that method computes
the value from the per-tier figures in Tiers; vanilla levels 1-3 fall through to the original
untouched.
It is worth having because the hoe genuinely spends durability. Player.UpdatePlacement
decrements m_durability on both placement and removal, gated on m_shared.m_useDurability and
scaled by Game.m_durabilityRate. The amount is Player.GetPlaceDurability(item), which is
m_useDurabilityDrain reduced by up to m_placementDurabilityMax as the relevant skill rises. Every terrain operation -- raise, level, path, smooth -- goes through that same placement path, so the hoe wears down exactly the way the hammer does.
Reach, via PlaceDistancePerLevel, applied only to levels above the vanilla max so the vanilla
levels behave exactly as they always did. Extra terraforming reach is the part you will notice: you can level ground further out without walking onto it and re-flattening your own footprints. Set it to 0 for durability-only.
Upgrading always returns a full-durability tool
DoCrafting removes the old item and rebuilds it through
Inventory.AddItem(name, stack, quality, ...), which does SetQuality(quality) and then
unconditionally sets m_durability = GetMaxDurability(). So a hoe reading 0/900 is simply
worn out -- repair it at a workbench.
The Forge of Potential is left alone
Valheim 1.0 can already push an item past its max quality: bring a Wooden Battle Idol to the
Forge of Potential and gamble on a level, at the risk of destroying the item. That is why the
hoe's recipe carries an Upgrader0Weapon entry you never see at a workbench.
That entry is not "hidden cruft". m_upgraderResource is a filter, and both the UI and the
requirement check apply it the same way:
if (station != null && station.m_upgrader != req.m_upgraderResource) continue;
A normal station shows only the entries without the flag; an upgrader station -- CraftingStation
with m_upgrader set, which is what the Forge of Potential is -- shows only the ones with it.
Same Recipe, same m_resources array, opposite halves.
This mod swaps m_resources for a per-level array that contains no upgrader entry at all. Swapping
it at the Forge of Potential would therefore leave the idol upgrade with an empty requirement list --
and because HaveRequirementItems applies the same filter, an empty list is a satisfied list, so
the upgrade would become free. So Apply checks GetCurrentCraftingStation().m_upgrader and puts
the vanilla array back instead. The idol path behaves exactly as it does without the mod.
(Player.RequiredCraftingStation returns true outright at an upgrader station, so the station
level is never gating there either.)
Config
Lands in BepInEx/config/niflheim.hoetiers.cfg on first run.
| Key | Default | Meaning |
|---|---|---|
ToolPrefab |
Hoe |
Which tool gets the levels. Hammer, Hoe and Cultivator all work. |
Tiers |
Tin:3:300,... |
Ordered Prefab:Amount:Durability list. One entry per added level. |
ReplaceVanillaUpgrades |
false |
false stacks metals after the vanilla levels; true replaces them from level 2. |
BaseMaterialsPerLevel |
1 |
Base materials per metal level = N x quality. 0 for metal only. |
PlaceDistancePerLevel |
1.0 |
Extra reach per level above vanilla max. Vanilla base reach is 5. |
Verbose |
false |
Logs each requirement swap. |
Prefab names that do not exist in your game version are skipped with a warning rather than breaking the mod, so a renamed metal costs you that level and nothing else.
Flametal is a trap. The flametal bar is
FlametalNew. The prefab namedFlametalstill exists as the pre-Ashlands item, converted to "Ancient metal" and unusable -- so naming it here would resolve to a real-but-dead item rather than failing loudly.
Bloodgold is the same trap backwards. The Deep North metal the game calls Bloodgold has the prefab name
Gold, and its ore isGoldOre. There is no prefab namedBloodGold.
How it works
Two things in vanilla stand in the way, both confirmed by reading assembly_valheim.dll IL at game
version 1.0.15:
-
Recipes cannot express per-level materials.
Piece.Requirement.GetAmount(quality)is one curve applied to every resource at every level, so "tin at one level, copper at the next" is not representable:if (quality <= 1) return m_amount; float steps = quality < 4 ? quality - 1 : 4f + (quality - 4) / 2f; return (int)Math.Floor(steps * m_amountPerLevel + (m_upgraderResource ? m_amount : 0));Note the bend: linear to quality 3, then a jump to 4 steps at quality 4 and half-rate after that. Vanilla already anticipates qualities above 3, because the Forge of Potential can reach them.
Rather than fight that curve, the mod prebuilds one requirement array per level and repoints
Recipe.m_resourcesat the right one immediately before the game reads it -- inInventoryGui.SetupRequirementList(the UI),Player.HaveRequirements(the button gate) andInventoryGui.DoCrafting(the actual spend). Each re-readsm_resourcesat the point of use, which is what makes the swap safe. Levels at or below the vanilla max point back at the untouched vanilla array.Every tier requirement is built with
m_amountPerLevel = 0, which the formula above would price at zero for any quality past 1. So the flat per-level amount is supplied by a prefix onGetAmountthat answers for this mod's ownRequirementobjects only -- matched by reference, so every other requirement in the game falls through to the original method. Settingm_upgraderResourceto get a flat amount instead is not an option: it would move the cost to the Forge of Potential and hide it at the workbench. -
The station requirement scales past what is buildable.
Recipe.GetRequiredStationLevelreturnsMathf.Max(1, m_minStationLevel) + (quality - 1)-- which is exactly why vanilla levels 1-3 want station 1/2/3, and why a level 11 upgrade would want a level 11 station that cannot exist. A postfix pins the metal levels of this one recipe to the recipe's ownm_minStationLevel, so the requirement stops climbing. This is not a difficulty setting and there is deliberately no config behind it: material access is the gate, enforced separately by the max-quality cap. Levels 1-3 keep vanilla's ladder, and every other recipe in the game is untouched.
m_maxQuality itself is raised on ObjectDB.Awake / CopyOtherDB, guarded so that reloading the
database re-reads the captured vanilla values rather than compounding the mod's own edits.
Install
Requires BepInEx and Jotunn (ValheimModding-Jotunn-2.30.0). Drop HoeTiers.dll into the
BepInEx/plugins folder of the profile you play:
%APPDATA%\Thunderstore Mod Manager\DataFolder\Valheim\profiles\<profile>\BepInEx\plugins\
Sibling mods, same engine, different tool: HammerTiers and CultivatorTiers. All three can be installed together.
Multiplayer and dedicated servers
The feature cannot be server-only. The upgrade panel is drawn by each client from its own
ObjectDB, and DoCrafting spends the resources in the local player's inventory. A vanilla client's
hoe has m_maxQuality = 3 and nothing the server sends changes that, so every player who wants
the extra levels needs the DLL. Valheim has no mod delivery, so distribute it as a Thunderstore
modpack or hand out the zip.
What is server-authoritative, via Jotunn:
1. The server can require the mod. The plugin is marked
[NetworkCompatibility(CompatibilityLevel.EveryoneMustHaveMod, VersionStrictness.Minor)], so Jotunn
compares module lists on connect and refuses clients that are missing it or running a different minor
version, with a message naming the mod. Nobody silently plays without it.
2. The server owns every setting. All config entries are bound with IsAdminOnly, which is what
makes Jotunn push the server's values to clients on connect. A player editing Tiers or
BaseMaterialsPerLevel locally has it overwritten, so costs are the server's decision, not theirs.
Not verified
Neither the version enforcement nor the config sync has been tested against a live dedicated server.
Both are wired to APIs read out of the installed Jotunn.dll, not from documentation.
Status
Run in-game and working. The engine is the one HammerTiers has been playing on, pointed at
the hoe by a single const, so the behaviour is the same code path in both.
The vanilla stat tables in this README come from the weirdgloop Valheim wiki. The mod itself
never trusts them: it reads m_maxQuality and the durability curve off the loaded prefab at
runtime, so if the wiki is out of date the README is wrong and the mod still is not.
Credits
Part of Niflheim, a set of single-issue Valheim modlets by NifusionDotDev. Each one does one thing and is installed on its own; none of them depend on the others.
Written by a human doing his best to enjoy his hobby. Reviewed and documented with AI help, which is why the README is longer than the mod is.
