Reusable PowerShell 7 tooling for authored Sea Power campaigns. The commands are intentionally campaign-neutral: all package paths, localization, briefing layout, and campaign-specific validation policy come from a versioned manifest.
From a campaign repository root:
pwsh -NoProfile -File .\tools\sea-power-campaign-tools\scripts\Generate-SeaPowerBriefings.ps1 `
-RepoRoot . -Config .\.campaign-tools\campaign.json
pwsh -NoProfile -File .\tools\sea-power-campaign-tools\scripts\Generate-SeaPowerBriefings.ps1 `
-RepoRoot . -Config .\.campaign-tools\campaign.json -Check
pwsh -NoProfile -File .\tools\sea-power-campaign-tools\scripts\Invoke-SeaPowerCampaignValidation.ps1 `
-RepoRoot . -Config .\.campaign-tools\campaign.json -GameRoot 'C:\Program Files (x86)\Steam\steamapps\common\Sea Power'
pwsh -NoProfile -File .\tools\sea-power-campaign-tools\tests\Test-SeaPowerCampaignTools.ps1 `
-RepoRoot . -Config .\.campaign-tools\campaign.json-Check is read-only and reports generated XML or localized INI drift.
-GenerateXml writes briefing XML while leaving mission INIs unchanged. The
validator skips installed-unit ID checks with a warning when -GameRoot is
missing.
The manifest is JSON with schemaVersion: 1. See
schema/campaign-manifest.schema.json for the complete contract and
examples/minimal-campaign.json for the smallest useful configuration.
Required top-level values are campaign, locales, and briefing. The
campaign object resolves package paths relative to the manifest and contains
an ID, display name, campaign root, metadata path, campaigns root, and INI
filename. briefing supplies the authored content JSON, path pattern, required
fields/headings, localized labels, section fields, and XAML roots/namespaces.
The optional validation object holds campaign-specific declarative rules:
operation/event expectations and graph policy, dynamic-roster and formation
policy, player-slot continuity/replenishment, variable naming, environment
date bounds, optional inventory checks, and installed-game unit-ID policy.
Omitted optional rules disable only those checks.
The briefing content source is a JSON object with schemaVersion: 1, a
locales list matching the manifest order, and a missions array. Each record
has a unique file stem and code, plus a briefings object keyed by locale;
each locale supplies every manifest requiredFields. The fixture command
checks this contract before exercising the validator and generator.
- Add this repository as a Git submodule (for example,
tools/sea-power-campaign-tools) and pin it to a reviewed commit. - Add
.campaign-tools/campaign.jsonand its briefing content JSON. - Populate paths and policies using the manifest schema.
- Run the briefing check, validator, and fixture tests from the campaign root.
The toolkit contains no campaign art, mission content, or generated package assets.
