RE:NODE

Valheim terraforming on servers: hoe, pickaxe and lag

By RE:NODE Team
11 min read


Every time someone levels, raises, digs or paints ground in Valheim, the change is saved into the world as a terrain modification for the zone it happened in, and every player who later loads that zone has to apply it before the ground under their feet is right. A little terraforming costs nothing you will notice. A hilltop levelled by hand into a castle platform, or a kilometre of raised roads, adds terrain data to many zones that are then rebuilt on every visit. On a shared server that cost lands on whoever arrives first and owns the zone, and on every client that has to draw it. The rule of thumb is to build on ground that is already flat, terraform small and with purpose, and never "undo" old work by reshaping it again.

The broader lag picture - zone ownership, which objects cost the most - is in Valheim server lag: zone ownership and desync. This post is about the ground itself.

The terraforming tools and what each one does#

Valheim has three tools that change terrain, and they behave differently enough that it is worth being precise.

ToolActionWhat it changesNotes
HoeLevel groundHeight, to where you standThe main flattening tool
HoeRaise groundHeight, upwardsUses stone
HoePathenPaint only (dirt path)No height change
HoePaved roadPaint only (paved look)No height change
PickaxeDigHeight, downwardsAny pickaxe, in any loose ground
CultivatorCultivatePaint (farmable soil)Needed for planting most crops
CultivatorGrassPaint back to grassRestores the look, not the original data

A few details that trip people up:

  • Level ground uses your feet as the reference. The hoe flattens a circle to the height you are standing at. Standing on a slope while levelling produces terraces; standing on a raised block produces a raised plateau.
  • The pickaxe does not give stone. Digging soil with a pickaxe removes terrain but yields nothing. Stone comes from rocks and boulders.
  • Painting is still a modification. Paths, paved roads and cultivated soil change no height, but they are stored in the same per-zone terrain data as height edits.
  • Wards do not stop the pickaxe. The hoe and cultivator count as placing pieces and are blocked inside someone else's active ward. Digging with a pickaxe is not. See Valheim wards and griefing for the full list.

How terrain changes are stored#

Valheim's world is divided into zones 64 metres square. The terrain for each zone is generated from the seed whenever it is needed, so an untouched zone costs nothing on disk for its ground - only for the objects on it.

When anyone modifies the ground, the game creates a terrain record for that zone and stores the difference from the generated terrain: height changes and the paint layer for the parts that were touched. That record is a world object saved in the world .db file with everything else. When a client loads the zone, it generates the original terrain from the seed, then applies the record, then rebuilds the mesh and collision for that patch of ground.

This is the system Valheim has used since the Hearth and Home update in 2021. Before that, every hoe or pickaxe stroke was its own object in the world, which is why old worlds with years of terraforming could become very slow. Hearth and Home introduced the per-zone records and the optterrain command, which an admin with devcommands can run to convert old-style modifications in the loaded area to the new format.

code
optterrain

If your world was created before 2021 and has heavy old terraforming that nobody has visited since, that command is still worth running in those areas, after a backup. On a world created since then it does nothing useful.

original groundfrom world fileapply, rebuildWorld seedgenerates terrainTerrain recordheight and paint deltasClientloads the zoneMesh and collisionrebuilt with edits
What happens when a client loads a terraformed zone

Two practical consequences:

  1. Edits do not merge away. Raising ground back to where it was is another edit, not a deletion. The zone keeps its terrain record either way. That is why Valheim base placement for shared servers says not to raise ground back - you make the zone no cheaper, and you spend stone doing it.
  2. The cost is per zone touched. A road that crosses fifteen zones adds a record to fifteen zones, however narrow it is. A large flattened plateau at the junction of four zones touches four.

The terrain height limit#

Valheim limits how far terrain can be moved from its original height. In vanilla the ground can be raised or lowered by about 8 metres relative to the height the seed generated. Past that, the hoe and pickaxe stop having any effect on that spot.

This catches people building moats and cellars. Dig a basement into a hillside and you will hit a floor you cannot go below; raise a platform on a dip and it stops rising. The limit is relative to the original terrain, not to sea level, so on a high mountain you can still dig 8 metres into it, and in a valley you can still raise 8 metres up from the valley floor.

Mods can change or remove this limit. Raising it is one of the faster ways to make terrain records heavier, because each touched point can hold a larger difference and players tend to use the freedom. If your group runs such a mod, set expectations about how much reshaping is welcome.

Why huge flattened areas slow a world#

Terraforming hurts in three places, and only one of them is the server.

The client loading the zone. Every visit means generating the ground, applying the record and rebuilding the mesh and collision. For a few small edits this is invisible. For a zone that has been levelled almost edge to edge, painted and dug, it adds to the hitch players feel when they arrive or teleport in. Several such zones around a main base add up. This is the largest effect and it is on the player's machine.

The zone owner. The first player to arrive owns the zone and simulates what is in it. Terrain itself is not simulated, but heavily reshaped bases tend to be the biggest bases, with the most pieces, fires and animals. Terraforming correlates with exactly the zones that are already expensive to own.

The server and the world file. The server stores the records, sends them to clients that load the zone, and writes them out at every save. A long-running world with heavy terraforming carries a bigger .db, takes a little longer to save and send. This is real but usually the smallest of the three. A bigger server plan does not fix the client-side part, which is the part people notice. CPU vs RAM for game servers is the general guide to working out which limit you are actually hitting.

