Skip to content

Fix Elemental Focus Support and Chilll#175

Merged
LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
Quotae:fix-ele-focus-chill
Feb 18, 2020
Merged

Fix Elemental Focus Support and Chilll#175
LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
Quotae:fix-ele-focus-chill

Conversation

@Quotae

@Quotae Quotae commented Feb 15, 2020

Copy link
Copy Markdown
Contributor

When I added in the new elemental ailments stuff a while ago I left in two lines that set your "chill chance", a non-existent stat, to 100%. This is leftover from the first way I tried implementing the Calcs tab stuff where I basically just copy and pasted the Freeze calcs and changed them to say Chill instead, but the final implementation doesn't need these lines.

ANYWAY, these lines come after the parts that check for whether you can apply each ailment, so even if you can't chill like when you're using Elemental Focus, the Calcs tab would show you could chill. This fixes that.

@LocalIdentity LocalIdentity merged commit 71d0a79 into PathOfBuildingCommunity:dev Feb 18, 2020
@Quotae Quotae deleted the fix-ele-focus-chill branch July 15, 2020 21:50
EtherealCarnivore added a commit to EtherealCarnivore/PathOfBuilding that referenced this pull request Feb 21, 2026
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
LocalIdentity pushed a commit that referenced this pull request Apr 12, 2026
* 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>
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.

3 participants