Table of Contents

Class HostedCampaignPreparation

Namespace
Valheim.Testing.GameSessions
Assembly
Valheim.Testing.GameSessions.dll

One command's setup half: reviewed inputs become pinned, separate disposable server/client installs.

public static class HostedCampaignPreparation
Inheritance
object
HostedCampaignPreparation

Methods

Check(string)

Require the same shared preflight used by preparation, before any host is contacted.

public static void Check(string manifestFile)

Parameters

manifestFile string

CheckHostedPlan(string, IReadOnlyDictionary<string, ClientRunPlan>)

Stage-1 agreement of a plan with a campaign without a dedicated server (#258 step 8b), before any host is contacted: the campaign has no server and names its fixture world; the plan binds exactly the campaign's clients; exactly one of them hosts (hostWorld) and every other one is its peer (joinsHost); and each client's pins and launch arguments agree with its role as CheckPlan(string, ServerRunPlan, IReadOnlyDictionary<string, ClientRunPlan>) checks them. Every problem is reported at once.

public static void CheckHostedPlan(string manifestFile, IReadOnlyDictionary<string, ClientRunPlan> clients)

Parameters

manifestFile string
clients IReadOnlyDictionary<string, ClientRunPlan>

CheckPlan(string, ServerRunPlan, IReadOnlyDictionary<string, ClientRunPlan>)

Stage-1 agreement of a plan with the campaign, before any host is contacted: the campaign names the fixture world and direct-join address binding needs; the plan binds exactly the campaign's clients; every plugin the plan (or a client section) pins by hash is one its role's dependency lock selects, since binding replaces those pins with the selected files' own hashes and would otherwise drop one, and none it pins absent is selected; and no launch argument still holds an angle-bracket placeholder such as <fixture password>, and no client's launch arguments set the game's save directory (-savedir), since its character and hosted world are staged in the default one. Every problem is reported at once, after the campaign's own preflight (Check(string)) passed.

public static void CheckPlan(string manifestFile, ServerRunPlan plan, IReadOnlyDictionary<string, ClientRunPlan> clients)

Parameters

manifestFile string
plan ServerRunPlan
clients IReadOnlyDictionary<string, ClientRunPlan>

Inspect(string)

Report all independent local setup problems. This does not contact a host, lease an account or copy data.

public static CampaignPreflightReport Inspect(string manifestFile)

Parameters

manifestFile string

Returns

CampaignPreflightReport

InspectAsync(string, TimeSpan, Func<string, IGameHost>?, CancellationToken)

Read-only host readiness for a statically eligible campaign. Hosts are checked concurrently and every independent refusal is retained; preparation and launch repeat mutable checks after taking their leases.

public static Task<CampaignPreflightReport> InspectAsync(string manifestFile, TimeSpan timeout, Func<string, IGameHost>? hostFactory = null, CancellationToken cancellation = default)

Parameters

manifestFile string
timeout TimeSpan
hostFactory Func<string, IGameHost>
cancellation CancellationToken

Returns

Task<CampaignPreflightReport>

PrepareAsync(string, string, TimeSpan, Func<string, IGameHost>?, CancellationToken)

Prepare a hosted campaign: every actor gets an owned loader profile on its host; one that names no loader package runs on the pinned BepInExPack on Windows and Linux (#711), as the public InspectAsync checked.

public static Task<PreparedHostedCampaign> PrepareAsync(string manifestFile, string outputDirectory, TimeSpan timeout, Func<string, IGameHost>? hostFactory = null, CancellationToken cancellation = default)

Parameters

manifestFile string
outputDirectory string
timeout TimeSpan
hostFactory Func<string, IGameHost>
cancellation CancellationToken

Returns

Task<PreparedHostedCampaign>