Confirm with your password

Tarn

Water at any height: real lakes above sea level, built from a per-world lake list, swimmable, on the map, synced from the server. Also keeps vegetation off a map maker's roads and lake beds.

Client & Server World Generation

· Website · 💗 Donate

Stars
0
Downloads
16
Version
0.3.0
Updated
Author
RavenIronStudios
Virus scan
✓ Scan successful
Runs on
Client & Server

Description

THIS MOD IS IN SUPER EARLY DEVELOPMENT. IT IS WHAT IT IS AND WILL NOT CHANGE MUCH. USED FOR PRIVATE SERVER AND CUSTOM MAP.

Tarn

Water at any height. Valheim has one water level, so every lake above the sea is a dry hollow. Tarn puts real vanilla water in them, at their own height. You can swim in it, sail on it, and see it on the map. It was made for the Ravenrest map, by Raven Iron.

Prototype. It works and is used on test worlds, but the details may still change.

What it does

  • Lakes at their own level. Each lake fills its basin: everything below its level that joins its deepest point. The water is vanilla's own (sea tiles and water volumes), so swimming, wet status, boats, floating and the underwater view all behave as at sea. Lakes are built as you come near and dropped behind you, a few milliseconds a frame.
  • On the map. Lakes are drawn as water on the minimap and the large map.
  • Multiplayer. The server, or the host in single player, owns the lake list and sends it to every player. A dedicated server builds no water of its own.
  • Clearing (0.2.0; synced from the server since 0.3.0). No trees, rocks, bushes or pickable debris are placed on ground a map maker marked, such as roads and lake beds. Tarn uses vanilla's own clear areas, the same ones that keep trees out of locations. Only what would have stood on a marked spot is removed; everything else is placed exactly as vanilla places it.

Files (per world, in BepInEx/config/Tarn/)

  • <world name>.txt: the lake list, read on the server or host. One lake per line: name;x;z;level;minX;minZ;maxX;maxZ;depth. Here x and z are the deepest point, level is the absolute world height of the water surface, and the box is the area the lake may fill. Lines starting with # are ignored.
  • <world name>.clear: the clearing mask (optional). The header is TARNCLR1, then an int32 size and a float32 half-extent in metres, then size × size bits: row 0 is the north edge, high bit first (numpy packbits order). It's read on the server, the host, or in single player, and sent to every joining player (0.3.0+), because whoever generates a zone places its vegetation. It only affects zones generated after it exists, so make a new world, or reset those zones. If a player generates a zone in the seconds before the mask arrives, the log names it.

Commands (console)

  • tarn here [radius] [margin]: fill the hollow you're standing in, up to just under its spill point.
  • tarn list [n]: the nearest lakes, and whether they're built.
  • tarn depth [scale]: how deep lakes look (colour, foam, waves). Applies live.
  • tarn reload: re-read this world's lake file on the server.
  • tarn at <x> <z> [radius] [margin], tarn remove <name|all>, tarn info.

On a server, changing commands need the player to be on adminlist.txt.

Config

Setting Default What it does
Look.DepthScale 0.5 How deep lakes look.
Sound.LakeVolume 0.35 Lake water sound.
Performance.BuildRange 400 Lakes within this many metres are built.
Performance.BuildBudgetMs 2 Milliseconds per frame spent building lakes.

Notes

  • Grass: vanilla's grass clutter uses a fixed water level, so a lake bed needs dirt paint on its ground, or grass stands up through the water. The Ravenrest map paints its beds.

Changelog

0.3.0 Latest
  • The clearing mask is synced from the server. Vegetation is placed by whichever machine generates a zone, which in multiplayer is usually a player. The server (or host) now sends its <world>.clear to every joining player: deflated (Ravenrest's 2 MB mask is 68 KB) and sent in 48 KB chunks. A connected player never reads their own .clear file, as with lakes. If a zone is generated before the mask arrives, the log names it.
  • One log line proves the clearing ran: the first zone with marked ground, and how many clear areas it got.
  • The server needs 0.3.0 too: an older server never answers, and the player is told so after about a minute.
0.2.0
  • Clearing: a per-world mask (BepInEx/config/Tarn/<world>.clear) of ground kept free of vegetation, such as a map maker's roads and lake beds. It adds vanilla clear areas to ZoneSystem.PlaceVegetation, so only what would have stood on a marked spot goes. Better Continents' vegetation map can't do this, because it is read once per 64 m zone, at the zone's centre. Verified in game on Raventest22.
  • Fix: the clear-area type is private in the real game, so it is reached by reflection. A first build compiled against the publicized assemblies threw MethodAccessException in game.
  • The load line names the real version. It said "0.1.0" whatever the build.
0.1.0
  • Lakes at their own height from BepInEx/config/Tarn/<world>.txt, built as you come near.
  • Lakes drawn on the map, and the lake sound.
  • Server-owned lake list, synced to every player. The tarn console commands.

Full version history & older downloads →

Manual installation instructions
1

Install BepInExPack Valheim

BepInExPack Valheim is required to run mods in Valheim.

Download BepInExPack Valheim 5.4.2351 · View mod page

Check out the mod page for detailed installation instructions.

2

Install Tarn

This mod must be installed on both the client and the server.

Download Tarn 0.3.0

Extract the ZIP and place the file(s) into the BepInEx/plugins/ folder inside your Valheim game folder.