Table of Contents

Class HostWorldPlan

Namespace
Valheim.Testing.Game
Assembly
Valheim.Testing.Game.dll

The hostWorld section of a ClientRunPlan: the client hosts this fixture world from its menu (a listen server) instead of joining a dedicated server. The world is the client's own local world, so the runner copies the pinned fixture into the client's local worlds for the run (HostedWorld) and never uses a world already there. Unknown fields are refused with the rest of the plan.

public sealed class HostWorldPlan
Inheritance
object
HostWorldPlan

Properties

Crossplay

Hosts a crossplay world (the game's PlayFab backend, --crossplay true).

public bool Crossplay { get; set; }

Property Value

bool

SaveDirectory

The client's data directory, which holds worlds_local. Default: this user's Valheim data directory for the client's platform (DefaultSaveDirectory(ClientPlatform)). Set it when a Windows client runs as another user. A native macOS hosted client must use its signed-in user's default; Valheim 1.0.16 ignored -savedir.

public string? SaveDirectory { get; set; }

Property Value

string

SaveSeconds

The confirmed save's timeout between rounds, 1 to 600 seconds.

public int SaveSeconds { get; set; }

Property Value

int

World

The fixture, in either layout the game (1.0.16) loads: a chunked save as Valheim 1.0 writes it, one directory <name>/ at the root holding _main.<n>.fwl2 and its chunks; or the older pair, one <name>.fwl at the root with its data beside it (<name>.db). Every entry is named for the world and pinned by SHA256 (Manifest(string)).

public PinnedDirectory World { get; set; }

Property Value

PinnedDirectory

WorldUid

The fixture world's exact UID, required even without pins: the host must load that world, and the game silently creates a fresh world when the named one is missing.

public string WorldUid { get; set; }

Property Value

string

Methods

Preflight()

Before the fixture is copied: its files must still be the pinned ones (when the plan lists hashes), and the world its own metadata states (Read(string)) must have WorldUid. A world name reused for another snapshot has another UID, and is refused here as the wrong fixture, naming the UID it holds, instead of after the game loaded it. Returns that identity.

public WorldIdentity Preflight()

Returns

WorldIdentity

Validate()

Refuses the section before anything is copied: a fixture without a manifest or name, no exact world UID, a relative save directory or a save timeout out of range.

public void Validate()