Skip to content

Comments

Port unique updater scripts from PoB2#9480

Open
EtherealCarnivore wants to merge 4 commits intoPathOfBuildingCommunity:devfrom
EtherealCarnivore:port-unique-updater-scripts
Open

Port unique updater scripts from PoB2#9480
EtherealCarnivore wants to merge 4 commits intoPathOfBuildingCommunity:devfrom
EtherealCarnivore:port-unique-updater-scripts

Conversation

@EtherealCarnivore
Copy link

Summary

Ports the unique item updater scripts from PathOfBuilding-PoE2 (PRs #54, #65, #175), building on the work started in #8700 by @Wires77. Extends coverage to all 20 PoE1 item types and fixes multiple bugs found during testing.

New scripts

  • uTextToMods.lua -- converts unique item text to mod IDs (run when adding new uniques)
  • uModsToText.lua -- converts mod IDs back to text from GGPK data (run when game data updates)

Changes to existing files

  • mods.lua -- adds ModItemExclusive.lua and ModTextMap.lua generation
  • statdesc.lua -- handles ! negation limits and ranges starting/ending at 0

Bug fixes over original PoE2 scripts

  • uModsToText.lua: last item in each file wasn't getting mods flushed (no separator at EOF)
  • uModsToText.lua: mod ID regex misidentified base type names containing hyphens (e.g. "Two-Point Arrow Quiver") as legacy mod ranges
  • uModsToText.lua: unresolved text lines lost their position among stat-ordered mods
  • uModsToText.lua: nil access on statOrder when processing legacy-only mods
  • uTextToMods.lua: greedy {.+} tag stripping consumed multiple tags; fixed to lazy {.-}
  • uTextToMods.lua: mod selection logic could skip better matches; separated into two-pass approach
  • uTextToMods.lua: usedMods was global; modTextMap reloaded inside loop unnecessarily
  • Enabled all 20 PoE1 item types (original only had axe enabled with PoE2 types commented out)

Bug fixes in Item.lua (pre-existing)

  • excluded/exclude variable name mismatch creating an accidental global (lines 103-143)
  • Wrong Lua pattern ^%[a ]+ corrected to ^[%a ]+ for jewel radius parsing
  • Space indentation converted to tabs in jewel radius block

Data update

  • All unique item text files re-exported with current GGPK data
  • Adds stat ordering, updated mod wording, and catalyst tags for amulets/rings

Addresses review feedback from @Nightblade on #8700. Supersedes #8700.

Test plan

  • Full test suite: 195/195 passing, 0 failures
  • No "unrecognised item" warnings during load
  • PoB loads and runs without errors
  • Spot-check unique items in PoB UI for correct mod display
  • Verify catalyst tags on amulets/rings are accurate

Port the unique item updater scripts from PathOfBuilding-PoE2 (PRs PathOfBuildingCommunity#54,
PathOfBuildingCommunity#65, PathOfBuildingCommunity#175) and fix multiple bugs for PoE1 compatibility.

Scripts added:
- uTextToMods.lua: converts unique item text to mod IDs (run when adding
  new uniques)
- uModsToText.lua: converts mod IDs back to text with fresh GGPK data
  (run when game data updates)

Changes to existing files:
- mods.lua: add ModItemExclusive.lua and ModTextMap.lua generation
- statdesc.lua: handle '!' negation limits and ranges starting at 0

Bug fixes over the original PoE2 scripts:
- Fix uModsToText.lua not flushing mods for last item in each file
- Fix mod ID regex misidentifying base type names containing hyphens
  (e.g. "Two-Point Arrow Quiver") as legacy mod ranges
- Fix unresolved text lines losing position among ordered mods
- Fix nil access on statOrder when processing legacy-only mods
- Fix uTextToMods.lua greedy tag stripping pattern and mod selection
- Make usedMods local and move modTextMap load outside loop
- Enable all 20 PoE1 item types (original only had axe enabled)

Bug fix in Item.lua:
- Fix excluded/exclude variable name mismatch creating accidental global
- Fix wrong Lua pattern ^%[a ]+ to correct ^[%a ]+ in jewel radius
- Fix space indentation to tabs in jewel radius block
- ModItemExclusive.lua: unique/exclusive mod data generated by mods.lua
- Export/Uniques/ModTextMap.lua: mod text to mod ID mapping
- Export/Uniques/*.lua: intermediate mod ID format for all item types
Re-export all unique item text files using the updater scripts with
current game data. Updates stat ordering, mod wording, and adds catalyst
tags to amulets and rings.
for _, s in ipairs(val) do
if s.min == 0 and s.max > 0 then
s.min = 1
s.minz = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, would you mind renaming minz and maxz to minZ and maxZ for spellchecking purposes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will rename those!

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.

2 participants