Implement Character Sheet display with stats, skills, equipment summary, and reputation overview #236

Open
opened 2026-03-16 01:40:20 +00:00 by freemo · 0 comments
Owner

Metadata

Key Value
Parent Epic #226 — Skill UI & Commands
Legendary #198 — Character Progression & Skills
Branch feature/m4-character-sheet-display
Commit Message feat(skills): implement Character Sheet display with stats, skills, and equipment summary
Points 5
Priority Medium
MoSCoW Must Have

Background and Context

A character sheet is a fundamental UI element in any RPG. Players need a single command that presents a comprehensive overview of their character's current state: base stats, skill levels, equipped items, and reputation standing. This is distinct from the detailed skill tree overlay — the character sheet provides a summary view suitable for quick reference.

The status (or sheet) command renders the character sheet in the main output window (not an overlay), making it easy to glance at during gameplay. The format should be clean, well-organized, and use ASCII formatting to create visual sections.

Expected Behavior

  1. CharacterSheetRenderer class at lib/aethyr/core/render/character_sheet_renderer.rb:

    • render(player) — returns an array of strings representing the formatted character sheet.
  2. Character Sheet Layout:

    ╔══════════════════════════════════════════════╗
    ║         CHARACTER SHEET: Aragorn             ║
    ╠══════════════════════════════════════════════╣
    ║ STATS                                        ║
    ║   STR: 14  DEX: 12  CON: 13                 ║
    ║   INT: 10  WIS: 11  CHA: 15                 ║
    ║   HP: 45/50   MP: 20/25                     ║
    ╠══════════════════════════════════════════════╣
    ║ SKILLS                                       ║
    ║   Combat Lv.2 ░░████░░░░  Survival Lv.1 ░█░ ║
    ║   Crafting Lv.0           Social Lv.0        ║
    ║   Magic Lv.0                                 ║
    ║   + Swordplay Lv.3       + Unarmed Lv.1     ║
    ╠══════════════════════════════════════════════╣
    ║ EQUIPMENT                                    ║
    ║   Weapon: Iron Longsword (+5 ATK)            ║
    ║   Armor:  Leather Vest (+3 DEF)              ║
    ║   Shield: (none)                             ║
    ╠══════════════════════════════════════════════╣
    ║ REPUTATION                                   ║
    ║   Townfolk: Friendly (+150)                  ║
    ║   Merchants: Neutral (+10)                   ║
    ╚══════════════════════════════════════════════╝
    
  3. Sections:

    • Stats: All base attributes, HP/MP with current/max.
    • Skills: Root disciplines with levels and mini progress bars. Unlocked sub-skills indented below with + prefix. Only show skills with level > 0.
    • Equipment: Currently equipped items with their primary stat bonuses. Show "(none)" for empty slots.
    • Reputation: Known faction standings with descriptive labels (Hostile, Unfriendly, Neutral, Friendly, Honored, Revered, Exalted).
  4. Command Registration:

    • status and sheet both trigger the character sheet display.
    • The output goes to the main output window, not an overlay.
  5. Graceful Handling:

    • New characters with no skills, no equipment, and no reputation should still render a clean sheet with appropriate defaults/placeholders.

Acceptance Criteria

  • CharacterSheetRenderer class exists at lib/aethyr/core/render/character_sheet_renderer.rb.
  • render(player) returns correctly formatted character sheet output.
  • Stats section shows all base attributes and HP/MP.
  • Skills section shows root disciplines with levels and progress bars.
  • Skills section shows unlocked sub-skills indented with + prefix.
  • Equipment section shows equipped items with stat bonuses or "(none)".
  • Reputation section shows faction standings with descriptive labels.
  • status and sheet commands both display the character sheet.
  • New characters with no data render a clean sheet with defaults.
  • Box-drawing characters create clean visual sections.

Subtasks

  • Create lib/aethyr/core/render/character_sheet_renderer.rb with the CharacterSheetRenderer class.
  • Implement stats section with base attributes and HP/MP formatting.
  • Implement skills section with root discipline levels and mini progress bars.
  • Implement sub-skill display with indentation and + prefix.
  • Implement equipment section with item names, stat bonuses, and empty slot handling.
  • Implement reputation section with faction standings and descriptive labels.
  • Implement box-drawing character framing for the full sheet.
  • Register status and sheet commands to trigger CharacterSheetRenderer#render.
  • Handle edge cases: new character, no equipment, no reputation data, no skills.
  • Ensure output goes to main output window (not overlay).
  • Docs: Update YARD comments on affected classes and methods. Update relevant Docusaurus documentation pages if applicable.
  • Tests (Cucumber): Add tests/unit/character_sheet_renderer.feature covering full sheet rendering, stats section formatting, skills section with progress bars, sub-skill indentation, equipment with bonuses, empty equipment slots, reputation labels, new character defaults, command registration.
  • Tests (Cucumber Integration): Add integration feature in tests/integration/ for Character sheet display and status/sheet command interaction.
  • Tests (Profiling): Run bundle exec rake unit_profile and verify no performance regressions.
  • Quality: Verify coverage >=97% via bundle exec rake unit. If coverage is <97% then review the current unit test coverage report at build/tests/unit/coverage/ and use it to write new Cucumber based unit tests to improve code coverage. Specifically, write Cucumber/Gherkin style unit tests that are descriptively named and specifically improve coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun bundle exec rake unit to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Quality: Run bundle exec rake (default task: unit tests with coverage) and bundle exec rake integration, fix any errors if needed ensuring both pass across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
