Evaluate Trader results with bench craft potential - #10164
Open
mcagnion wants to merge 11 commits into
Open
Conversation
mcagnion
marked this pull request as ready for review
August 7, 2026 17:08
mcagnion
marked this pull request as draft
August 8, 2026 16:05
mcagnion
force-pushed
the
feature/bench-craft-eval-port
branch
from
August 12, 2026 22:01
168bce4 to
26ab984
Compare
mcagnion
force-pushed
the
feature/bench-craft-eval-port
branch
from
August 21, 2026 23:01
26ab984 to
1e8c273
Compare
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.
Attach immutable query weights to fetched results and use them to evaluate only the highest-weight legal bench craft. Keep an exact exhaustive fallback when weights are absent or stale.
Evaluate fetched items cooperatively across frames and keep fetch identity separate from presentation state. This prevents stale searches, re-sorts, and action tooltips from publishing or reading obsolete results.
Own query-derived weights once per result row, reuse Item magnitude scaling, and evaluate a bounded set of legal candidates. Keep the generated empty-affix filter in the same priority ordering as regular weighted filters.
Reduce duplicated test setup while preserving the full behavior matrix and extending the Trade API fixture through crafted-affix reconstruction and replacement.
Distinguish Trade API records, stripped items, and numeric affix counts from similarly named production shapes.
mcagnion
force-pushed
the
feature/bench-craft-eval-port
branch
from
August 26, 2026 18:12
1e8c273 to
6afb95b
Compare
Describe the user-visible effect without promising a globally optimal craft selection.
mcagnion
marked this pull request as ready for review
August 29, 2026 12:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5437.
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 Craftoption to Trade Query Options. For generated queries, PoB adds an exactly-one-empty-affix pseudo-stat weighted from the compatible bench craft with the highest estimated query weight for the item type. For each fetched item, it fully evaluates the highest-level craft in each compatible local group and at most one positive highest-estimated compatible non-local craft, then selects the best calculated outcome from that bounded set. It does not exhaustively compare every compatible craft, so modifier interactions and breakpoints can occasionally make another non-local craft better. Pasted queries, or results whose selected weights changed after the search, evaluate all highest-level legal craft candidates. Result evaluation yields between build calculations so that fallback remains responsive.The selected craft can fill an open prefix or suffix, or replace exactly one existing crafted modifier when the calculated result 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
Ctrlpreviews the simulated item with the new lines marked[Craft]. The generated weighted query uses the empty-affix pseudo-stat to influence which listings the Trade API returns; the post-fetch evaluation then reranks those listings. The simulated craft never replaces the original listing text used for import.Steps taken to verify a working solution:
Bench Craftdisabled and enabled, verified the changed order, tested a crafted-mod replacement, and checked the exactCtrlpreview 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:
After screenshot — open affix:
After screenshot — crafted modifier replacement:
Query Options:
Notes: