# Feature Proposals: Glossary & Tech Tree ## Glossary / Mechanics Explainer ### Goal Provide inline tooltips and a browsable reference for game-specific terms (resources, mechanics, roles, etc.) with automatic cross-linking whenever those terms appear in entity descriptions, notes, or tooltips. ### Data Model Add a new model under `Model/`: **`Model/Glossary/GlossaryTermModel.cs`** ``` - Id (string, e.g. "glossary_pyre") - Term (string, e.g. "Pyre") - ShortDefinition (string, ~1-2 sentences for tooltips) - LongDefinition (string, markdown-capable for glossary page) - Category (string, e.g. "Resource", "Mechanic", "Faction", "Role") - RelatedTermIds (List — cross-links to other glossary terms) - RelatedEntityIds (List — entities that exemplify this term) ``` **Term Catalog** — Seed ~20–40 terms covering: - Resources: Alloy, Ether, Pyre, Energy, Supply - Mechanics: Vanguard, Morph, Pyre Spells, Immortals, Suppression, Overgrowth, Shield - Roles (from `DescriptiveType.cs`): Frontliner, Skirmisher, Support, Generalist, etc. - Factions: Aru, Q'Rath, etc. - Stats: Armor types (Light, Medium, Heavy, Etheric, Structure), Movement types - RTS concepts: Tier, Tech, Morph, Harass, Timing ### Service Layer **`Services/Website/GlossaryService.cs`** — implement `IGlossaryService` (add interface to `IServices.cs`): - `GetTerm(string id) — GlossaryTermModel?` - `SearchTerms(string query) — List` - `GetTermsByCategory(string category) — List` - `GetAllTerms() — List` - `LinkifyText(string text) — MarkupString` — scans text for known terms and wraps them in tooltip/clickable links ### Component Layer **`Components/Display/GlossaryTooltipComponent.razor`** - Wraps a term name with a hover tooltip showing `ShortDefinition` - On click, opens the glossary detail (either a dialog or navigates to a glossary page) - Reuses the existing `InfoTooltipComponent` pattern (css hover) but upgraded to be interactive **`Components/Inputs/GlossaryLabelComponent.razor`** - Like `EntityLabelComponent` but for glossary terms - Renders a styled `