Skip to content

Dynamic Pricing

DynamicShop Admin edited this page Apr 21, 2026 · 1 revision

Dynamic Pricing System

DynamicShop isn't just a static economy plugin—it's a fully simulated supply and demand system! This page explains how item prices fluctuate.

1. Stock Curve Pricing

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-multiplier up to the max-price-multiplier, passing through the basePrice.
  • Adjust curve-strength to make prices more or less volatile.

2. Negative Stock Pricing

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.0 adds a compounding 5% increase for every item in debt.
  • Per-Item Override: The "rate" can be individually overwritten per item either using /shopadmin setrate or in the web admin dashboard.

3. Hourly Time Inflation (Shortage System)

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.

4. Purchasing Bulk (Continuous Pricing)

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!

5. Sell Tax

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.

Clone this wiki locally