Jump to content

SpaceGod.Game/PROSE

From MindAttic Docs

SpaceGod and Prose (US-T171, US-T236)

SpaceGod keeps its story in Prose, the MindAttic narrative engine, through Prose's standard conduit (RFC 0017), the same one GridGame uses. Gameplay and story are separate:

  • The game owns the simulation and its facts: orbits, positions, stats, populations, cargo, ownership, histories, pilots' life events, and every entity's id. In Prose they are read-only canon; a change to them is a change to Core, re-exported.
  • Prose owns every word a player reads as story: descriptions, books and logs, barks, conversations. The author writes and approves them in Prose; the game only receives approved text. This repo never authors story: the files under Data/Lore are generated by the applier and never edited by hand (an edit belongs in Prose, and the next apply overwrites a hand edit and says so).
  • Gameplay never waits on story. The game builds, tests and plays with no text at all: a key with no text answers its placeholder.

The whole loop runs through Prose's consumer kit, invoked by path from the Prose checkout (nothing is vendored here), configured by Data/Prose/prose.config.json:

  SpaceGod Core ──mapper: tools/universe-export.ps1──> Data/Prose/spacegod.universe.json ──kit push --prune──> Prose 'spacegod'
  (simulation facts)                                    (gitignored, rebuilt from a seed)                     (entities + edges)
                                                                                                                    │
                                                    the author writes and approves texts in Prose (agents may only draft)
                                                                                                                    │
  the game (GameLore) <── Data/Lore/<kind>/<id>.json <──applier: tools/prose_apply.py── Data/Prose/pending/ <──kit pull──┘
                          (committed, generated)         kit apply records Data/Prose/applied.jsonl (committed)
$kit = 'D:\Projects\MindAttic\Prose\consumer-kit\kit.ps1'
& $kit push --map --prune   # export the galaxy, import it, retire what the game no longer has, diff and leak check
& $kit validate             # the universe file and any pending texts against Prose's schemas
& $kit pull                 # approved/published texts newer than applied.jsonl into Data/Prose/pending/
& $kit apply                # the applier writes Data/Lore; the kit records applied.jsonl and clears pending/
& $kit status               # the universe on the Hub, texts by kind and status, pending, last applied
& $kit outbox [--peek]      # drain the Prose Outbox for 'spacegod' into Data/Prose/outbox.jsonl

The kit needs Python 3.9+ on PATH; it talks only to the Prose Hub at http://127.0.0.1:5900 (writes with the X-Prose-Key header from %LOCALAPPDATA%\MindAttic\Prose\Settings.json), and starts the deployed C:\Apps\MindAttic\Prose\Hub.exe when the Hub is down. Nothing in the game's build or run needs Prose or the Hub: the committed Data/Lore files are what ships.

Files

Path What In git
Data/Prose/prose.config.json the kit config: consumer and universe spacegod, the mapper, the applier, the kinds SpaceGod uses (description, book, bark, conversation), the choice tags the game executes (section 5, "Encounters") committed
Data/Prose/spacegod.universe.json the mapper's output ignored (derived)
Data/Prose/pending/ pulled prose-text/1 texts waiting to be applied ignored
Data/Prose/applied.jsonl one line per applied text {id, version, hash, key, kind, status, appliedAt}, written by the kit committed (once there is one)
Data/Prose/outbox.jsonl, Data/Prose/.kit/ the drained Outbox journal; kit scratch (import exports, snapshots) ignored
Data/Lore/<kind>/<id>.json the applied texts the game loads (spacegod-text/1, section 4) committed

1. The mapper: the export

tools/universe-export.ps1 builds tools/universe-export/UniverseExport.cpp, a headless Core runner (no Unreal; it links the standalone SpaceGodCore.lib from tools/build-core.ps1, as the Bench does) and runs it:

  1. Galaxy::CreateDefault(2461324.0, seed): the galaxy exactly as the game and the Bench build it, at the Bench's fixed start date so the clock never enters into it, with Sol in focus.
  2. Runs it on for -Days (default 30) at coarse detail, so there is a little history: wrecks, derelicts, wars, grudges.
  3. Meets the pilot of every ship (Characters::Meet, as a hail does), which writes their past from the simulation's own history, and tells their life story with the template teller.
  4. Writes everything as one Universe Interchange file, Data/Prose/spacegod.universe.json, and checks it with tools/prose_manifest.py (below). The kit's validate, which push runs first, checks the rest of the contract against Prose's own docs/schemas/universe.schema.json.

