Skip to content

Evaluate Trader results with bench craft potential - #10164

Open
mcagnion wants to merge 5 commits into
PathOfBuildingCommunity:devfrom
mcagnion:feature/bench-craft-eval-port
Open

Evaluate Trader results with bench craft potential#10164
mcagnion wants to merge 5 commits into
PathOfBuildingCommunity:devfrom
mcagnion:feature/bench-craft-eval-port

Conversation

@mcagnion

@mcagnion mcagnion commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

Trader ranks items as they are listed on the trade site. A rare item with an open prefix or suffix, or an item with a replaceable crafted modifier, can therefore appear below a less promising item even when a simple bench craft would make it the better upgrade.

This adds an opt-in Bench Craft option to Trade Query Options. When enabled, PoB evaluates crafts that are available for the item type and compatible with its existing modifiers, then reranks the fetched results using the best outcome. It can fill an open prefix or suffix, or replace exactly one existing crafted modifier when the replacement is an improvement. Items with multiple crafted modifiers are only considered for additions; their existing crafts are never replaced.

The result tooltip shows the selected craft or replacement, and holding Ctrl previews the simulated item with the new lines marked [Craft]. The option only reranks results already returned by the Trade API. It does not change the trade-site query or the item that gets imported.

Steps taken to verify a working solution:

  • Added focused coverage for affix identity and capacity, item-type restrictions, modifier conflicts, single-crafted-mod replacements, multi-line crafts, Catalyst modifiers, multiple crafted modifier limits, corrupted and mirrored items, exact preview rolls, tooltip lifecycle, and unchanged item imports.
  • Ran the full automated test suite.
  • Compared the same fetched listings with Bench Craft disabled and enabled, verified the changed order, tested a crafted-mod replacement, and checked the exact Ctrl preview in the UI.

Link to a build that showcases this PR:

No specific build is required. The behavior can be reproduced with an equipment search that returns a rare item with an open affix or one replaceable crafted modifier.

Before screenshot:

Trader results without Bench Craft evaluation

After screenshot — open affix:

Trader results reranked with Bench Craft and Ctrl preview

After screenshot — crafted modifier replacement:

Trader result with a better bench craft replacement and Ctrl comparison

Query Options:

Bench Craft option in Trade Query Options

Notes:

  • The calculation is opt-in and disabled by default.
  • On complex builds, evaluating every valid craft option may add a few seconds while results are processed.

Use Trade affix metadata to track empty prefix and suffix slots separately,
then locally rerank fetched results with the best legal bench craft.

Show the exact simulated item while Ctrl is held without changing the item
imported from the listing.
Make the tooltip explicit that bench craft potential sorts fetched results locally. Align the bench craft tests with the same evaluation vocabulary and the existing flask modifier group name.
Allow a single standard crafted modifier to be removed in the simulation before testing legal replacements. Multicraft items continue to support additions only.
@mcagnion
mcagnion marked this pull request as ready for review August 7, 2026 17:08
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.

1 participant