Phase 19 — onboarding: hint tour + Help modal + tooltip pass

Three-agent fan-out (gdscript-refactor x3) ships the chosen Phase 19
approach: contextual hints during first session + a Help reference,
plus a sweep of hover tooltips for desktop discoverability.

- HintSystem (autoload) + HintOverlay (layer 22 top-center banner):
  7-step tour gated on player events — welcome (boot+2s), pawn select,
  build drawer open, stockpile painted, work matrix open, day_ended,
  tour_complete. Per-hint dismissals persist as Array[String] in
  GameState.settings['dismissed_hints']. Max-3 FIFO queue if hints
  chain. Reduce-motion path snaps in/out instead of tweening.
  Reset_tour() public API for the Help modal.

- HelpModal (layer 20): 5-tab static reference (Controls / Verbs /
  Priorities / Storyteller / Tips). Opens via EventBus.help_requested,
  dimmed backdrop, X/Esc/backdrop-tap dismiss. SettingsMenu gains an
  'Onboarding' section: Show-hints checkbox, Help button (emits
  help_requested), Reset hints button (calls HintSystem.reset_tour with
  has_method guard). Pre-existing 'W' keybind reference fixed to 'P'.

- Tooltip pass: tooltip_text via Strings.t on every TopBar button
  (10 buttons incl. speed shortcuts), BuildDrawer FAB, and every tool
  button in BuildDrawer (21 tools). _add_tool_btn extended with optional
  tooltip param. ~34 new tooltip.* string keys.

Contracts pre-written (Opus): EventBus.help_requested, hint_dismissed,
ui_panel_opened signals; GameState show_hints + dismissed_hints
defaults; BuildDrawer.open + WorkPriorityMatrix.open emit
ui_panel_opened so HintSystem can subscribe via one signal.

Also recorded [MED] known bug in memory.md: drag-paint with active
paint tool is eaten by camera drag-pan.

MCP runtime verified: welcome banner fires 2s after boot, dismiss
queues build_drawer hint on next ui_panel_opened, dismissed_hints
persisted as ['welcome'], HelpModal opens via help_requested with
tab switching working (Controls → Tips verified visually).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-16 17:36:18 +01:00
parent bba1ce4334
commit 59ca6ba9c5
16 changed files with 844 additions and 22 deletions

View file

