Commit Graph
11 Commits
Author SHA1 Message Date
archvillainette b47a8a7afd Generate racial radial rows from race UsableFeat (#94) (#95)
build-binaries / build-binaries (push) Successful in 2m26s
Closes #94.

Generates the racial radial rows at build time from the `UsableFeat` column in the race feats tables, replacing the hand-maintained racial block in `sow-topdata` `data/classes/feats/global.json`.

## Why

Racial spell-like abilities reach the in-game radial only via an `OnMenu` row in every `cls_feat_<class>.2da`. Racial feats are granted by race, never by a class, so nothing adds them automatically — they were hand-written and prepended into every class table. The list drifts: this build already had **24** usable racial feats in the race tables but only **23** hand rows, so one activatable feat was silently missing.

## What

- `racialUsableFeatRules()` scans `race_feat_*.2da` datasets, collects `UsableFeat=1` feats, emits one rule each: `List=3, GrantedOnLevel=99, OnMenu=1`. Deduped across races, sorted for deterministic output.
- Row shape is exactly the in-game-verified hand rows. `List=3` keeps it off every level-up selection list; `GrantedOnLevel=99` is above the level cap so no class ever actually grants it (`nLevelGranted` is `uint8_t`); `OnMenu=1` renders the button once the creature possesses the feat. Possession stays chargen / the login racial-feat sync (`sow-codebase#359`).
- Reuses the existing `globalRules` injection path (same dedup, feat-existence check, label lookup) but applies **unconditionally**, so a leftover hand row in `global.json` deduplicates to a no-op — the `sow-topdata` cleanup lands separately.
- Not sourced from `feat.2da`: a global feat flag would inject unrelated class abilities (e.g. a shadowdancer ability) into every class radial via multiclass.

## Tests

- `racial_feat_rules_test.go`: usable-only, non-usable excluded, cross-race dedup, non-`race_feat_` ignored, deterministic order.
- Existing `cls_feat` global-injection build tests still pass with the new parameter.
- End-to-end: with the racial block removed from `global.json`, a real `build-topdata` emits `TieflingDarkness 3 99 1` once per table across all 21, 24 racial rows total.

## Merge order

The `sow-topdata` `global.json` racial-row deletion depends on this — it must ship first (or the racial radial vanishes on the next topdata build with the released tool).

🤖 Generated with [Claude Code](https://claude.com/claude-code)Reviewed-on: #95

Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
2026-08-03 18:58:43 +00:00
archvillainette 56c67132f3 claude: fold in old sow-tools 2026-06-13 09:49:29 +02:00
archvillainette 97f8427c4b Phase 5: scaffold Crucible (sow-tools) — dispatcher + builder shims, container, PR-first CI, fail-closed (D11, D19). 2026-06-11 20:36:13 +02:00
archvillainette c5a18df730 Sidecar generation 2026-05-26 16:11:45 +02:00
archvillainette e6fffdf041 Fix tail rows in portrait generation 2026-05-25 10:06:40 +02:00
archvillainette b2a58cb011 Class feat injections moved to yaml 2026-05-24 20:23:08 +02:00
archvillainette 7288d7e2b7 Fix topdata lock file generation 2026-05-23 00:52:16 +02:00
archvillainette 82bd075ae4 autogen cached models 2026-05-23 00:24:47 +02:00
archvillainette b5a3a715a4 Sorting changes 2026-05-17 14:43:09 +02:00
archvillainette 574349b929 Automated parts sorting 2026-05-17 14:21:05 +02:00
archvillainette d7704c5f68 Migrate parts data to assets repo 2026-05-17 13:46:09 +02:00