Skip to content

Feature/trade query improvements#9688

Open
BeardyBarber wants to merge 4 commits intoPathOfBuildingCommunity:devfrom
BeardyBarber:feature/trade-query-improvements
Open

Feature/trade query improvements#9688
BeardyBarber wants to merge 4 commits intoPathOfBuildingCommunity:devfrom
BeardyBarber:feature/trade-query-improvements

Conversation

@BeardyBarber
Copy link

No description provided.

BeardyBarber and others added 3 commits March 18, 2026 20:05
…ods, catalyst de-augmentation

- Consolidate related explicit/implicit trade stat IDs into pseudo.* filters
  to reduce filter slot usage (PseudoStats.lua cache + pseudoMemberLookup)
- Add "Require current mods" checkbox: adds explicit/implicit mods from the
  currently equipped item as required minimum filters
- Strip catalyst quality boost from mod values before setting required minimums
- Skip crafted (bench) mods from required filters so users can re-craft them
- Fix catalyst clipboard format parsing in Item.lua
- Parse and round-trip valueScalar annotation through BuildRaw
- Add tests: catalyst parsing, valueScalar, de-augmentation formula, crafted skip
…dling

- Fix Eldritch mods (Eater/Exarch): now properly included in require-current-mods filters for modes 2-3 by merging eldritch text lookups into explicit lookup when checkbox is enabled

- Add Implicit Mods checkbox: gates implicit weight generation (modes 1-3) and implicit require-current-mods filtering (modes 2-3), giving users fine-grained control over implicit mod inclusion

- Fix popup layout: shorten "Search mode:" label to "Mode:" to prevent label from extending off-screen in the TOPRIGHT-anchored control chain

All checkbox behaviors now respect the four search modes:
  Mode 1 (Standard): weighted search
  Mode 2 (Upgrade): weighted + require current mods
  Mode 3 (Exact): require current mods only
  Mode 4 (Implicit Upgrade): implicit weights only

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…r, UI layout

- Fix local weapon/armour mods mapping to wrong trade stat ID (preferLocal lookup)
- Fix crafted mod count group using wrong data pool (data.masterMods vs data.itemMods.Item)
- Fix crafted slot stat IDs: looked up dynamically from trade API, cached in PseudoStats.lua
- Add Implicit Mods, Pseudo Mods checkboxes; rename Corrupted Mods → Corrupted Items
- Corrupted Items now adds misc_filters exclusion same as Mirrored Items
- Fix control layout: all controls left-aligned in single TOPLEFT chain, correct order

Claude Code helped here.
- Extract normalizeModText() helper for repeated gsub pattern (6 uses)
- Lift qualityModifierToCatalyst to module level, built from catalystList
- Cache specName regex match to avoid double-match on catalyst parsing
- Defer localOverrides alloc until preferLocal is true
- Consolidate Eater/Exarch lookup merge into single loop
- Add nil-guard on fetchStats() in InitMods pseudo-stats path
- Fix spec indentation on added lines only (no whole-file reformat)

Claude Code helped here.
@BeardyBarber BeardyBarber reopened this Mar 25, 2026
@BeardyBarber
Copy link
Author

Trade Query Improvements

New Features

1. Pseudo Mods Consolidation (checkbox)

When enabled, related explicit and implicit mods (e.g. +to maximum Life from multiple sources) are merged into a single pseudo stat filter in the weighted search group. This frees up trade filter slots for other stats. Controlled by a new "Pseudo Mods:" checkbox in the Query Options popup. Off by default. (Resolves Issue #9217)

2. Implicit Mods Control (checkbox)

New "Implicit Mods:" checkbox controls whether implicit mod weights are generated and whether implicit mods are included in "Require Current Mods" filters (Upgrade/Exact modes). On by default.

3. Crafted Slot Filters (Upgrade & Exact modes)

When the current item has bench-crafted mods, the trade query now includes a count group requiring the search results to have available crafting slots. For example, if your item has a crafted suffix, the query adds a count filter requiring at least 1 empty suffix OR crafted suffix slot. The crafting slot stat IDs are resolved dynamically from the trade API and cached in Data/PseudoStats.lua.

4. Catalyst De-augmentation

In Upgrade/Exact modes, mod values on catalyst-enhanced items are de-augmented before being set as required minimums. This prevents inflated catalyst-boosted values from filtering out items that would be equivalent at 0% quality.

5. Unique Item Search

When the equipped item in a slot is a unique (e.g. "Mark of the Shaper, Opal Ring"), the search now:

  • Searches by item name and base type instead of by mods
  • Restricts rarity to unique instead of "any non-unique"
  • Skips explicit mod weights (those are fixed on every copy)
  • Generates only implicit and corrupted mod weights (the stats that actually vary between copies)
  • Adjusts the minimum weight threshold proportionally to the implicit/corrupted mod count vs total mods, so having just one good variable mod is enough to match

6. Local Mod Recognition (Upgrade & Exact modes)

Weapon and armour items now correctly resolve local mods (e.g. "Adds # to # Physical Damage" on a weapon) to their (Local) trade stat ID. This avoids matching the global version, producing incorrect required filters.

7. Game Clipboard Catalyst Parsing

Items pasted from the game clipboard with the format Quality (Life and Mana Modifiers): +20% (augmented) now correctly detect the catalyst type and quality, matching PoB's internal Catalyst: / CatalystQuality: format.

Changed Behavior

Corrupted Mods → Corrupted Items

Renamed and repositioned. The checkbox now works like Mirrored Items:

  • Checked = allow corrupted items in search (Any) + include corrupted implicit weights
  • Unchecked = exclude corrupted items (corrupted: false added to misc_filters) + skip corrupted implicit weights

Eldritch Mods in Require-Current-Mods

When the Eldritch Mods checkbox is enabled, Eater of Worlds and Searing Exarch mods from the current item are now included as required filters in Upgrade/Exact modes (previously only affected weight generation).

UI Layout

All popup controls are now left-aligned in a single vertical chain. Control order: Mirrored Items → Corrupted Items → Mode → Pseudo Mods → Implicit Mods → Eldritch Mods → Scourge Mods → Talisman Mods → (slot-specific controls) → Max Price → Max Level → Sockets/Links → Sort Stats.

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