@ -261,6 +261,72 @@ const TABLE: Dictionary = {
&"item.armor": "Armor",
&"item.corpse": "Corpse",
&"item.ash": "Ash",
# Phase 19 — Onboarding hint tour.
&"hint.welcome": "Welcome to your settlement. Drag to pan the camera, scroll or pinch to zoom.",
&"hint.pawn_select": "Tap a pawn to open their detail panel — HP, hunger, mood, skills, and work priorities.",
&"hint.build_drawer": "The Build drawer has four tabs: Designate orders, Build structures, paint Stockpiles, or Cancel a tool.",
&"hint.stockpile_painted": "Tap your new stockpile to set its accepted items and priority. Pawns will haul matching items here.",
&"hint.work_matrix": "Work priorities go 0 (off) to 4 (urgent). Pawns pick the highest-priority work they're capable of.",
&"hint.day_ended": "Day ends at dusk. Sleep, mood, and weather all carry into the next day. Plan ahead.",
&"hint.tour_complete": "Tour complete. Find more in Settings → Help anytime.",
&"hint.got_it": "Got it",
# Phase 19 — Help modal content.
&"ui.help.title": "Help",
&"ui.help.close": "X",
&"ui.help.tab.controls": "Controls",
&"ui.help.tab.verbs": "Verbs",
&"ui.help.tab.priorities": "Priorities",
&"ui.help.tab.storyteller": "Storyteller",
&"ui.help.tab.tips": "Tips",
&"help.controls.heading": "Camera & Selection",
&"help.controls.body": "Drag with mouse or finger to pan the camera.\nScroll wheel or pinch to zoom.\n\nWASD or arrow keys also pan; + / - zoom; Home or C re-centers.\n\nTap a pawn, workbench, or stockpile to open its detail panel.\nRight-click or Escape deselects.\n\nB toggles the Build drawer.\nP opens the Work priority matrix.\nL opens the Alerts log.\n, opens Settings.",
&"help.verbs.heading": "Player Verbs",
&"help.verbs.body": "Designate - orders pawns to chop trees, mine rocks, dig graves, prevent roofing, or plant new trees.\n\nBuild - queues construction: walls, floors, doors, beds, torches, crates, workbenches, and quarries.\n\nStockpile - paints a zone where items get hauled. Each zone has a filter (which item types) and a priority.\n\nCancel - clears a tool selection or pending designation.",
&"help.priorities.heading": "Work Priorities",
&"help.priorities.body": "Each pawn has priorities (0-4) per work category. The Work matrix grid lets you tune them.\n\n0 = Off. Pawn won't do this work.\n1 = Background. Only if nothing else fits.\n2 = Low.\n3 = Normal (default).\n4 = Urgent. Drops other work to take this.\n\nNeeds (rest, eat, sleep) always run regardless - you can't starve a pawn by setting priorities.",
&"help.storyteller.heading": "Storyteller Events",
&"help.storyteller.body": "Each in-game day at 6 AM the Storyteller may roll an event. Categories include nudges (gentle hints), threats (wolves, raids), wanderers (recruit offers), seasonal beats, disease, resource booms, lore, and milestones.\n\nThreat events auto-pause the sim and show a modal with a choice. Other events show a banner that fades in a few seconds.\n\nThe Storyteller's tension rises and falls based on what happens to your colony - calmer when nothing has happened recently, escalating after kills, damage, or near-misses.",
&"help.tips.heading": "Early-game Tips",
&"help.tips.body": "Build at least one bed and one wall before nightfall - pawns sleep on the ground and grow tired, and wolves come at night.\n\nKeep beds indoors (under a roof). Rain and cold ruin sleep quality.\n\nPaint a stockpile early - items left on the ground decay (corpses, food) or just clutter the map.\n\nWatch tension. If it climbs, slow down and reinforce. The Storyteller is reactive - give it nothing to react to and it stays quiet.\n\nFood priority order: Meal > Bread > Vegetable / Grain / Strawberry > raw Wheat. Cook before eating raw.",
# Phase 19 — Onboarding section in SettingsMenu.
&"ui.settings.section.onboarding": "Onboarding",
&"ui.settings.show_hints": "Show hints (first session)",
&"ui.settings.help": "Help",
&"ui.settings.reset_hints": "Reset hints",
&"ui.settings.hints_reset": "Hint tour reset. Welcome banner will reappear shortly.",
# Phase 19 — Hover tooltips for desktop discoverability.
&"tooltip.pause": "Pause sim (Space)",
&"tooltip.speed_normal": "Normal speed (1)",
&"tooltip.speed_fast": "Fast speed (2)",
&"tooltip.speed_ultra": "Ultra speed (3)",
&"tooltip.save": "Save game",
&"tooltip.load": "Load game",
&"tooltip.settings": "Open Settings (,)",
&"tooltip.build": "Open Build drawer (B)",
&"tooltip.work": "Open Work priorities (P)",
&"tooltip.log": "Open Alerts log (L)",
&"tooltip.fab_build": "Toggle Build drawer (B)",
&"tooltip.tool.chop": "Order pawns to chop selected trees for wood",
&"tooltip.tool.mine": "Order pawns to mine selected rocks for stone / ore",
&"tooltip.tool.dig_grave": "Mark a tile for grave digging",
&"tooltip.tool.no_roof": "Prevent auto-roofing on selected tiles",
&"tooltip.tool.plant_tree": "Plant a sapling (1 wood)",
&"tooltip.tool.build_wall_stone": "Build stone wall",
&"tooltip.tool.build_wall_wood": "Build wood wall",
&"tooltip.tool.build_floor_wood": "Build wood floor",
&"tooltip.tool.build_floor_stone": "Build stone floor",
&"tooltip.tool.build_door": "Build a door",
&"tooltip.tool.build_crate": "Build a storage crate",
&"tooltip.tool.build_bed": "Build a bed",
&"tooltip.tool.build_torch": "Build a torch",
&"tooltip.tool.build_workbench_carpenter": "Build a carpenter's bench",
&"tooltip.tool.build_workbench_smelter": "Build a smelter",
&"tooltip.tool.build_workbench_millstone": "Build a millstone",
&"tooltip.tool.build_workbench_hearth": "Build a hearth",
&"tooltip.tool.build_workbench_cremation_pyre": "Build a cremation pyre",
&"tooltip.tool.paint_quarry": "Paint a quarry on a stone outcrop",
&"tooltip.tool.paint_stockpile": "Paint a stockpile zone",
&"tooltip.tool.graveyard": "Paint a graveyard zone",
}