Skip to content

Reagent-cost price derivation for craftable gap items#15

Merged
icemansparks merged 6 commits into
merkerhoodfrom
feat/reagent-cost-derivation
Jul 1, 2026
Merged

Reagent-cost price derivation for craftable gap items#15
icemansparks merged 6 commits into
merkerhoodfrom
feat/reagent-cost-derivation

Conversation

@icemansparks

Copy link
Copy Markdown
Collaborator

Derives AH prices for craftable items that have no ChromieCraft auction data, from the cost of their reagents.

How

  • spelldbc.py parses Spell.dbc (3.3.5a, verified field offsets) into a created-item -> recipe map. Committed once as recipes.json (3,443 recipes) so there's no runtime DBC dependency; a validate() gate guards against wrong offsets/build.
  • recipe_prices.py prices each craftable recursively: ChromieCraft override -> recipe derivation -> vendor SellPrice -> 0. Memoized, cycle-safe.
  • derive.py merges add-only derived rows into the override SQL (never overwrites a ChromieCraft-priced item) and emits a derived-prices report.

Real run

3,443 recipes; 1,071 craftable gap items priced (2,940 reagent refs from ChromieCraft market, 64 recursively derived, 215 vendor-floor, 21 unpriceable). Merged SQL is sanity-clean (no dup/malformed/min>avg rows). Config: avg = cost x1.3, min = cost.

Review reports/derived-prices-2026-07-01.csv — the reagent_sources column is the confidence signal (cc / derived / vendor / none).

Tests

39 passing (parser fixture, recursive resolver incl. cycle/vendor/yield/margin, add-only merge smoke). Zero third-party deps.

Note

The merged SQL itself (ChromieCraft + derived rows) is applied on the price-data branch, since it builds on the ChromieCraft refresh (PR #13). This PR is the tool + reusable recipe data + report + spec/plan.

icemansparks added a commit that referenced this pull request Jul 1, 2026
Adds derived override rows (avg=cost x1.3, min=cost) for craftable items with
no ChromieCraft price, generated by tools/price-backfill/derive.py from
recipes.json + vendor SellPrice. Add-only: no ChromieCraft row changed.
Provenance: reports/derived-prices-2026-07-01.csv (PR #15).
@icemansparks
icemansparks merged commit 2053c40 into merkerhood Jul 1, 2026
1 check passed
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