From 35bae586b418fbd908b2f25e044aa6d5d9469f2b Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Fri, 9 Oct 2026 17:56:13 -0400 Subject: [PATCH] feat(wiki): add welcome-to-the-unit starter guide Seed a new 'Welcome to the Unit' documentation page that anchors the wiki 'Start here' strip. seedDocumentation flags it featured at order 1 (idempotent; Game Masters can re-feature other pages between runs). --- .../seed/documentation/welcome-to-the-unit.md | 48 +++++++++++++++++++ src/tools/seed/seedDocumentation.ts | 28 +++++++++++ 2 files changed, 76 insertions(+) create mode 100644 src/tools/seed/documentation/welcome-to-the-unit.md diff --git a/src/tools/seed/documentation/welcome-to-the-unit.md b/src/tools/seed/documentation/welcome-to-the-unit.md new file mode 100644 index 00000000..c8dfc959 --- /dev/null +++ b/src/tools/seed/documentation/welcome-to-the-unit.md @@ -0,0 +1,48 @@ +# Welcome to the Unit + +New to Polaris Task Force? This page is the front door: what we play, how an operation runs, and where to read next. Skim it once, then follow the links that matter to you. + +## What we play + +Polaris Task Force is an Arma 3 unit with a persistent campaign world. Two rhythms drive it: + +- **Main operations** are scheduled missions with briefings, role sign-ups, and full attendance tracking. They move the campaign story forward. +- **Friday side ops** are community-run smaller operations: looser, flexible, and a great way to get seat time and try new things. + +This website is the shared back office for all of it: missions, roster, logistics, banking, a player market, the world map, and the written history of everything that happened. + +## First steps + +1. **Set up your profile.** Your account page covers display name, preferences, and linking your Discord so mission notifications and RSVP buttons reach you. +2. **Look at the next op.** The dashboard and the mission pages show what is coming. RSVP yes, tentative, or no from the mission page or the Discord poll; both stay in sync. +3. **Sign up for a role if one catches your eye.** Missions list their provided roles with slots. Roles can require a minimum rank or a qualification; sign-ups run first-come, and a waitlist slides people up automatically when a holder drops out. +4. **Show up on comms.** Details (times, channels, modset) live on the mission page and its announcement posts. + +## How an operation runs + +A mission starts as **Scheduled** with a classification: map, start time, expected duration. When the window passes, the site marks it **Active** and later **Completed** on its own. After an op you can rate your leadership (and, if you led, your subordinates), and the story of what happened ends up in the Chronicle and the event log. + +## Learn the world systems + +The campaign has a working economy and infrastructure that players interact with. Each of these has a full guide: + +- [[The Map]]: the shared theater view: structures, roads, zones, resource nodes, and live shipments. +- [[Shipments]]: moving resources between bases, by road or air, with fuel and transit times. +- [[Logistics and Storage Rules]]: what each base can hold, whitelist modes, and per-item caps. +- [[Base Management]]: staffing, salaries, upkeep, upgrades, and modules. +- [[Banking]]: personal wallets, the unit treasury, deposits, withdrawals, transfers. +- [[Market and Negotiation]]: buying and selling gear, including haggling with NPC vendors. + +## Writing your own pages + +Any member can write here. The editor takes markdown with live preview, supports linking to other pages by wrapping their title in double square brackets, and has a formatting toolbar plus keyboard shortcuts (Ctrl/Cmd+B bold, Ctrl/Cmd+K insert wikilink). The [[Example Wiki Article]] page demonstrates every styling trick the wiki supports; use it as a reference. Pages get categories and tags so they stay findable; the Documentation category itself is maintained by admins. + +## House terms + +- **Main op / side op**: the weekly scheduled operation vs. the community Friday event. +- **FNG**: new folk, you, for now. You earn XP and rank up from activity. +- **Qualification**: a profile flag that opens division features (for example logistics or intelligence) to a member. +- **Manager**: shorthand for admin, developer, or logistics-qualified member, used by the banking and base systems. +- **Chronicle**: the running narrative archive of after-action write-ups. + +Questions on any of this? Ask in Discord, or edit a page and make the answer easier to find next time. That is the whole point of a field guide. diff --git a/src/tools/seed/seedDocumentation.ts b/src/tools/seed/seedDocumentation.ts index 6f81cd0f..73d32f09 100644 --- a/src/tools/seed/seedDocumentation.ts +++ b/src/tools/seed/seedDocumentation.ts @@ -19,6 +19,9 @@ interface DocFile { body: string; } +/** The starter guide anchors the wiki index "Start here" strip at position 1. */ +const STARTER_GUIDE_SLUG = "welcome-to-the-unit"; + function parseDocFile(fileName: string, raw: string): DocFile { const normalized = raw.replace(/\r\n/g, "\n").trim(); const match = /^# (.+)$/m.exec(normalized); @@ -88,6 +91,31 @@ for (const fileName of fileNames) { } } +// Keep the starter guide featured first in the index strip (idempotent; GMs +// can re-feature other pages between runs, this file just guards the anchor). +const starterResult = await payload.find({ + collection: "wiki-pages", + where: { slug: { equals: STARTER_GUIDE_SLUG } }, + limit: 1, + depth: 0, + overrideAccess: true, +}); +const starter = starterResult.docs[0]; +if (!starter) { + payload.logger.warn( + `[seed-documentation] starter guide page not found (slug: ${STARTER_GUIDE_SLUG}); expected documentation/welcome-to-the-unit.md`, + ); +} else if (starter.curation?.featured !== true || starter.curation?.featuredOrder !== 1) { + await payload.update({ + collection: "wiki-pages", + id: starter.id, + data: { curation: { featured: true, featuredOrder: 1 } }, + overrideAccess: true, + depth: 0, + }); + payload.logger.info(`[seed-documentation] featured starter guide: ${starter.title}`); +} + payload.logger.info( `[seed-documentation] done: ${created} created, ${updated} updated, ${unchanged} unchanged (${fileNames.length} files).`, );