Skip to content

feat(txt): properties table + TxtTables namespace for the data tables#4

Merged
ResurrectedTrader merged 1 commit into
mainfrom
txt
Jun 17, 2026
Merged

feat(txt): properties table + TxtTables namespace for the data tables#4
ResurrectedTrader merged 1 commit into
mainfrom
txt

Conversation

@ResurrectedTrader

Copy link
Copy Markdown
Owner

Expose the Diablo II data (.txt) tables more fully.

  • properties.txt: add the property -> (func, stat, set, val) table that affixes / runewords / set bonuses resolve their mods through. Record layout verified against Game.exe (TXT_AllocTxt_properties, 0x2e-byte records) and D2MOO (D2PropertiesTxt; pointer/count at sgptDataTables +0xa4/+0xac).
  • TxtTables: a non-constructable namespace class (like HttpClient's static methods) with names(), size(table), columns(table), row(table, id) and value(table, id, column) - the same machinery as getBaseStat, with method names that don't stutter.
  • getBaseStat(table, row) with no column now returns the whole row as a {column: value} object.
  • game::GetTxtTableRowCount primitive backs size(); shared cell/row marshaling lives in api/globals/TxtTableAccess.h.
  • gen_txt_tables.py appends properties; TxtTables.h regenerated.

Expose the Diablo II data (.txt) tables more fully.

- properties.txt: add the property -> (func, stat, set, val) table that
  affixes / runewords / set bonuses resolve their mods through. Record
  layout verified against Game.exe (TXT_AllocTxt_properties, 0x2e-byte
  records) and D2MOO (D2PropertiesTxt; pointer/count at sgptDataTables
  +0xa4/+0xac).
- TxtTables: a non-constructable namespace class (like HttpClient's
  static methods) with names(), size(table), columns(table),
  row(table, id) and value(table, id, column) - the same machinery as
  getBaseStat, with method names that don't stutter.
- getBaseStat(table, row) with no column now returns the whole row as a
  {column: value} object.
- game::GetTxtTableRowCount primitive backs size(); shared cell/row
  marshaling lives in api/globals/TxtTableAccess.h.
- gen_txt_tables.py appends properties; TxtTables.h regenerated.
@ResurrectedTrader

Copy link
Copy Markdown
Owner Author

/ci

@ResurrectedTrader ResurrectedTrader merged commit 31c0551 into main Jun 17, 2026
6 checks passed
@ResurrectedTrader ResurrectedTrader deleted the txt branch June 17, 2026 23:09
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