fix: resolve class system startup and stat range issues #16

Merged
kevin merged 1 commit from fix/charactercreator into main 2026-05-11 10:50:59 +00:00
Owner
  • Remove hardcoded HeroClass seed data from main.py (replaced by seed_classes)
  • Call seed_classes() on startup in main.py
  • Fix CLASSES_DIR path in seed_classes.py (three levels up to project root)
  • Replace base_strength/dex/int/vit/wil with min/max variants in:
    • GET /heroes/classes/all endpoint
    • GET /heroes/{id}/sheet hero_class block
    • POST /heroes/create (cls → hero_class, use randint with min/max)
  • Fix CharacterCreator.jsx StatBar missing cls. prefix on _max fields
  • seed_classes.py now uses glob("**/*.yaml") to include prestige/ subdir
  • seed_classes.py runs on every startup with upsert logic (insert or update)

Signed-off-by: kevin mika mika.kevin@nexus-6.eu

- Remove hardcoded HeroClass seed data from main.py (replaced by seed_classes) - Call seed_classes() on startup in main.py - Fix CLASSES_DIR path in seed_classes.py (three levels up to project root) - Replace base_strength/dex/int/vit/wil with min/max variants in: - GET /heroes/classes/all endpoint - GET /heroes/{id}/sheet hero_class block - POST /heroes/create (cls → hero_class, use randint with min/max) - Fix CharacterCreator.jsx StatBar missing cls. prefix on _max fields - seed_classes.py now uses glob("**/*.yaml") to include prestige/ subdir - seed_classes.py runs on every startup with upsert logic (insert or update) Signed-off-by: kevin mika <mika.kevin@nexus-6.eu>
- Remove hardcoded HeroClass seed data from main.py (replaced by seed_classes)
- Call seed_classes() on startup in main.py
- Fix CLASSES_DIR path in seed_classes.py (three levels up to project root)
- Replace base_strength/dex/int/vit/wil with min/max variants in:
  - GET /heroes/classes/all endpoint
  - GET /heroes/{id}/sheet hero_class block
  - POST /heroes/create (cls → hero_class, use randint with min/max)
- Fix CharacterCreator.jsx StatBar missing cls. prefix on _max fields
- seed_classes.py now uses glob("**/*.yaml") to include prestige/ subdir
- seed_classes.py runs on every startup with upsert logic (insert or update)

Signed-off-by: kevin mika <mika.kevin@nexus-6.eu>
kevin merged commit a200566ab5 into main 2026-05-11 10:50:59 +00:00
kevin deleted branch fix/charactercreator 2026-05-11 10:50:59 +00:00
Sign in to join this conversation.
No reviewers
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.

Dependencies

No dependencies set.

Reference
kevin/nexus-rpg!16
No description provided.