Add support for toggling foulborn modifiers on uniques#9946
Conversation
d728334 to
a68e2df
Compare
|
I ended up completely rethinking the approach here. This now:
This has a couple of benefits. Firstly it gets rid of the weird originalLine tagging, which means it should work on any item string, including foulborn items. Secondly it allows for replacing mods with split lines like the +1 zombie +1 skeleton etc mod. This is done by using `mod.tradeHashes´. Not because hashes are relevant, but this has the lines separated by stat which is more in line with what PoB actually parses from the items. There are only a few caveats remaining here. One is that ambiguous transformations (some jewels) don't work because that's not compatible with checkboxes. I'll probably fix this some day since PoE2 doesn't have 1:1 mutated mods. Might of the Meek doesn't work because it changes the radius which isn't a modline in pob. I wanted to add a variant for this, but that doesn't work either as you can't add a radius variant. I'll make a separate issue later The wiki doesn't source the mod ids from game data (this is why I use the wiki; they're manual) and so some IDs are incorrect. The bane of hope suffers from this.
The single dropdown UI kinda sucks since it resets the selection index. I frankly don't want to deal with this. I'm not sure why this is UI is a thing at all anymore? Path.space.of.space.Building_2026-07-23_19-12-40.mp4 |
Kitava’s Thirst now uses PoB’s real modifier lines instead of trade-search hashes and remains reversible. Generated modifier groups prevent Green Nightmare’s unsupported neighboring line from consuming the replacement. Alternate Foulborn modifier searches are case-insensitive and preserve spaces between multiline descriptions. Removed redundant manual parsing, the unused originalLine field, and the commented debug block. Reset mutatedLines during reparsing and avoided creating normalization helpers for unrelated items.
LocalIdentity
left a comment
There was a problem hiding this comment.
Fixed a few issues but looks good for now
Fixes #9355 and some reddit complaints.
Description of the problem being solved:
This adds a checkbox to turn an unique mod into a foulborn mod. This is primarily done by matching the item title (e.g. "Mageblood") and a normalised mod line to a list of transformations taken from the wiki with a simple JS script which is described in the .jsonc comments.
The wiki data is used because it is much simpler and the mod mappings cannot be exported directly from the game files. As mentioned by Wires, it is possible to get these from the trade site, but this feels very complex for the same result, and I opted to focus on implementing the feature first here. If it is important, it could be added in a separate PR.
This ended up feeling a bit complex due to difficulties in matching the mods. PoB seems to split lines in odd ways and foulborn mods can map one mod to several lines.
This uses text-based mod matching, which I think is pretty bad because it often ends up being hard to read, but the pool of mods is small and verifiable. This, as far as I know, only misses two mods which are both on midnight bargain. For some reason the lines on this are sorted differently, and the three line mod is also missed. This is probably possible to fix, but would require the matching to be a lot more complex.
Existing foulborn items won't match. It would probably be possible to do this, but I'm not sure it is as important since you can just add a similar item from the DB if you want to experiment. This is due to there being added information in the resulting item string which won't exist on foulborn items unless they are created by this pr:
{originalLine:(10-20)% increased Elemental Damage with Attack Skills}{mutateActive}{mutated}Damage cannot be ReflectedExisting non-foulborn items will work fine. This also fixes the UI logic a little bit by adding wrapping to the lines. One outdated and useless unique was also fixed because the wording had changed 9 years ago. Porting to PoE2 is probably possible.
Steps taken to verify a working solution:
Todo:
see if I can use exported mod data combined with the mappings from the wiki. Currently the end result seems to lack mod tags which isn't good.The exported mod id data seems lacking. Some of the mods are incorrect or don't exist. I think taking the ids from the wiki seems better as it seems to have no mistakes
Link to a build that showcases this PR:
Use item db or trade site.
Before screenshot:
After screenshot:
Path.space.of.space.Building_2026-07-18_17-23-06.mp4