Guide for finding and modifying landing events, narrative events, or system entry text in The Years Between the Stars. Use this skill whenever the user wants to add, change, or fix any kind of game event — landing encounters, event choices, event outcomes, faction-specific events, era-gated events, or the system entry narration text. Also covers lore integration — reading tone and canon files from story/ to keep events consistent with the game's world. Always invoke this when the user says things like "add a new event", "change what happens when you land", "add a choice to an event", "the event text is wrong", or any mention of events/encounters/narrative/lore/story/tone.
There are two types of narrative events:
engine/content/events/**/*.yaml — the primary source of truth. Event narrative, choices, effects, and conditions are authored in YAML files grouped by pool:
landing/asteroid_base/oort_cloud/maximum_space/triggered/system_entry/proximity_star/proximity_base/planet_landing/engine/src/content.rs — registers YAML files with include_str! for each pool. Edit this when:
engine/src/events.rs — selection/filtering only. Edit this when:
EventCondition behavior, trigger rules)engine/src/lib.rs — maps runtime context to an EventPool in get_game_event(). Edit this when:
src/ui/LandingDialog/LandingDialog.tsx — renders the event narrative and choice buttons. Edit here to:
src/game/GameState.ts — holds pendingGameEvent and processes player choices. Touch this when:
src/game/Game.ts — calls into the engine to fetch landing events when docking. Touch this when:
engine/src/types.rs defines the YAML schema:
GameEventEventChoiceEventMomentChoiceEffectEventConditionTrigger / TriggerFileTouch this file (plus TS bridge/state handling) only when adding new fields or effect/condition types.
src/ui/HUD/SystemEntryText.tsx — renders the staggered lines that appear on system entry. This is also where era-transition narration is displayed ("Centuries have passed...").
engine/src/lib.rs — build_system_payload() assembles system entry lines. Edit here to:
engine/content/events/system_entry/*.yaml — optional event-driven system-entry encounters selected via EventPool::SystemEntry.
The story/ directory contains the game's tone and canonical lore. Use it whenever writing or editing event text.
Before writing any event text, read story/universal_vibes.md. This is a mandatory first step — it defines the emotional register, vocabulary, and worldview that all narrative text must match.
When the event references a specific topic (e.g., "quasar war", a faction's history, a technology):
story/universal_truths/ and scan filenames for keyword matches.universal_vibes.md is the authority. The galaxy is alive and evolving, not a fallen world. Match the tone.universal_truths/ files as canon. Use specific names, dates, and details from them rather than inventing alternatives.{come up with X} or rough notes. Extract the intent behind them. Skip placeholders in event text, or ask the user what to fill in.Add a new landing event:
0. Read story/universal_vibes.md for tone; check story/universal_truths/ for relevant lore
engine/content/events/landing/engine/src/content.rs inside landing_events()npm run wasm:build (or cd engine && wasm-pack build --target web --out-dir pkg)cd engine && cargo test eventsAdd a new non-landing event (proximity/system entry/planet/triggered):
engine/content/events/<pool>/ directoryengine/src/content.rslanding, system_entry, proximity_star, proximity_base, planet_landing, triggered) via get_game_event()cargo test eventsChange event display layout:
src/ui/LandingDialog/LandingDialog.tsxChange era-transition narration:
engine/src/lib.rs — find build_system_payload()Add a new choice effect type:
engine/src/types.rs — add field(s) on ChoiceEffect and serde defaultseffectsrc/game/engine.ts — update TS type definitions if neededsrc/game/Game.ts and/or src/game/GameState.ts — apply the new effect in client state