-
Notifications
You must be signed in to change notification settings - Fork 2
Dynamic Pricing
DynamicShop isn't just a static economy plugin—it's a fully simulated supply and demand system! This page explains how item prices fluctuate.
When the stock of an item is positive, its price is determined by the Stock Curve. As players sell items to the shop, the stock goes up, making the item cheaper to buy (higher supply = lower price). As players buy items, the supply goes down, causing the price to increase.
-
Formula Focus: Price is a continuous curve from the
min-price-multiplierup to themax-price-multiplier, passing through thebasePrice. - Adjust
curve-strengthto make prices more or less volatile.
If players buy an item until its stock reaches 0, what happens next? If unrestricted, stock drops to negative values. This represents a heavy deficit or high-demand "Shortage".
-
Negative Margin Config: Each unit below zero inflates the price exponentially. By default,
negative-stock-percent-per-item: 5.0adds a compounding 5% increase for every item in debt. -
Per-Item Override: The "rate" can be individually overwritten per item either using
/shopadmin setrateor in the web admin dashboard.
Items in shortage don't just sit there. Time factors in! If an item has 0 or negative stock, it accumulates Shortage Hours every hour.
-
Inflation: Each hour of shortage adds a compounding bump (default
2.0%) to the price. This simulates a long-term resource drought. -
Shortage Decay: Once stock climbs back into positive numbers, those accumulated Shortage Hours slowly decay. The decay rate scales dynamically with how much stock the shop has (a fully stocked shop recovers from an inflation wave much faster than a mostly empty shop) using
shortage-decay-percent-per-hour: 2.0.
DynamicShop uses Definite Integrals for bulk price calculations! This means buying 64 items at once is mathematically identical to buying 1 item 64 times in a row. It precisely calculates the area under the pricing curve, preventing any duplication exploits!
The global economy naturally relies on a sell_tax_percent.
A 30% sell tax means players who sell an item to the server only receive 70% of its current buy price. This creates an economic sink.