[priority: medium-high] Discipline tab UI confusing labels and missing perk/stat info #179

Closed
opened 2026-05-28 11:39:13 +02:00 by Anexim · 2 comments
Owner

Description

The Discipline tab has several UX issues that make it hard for players to understand mechanics:

Issue 1: "Base Cost" label is unclear

  • Label says "Base Cost: 5" with no unit, no explanation. Is it the cost to start practicing? To activate? The initial drain?
  • Note: baseCost is defined on all discipline definitions but is never consumed by any game logic (discipline-slice.ts activate() never charges it). The field appears to be purely informational but gives no context.
  • File: src/components/game/tabs/DisciplinesTab.tsx line 154

Issue 2: "Drain per tick" uses internal jargon

  • Displays "Drain: X/tick" — players don't know what a tick is (200ms real time = 0.04 game hours)
  • Should display as "Drain: X per second" or "Drain: X/sec" (multiply by 5) or "Drain: X per hour" (multiply by 25)
  • Constants available: TICK_MS = 200, HOURS_PER_TICK = 0.04 in src/lib/game/constants/core.ts
  • File: DisciplinesTab.tsx line 151

Issue 3: Perks don't show current computed effect

  • Perks display static strings like "Every 100 XP: +0.25 Discipline XP per tick"
  • Should show the computed current effect, e.g.: "Every 100 XP: +0.25 Discipline XP/sec (current: +5.25/sec)"
  • calculatePerkTier() already exists in src/lib/game/utils/discipline-math.ts and can compute the current tier
  • Files: DisciplinesTab.tsx lines 102–121 (unlockedPerks computation), lines 172–182 (rendering)

Issue 4: Stat bonus doesn't show perk-augmented total

  • Shows "Stat Bonus: X on {label}" but this is only the continuous XP-based bonus
  • Should also show the projected total after all applicable perks, e.g.: "5.25 (7.75 with perks)"
  • computeDisciplineEffects() in src/lib/game/effects/discipline-effects.ts already computes the total including perks — this data needs to flow into the UI
  • File: DisciplinesTab.tsx line 161

Affected Files

  • src/components/game/tabs/DisciplinesTab.tsx — lines 151, 154, 102–121, 161, 172–182
  • src/lib/game/utils/discipline-math.tscalculatePerkTier() for computing current perk effects
  • src/lib/game/constants/core.tsTICK_MS, HOURS_PER_TICK for time unit conversion
  • All discipline data files that define statBonus.label with "/tick" suffix
## Description The Discipline tab has several UX issues that make it hard for players to understand mechanics: ### Issue 1: "Base Cost" label is unclear - Label says "Base Cost: 5" with no unit, no explanation. Is it the cost to start practicing? To activate? The initial drain? - **Note**: `baseCost` is defined on all discipline definitions but is **never consumed by any game logic** (`discipline-slice.ts activate()` never charges it). The field appears to be purely informational but gives no context. - File: `src/components/game/tabs/DisciplinesTab.tsx` line 154 ### Issue 2: "Drain per tick" uses internal jargon - Displays "Drain: X/tick" — players don't know what a tick is (200ms real time = 0.04 game hours) - Should display as "Drain: X per second" or "Drain: X/sec" (multiply by 5) or "Drain: X per hour" (multiply by 25) - Constants available: `TICK_MS = 200`, `HOURS_PER_TICK = 0.04` in `src/lib/game/constants/core.ts` - File: `DisciplinesTab.tsx` line 151 ### Issue 3: Perks don't show current computed effect - Perks display static strings like "Every 100 XP: +0.25 Discipline XP per tick" - Should show the computed current effect, e.g.: "Every 100 XP: +0.25 Discipline XP/sec (current: +5.25/sec)" - `calculatePerkTier()` already exists in `src/lib/game/utils/discipline-math.ts` and can compute the current tier - Files: `DisciplinesTab.tsx` lines 102–121 (unlockedPerks computation), lines 172–182 (rendering) ### Issue 4: Stat bonus doesn't show perk-augmented total - Shows "Stat Bonus: X on {label}" but this is only the continuous XP-based bonus - Should also show the projected total after all applicable perks, e.g.: "5.25 (7.75 with perks)" - `computeDisciplineEffects()` in `src/lib/game/effects/discipline-effects.ts` already computes the total including perks — this data needs to flow into the UI - File: `DisciplinesTab.tsx` line 161 ## Affected Files - `src/components/game/tabs/DisciplinesTab.tsx` — lines 151, 154, 102–121, 161, 172–182 - `src/lib/game/utils/discipline-math.ts` — `calculatePerkTier()` for computing current perk effects - `src/lib/game/constants/core.ts` — `TICK_MS`, `HOURS_PER_TICK` for time unit conversion - All discipline data files that define `statBonus.label` with "/tick" suffix
Anexim added the ai:todo label 2026-05-28 11:39:13 +02:00
n8n-gitea was assigned by Anexim 2026-05-28 11:39:13 +02:00
Author
Owner