HabitZones touchedTypical effect
Levelling under a house footprint1None worth measuring
Paths between buildings in one base1-2Negligible
Flattening a hilltop for a castle2-4Noticeable load hitch on arrival
Raised roads across the mapDozensMany zones each slightly heavier
Dug-out canals or moats around a base2-6Heavy edits in exactly the busiest zones

None of this is a reason not to terraform. It is a reason to do it where it earns its place.

Safer terraforming habits for a group#

On a shared world the cost of terraforming is paid by everyone who visits, so a few house rules go a long way.

  1. Pick naturally flat ground. Meadows and Plains have plenty. Five minutes looking for a flat spot saves an evening with the hoe and keeps the base light for good. The seed map viewers mentioned in the Valheim seeds guide make this easy before the world is even started.
  2. Use foundations instead of earth. Stone or wood floors on posts over uneven ground look better than a levelled platform and do not touch terrain records. They cost build pieces instead, which is a different trade-off - pieces are objects too - but for one house it is the better one.
  3. Level only the footprint. Flatten under the building, not the whole hill.
  4. Path the routes people use, not every square metre. Paint is cheap per stroke but it all goes into the record.
  5. Raised roads only where boats and carts need them. Cart roads matter on default portal rules, because ore travels by cart or boat. Moving ore without portals covers when a road is worth building.
  6. Do not reverse old terraforming. Leave it. Rebuilding the hill adds work and saves nothing.
  7. Keep heavy terraforming out of the main base and the portal hub. These are the most-loaded zones in the world. Designing a Valheim portal hub explains why a hub should stand on natural ground.

Farming, cultivated soil and terrain#

Farms are the most common large terraforming on a server, because most crops need cultivated soil, and cultivating is painting the terrain.

  • The cultivator paints, it does not level. Cultivated soil follows the existing ground. You do not need to flatten a field first unless you want it tidy. A gently sloping field farms perfectly well.
  • Big fields touch more zones. A field that crosses a zone boundary puts records in both zones. Keep farms inside one zone where you can.
  • Replanting grass restores the look, not the data. The zone keeps its record.
  • Plants are objects. Every planted crop is an object until harvested. A field of several hundred carrots is far more expensive than the cultivated soil under it, and it is simulated by the zone owner as it grows.

A sensible group farm is sized to what the group eats, on naturally flat Meadows or Plains ground, inside one zone, with the cultivator used once rather than repeatedly. Running a shared farm well - crops per biome, replanting and food duty - is covered in Valheim shared farming and food.

Admin tools and mods for terrain#

Vanilla gives admins very little for terrain beyond optterrain. There is no command to reset a zone's ground to the original. Mods fill the gap, with the usual cost that most of them need installing on the server and, for some, on every client.

  • Upgrade World by JereKuusela can regenerate zones, which resets their terrain - and deletes everything built in them. It is a tool for unexplored or abandoned areas, not for tidying a base. Read Upgrade World for Valheim and back up first.
  • ServerDevcommands, also by JereKuusela, extends devcommands on a dedicated server, which helps an admin fly in and inspect a heavily terraformed area. See ServerDevcommands on a dedicated server.
  • Building and terrain tool mods that raise the height limit, add bigger brushes or precise levelling exist on Thunderstore. They make more terraforming easier, not less. Install them on purpose, with a rule about where large edits are welcome.

Anything that edits terrain in bulk should be tested on a copy of the world first. On RE:NODE you can take a backup from the panel before any such change and restore it with one button if the result is wrong. Backup slots come with every Valheim plan, and the file manager and SFTP let you download the world .db and .fwl for a local copy as well.

Troubleshooting terrain problems#

The hoe or pickaxe stopped working on one spot. You have reached the height limit of about 8 metres above or below the original ground. Nothing is broken.

The hoe does nothing in a friend's base. Their ward is active and you are not permitted. Ask them to add you or to switch the ward off while you work.

Someone dug a trench through our farm. Pickaxe digging is not blocked by wards. Fill it with the hoe's raise ground, accept that the zone keeps its record, and treat it as a rules matter. Admin handling of griefing is covered in the wards post linked above.

The main base takes a long time to load into. Usually a combination of piece count, lights and terraforming. Teleport in to a portal just outside the base rather than in the middle, reduce lights, and stop further terraforming there.

Floating grass or a strange step in the ground after an edit. A rendering artefact on the client, usually cleared by walking away and back so the zone reloads. If everyone sees it after a restart, the edit really is there; smooth it with the hoe.

The world file grew after a big building weekend. Expected. Terrain records, pieces and dropped items all add to it. Valheim dropped items and world cleanup covers what else grows the file and what can be cleaned.

FAQ#

Does terraforming lag the server or the players?

Mostly the players. Clients apply terrain records and rebuild the ground every time they load a zone, which is where the hitch comes from. The server stores and sends the data, which costs much less.

Can I undo terraforming in Valheim?

Not cleanly. You can raise or lower the ground back, but that is another edit and the zone keeps its terrain record. Only regenerating the zone with a mod returns it to the original, and that also removes everything built there.

How deep can you dig in Valheim?

About 8 metres below the ground's original height, measured from where the seed placed it. The same limit applies upwards when raising ground.

Is building on stone floors better than flattening?

For a single building on uneven ground, usually yes for terrain, because the ground stays untouched. Floors and posts are pieces, which have their own cost, so do not swap a small levelled patch for hundreds of extra pieces.

Does optterrain help on a new world?

No. It converts terrain edits made before the Hearth and Home update into the current format. A world created since then already uses the current format.

Do console players on crossplay pay the same terrain cost?

Yes. Terrain records are part of the vanilla world, so every client that loads a zone applies them, whatever the platform. Console hardware is a good reason to keep shared areas modest.