1. General Configuration - Tylwen/ShopGUIPlus-DynaShop GitHub Wiki

This guide explains all settings in the DynaShop config.yml file, providing a comprehensive reference for configuring your dynamic economy.

Basic Configuration

config-version: 1.0  # Configuration file version - don't change this

Database Configuration

database:
  type: FLATFILE  # Storage type: MYSQL or FLATFILE
  mysql:          # MySQL settings (only used if type is MYSQL)
    host: "localhost"
    port: 3306
    name: "dynashop"     # Database name
    table-prefix: "dynashop"  # Prefix for all tables
    username: "root"
    password: ""
  • FLATFILE: Stores data in JSON files in the plugin folder (recommended for small servers)
  • MYSQL: Stores data in a MySQL database (recommended for larger networks)

Web Dashboard

web-dashboard:
  enabled: false  # Enable or disable the web interface
  port: 7070      # Port for the web interface

The web dashboard provides real-time visualizations of your economy, including price trends, stock levels, and transaction volume.

History Configuration

history:
  retention-days: 90     # Number of days to keep historical data
  auto-purge: true       # Enable automatic purging of old data
  save-interval: 15      # Automatic save interval (minutes)
  • retention-days: Longer retention means more historical data for trends, but larger database size
  • auto-purge: Automatically removes data older than retention-days
  • save-interval: How often prices history is saved to the database

Transaction Limits

limit:
  sound: "ENTITY_VILLAGER_NO"  # Sound played when a limit is reached
  time-reference: "first"      # "first" or "last" - When to start counting the cooldown
  • time-reference:
    • first: Cooldown starts from the first transaction in the period
    • last: Cooldown starts from the most recent transaction

Recipe Type Multipliers

actions:
  shaped: 1.25      # Multiplier for shaped crafting recipes
  shapeless: 1.25   # Multiplier for shapeless crafting recipes
  furnace: 0.75     # Multiplier for furnace recipes

These values determine how recipe costs are calculated for RECIPE mode items.

Dynamic Pricing Configuration

time-period: 15  # Duration of dynamic pricing period (minutes)

default:
  # Price range controls
  price-min-multiply: 0.5  # Minimum price as a multiplier of base price
  price-max-multiply: 2.0  # Maximum price as a multiplier of base price
  price-min: 0.01          # Absolute minimum price
  price-max: 1000.0        # Absolute maximum price
  price-margin: 0.1        # Price margin between buy and sell

  # Growth/decay rates for DYNAMIC mode
  buy-growth-rate: 1.00005   # Rate at which buy price increases when bought
  buy-decay-rate: 0.99998    # Rate at which buy price decreases when sold
  sell-growth-rate: 1.00002  # Rate at which sell price increases when sold
  sell-decay-rate: 0.99995   # Rate at which sell price decreases when bought

  # Alternative rates (can be used instead of growth/decay)
  price-increase: 1.0001     # Price increase factor
  price-decrease: 0.9999     # Price decrease factor

  # Stock settings for STOCK mode
  stock-min: 0               # Minimum stock level
  stock-max: 1000000         # Maximum stock level
  stock-buy-modifier: 0.5    # How much stock affects buy prices
  stock-sell-modifier: 2.0   # How much stock affects sell prices

GUI Refresh Configuration

gui:
  refresh:
    default-items: 1000  # Default refresh rate (milliseconds)
    critical-items: 300  # Refresh rate for critical items (milliseconds)
  • default-items: Standard refresh interval for inventory GUI elements
  • critical-items: Faster refresh for items with critical stock levels

Cache Configuration

cache:
  mode: "full"  # "full" (performance) or "realtime" (fresh data)
  
  # Items that should always have up-to-date prices
  critical-items:
    - "shop2:item3"  # Format: shopID:itemID
  
  # Cache durations in seconds
  durations:
    price: 30        # Price cache duration
    display: 10      # Display elements cache duration
    recipe: 300      # Recipe calculation cache duration
    stock: 20        # Stock level cache duration
    calculated: 60   # Calculated price cache duration
  • full mode: Caches prices and other data for better performance
  • realtime mode: Always recalculates prices (higher server load but always up-to-date)

Taxation System

tax:
  enabled: false           # Enable or disable taxation
  mode: "system"           # "player", "system", or "remove"
  receiver: "DynaShopBank" # Account receiving taxes
  buy-rate: 5.0            # Tax percentage on purchases
  sell-rate: 0.0           # Tax percentage on sales
  log-transactions: false  # Log tax transactions to console
  • mode options:
    • player: Sends taxes to a real player (must have played on server)
    • system: Sends taxes to a virtual account (doesn't need to be a real player)
    • remove: Money is removed from the economy (not given to anyone)

Inflation System

inflation:
  enabled: false             # Enable or disable inflation
  base-rate: 0.5             # Base inflation rate (% per day)
  transaction-multiplier: 0.001  # Inflation factor per transaction
  money-threshold: 1000000   # Money supply threshold
  money-rate: 0.1            # Inflation rate based on money supply
  deflation-rate: 0.05       # Automatic deflation rate (% per day)
  update-interval: 24        # Inflation update interval (hours)
  max-factor: 5.0            # Maximum inflation factor
  
  # Category-specific inflation rates
  categories:
    food: 0.3        # Food items inflate slower
    minerals: 0.8    # Minerals inflate faster
    rare_items: 1.2  # Rare items inflate even faster
  
  # Item-specific inflation rates
  items:
    resource:diamond: 1.5  # Diamonds inflate very quickly
    farm:wheat: 0.2        # Wheat inflates very slowly

The inflation system simulates a realistic economy with prices that evolve over time based on multiple factors.

Enchantment Multipliers

enchant_multipliers:
  SHARPNESS:    # Example enchantment
    1: 1.2      # Level 1: price x 1.2 (20% increase)
    2: 1.5      # Level 2: price x 1.5 (50% increase)
    3: 1.9      # Level 3: price x 1.9 (90% increase)
    4: 2.5      # Level 4: price x 2.5 (150% increase)
    5: 3.0      # Level 5: price x 3.0 (200% increase)
  # ... other enchantments follow the same pattern

These values are multipliers applied to item prices based on their enchantments. Multiple enchantments are cumulative.

Best Practices

  1. For high-traffic servers:

    • Use full cache mode
    • Set longer cache durations
    • Use MYSQL database type
  2. For small servers:

    • FLATFILE storage is sufficient
    • Cache settings can be shorter for more responsive prices
  3. For testing changes:

    • Use realtime cache mode
    • Set short cache durations
    • Use /dynashop reload to apply changes
  4. After making changes:

    • Always use /dynashop reload to reload the configuration
    • Monitor server performance to ensure your settings aren't causing lag
⚠️ **GitHub.com Fallback** ⚠️