Commit ff5eb7e
Port unique updater scripts from PoB2 (#9480)
* Port unique updater scripts from PoB2
Port the unique item updater scripts from PathOfBuilding-PoE2 (PRs #54,
#65, #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
* Add generated mod data and intermediate export files
- 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
* Update unique item data from GGPK export
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.
* Rename minz/maxz to minZ/maxZ for spellchecking
* Make scripts more robust and fix tags for PoE1
* Revert "Update unique item data from GGPK export"
This reverts commit b01d5f3.
* Update uTextToMods to be much more robust
This script now handles sorting mods on preference to remove as much
manual mod entry as possible. There are still many caveats with using
it, so item types have been commented out for now with the intent to
tackle each type one at a time until we are confident in its data.
* Small script improvements + axe uniques
* Exclude all itemTypes from uTextToMods to prevent accidents
* bows
* Missed some axe mods
* Fix numerical errors after export
* Claws
* Daggers
* Fishing rods, maces
* Hopefully final bugfix and rewrite
* Staves
* Swords
* Wands
* Body armour, boots, gloves
* Jewels
* Re-export body, boots, gloves, jewel via uTextToMods + uModsToText
* Re-export belt via uTextToMods + uModsToText
* Fix spelling for linesBackward
* Revert "Re-export belt via uTextToMods + uModsToText"
This reverts commit 49ac1b8.
* Fix decimal range parsing in uModsToText
Pattern was missing dots so mods with values like 0.2 (leech rates etc)
would fail to parse and crash describeStats with nil comparison.
* Re-export belt via uTextToMods + uModsToText COPIUM
* Forgot to commit the staff export
* Skip continuation lines after resolving multi-line mods
When a mod ID resolves to N lines of text, the export file also has
N-1 plain text continuation lines after it. Without skipping those,
they'd get output twice (once from the mod resolution, once as
unresolved text).
* Helmets
* Manually fix enemy aura mods for now
* Fix multi-line mod handling in export round-trip
Rewrote io.linesBackward to read the whole file into memory instead
of the old chunk-based approach - the 4KB-chunk reader broke on
Windows because text-mode \r\n conversion threw off the seek math,
producing garbled lines at chunk boundaries.
After resolving a multi-line mod to its ID, strip stale continuation
lines from the output. Also handles sibling mods that share the same
first line (Dream/Nightmare jewels have 4 mods starting with the
same text but different continuations).
Reverted the skipLines workaround in uModsToText - it was eating
legitimate variant override lines (e.g. GrantShaperSkill_1 variants).
Fixed a few ModItemExclusive wording mismatches (Violent Dead
recovery rate/speed, unarmed attack/attacks pluralization, DNT tag).
* Revert ModItemExclusive.lua changes - generated file, fix in unique files instead
* Add ConvertMod to ModStore/ModList/ModDB
Like ReplaceMod but matches by oldName instead of the new mod's name,
so it can change a mod's identity (e.g. FireMin -> ColdMin) rather
than just updating its value. ModDB moves the mod between name buckets.
* Revert "Add ConvertMod to ModStore/ModList/ModDB"
This reverts commit c1228ca.
* Rings
* Update export script to support multi-line implicit mods
* Tinctures
* Flasks
* Fix rings
* Add missing implicit line on Grattus Signet
* Update exporter
* Regenerate mods
* Jewels
* Amulets, haven't checked over the text changes yet
* Amulet mod value updates
* Export amulets after fix
* Belts
* Quivers
* Update export to handle spaces in mod names
* Shields
* Body
* Boots
* Gloves, text to mod
* Export gloves text
* New Rings
* New items, mod ordering and small fixes for weapons
* New armor items
* Final fixes and updates for jewels, jewellery, and consumables
* Fix typo
* Re-export exclusive mods
* Export ModCache
* Fix Seething Fury export
The stat description for the mod was rounding it when it should not have been
* Fix export of aura mods
Mods that grant effects like `Nearby Enemies have 50% increased Fire and Cold Resistances` contain stats that are used in the BuffTemplate for it to apply to enemies
We have to remove these stats as they aren't needed on the items
* Remove old code for removing BuffTemplate stats
The block used to handle the stat removal for the mods that gained an extra stat for the purpose of being using in the buff template
* Update ModCache
---------
Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
Co-authored-by: PJacek <PJacek@users.noreply.github.com>
Co-authored-by: LocalIdentity <localidentity2@gmail.com>1 parent d0e74dd commit ff5eb7e
File tree
57 files changed
+39699
-3269
lines changed- src
- Classes
- Data
- Bases
- Uniques
- Export
- Scripts
- Uniques
- Modules
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
57 files changed
+39699
-3269
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
556 | | - | |
| 555 | + | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
| 566 | + | |
| 567 | + | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
578 | | - | |
| 577 | + | |
| 578 | + | |
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
| 1107 | + | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
| |||
0 commit comments