Skip to content

Trade: static stat data, better error handling, fix radius jewel#2020

Open
vaisest wants to merge 11 commits into
PathOfBuildingCommunity:devfrom
vaisest:trader-0.5
Open

Trade: static stat data, better error handling, fix radius jewel#2020
vaisest wants to merge 11 commits into
PathOfBuildingCommunity:devfrom
vaisest:trader-0.5

Conversation

@vaisest
Copy link
Copy Markdown
Contributor

@vaisest vaisest commented May 30, 2026

Description of the problem being solved:

Fixes crash and incorrect results in trader tool resulting from the trade stat categories changing

Steps taken to verify a working solution:

  • Personal testing

This will still need an update after more mods and augments are exported.

Comment thread src/Classes/TradeHelpers.lua Outdated
_tradeStats = parsed.result

for _, cat in ipairs(_tradeStats) do
local file = io.open("./Data/trade_site_stats.json")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we have this auto-regenerate if it's not there? As it is, when regenerating QueryMods it seems like we'd have to delete that one so it regenerates, as well as redownload this file too if I'm reading this right. Seems like it should just be one or the other, or at the very least have them both regenerate in the same way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'll fix that later today by making the client download it when QueryMods is regenerated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed with f8fc946. Now deleting the querymods file also downloads this json. It's also converted to lua as that seems to be preferred. Hopefully it won't cause an error at some point since the file is rather large

@vaisest vaisest marked this pull request as draft June 1, 2026 04:36
@vaisest vaisest marked this pull request as ready for review June 1, 2026 15:18
@vaisest
Copy link
Copy Markdown
Contributor Author

vaisest commented Jun 1, 2026

Rebased to dev. This PR probably isn't required to fix the trader working, but it does fix radius jewels and hardens the trader a bit towards future releases where new bases are introduced. I think rune matching is also better, but runes are frankly overly complex so I'm not sure about that

@vaisest vaisest changed the title Update trader for 0.5 with local stat JSON and fix newlines Trade: static stat data, better error handling, fix radius jewel Jun 1, 2026
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.

2 participants