Commit graph

46 commits

Author SHA1 Message Date
c5f0597d42 Remove unused items 2026-03-15 20:29:18 +01:00
f9b44975ce Balance and prehistoric tweak 2026-03-15 20:28:12 +01:00
2e68e541ba Fix next-step hints: cryptic destiny hint, hide completed adventures count
- Don't show "Adventures: 9/10" when all unlocked adventures are done
  (the 10th is Destiny which isn't unlocked yet, confusing the player)
- Only show adventure count when there are incomplete unlocked adventures
- Replace misleading "complete all adventures" destiny hint with a
  cryptic "keep opening boxes" hint (Destiny unlocks via box_endgame drop)
2026-03-15 20:25:39 +01:00
d079faa2e6 Stop meta box drops when all unlocks obtained, add next-step hints
- BoxEngine: treat meta box chain items as "already obtained" when
  the entire meta unlock sequence is complete, preventing useless
  box_meta_mastery drops that only contain more boxes.
- Add progression hints under completion tracker showing lore fragment
  count, adventure completion count, and a teaser for the final adventure.
2026-03-15 20:00:47 +01:00
a8d2903b94 Translate crafting workstation names in UI
Workstation names were displayed as raw enum values (e.g. EngineerDesk).
Add 32 workstation.* localization keys in both fr/en and use them in
CraftingPanel and the craft.started event message.
2026-03-15 19:25:05 +01:00
75797ffc24 Fix unescaped quotes in space adventure script
Loreline parser choked on literal " characters in dialogue text,
causing "Expected identifier after '.'" at runtime. Escape all 8
occurrences with \" to match the convention used in every other .lor file.
2026-03-15 19:20:23 +01:00
671aa30409 Defer feedback messages to display after loot reveal
Move MessageEvent, AdventureUnlockedEvent and LootTableModifiedEvent
rendering after the loot table so players see their items first,
then contextual feedback like key hints and adventure unlocks.
2026-03-15 18:47:31 +01:00
41bfb54a2c Implement chain reaction system replacing simple auto-activation
Redesign the interaction mechanic into a recursive chain reaction system
where items can trigger cascading reactions. Keys now open themed chests
which produce items that may trigger further reactions, with chain bonus
rewards for multi-step chains (x2/x3/x4+).

- Add 6 themed chests + mysterious chest + alchemist stone catalyst
- Rewrite InteractionEngine with recursive chain loop (max depth 10)
- Add ConsumeTrigger field to InteractionRule for catalyst support
- Add ChainBonusEvent and enrich InteractionTriggeredEvent with context
- Update rendering to show both reacting items and chain indicators
- Add item descriptions with anticipation hints for chain partners
- Update GDD Section 5 with full chain reaction specification
2026-03-15 18:43:42 +01:00
bc1857a6ae Fix interaction context and adventure character name translation
- Interaction messages now show which item triggered them (e.g., "You use
  Golden Key — the key fits!") instead of appearing without context.
- Adventure character names are resolved from their Loreline script name
  field before localization lookup, fixing IDs like "knight" showing
  instead of translated names like "Sire Boîtalot".
2026-03-15 17:50:02 +01:00
1b6b635335 Add Windows launcher scripts and include them in publish output
LaunchOpenTheBox.cmd + Launch.ps1 set UTF-8 encoding, window title,
and error feedback. Fallback chain: Windows Terminal → pwsh → powershell → cmd.
Scripts are auto-copied to publish root via the csproj.
Also adds builds/ to .gitignore and updates README distribute section.
2026-03-15 17:42:44 +01:00
4d8d5224e1 Complete TODO.md: remove event log, retouch Space adventure, add character name translation
- Remove ChatPanel/EventLog entirely (UIFeature, GameState, MetaEngine,
  SpectreRenderer, Program, ChatPanelTests, meta_chat item/box/strings)
- Retouch Space adventure: expand AlienEncounter with 3 proper endings
  (RareBoxStory, AlienTrade, BoxContest with flair secret branch),
  expand SpaceExploration with fuel-gated choices and deeper branching
- Add (NOUVEAU/NEW) prefix to adventure action when no adventure completed
- Translate character names via localization keys (character.* in en/fr.json)
- Replace hardcoded "(unavailable)" with localized hint or fallback text
- Fix snapshot path to use CallerFilePath instead of fragile ../ chain
- Add Workstations summary section to item_utility_report.txt
2026-03-15 17:08:46 +01:00
006ef1f94a TODO and adventures improvements 2026-03-15 15:59:45 +01:00
001f682320 Show unlocked workstations permanently in Atelier panel with idle indicator
Workstations now appear as soon as they are unlocked, not only when a job
is active. Idle stations display a waiting-for-ingredients status (/~).
Add craft.idle localization key and update empty message to "no workshops
unlocked".
2026-03-15 15:27:02 +01:00
e3aa4cbfe7 Fix snapshot path to repo root and add workstation info to utility report
Snapshot now writes to tests/snapshots/ at repo root instead of the test
bin output directory, so it can be committed and diffed across changes.

Crafting entries now show the workstation (e.g. "@ DrawingTable") for both
ingredients and outputs. Removed timestamp from report header to keep
snapshots stable across runs.
2026-03-15 15:09:56 +01:00
7a854ccc15 Remove 6 unused resource types and add item utility snapshot test
Strip Health, Mana, Food, Stamina, Oxygen, Energy — only Gold and Blood
remain as they serve as adventure gates (Contemporary ≥30, DarkFantasy ≥20).
Remove 22 orphaned items, 5 recipes, and the AlchemyTable workstation.
Replace energy_cell in rocket_boots recipe with cosmic_shard.
Change box_endgame condition from AllResourcesVisible to BoxesOpenedAbove:500.

Add ItemUtilitySnapshot test that maps every item to its usage contexts
(loot sources, crafting, interactions, adventures) and generates a report.
DEBUG overwrites the snapshot; RELEASE asserts no changes.

Update specifications.md and CLAUDE.md to reflect resource cleanup.
Remove obsolete bugs.md and refactoring_plan.md.
2026-03-15 15:05:45 +01:00
c8961830bb Implement TODO.md: inventory UX, ephemeral items, category names, launcher
- Inventory panel: expand to full width, fix layout with long descriptions
- Compact inventory: show category summary instead of item list
- Detail panel header: show full category name instead of generic "Details"
- Material description: show "Crafting material — Raw" instead of repeating name
- Equipped indicator: use > fallback instead of ✓ on non-UTF8 terminals
- Fortune cookies and music: consumed immediately on receipt (ephemeral)
- Remove inline resource summary after box opening (not useful)
- Add localized category names (EN + FR) for 16 item categories
- Add OpenTheBox.cmd launcher for Windows Terminal / PowerShell / cmd
- Update TODO.md with characteristics report
2026-03-14 22:25:20 +01:00
240989e0ff Add UTF-8 detection with ASCII fallback for terminal compatibility
- Detect Windows Terminal (WT_SESSION), PowerShell, and non-Windows
  terminals to enable UTF-8 output encoding automatically
- Use ★ and → when UTF-8 is supported, fall back to * and -> on cmd.exe
- Set Console.OutputEncoding = UTF8 at startup for capable terminals
2026-03-14 20:46:33 +01:00
af13380a26 Defer interaction messages after loot reveal and replace Unicode with ASCII
- Collect InteractionTriggeredEvent during box opening and display them
  after the loot reveal sequence for better context
- Replace ★ with * and → with -> for cmd.exe compatibility (CP437)
- Remove emoji (🧪📜) from event log entries
2026-03-14 20:43:30 +01:00
83270ed4a0 Implement TODO.md: deterministic meta order, pity system, UX fixes
- Play time tracking: accumulate TotalPlayTime each game loop iteration
- Return to menu: split _running into _appRunning/_gameRunning so quit
  returns to main menu instead of exiting the app
- Deterministic meta unlock order: ArrowKeySelection first (accessibility),
  then TextColors, AutoSave, InventoryPanel, etc. (13-step sequence)
- Merge KeyboardShortcuts into ArrowKeySelection
- Meta box pity system: guarantee a meta box every 10 openings
- Inventory flickering: buffer-based rendering with ANSI cursor repositioning
- Non-readable symbols: use ASCII abbreviations instead of emoji in footer
- Resource/stats confusion: rename Resource Panel to Characteristics Panel
  in all user-facing text (EN/FR), update specs and descriptions
- Block consumable use before inventory panel unlock
- Remove obsolete proposal/suggestion files, clean up Spectre-only renderer
2026-03-14 20:21:18 +01:00
92ce67684d Fix test for early-game box counter and add refactoring plan
Update ShowGameState test to expect box counter output (added in
proposals_2.md). Add refactoring_plan.md documenting Black Box Sim
pattern violations and prioritized fixes.
2026-03-14 09:56:53 +01:00
6e5bc6e35e Implement proposals_3.md: box rarity fix, ASCII categories, separators, crafting hints
- Fix box rarity display to use box definition rarity in detail panel
- Replace emoji category icons with ASCII abbreviations (BOX, CSM, MAT, etc.)
- Add category separator rows between groups in non-compact inventory
- Show equipped/not equipped status for cosmetic items
- Show crafting recipe hints for materials when workstations are unlocked
- Add rarity stars (★) in loot reveal table for Rare+ items
2026-03-14 09:40:49 +01:00
7b3a3d5a58 Implement proposals.md + proposals_2.md: adaptive UX, early-game feedback, TUI default
- Adaptive welcome message based on progression (50/200/500 boxes thresholds)
- Raw inventory display before InventoryPanel unlock (plain text list)
- Terminal.Gui as default mode (--classic flag for old sequential renderer)
- Early-game box counter before StatsPanel unlock
- Encouraging messages in empty ResourcePanel and locked panel placeholders
- Wider inventory name column (28 chars), cookie detail/consume, box teaser
- Richer StatsPanel with items discovered and play time
2026-03-14 09:33:47 +01:00
576a23d540 upgrade descriptions 2026-03-14 08:56:22 +01:00
d501639756 Polish localization, name truncation, adventure tokens, consume feedback, column headers
- Localize box names and rarity in PlaythroughCapture test events
- Fix name truncation to account for 2-char prefix (► /  ) in inventory table
- Add AdventureToken detail panel showing linked adventure name
- Show remaining quantity after consuming an item
- Localize inventory column headers (Nom, Rareté, Qté in FR)
2026-03-13 23:47:12 +01:00
04ee449f74 Localize loot rarity, material forms, compact footer, rapid consume, meta descriptions
- Localize rarity labels in loot reveal and event log (Commun, Rare, Épique…)
- Add localized material form names (Lingot, Planche, Poudre, Gemme…)
- Show category summary footer in compact inventory (📦3 🧪5 📜2 👗12 🔩8)
- Remove WaitForKeyPress after consuming items for rapid multi-use
- Add description keys for all 14 meta items explaining their unlocked feature
2026-03-13 23:42:51 +01:00
71a35cd19d Improve inventory UX: localized names, smart sorting, icons, box details, lore progress
- Resolve box names via BoxDefinition.NameKey instead of showing raw IDs
- Reorder inventory categories: Box → Consumable → Lore → Cosmetic → Material → Meta
- Replace English category/rarity text with emoji icons and localized rarity labels
- Show box description in detail panel when selecting a box item
- Add lore collection progress counter (N/10) in lore fragment detail panel
- Add FR rarity translations (Commun, Peu commun, Rare, Épique, Légendaire, Mythique)
2026-03-13 23:36:50 +01:00
930128a766 Implement interactive inventory, event log, and UI improvements (proposals 1-11)
- Reorder meta unlocks for better early-game pacing (visual panels first)
- Portrait always visible, cosmetics shown only when panel unlocked
- Auto-equip first cosmetic of each slot
- Transform ChatPanel into event log with localized title
- Compact UI feature announcements (Panel instead of FigletText)
- FullLayout-only screen clearing, inline resource summary pre-unlock
- Lore fragment named keys for inventory display
- Interactive inventory with ↑↓ selection, detail panel, and Enter to act
- Consumable items usable via UseItemAction pipeline
- Lore fragments readable in dedicated display panel
- Add InventoryRenderCapture test and document render capture workflow
2026-03-13 23:30:04 +01:00
82aba2b3eb Fix layout, portrait cosmetics, add TUI renderer, snapshots, and playthrough analysis
- Fix compact tmux-like layout (120×30 ref) with side-by-side panels
- Fix cosmetic portrait: PlayerAppearance now mutable with ApplyCosmetic()
- Add per-style intrinsic colors for all cosmetic types on portrait
- Add compact inventory mode (6 rows) for layout views
- Add Terminal.Gui renderer (--tui flag)
- Add save snapshot generation and --snapshot N CLI loading
- Add PlaythroughCapture test for automated output analysis
- Add destiny adventure French translation (intro.fr.lor)
- Remove FontStyle enum (fonts are collectibles only)
- Add proposals.md with 11 rendering improvement suggestions
- Update bugs.md (3 FIXMEs resolved)
2026-03-13 21:37:09 +01:00
d69aa5b4a4 Fixes 2026-03-11 22:19:25 +01:00
9e1e0112c9 Reduce pacing variance with conditional weight boosts
Add pity-timer style conditional entries in box_of_boxes:
- box_meta_basics weight 3 after 15 boxes (direct meta path)
- box_adventure weight 3 after 30 boxes (adventure safety net)

This reduces early-game variance significantly:
- 1st Meta UI spread: 7x → 3.3x
- 1st Adventure spread: 14x → 7x
- All Adventures: faster across all seeds
2026-03-11 21:00:51 +01:00
4703ff1e05 Document pacing test workflow in CLAUDE.md
Add instructions for running the pacing report test and interpreting
results after loot table changes. Also fix stale [if] syntax note.
2026-03-11 20:57:30 +01:00
71e10ec084 Add adventure unlock CTA and rebalance box loot pacing
- Add AdventureUnlockedEvent emitted by MetaEngine when a new adventure
  is unlocked, displayed as a CTA in the loot reveal flow
- Rebalance box_of_boxes: reduce box_not_great weight 10→7, boost
  box_ok_tier 5→7 for more variety in early game
- Add box_ok_tier and box_meta_basics drops to box_not_great loot table
  so basic boxes can escape the loop
- Double box_meta_basics weight in box_ok_tier (1→2) for faster
  meta progression
- Update bugs.md: resolve all 4 FIXME items
2026-03-11 20:47:20 +01:00
aeae979d05 Fix adventure parsing, add French accents, fix cosmetic translation bug
- Fix Loreline parsing: escape quotes in dialogue, remove [if] bracket
  syntax, remove # in text conflicting with tags
- Add French accents to all 9 .fr.lor translation files (hundreds of fixes)
- Fix cosmetic equip display: use item nameKey lookup instead of
  constructing key from cosmeticValue (fixes StardustLegendary MISSING)
- Deduplicate cosmetics in appearance menu
- Localize all hardcoded strings (welcome, inventory, adventure, cosmetic)
- Add new tests: Loreline parsing (19), cosmetic slot keys, slot+value
  uniqueness (302 total, 0 failures)
2026-03-11 20:40:07 +01:00
2c96cba174 Accents and bug tracking 2026-03-11 18:33:10 +01:00
c9f8a9566a Add adventure secret branches, Destiny finale, crafting system, and project docs
Integrate stats, resources, and cosmetics into adventures via conditional
branches gated by game state checks. Each of the 9 adventures now has a
secret branch that rewards exploration and encourages replay with subtle
hints on locked choices. The endgame box now triggers a Destiny adventure
that acknowledges all completed adventures and secret branches, with four
ending tiers culminating in an ultimate ending when all 9 secrets are found.

Also adds the crafting engine, CLAUDE.md and specifications.md for faster
onboarding.
2026-03-11 17:50:37 +01:00
4c4d528187 Fix bugs, add endgame/completion features, adventure dedup, and comprehensive renderer tests
Bug fixes:
- Fix double "NEW FEATURE UNLOCKED" message and broken enum-to-key mapping for all UIFeatures
- Fix Spectre markup crash when opening inventory with colors unlocked (unescaped rarity brackets)
- Fix latent Spectre markup crash in ResourcePanel (unescaped bar brackets)
- Fix WeightedRandom.PickMultiple picking with replacement causing duplicate drops
- Fix double AddItem bug (BoxEngine + RenderEvents both adding to state)
- Add StatType and FontStyle fields to ItemDefinition (were in JSON but missing from C# record)

New features:
- Endgame box (Mythic) that appears when all 8 resources are discovered, contains Crown of Completion
- Completion percentage tracker as mid-game meta unlock (tier 3), shown in both renderers
- Adventure pool depletion: adventure sub-boxes with already-unlocked themes are removed from loot pool
- Global error handling with log file output (openthebox-error.log)
- Tiered meta progression: 5 sequential meta boxes replacing single box_meta

New tests (180 new, 228 total):
- 5 panel rendering test classes covering all enum values (Portrait, Resource, Stats, Inventory, Chat)
- RenderContext and RendererFactory logic tests
- SpectreRenderer output tests across 4 context configurations
- BasicRenderer output and input method tests
- Simulation state mutation and full-run completion tests
2026-03-11 09:34:30 +01:00
77c70593ee Improve auto-opening box UX with clear messaging
- Auto-opened boxes now show "Box of Boxes opens automatically!" instead
  of the full opening sequence, making the cascade clear to the player
- Items that are immediately auto-consumed (auto-opening boxes) are
  hidden from loot reveal to reduce noise
- BoxOpenedEvent now carries IsAutoOpen flag set by BoxEngine
2026-03-10 20:34:35 +01:00
c580e1cf2e Localize all hardcoded English strings in renderers
Renderers now use LocalizationManager for all UI text: box opening,
loot reveal, feature unlock, prompts, and error messages. Added
missing localization keys to both en.json and fr.json.
2026-03-10 20:31:46 +01:00
2825621d0a Group duplicate boxes and inventory items with count display
Box selection and inventory now show "Boite pas ouf (x4)" instead of
listing each instance separately. Picks the first instance of the
selected type when opening.
2026-03-10 20:01:11 +01:00
d09bf72a90 Guarantee box_of_boxes in every non-auto-opening box
Every box now always drops a box_of_boxes (auto-open) alongside its
normal loot, ensuring the core loop never breaks. The player always
has at least one box to open next. Only auto-opening boxes (box_of_boxes
itself, box_adventure) are excluded to prevent infinite recursion.
2026-03-10 19:35:57 +01:00
f88a3cc3f6 Fix box name lookups falling back to raw IDs instead of localization
GetItem() returns null for box definition IDs, causing [MISSING:box_*]
display. Added GetLocalizedName() helper that checks both item and box
registries before resolving the localization key.
2026-03-10 19:29:31 +01:00
9c4fd0d73a Fix runtime deserialization bugs, add test suite and publish support
- Fix LootTable.GuaranteedRolls type (int -> List<string>) to match JSON schema
- Fix BoxEngine guaranteed rolls to iterate item IDs directly
- Fix BoxEngine resource condition evaluation for "any" targetId
- Make ItemDefinition.DescriptionKey optional
- Fix font meta item nameKeys to use proper localization keys
- Add 43 xUnit content validation tests (deserialization, cross-refs, localization)
- Add self-contained single-file publish via publish.ps1
- Update README with distribute and test sections
2026-03-10 19:25:02 +01:00
05289da2e2 Add README.md 2026-03-10 18:51:43 +01:00
e0cdc7a6de Add init.ps1 setup script, remove Loreline binaries from repo
- Add PowerShell init script that downloads Loreline v0.7.1 from GitHub
- Script also checks for .NET 10 SDK and restores NuGet packages
- Remove Loreline DLL/XML/deps from git tracking (now fetched by init.ps1)
- Update .gitignore to exclude entire lib/ directory
2026-03-10 18:49:26 +01:00
b1f8ceec66 Add complete content: recipes, French translations, music/cookie events
- Add 34 crafting recipes (materials, consumables, cosmetics, adventures, boxes)
- Add French translations for all 8 remaining adventures
- Add missing item definitions (resource_max_*, music_melody, cookie_fortune)
- Add MusicPlayedEvent and CookieFortuneEvent for special box types
- Make box_story, box_cookie, box_music reachable from box_of_boxes
- Fix content file copying in csproj (None -> Content)
- Add global.json pinning .NET 10 SDK
- Add graceful Console.Clear() error handling
- Add recipe localization keys (EN/FR)
- Add adventure localization keys (EN/FR)
2026-03-10 18:45:54 +01:00
04894a4906 Initial project setup: Open The Box CLI game
- .NET 10 console app with Spectre.Console and Loreline integration
- Black Box Sim architecture (simulation separated from presentation)
- Progressive CLI rendering (9 phases from basic to full layout)
- 25+ box definitions with weighted loot tables
- 100+ item definitions (meta, cosmetics, materials, adventure tokens)
- 9 Loreline adventures (Space, Medieval, Pirate, etc.)
- Bilingual content (EN/FR)
- Save/load system
- Game Design Document
2026-03-10 18:24:01 +01:00