feat: player-reactive demand multiplier on top of curated baseline#25
Merged
Conversation
icemansparks
changed the base branch from
fix/sell-flow-and-override-guards
to
merkerhood
July 2, 2026 14:47
…/decay/bump New per-item demand multiplier table and AHBConfig plumbing: an in-memory itemDemand map (mirroring the price/count override maps), lazy decay computed on read (GetEffectiveDemandMultiplier), and BumpDemand to persist a bump. Not wired into the signal or the pricing path yet.
OnAuctionSuccessful now bumps the winning item's demand multiplier when dynamic pricing is enabled and the buyer is a real human: excluded via gBotsId for the bot's own characters, and via a LoginDatabase account username prefix check (cached in gAccountHumanCache) for mod-playerbots random bots, since there's no compile-time dependency on that module. Ambiguous/failed resolution never bumps.
AdjustPrices multiplies buyout/bid by the item's effective demand multiplier when AuctionHouseBot.DynamicPricing.Enable is set, after the existing moving-average and override clamps; the bid<=buyout guard further down in Sell() still runs afterward. LoadSharedOverrides now also loads and shares the demand map on startup and .reload config. New DynamicPricing.* options documented in mod_ahbot.conf.dist.
icemansparks
force-pushed
the
feat/demand-multiplier
branch
from
July 2, 2026 14:50
a19424d to
8638be2
Compare
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.
Stacked on #23 (retarget to merkerhood after that merges). Covers planned items 1, 2 and 10.
Adds a per-item demand multiplier on top of the ChromieCraft price baseline that reacts only to real human purchases and decays back to neutral. Design doc in
docs/superpowers/specs/2026-07-02-demand-multiplier-design.md.How it works
mod_auctionhousebot_demand(item, multiplier, last_bump), loaded with the other override tables and refreshed by.reload config.OnAuctionSuccessful, if the buyer is a real human, the item's multiplier bumps byBumpPercent(applied to the already-decayed value, clamped to[MinMultiplier, MaxMultiplier]) and persists.BotAccountPrefixes, defaultrndbot, case-insensitive) with a per-account verdict cache; ambiguous lookups fail toward no-op. The cache clears on reload so prefix changes take effect.1 + (stored - 1) * 0.5^(hoursSinceBump / DecayHalfLifeHours), computed on read, snapped to 1.0 inside 1%. No periodic job, no periodic writes.AdjustPrices()to both buyout and bid; bid <= buyout invariant preserved.Config (all in mod_ahbot.conf.dist)
DynamicPricing.Enable(default 0 — off),BumpPercent(8),DecayHalfLifeHours(72),MinMultiplier(0.5),MaxMultiplier(3.0),BotAccountPrefixes("rndbot"). All validated with clamp-and-warn.Out of scope (deferred): supply-side signal from human listings.
Compile-checked against the full core tree (RelWithDebInfo, gcc/ninja).