The kit runs it as its mapper with -BuildCore -Days 730 (an incremental tools/build-core.ps1, so the exporter always links a lib built from the Core it compiles against; two years so the Society and Civilization cast has lived, US-T294). A push of a shorter run would prune the houses, citizens and organisations it lacks, and their texts would orphan.

Same seed and same build give the same file, byte for byte. The build hash (git rev-parse HEAD, +dirty when Core has uncommitted edits), the seed, start date and days are recorded in the file's top-level source block and in the spacegod-export-manifest entity, with the entity and edge counts, so it round-trips through Prose like any other entity. tools/prose_manifest.py checks those counts against the file and the source block against the manifest.

Why the file is gitignored. It is derived: Core plus a seed reproduce it in about ten seconds, and with many agents changing Core at once a committed copy would be stale after almost every commit (and is several megabytes). The reviewable, committed side of the contract is the generator, the kit config, applied.jsonl and the applied texts in Data/Lore.

Ids

Every id is a slug of the thing's name, prefixed by its type and qualified by its place, and contains only a-z, 0-9 and single hyphens: exactly the form Prose's own slugifier leaves unchanged, so Prose can never rename one (the EVE post-mortem's re-slugify bug). They never use pointers, list indices or counters, so they survive re-runs; two things that slug alike get -2, -3 in the order the seed finds them. Examples: star-system-... is system-alpha-centauri, planet-sol-earth, moon-sol-europa, settlement-sol-ceres-hub, ship-sol-sfs-resolute, pilot-tomas-brennan, faction-sol-federation, void-station-12, module-railgun, good-helium-three.

What is in it

Type (type) What
star-system every simulated system (position, holder, biome, discovery)
star, planet, dwarf-planet, moon, asteroid, barycentre, station every body of every simulated system, with its orbit
star (charted tag) every charted or undiscovered real star out to 100 ly not yet simulated
settlement, pirate-base colonies, stations, mining outposts; pirate havens
void-station every void station of the neighbourhood, with its plan: asteroid-field/ice-field, planetoid, sight, nebula, pirate-base, megastructure
nebula, ice-field, graveyard, derelict, derelict-station the space features of every place (US-T130/T131)
jump-gate, megastructure, gas-harvester gates, belt-works megastructures, and gas harvesters once US-T146 lands
ship every live ship in a system, in a gate or crossing deep space
character the named pilot of each ship, with traits, career, grudges and life story (Comms/Pilots)
missing-ship derelict hulls and distress calls, with lastKnown coordinates (galactic sector + offset, ly from Sol, system km)
wreck, rogue-planet, ice-body, relay, listening-post the deep-space objects between the stars
faction every polity: states, companies, free traders, pirate clans
technology, weapon, equipment research tracks and megastructure designs; the outfitting catalogue's modules and the weapon battle profiles
ship-class, ship-design every hull class and its designs
good, biome, manifest the traded goods, the ten biomes, the export's own record

Edges (relations[].kind): orbits, located-in, near, owns, holds, capital-of, occupied-from, crew-of, member-of, grudge-against (pilots' grudges and factions' grievances), rival-of, hostile-to, at-war-with, friendly-to, pact-<kind>, gate-link, bridges (void station to the systems it joins), has-biome, is-class, is-design, design-of, made-from, carries, stocks, yields, researched, built-to, last-seen-in, lost-to, on-route-from, bound-for. No relation points at an id outside the file (a dangling one would make Prose invent a stub entity); the exporter drops any it cannot resolve and says how many.

2. Pushing it: kit push --map --prune

  1. Runs the mapper, then validates the file (stable ids, no duplicates, no dangling relations, no reserved type, the schema).
  2. Imports it through POST /api/universes/spacegod/import in batches of 400 entities, as one import session (one session id on every batch, final=true on the last), so Prose sends one Outbox notice for the whole push.
  3. Prune (mode=replace, the config's default): at the final batch Prose retires every entity an earlier import brought in that the file no longer has (a pilot renamed because Core moved the run's history, a ship class removed). Retired means archived, never deleted; a later import of the same id revives it. Texts and entities Prose authored itself are never retired by an import. This replaces the old -AllowStale workaround: Prose and the file now hold the same live set.
  4. Round trip: exports the universe back with Prose's own exporter to Data/Prose/.kit/spacegod.prose-export.json and diffs it entity by entity, relation by relation; then pulls the Hub's graph view (/snapshot?scope=all) and runs the leak check, which fails on any node or edge that is not one of the file's (texts and retired entities are ignored). Prose's exporter now writes relations from its edge rows, so an import cut short shows in the diff.

The Hub's graph view still keys nodes by name (PRS-T916), so same-named entities (two pilots called alike, a hundred "Earth Orbital Cab"s) are one graph node there; the leak check compares in those terms.

The CLI does the same by hand: prose --universe-import D:\Projects\MindAttic\SpaceGod\Data\Prose\spacegod.universe.json --replace, prose --universe-export spacegod <path>.

3. Querying it from a session here

.mcp.json registers Prose's MCP server (Prose.Mcp, a Hub client, run from the sibling ../Prose checkout's Release build) with PROSE_UNIVERSE=spacegod. Use the RFC 0007 tools, which read the stored ids directly: get_universe_entity(slug: "spacegod", entitySlug: "pilot-tomas-brennan"), search_universe(slug: "spacegod", query: "Ceres"), export_universe_file. Prose's generic graph tools re-slugify names and are not reliable for interchange ids.