starting work on Discipline tab UX improvements: fix unclear labels, tick jargon, missing perk/stat info

starting work on Discipline tab UX improvements: fix unclear labels, tick jargon, missing perk/stat info
Author
Owner

All 4 issues fixed and verified:

  1. "Base Cost" label removedbaseCost is defined on discipline data but never consumed by game logic (discipline-slice.ts activate() doesn't charge it), so showing it was misleading. Removed from the UI entirely.

  2. Drain converted from /tick to /sec — "Drain: X/tick" changed to "Drain: X/sec" using TICKS_PER_SECOND = 1000 / TICK_MS (200) = 5, a new export in disciplines-utils.ts.

  3. Perks now show computed current effect — Added computePerkCurrentEffect() that uses calculatePerkTier() to display e.g. "+1.25/sec" for infinite perks, "+50 (unlocked)" for once perks, and "at 500 XP" for locked perks. Rendered as "description — currentEffect" on each perk line.

  4. Stat bonus now shows perk-augmented total — Added computeTotalPerkBonusForStat() that mirrors computeDisciplineEffects() logic. Displays as "5.25/sec on Max Mana (7.75/sec with perks)" when perks contribute bonus to the same stat.

  5. Fixed /tick suffixes in data — Changed statBonus.label and perk descriptions in data/disciplines/base.ts from "/tick" to "/sec" for consistency.

Files changed:

  • src/components/game/tabs/DisciplinesTab.tsx (271 lines, refactored to pass definition directly)
  • src/components/game/tabs/disciplines-utils.ts (90 lines, new shared helpers)
  • src/lib/game/data/disciplines/base.ts (label fixes)
  • Auto-generated docs updated by hooks

All 917 tests pass, build succeeds.

All 4 issues fixed and verified: 1. **"Base Cost" label removed** — `baseCost` is defined on discipline data but never consumed by game logic (discipline-slice.ts activate() doesn't charge it), so showing it was misleading. Removed from the UI entirely. 2. **Drain converted from /tick to /sec** — "Drain: X/tick" changed to "Drain: X/sec" using `TICKS_PER_SECOND = 1000 / TICK_MS (200) = 5`, a new export in `disciplines-utils.ts`. 3. **Perks now show computed current effect** — Added `computePerkCurrentEffect()` that uses `calculatePerkTier()` to display e.g. "+1.25/sec" for infinite perks, "+50 (unlocked)" for once perks, and "at 500 XP" for locked perks. Rendered as "description — currentEffect" on each perk line. 4. **Stat bonus now shows perk-augmented total** — Added `computeTotalPerkBonusForStat()` that mirrors `computeDisciplineEffects()` logic. Displays as "5.25/sec on Max Mana (7.75/sec with perks)" when perks contribute bonus to the same stat. 5. **Fixed /tick suffixes in data** — Changed `statBonus.label` and perk descriptions in `data/disciplines/base.ts` from "/tick" to "/sec" for consistency. Files changed: - `src/components/game/tabs/DisciplinesTab.tsx` (271 lines, refactored to pass definition directly) - `src/components/game/tabs/disciplines-utils.ts` (90 lines, new shared helpers) - `src/lib/game/data/disciplines/base.ts` (label fixes) - Auto-generated docs updated by hooks All 917 tests pass, build succeeds.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#179