Skip to content

Add support for toggling foulborn modifiers on uniques#9946

Merged
LocalIdentity merged 5 commits into
PathOfBuildingCommunity:devfrom
vaisest:foulborn2
Jul 24, 2026
Merged

Add support for toggling foulborn modifiers on uniques#9946
LocalIdentity merged 5 commits into
PathOfBuildingCommunity:devfrom
vaisest:foulborn2

Conversation

@vaisest

@vaisest vaisest commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

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 Reflected

Existing 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:

  • Vibe coded audit which tests every mod in the json
  • A lot of clicking around
  • UI look approved on discord
  • Tests
  • Modcache doesn't change (unique db mods that don't parse would show a change here)
  • single dropdown menu tested lightly

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:

image image image

After screenshot:

Path.space.of.space.Building_2026-07-18_17-23-06.mp4
image image image

@vaisest
vaisest force-pushed the foulborn2 branch 2 times, most recently from d728334 to a68e2df Compare July 18, 2026 19:23
@vaisest vaisest changed the title Add support for creating foulborn items from DB Add support for toggling foulborn modifiers on uniques Jul 19, 2026
@vaisest

vaisest commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

I ended up completely rethinking the approach here. This now:

  1. Exports mod ids from wiki
  2. Checks if all of the stat lines exist in explicitModLines and tags each of them with their mod ID and the destination mod id
  3. When box is clicked, removes the mod lines matching the source mod id, and adds the lines of the new mod.

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.

Mods where the stat description has multiple lines ("Passage", the bane of my existence) makes things not match if the other line is parsed to a different mod line. See for example Mjolner where half of the stat description is unsupported Edit: fixed by having a second pass without table.concat

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

@vaisest
vaisest marked this pull request as ready for review July 23, 2026 16:28
@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label Jul 24, 2026
LocalIdentity added 2 commits July 24, 2026 14:32
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 LocalIdentity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed a few issues but looks good for now

@LocalIdentity
LocalIdentity merged commit 017b48f into PathOfBuildingCommunity:dev Jul 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How does a player create a Foulborn item?

2 participants