## Metadata | Key | Value | |-----|-------| | **Parent Epic** | #226 — Skill UI & Commands | | **Legendary** | #198 — Character Progression & Skills | | **Branch** | `feature/m4-character-sheet-display` | | **Commit Message** | `feat(skills): implement Character Sheet display with stats, skills, and equipment summary` | | **Points** | 5 | | **Priority** | Medium | | **MoSCoW** | Must Have | ## Background and Context A character sheet is a fundamental UI element in any RPG. Players need a single command that presents a comprehensive overview of their character's current state: base stats, skill levels, equipped items, and reputation standing. This is distinct from the detailed skill tree overlay — the character sheet provides a summary view suitable for quick reference. The `status` (or `sheet`) command renders the character sheet in the main output window (not an overlay), making it easy to glance at during gameplay. The format should be clean, well-organized, and use ASCII formatting to create visual sections. ## Expected Behavior 1. **CharacterSheetRenderer** class at `lib/aethyr/core/render/character_sheet_renderer.rb`: - `render(player)` — returns an array of strings representing the formatted character sheet. 2. **Character Sheet Layout:** ``` ╔══════════════════════════════════════════════╗ ║ CHARACTER SHEET: Aragorn ║ ╠══════════════════════════════════════════════╣ ║ STATS ║ ║ STR: 14 DEX: 12 CON: 13 ║ ║ INT: 10 WIS: 11 CHA: 15 ║ ║ HP: 45/50 MP: 20/25 ║ ╠══════════════════════════════════════════════╣ ║ SKILLS ║ ║ Combat Lv.2 ░░████░░░░ Survival Lv.1 ░█░ ║ ║ Crafting Lv.0 Social Lv.0 ║ ║ Magic Lv.0 ║ ║ + Swordplay Lv.3 + Unarmed Lv.1 ║ ╠══════════════════════════════════════════════╣ ║ EQUIPMENT ║ ║ Weapon: Iron Longsword (+5 ATK) ║ ║ Armor: Leather Vest (+3 DEF) ║ ║ Shield: (none) ║ ╠══════════════════════════════════════════════╣ ║ REPUTATION ║ ║ Townfolk: Friendly (+150) ║ ║ Merchants: Neutral (+10) ║ ╚══════════════════════════════════════════════╝ ``` 3. **Sections:** - **Stats**: All base attributes, HP/MP with current/max. - **Skills**: Root disciplines with levels and mini progress bars. Unlocked sub-skills indented below with `+` prefix. Only show skills with level > 0. - **Equipment**: Currently equipped items with their primary stat bonuses. Show "(none)" for empty slots. - **Reputation**: Known faction standings with descriptive labels (Hostile, Unfriendly, Neutral, Friendly, Honored, Revered, Exalted). 4. **Command Registration:** - `status` and `sheet` both trigger the character sheet display. - The output goes to the main output window, not an overlay. 5. **Graceful Handling:** - New characters with no skills, no equipment, and no reputation should still render a clean sheet with appropriate defaults/placeholders. ## Acceptance Criteria - [ ] `CharacterSheetRenderer` class exists at `lib/aethyr/core/render/character_sheet_renderer.rb`. - [ ] `render(player)` returns correctly formatted character sheet output. - [ ] Stats section shows all base attributes and HP/MP. - [ ] Skills section shows root disciplines with levels and progress bars. - [ ] Skills section shows unlocked sub-skills indented with `+` prefix. - [ ] Equipment section shows equipped items with stat bonuses or "(none)". - [ ] Reputation section shows faction standings with descriptive labels. - [ ] `status` and `sheet` commands both display the character sheet. - [ ] New characters with no data render a clean sheet with defaults. - [ ] Box-drawing characters create clean visual sections. ## Subtasks - [ ] Create `lib/aethyr/core/render/character_sheet_renderer.rb` with the `CharacterSheetRenderer` class. - [ ] Implement stats section with base attributes and HP/MP formatting. - [ ] Implement skills section with root discipline levels and mini progress bars. - [ ] Implement sub-skill display with indentation and `+` prefix. - [ ] Implement equipment section with item names, stat bonuses, and empty slot handling. - [ ] Implement reputation section with faction standings and descriptive labels. - [ ] Implement box-drawing character framing for the full sheet. - [ ] Register `status` and `sheet` commands to trigger `CharacterSheetRenderer#render`. - [ ] Handle edge cases: new character, no equipment, no reputation data, no skills. - [ ] Ensure output goes to main output window (not overlay). - [ ] Docs: Update YARD comments on affected classes and methods. Update relevant Docusaurus documentation pages if applicable. - [ ] Tests (Cucumber): Add `tests/unit/character_sheet_renderer.feature` covering full sheet rendering, stats section formatting, skills section with progress bars, sub-skill indentation, equipment with bonuses, empty equipment slots, reputation labels, new character defaults, command registration. - [ ] Tests (Cucumber Integration): Add integration feature in `tests/integration/` for Character sheet display and status/sheet command interaction. - [ ] Tests (Profiling): Run `bundle exec rake unit_profile` and verify no performance regressions. - [ ] Quality: Verify coverage >=97% via `bundle exec rake unit`. If coverage is <97% then review the current unit test coverage report at `build/tests/unit/coverage/` and use it to write new Cucumber based unit tests to improve code coverage. Specifically, write Cucumber/Gherkin style unit tests that are descriptively named and specifically improve coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `bundle exec rake unit` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [ ] Quality: Run `bundle exec rake` (default task: unit tests with coverage) and `bundle exec rake integration`, fix any errors if needed ensuring both pass across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done.
freemo added this to the v1.3.0 milestone 2026-03-16 01:40:20 +00:00
freemo self-assigned this 2026-03-16 01:40:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#236
No description provided.