4. Prose to the game: texts

Writing and approving (in Prose, never here)

Texts are prose-text/1 documents (Prose's docs/schemas/prose-text.schema.json) authored against the universe's entities. SpaceGod uses four kinds:

Kind Payload In SpaceGod
description short?, long? a planet's, station's, faction's or ship class's blurb
book title, author?, pages[] a ship's log, a station's records
bark speaker, context?, lines[] a pilot's comms chatter
conversation title?, start, nodes[{id, speaker, line, next?, choices?}] a hail

Keys are the game's lookup handles: <entity-id> for an entity's description (planet-sol-earth), or <entity-id>/<name> for anything else about it (pilot-tomas-brennan/hail, ship-sol-sfs-resolute/log); spacegod or spacegod/<name> for a text about the universe as a whole. Text ids are Prose's kind-prefixed slugs (description-planet-sol-earth).

Lifecycle (Prose RFC 0009): draft -> approved -> published -> retired. Agents may draft; only the owner approves and publishes. An agent in this repo drafts through the CLI or MCP and stops there:

prose --texts-draft spacegod <file.json|folder>        # agent or owner: new draft (or a new draft version)
prose --texts-list spacegod --status draft             # what is waiting
prose --texts-get spacegod <id>                        # one text, every version
# The owner only:
prose --texts-approve spacegod <id>... --by <name>                         # approve (pullable)
prose --texts-approve-all spacegod --kind description --by <name> --dry-run  # see a bulk batch first
prose --texts-approve-all spacegod --kind description --by <name> --publish  # approve and publish a whole kind
prose --texts-publish spacegod --by <name> [ids...]                          # one texts.published Outbox notice
prose --texts-retire spacegod <id> --by <name>

(Known Prose bug PRS-T919: --texts-list ... --status all shows a retired text as published; list by a single status.)

Pulling and applying (here)

kit pull writes every approved or published text whose live version is newer than Data/Prose/applied.jsonl to Data/Prose/pending/<id>.v<version>.json; kit pull --status retired fetches retirements. kit apply runs the applier, tools/prose_apply.py, which for each pending text prints one JSON line ({"id", "version", "hash", "result", "note"}):

  • applied: written to Data/Lore/<kind>/<id>.json (new, updated, unchanged, or overwriting a hand edit, which the note says); a retired text's file is deleted. The kit records it in applied.jsonl and removes it from pending.
  • orphan: the key's entity is not in the universe file, so nothing in the game would look it up (a pilot the simulation renamed, say). It stays pending.
  • skipped: a kind SpaceGod does not use, a key another applied text already holds, or no universe file to check the key against (run kit map). It stays pending.

On stderr it reports how many universe entities still have no description (they keep their placeholder). Then commit Data/Lore and Data/Prose/applied.jsonl under the ticket that pulled them.

spacegod-text/1, the shape of every Data/Lore file, written only by the applier, UTF-8, two-space indented, LF, fields in this order:

{
  "schema": "spacegod-text/1",
  "id": "description-planet-sol-earth",
  "kind": "description",
  "key": "planet-sol-earth",
  "version": 2,
  "hash": "sha256:...",
  "about": ["planet-sol-earth"],
  "speakers": [],
  "payload": { "short": "...", "long": "..." }
}

Prose's bookkeeping (status, approvedBy, approvedAt) is left out, so a text going from approved to published unchanged writes the same bytes.

5. The game's side: LoreLibrary and GameLore

  • Core: Cpp/Source/SpaceGodCore/Lore/LoreLibrary.h reads a Lore folder: every <kind>/*.json of the four kinds, in ordinal path order, into a library ordered by key. Find(key), Short(key, placeholder), Long(key, placeholder), Lines(key) (a bark's lines or a book's pages), Keys(), Problems(). It never throws: a missing folder is an empty library, a key with no text answers the caller's placeholder, and a file that is not JSON, not spacegod-text/1, in the wrong kind's folder or a second file for a key is left out and listed in Problems(). No simulation code reads it, so the Bench digests and rewind are untouched by story.
  • Runtime: Cpp/Source/SpaceGod/GameLore.h loads the game's one library on first use, from SPACEGOD_LORE_DIR when set, else the package's Lore/ folder (tools/package.ps1 copies Data/Lore there; run.ps1 repackages when it changes), else the repo's Data/Lore (editor and uncooked runs). The console command sg.Lore lists what it loaded and sg.Lore <key> prints one text.
  • Tests: tools/test_prose_apply.py (python -m unittest tools/test_prose_apply.py) applies the fixture Cpp/Source/SpaceGodCore/Tests/Lore/fixture/pending and requires exactly the files in fixture/Lore, plus the orphan, skipped, retired, idempotent, hand-edit and dry-run cases; Tests/Lore/LoreLibraryTests.cpp (built and run by tools/build-core.ps1) loads fixture/Lore, fixture/LoreBroken and fixture/LoreSurfaces (test-only texts for the panel lookups, US-T237). Together they cover the return path from a pulled text to the game's lookup with no Hub and no approval.

Where the game shows texts (US-T237)

Every key is made by Core/Lore/LoreKeys (Slug, SystemSlug, System, Body, Settlement, Ship, Pilot, Named), which tools/universe-export itself calls, so a panel asks for exactly the id the export wrote. Each surface makes one lookup through GameLore (LoreShort, LoreLong, LoreBark); with no text it shows what it showed before.

Surface Key Form With no text
Scan panel (the selection card), a body's Overview tab (planet, moon, dwarf planet, asteroid, star, station body) <type>-<sys>-<name> long the catalogue summary
Scan panel, a settlement's subtab on its world (colonies, stations, outposts, havens), Overview tab settlement-<sys>-<name> long no line
Scan panel, a ship's Overview tab ship-<sys>-<name> long no line
Scan panel, a ship's Crew tab: its named pilot (once met at a hail or a fight) pilot-<name> short, after their styled name their styled name
Scan panel, a met pilot's subtab, Overview tab pilot-<name> long no line
Scan panel, every other tab <entity>/<tab> (section "Scan panels" below) long "No record on file."
Comms, an encounter's conversation <pilot>/encounter-<kind>, <faction>/encounter-<kind>, spacegod/encounter-<kind> (section "Encounters" below) conversation the plain comms panel
Galaxy map, a known system's detail system-<sys> short no line
Comms channel header, the party hailed (pilot or station) pilot-<name> / settlement-<sys>-<name> short no line
Comms, the answer to a hail bark <speaker>/hail, else any bark naming the speaker; then the hull's ship-<sys>-<name>/hail one line, picked from the pilot's seed and times hailed (a station: its key and the day); it replaces only the flavour, and the greeting's gameplay rider (CommsLine::Rider: a trader's cargo offer, a raider's demand) always follows it (US-T238) the generated greeting
Logs screen (Shift+L), a ship's log: recovered salvaging its derelict or wreck once nobody hostile is aboard, or taking it as a prize book ship-<sys>-<name>/log title, author, pages (section "Books" below) nothing recovered
Logs screen, a port's records: recovered when it clears you to dock book settlement-<sys>-<name>/records title, author, pages nothing recovered

Lore is display only: no simulation code reads it, and a hail's bark replaces only the logged words after Comms::Apply has done what the hail does. A key the game cannot rebuild never matches and keeps its placeholder: an entity the export suffixed (-2) because two things slug alike, the bodies of a void station, and orbital structures and docking rings (not exported). sg.LoreView [<body>] [shot <file>] [quit] selects a body and logs every lookup its card and its ports make; point SPACEGOD_LORE_DIR at a folder of test texts to see them on screen without approved lore.

Encounters (US-T239)

When the unit the SpaceGod holds hails someone, or a beaten hull hails it for terms, the game decides what kind of encounter it is from the simulation alone (Core/Lore/Encounters, KindOf) and looks for a conversation text for it. With none, the comms panel runs exactly as it always has.

Kind When
trader a civilian hull: merchant, courier, miner, independent
patrol a lawful warship (any navy that is not a pirate clan)
pirate a pirate clan's hull
distress a hull in trouble: dry tanks, pulled out of a lane and adrift, or in a battle the speaker is not part of
surrender a hull that has struck its colours to the speaker's side and hails for terms
station a settlement's traffic control
hail the generic hail: the last fallback of every kind

Keys, looked up in this order, the first conversation found wins:

  1. pilot-<name>/encounter-<kind>: one pilot's own (pilot-tomas-brennan/encounter-pirate), once the game knows the pilot;
  2. faction-<name>/encounter-<kind>: their faction's (faction-sol-federation/encounter-patrol);
  3. spacegod/encounter-<kind>: the generic one of the kind (spacegod/encounter-trader);
  4. spacegod/encounter-hail: the generic hail, for any kind.

Speakers. $them is whoever was hailed (or hails); $player (also $me, $hero) is the unit the SpaceGod holds. An entity id may also be a speaker in a pilot's own text. A node's line is said by its speaker; its choices are the player's answers. A node with no choices goes on to its next; with neither, the talk ends.

What the opening does. The start node's line is the answer to the hail: it stands in for the generated greeting, and the greeting's gameplay rider (a merchant's cargo offer, a raider's demand, US-T238) is still added after it. For a surrender the game's own line of terms is said first and the conversation follows.

Choices and tags. The text never decides an outcome. A choice that does something carries one of the tags below (the config's tags, so kit validate warns on any other): the panel offers it only while the game offers that verb (a crate to buy only when they carry cargo, terms only from a struck hull), and choosing it says the verb exactly as the panel's button would (Comms::Apply, the same command a co-op peer or replay runs). The player's line in the log is the choice's text; everything after it is the simulation's answer. A choice with no tag (or an unknown one) only moves the talk to its next. The panel always adds a last choice, "(other options)", back to the plain verbs.

Tag Game action (comms verb) Offered when
rumours ask what they have heard any hull or station not surrendering
advice ask about the area (contacts, bearings, threats) same
news ask the system's news same
trade ask to trade (their offer and price) anyone but a lawful warship
buy buy a crate of their cargo at their price they carry cargo and the speaker has a hull
story ask who they are (their life story) a hull
threaten demand their cargo or their life: they comply, run or fight a hull, from a hull
accept-surrender take what a struck hull offers a hull hailing for terms
plunder board and strip a struck hull same
let-go let a struck hull go same
refuse-surrender no quarter: the fight goes on same
sign-off close the channel always

There is no pay, fight, flee, bluff or comply tag because the game has no such comms action: paying off a raider, bluffing a patrol or complying with an inspection would be new game mechanics (a Core ticket), not text. Fighting or fleeing is done at the helm, not by a choice.

$outcome. A tagged choice whose next is $outcome goes to the node named after what the action came to: talked, complied, ran, fought, refused, traded, surrender-taken, no-quarter, plundered, let-go. With no such node the talk ends. $end (or any other $token, or no next) ends it. A threat answered with guns closes the panel and the hands go back to the helm, whatever the text says next.

Placeholders. Any line or choice may show these game values; the game fills them every time a line is shown. An unknown {name} is left as written, so a typo shows on screen.

Placeholder Value
{ship} their hull's name
{pilot} their pilot's styled name ("Pirate fighter Sefa Voss"), else "the captain of the <ship>"
{callsign} their pilot's callsign, or empty
{faction} their faction
{station} the station's name (a station encounter), else empty
{system} the system the talk happens in
{stance} how they feel about the speaker: friendly, neutral, wary, hostile
{range} how far they are, as comms says it ("320 klicks")
{cargo} their hold ("40 t of helium-3", "nothing")
{my-ship}, {my-pilot}, {my-faction} the speaker's hull, pilot and faction
{my-cargo} the speaker's hold
{credits} the speaker's credits ("12,400"): what a purchase is paid from
{entity:<id>} the entity's name when the game can resolve it (pilots met, factions, the active system's bodies, ports and hulls), else the id's words

Prices are not placeholders: the price is in the game's own answer to trade or buy, which follows the choice.

Scan panels (US-T239)

The selection card is a scan: a row of subtabs picks what it is about (a body and each discovered settlement on it; a ship and its named pilot once met) and a row of tabs picks the aspect. Each tab shows the simulation's numbers for it, which stay game-owned, then its narrative: one description text, shown long, else a placeholder.

Subject Tabs (id) The game's numbers on them
Star overview, history, notable photosphere, radius, mass, orbit, discovery
World (planet, moon, dwarf planet, asteroid) overview, industry, culture, history, notable overview: radius, mass, gravity, atmosphere, equilibrium temperature, orbit, day, habitable zone, a battle there; industry: docking rings, each settlement, population, who holds it
Station body the same as a world the same, without gravity and atmosphere
Settlement (its world's subtab) overview, industry, culture, history, notable overview: holder, population, migration, jobs, wage tax, defences; industry: companies, works (recipe, level, running), exports, shortages; culture: unrest; history: occupation, fallen
Ship (civilian) overview, cargo, crew, history, reputation overview: length, drive, propellant, status, hull, armament, damage; cargo: cargo, hold, paid, profit, owner; crew: aboard, boarders, its pilot; history: trips; reputation: the law's record
Warship (navy or pirate) overview, orders, crew, history, reputation orders: orders or bounty contract; reputation: the law's record, outlaw file
Pilot (the ship's subtab once met) overview, history, reputation overview: age, birthplace, faction, career and next step; history: ships flown, battles, robberies, salvage, their life as the simulation wrote it; reputation: renown, grudges, record

Keys (Core/Lore/ScanTabs::Key, every entity id from LoreKeys): the overview tab's narrative is the entity's own description, keyed by its id (planet-sol-earth, settlement-sol-ceres-hub, ship-sol-sfs-resolute, pilot-tomas-brennan), the same text US-T237 already shows; every other tab is <entity>/<tab> (planet-sol-earth/history, settlement-sol-ceres-hub/industry, ship-sol-sfs-resolute/reputation, pilot-tomas-brennan/history). A description's long is shown (else its short). With no text the overview shows what it did before (a body's catalogue summary, else nothing) and any other tab "No record on file." Orbital structures and docking rings keep their one-page card (not exported, no keys).

The numbers in Prose. The export carries what the scan shows, so a writer reads the player's numbers in the entity's details: bodies have a scan block (surfaceGravityG, atmosphere, equilibriumTempK, habitableZone) beside radiusKm, gmKm3S2, rotationHours and orbit; settlements add industry (recipe, level, utilisation per works), staffing, netMigrationPerDay and capital to population, owner, unrest, stockTonnes and the rest; ships add a scan block (hullClass, lengthKm, accelG, crew, marines) to class, cargo, faction; pilots already carry their career, traits, grudges and life story. The text may describe these; it must not contradict them, and the game never reads a number from text.

sg.ScanView [<body>] [ship] [tab <id>] [subtab <n>] [shot <file>] [quit] opens the scan on a body (or a hull) and logs every tab's key and what it found; sg.EncounterView [shot <file>] [quit] takes a helm, hails the nearest hull that is not hostile and logs the encounter kind and the conversation found. Tests/Lore/EncounterTests.cpp (built by tools/build-core.ps1) checks the tag vocabulary against this config, the lookup order, choices offered, $outcome, the placeholders, the tab keys and the scanner readings on the test-only fixture/LoreEncounters.

Books (US-T261)

A book is something the player finds and reads: a ship's log, a port's records. The game reads exactly two book keys, both made by Core/Lore/LoreBooks from LoreKeys:

Key Found Example
ship-<sys>-<name>/log salvaging the hull's derelict, or the wreck it left, once nobody hostile is left aboard; or taking it as a prize in a fight the player's hull is in ship-sol-sfs-resolute/log
settlement-<sys>-<name>/records docking at the port (Shift+M at a helm alongside it, with its clearance) settlement-sol-armstrong-station/records

Write title (the logs screen lists it; with none the game shows "Log of ..." / "Records of ..." and the entity's words), author if anyone signs it, and pages[], one screen each: the reader turns them with Left / Right. Blank pages are left out. No book, no item: a hull or port with no book (or one whose pages are all blank) gives the player nothing, never a placeholder. A recovered book is kept by key in the saved game (World::RecoveredLogs), so a later version of its text is what the player reads, and a retired text drops off the list. Like every other surface it is display only. Tests/Lore/EncounterTests.cpp pins both keys and the recovery rules on the test-only fixture/LoreBooks.

What to write first

  1. The four generic encounters, spacegod/encounter-trader, -patrol, -pirate and -distress, and the fallback spacegod/encounter-hail: every hail in the game reaches one of them.
  2. spacegod/encounter-surrender and spacegod/encounter-station.
  3. Overview descriptions of the places players see first (Sol's worlds and ports), then their history and culture tabs.
  4. Faction encounters (faction-<name>/encounter-patrol for each navy, .../encounter-pirate for each clan), then pilots players meet often.
  5. Records for the ports players dock at first, and logs for named hulls likely to end up derelict or taken.

Social narration (US-T274..US-T292)

The Civilization layer (Cpp/Source/SpaceGodCore/Systems/Civilization/) records what the galaxy's people do as structured SocialEvents and never as prose. The Narrator (Systems/Civilization/Narrator.h) words an event when it is shown. It uses the event kind's bark pool, else the built-in template, and picks the line by the event's seed, so every peer and every replay reads the same words. The events are saved and the words are not, so a newly approved pool rewords old events too. A notable event is also logged on its system for the news relays, in the template's words only (the simulation's state never depends on Prose). sg.Civ keys lists every key in game; sg.Civ shows the events.

Bark pools, one per kind, kind bark, key spacegod/social-<slug>, payload lines[] (one line is picked):

  • Society (US-T273), mirrored as events: birth, death, wedding, business-founded, bankruptcy, buyout, scandal
  • Persona (US-T275): friendship, rivalry, falling-out, mood
  • Kinship (US-T276): feud-declared, feud-sabotage, feud-ended, inheritance-dispute, house-split, affair, divorce, hidden-heir, graduation, school-founded, celebrity-rise, celebrity-scandal, endorsement
  • Politics (US-T277): ideology-shift, party-founded, election-called, election-won, election-rigged, coup, coup-failed, succession-crisis, trial-opened, verdict, judge-bribed, peace-summit, summit-failed, poll-published
  • Strife (US-T278): protest, riot, cell-formed, sabotage, uprising, spy-caught, pact-leaked, tech-stolen, war-weariness, conscription, peace-forced, mercs-hired, mercs-turned, admiral-rises, prisoners-exchanged
  • Underworld (US-T279): syndicate-rises, protection, smuggling-run, smuggler-caught, prison-opened, prison-break, assassination, assassination-foiled, fraud, fraud-exposed, crime-wave, crackdown
  • Commerce (US-T280): union-formed, wage-deal, strike-called, refugees, takeover, shares-crash, bank-founded, loan-default, bank-run, premiums-rise, ad-war, landmark-found, tourist-boom, patent-filed, patent-stolen
  • Culture (US-T281): faith-founded, conversion, schism, pilgrimage, holy-war, festival, match-played, match-rigged, championship, trend-sweeps, cultural-drift, monument-raised, chronicle, rumour, propaganda
  • Health (US-T284): outbreak, spread, quarantine, cured, hospital-built, medicine-shortage, baby-boom, ageing, disaster, relief, famine, food-aid
  • Press (US-T283): outlet-founded, slanted-story, board-post, investigation, journalist-silenced, charity-founded, donation
  • Witness (US-T292): world-conquered, world-liberated, world-ceded, world-seceded, world-fallen, world-devastated, war-declared, peace-made, pact-signed, pact-broken, pirate-hold, haven-stormed, pirate-raid, battle-fought, faction-fallen, mine-accident, blight, rationing, blockade, embargo

Witnessed events (US-T292). The galaxy runs whether or not anyone plays it: wars, conquests, pirate havens and market shocks happen in the Core simulation on their own. The Witness module (Systems/Civilization/Witness.h) runs first in the Civilization's day. It compares what Core shows against the day before and publishes each change as one of the kinds above. A market strike reuses strike-called. Every module's React then answers it the way it answers its own events. A conquered world turns on its new flag and grows a rebel cell, its firms are bought up or crash, and its people flee. A war calls up the reserves, moves the shares, heats the feuds across the two flags and starts the propaganda. A peace sends the prisoners home and fills the chronicles. A raid feeds the syndicates and raises the premiums. A blight brings famine and food aid. The SpaceGod's hand goes through the same events: a battle it flew in, a world taken by the polity it commands, or a war or pact that polity chose all arrive as ordinary witnessed events. Those events are marked Steered, and the people react to them as they would to any other. So these pools word the galaxy's own history and the SpaceGod's interference alike. Lines should read as the people's view of the event (a street, a newsroom, a family), not as the battle report the system log already carries.

The prefix spacegod/social- is the same for every pool, so feud-declared is spacegod/social-feud-declared. Lines may use these placeholders; one an event lacks reads as a plain noun ("someone", "a family"):

Placeholder What
{who}, {whom} the people in it (full names)
{house}, {otherhouse} "House <surname>"
{business} a family business
{org}, {otherorg}, {outlet} organisations (their Prose name, see below)
{world}, {system} the settlement and its star system
{faction}, {rival} the states in it
{money}, {amount}, {pct} the event's amount as credits, a plain number, or a percentage

Slant tags: spacegod/social-slant-for and spacegod/social-slant-against are short tails an outlet adds when it runs a story for or against {faction} (" A triumph for {faction}.").

Organisation names: spacegod/names-<kind> for each kind (party, faith, syndicate, union, bank, outlet, team, charity, mercenaries, school, agency, insurgents). A name pool's lines are names, picked by the organisation's seed; {world} and {house} are filled. With no pool the organisation keeps the name the simulation gave it.

The cast: tools/universe-export runs the Society and Civilization layers too (--society none leaves them out; pass -Days 730 or more so the people have lived a while). It exports houses (house-<surname>-<id>, type faction), their heads and famous members (citizen-<name>-<id>, character), every active organisation (org-<kind>-<name>-<id>, faction, with its nameKey), and one concept per event kind (social-<slug>, with its key and fallback lines) for Prose to draft from.

Drafted (US-T294): the 730-day galaxy (seed 1977, build 55291b2b0e21: 146 houses, 153 citizens, 78 organisations, 134 event concepts) is in Prose 'spacegod', and every pool above is drafted there for the owner to approve: all 134 spacegod/social-<slug> pools, both slant tails, the twelve spacegod/names-<kind> pools, and a description of each of the 78 organisations (keyed by its org-... id). Agents drafted them (draftedBy claude-US-T294, batches social-v2-US-T294 and social-witness-US-T294); none is approved yet, so the game still words every event from the templates. prose --texts-list spacegod --status draft shows them; the owner approves with --texts-approve-all spacegod --kind bark --by <name> --dry-run first.

What to write first: the kinds the feed shows most (birth, death, wedding, friendship, falling-out, board-post, protest, festival, match-played, trend-sweeps, rumour, propaganda), then the notable ones the relays carry (feud-declared, election-won, coup, riot, uprising, peace-summit, outbreak, quarantine, disaster, assassination), then the name pools for faiths, parties and teams.

6. The Outbox

kit outbox drains GET /api/outbox/spacegod (Prose's notices: one per import session, one texts.published per publish batch) into the gitignored Data/Prose/outbox.jsonl; --peek reads without consuming. The old spacegod-lore/1 proposal format and tools/prose-outbox.ps1 are gone (never used): story arrives as texts through kit pull.

7. What the interchange could not say (proposed Prose changes, US-T171)

# Proposed Status
1 Delete on re-import Done in Prose (PRS-T916/T917): mode=replace retires absent entities; kit push --prune
2 A provenance block Done: the file's top-level source (consumer, generator, build, seed, startJd, simDays), kept with the universe; the manifest entity keeps the counts
3 Typed relations (weight, since, note) Open: a rivalry's strength or a war's start still lives in details
4 Coordinates and units Open: positions and orbits are free-form details
5 Import cost Done: batched, transactional import sessions
6 The export did not read the edges Done: relations are exported from the edge rows
7 The graph merges same-named entities Open (PRS-T916): graph nodes are still keyed by name
8 Outbox noise Done: one notice per import session
9 Edge provenance per consumer Open (PRS-T916)

8. SpaceGod's own canon (US-T859)

SpaceGod is its own universe, set in 3026; its history and the rules for new canon are docs/HISTORY.md. Sol's Earth carries the Ascension Tether, "the Thread", raised from Isla Isabela in 2163-2191 and run by the Federation's Tether Authority (US-T459, Views/TetherView), and the Exclusion, the Biomass in the old south-east United States since the Carolina Fall of 2751 (US-T461, Views/EarthBiomassView, sg.EarthBiomass). The Biomass was met in 2734 at Barnard's Star; it comes from the dark between the stars, is minor and seemingly manageable, and is never given an origin. The mapper carries this as a universe rule and the concept-earth-biomass entity, and the manual's Bio Mass entry tells it.

Part of SpaceGod.Game.
From SpaceGod.Game/docs/PROSE.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.