Table of Contents

Class StartupEvents

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

What an owned server's startup waits on instead of retrying connections. The process exit is always watched. Without CliLog, connecting falls back to bounded retries at the session's poll interval.

public sealed class StartupEvents
Inheritance
object
StartupEvents

Fields

BepInExPluginLoadFailures

public static readonly IReadOnlyList<Regex> BepInExPluginLoadFailures

Field Value

IReadOnlyList<Regex>

CliListening

ValheimCLI's line once its command server accepts connections.

public static readonly Regex CliListening

Field Value

Regex

RuntimeLoadFailures

Lines that mean the runtime's assemblies do not fit the game: a Startup pattern of Patterns (TypeLoadException, MissingMethodException, MissingFieldException: a leftover preloader patcher or a mod built for another game version) in a BepInEx warning, error or fatal line, or an exception line that starts with its name as Unity and .NET write it (System.TypeLoadException: ...); and ValheimCLI's packs reporting that its core never became ready ("CLI core 1.1 is not ready."). An info or debug line that only mentions an exception (a mod's handled soft dependency) does not count. Before ValheimCLI listens, all of them mean the run cannot work, so startup should end at once instead of at its deadline.

public static readonly IReadOnlyList<Regex> RuntimeLoadFailures

Field Value

IReadOnlyList<Regex>

StartupFailures

BepInExPluginLoadFailures and RuntimeLoadFailures: what the owned server and client startups fail on.

public static readonly IReadOnlyList<Regex> StartupFailures

Field Value

IReadOnlyList<Regex>

Properties

CliListeningWait

Waits for ValheimCLI's listening line somewhere CliLog cannot reach, such as a server host's log through IGameHost.WaitForLogAsync; it gets the time left and a token cancelled when the process exits first, and throws WaitFailedException or WaitTimeoutException as HostLogResult.EnsureMatched does. Used only without CliLog; after it, as after the local line, a failed connection is a fault.

public Func<TimeSpan, CancellationToken, Task>? CliListeningWait { get; init; }

Property Value

Func<TimeSpan, CancellationToken, Task>

CliLog

The log ValheimCLI writes to, normally the runtime's BepInEx/LogOutput.log. No connection is tried before Listening appears in it.

public string? CliLog { get; init; }

Property Value

string

FailureStates

public IReadOnlyList<string> FailureStates { get; init; }

Property Value

IReadOnlyList<string>

Failures

Lines in CliLog that end startup at once, for example a required plugin's load error.

public IReadOnlyList<Regex> Failures { get; init; }

Property Value

IReadOnlyList<Regex>

Listening

public Regex Listening { get; init; }

Property Value

Regex

ReadyStates

public IReadOnlyList<string> ReadyStates { get; init; }

Property Value

IReadOnlyList<string>

States

Opens a connection used only for state pushes, for example () => StateWait.Connect(host, port). Startup then waits for one of ReadyStates before the first readiness probe.

public Func<StateWait>? States { get; init; }

Property Value

Func<StateWait>