Skip to content

The row generator refuses a flat enchantment row on a stat the game reads nowhere (#2387) - #2583

Merged
sdubois777 merged 1 commit into
developmentfrom
fix/flat-row-on-an-unknown-stat-is-refused
Oct 29, 2026
Merged

sdubois777 merged 1 commit into
developmentfrom
fix/flat-row-on-an-unknown-stat-is-refused

Conversation

@sdubois777

Copy link
Copy Markdown
Owner

The row generator now refuses a flat enchantment row whose stat the game reads nowhere (#2387). Until now such a row (a misspelling, or a stat whose mechanism has not merged) was written to game/Data/EnchantmentEffects.csv and did nothing in play, with no message.

What changed

  • tools/generate_datatables.py:
    • stats_with_an_attribute(), beside stats_with_no_attribute(). It reads UCataclysmPlayerClassStats::StatToAttribute from CataclysmPlayerClassStats.cpp, resolving entries named by constant from their const TCHAR* X::Y = TEXT("...") definitions (tests excluded). It raises rather than returning a partial set when the map is missing, when parsed entries do not equal the attribute getters (130 = 130 today), or when a constant has no definition.
    • In validate_enchantment_effects: a row with no Action, Value Kind flat, and a Stat in neither list is refused, naming the row and the stat.
  • tools/tests/test_generate_datatables.py: two tests. Controls first: flat rows on a stat with an attribute and on one without both pass; a misspelt stat is refused with one complaint; an action row is not asked. And the attribute list is read for both literal and constant entries.
  • docs/DECISIONS.md: the entry.

Why flat rows were exempt

Deliberate, and a different question: the existing check asks whether an increase has a base under it, and a flat row is a base. Nothing asked whether the game reads the flat row's stat. The base check is unchanged.

Evidence (at 96ba64b on development 21d6a63)

  • Merged rows that fail the new check: 0 of 213 flat stat rows.
  • Guard proof with tools/prove_guard.py in a git-archive copy, break and False before the attribute-list test: "PROVED: 1 failed, 1031 passed | restored: 1032 passed"; named_failures: TestEnchantmentEffects::test_a_flat_row_on_a_stat_the_game_reads_nowhere_is_refused.
  • Regenerate: generate_datatables.py exit 0; git diff --exit-code --stat game/Data exit 0; --check: "All 29 DataTable CSVs are up to date."
  • Python: "7024 passed, 8 skipped"; JUnit tests=7032, failures=0, errors=0, skipped=8 (7030 + 2). ruff: "All checks passed!".
  • No Unreal window, by the coordinator's ruling: no game code, and game/Data unchanged.

Not done: the Passive Effects sheet's flat rows have the same gap (validate_passive_effects), filed as #2582.

🤖 Generated with Claude Code

…eads nowhere (#2387)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdubois777
sdubois777 merged commit 4faf66b into development Oct 29, 2026
3 checks passed
@sdubois777
sdubois777 deleted the fix/flat-row-on-an-unknown-stat-is-refused branch October 29, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant