====== Resource Market ====== CoalGov includes a vanilla-client trading menu at: /market The menu is a normal server-side inventory GUI, so players do not need Forge, Fabric, client mods, resource packs, or custom launchers. ===== What It Does ===== * Players can sell configured resources from their inventory. * Players can buy configured resources one at a time by default. * Click buys 1, and shift-click buys 64. * Buying charges the fractional unit price times the batch size in Coal Cents, with a 1cc minimum for the whole click. * The Ministry keeps a persisted stock count for each traded material. * Selling resources increases Ministry stock. * Buying resources decreases Ministry stock. * Prices move with stock pressure. * Bulk sales are priced against rising simulated stock as the sale is counted. * Coal-equivalent materials have a floor based on coal, charcoal conversion, or fuel value. * Arbitrary/generated materials such as cobblestone do not have a forced 1-coal floor. ===== Dynamic Prices ===== Every traded material has a base price in config. The live price is adjusted by comparing current stock to target stock. * If stock is low, the multiplier rises and items become more expensive. * If stock is high, the multiplier falls and items become cheaper. * Recent net buying raises prices for a while. * Recent net selling lowers prices for a while. * Recent buy/sell pressure decays over time. * The config has minimum and maximum multipliers to prevent runaway prices. * Materials can override the global target stock and multipliers under ''market.dynamic.materials''. * The buy price is higher than the sell price because the market has a spread. This keeps the economy simple while still reacting to player behavior. If everyone sells cobblestone, cobblestone becomes less valuable. If everyone buys out iron, iron becomes more expensive until players sell more into the market. When a player sells a full inventory, the whole batch does not receive the first high scarcity price. CoalGov prices the sale as if each sold item is added to Ministry stock before pricing the next item in that batch. Food items start with Ministry stock 0 by default, so players must sell food into the market before anyone can buy it back out. ===== Default Dynamic Settings ===== market: dynamic: initial_stock: 1024 target_stock: 1024 elasticity: 1.0 stock_floor_ratio: 0.05 min_multiplier: 0.35 max_multiplier: 3.0 sell_multiplier: 0.85 buy_multiplier: 1.15 flow_half_life_minutes: 180 flow_weight: 0.5 flow_min_multiplier: 0.70 flow_max_multiplier: 1.75 materials: COBBLESTONE: target_stock: 4096 elasticity: 1.0 min_multiplier: 0.20 max_multiplier: 10.0 flow_weight: 1.25 flow_min_multiplier: 0.50 flow_max_multiplier: 2.25 initial_stock: BREAD: 0 COOKED_BEEF: 0 ===== Default Traded Resources ===== * DIRT * COBBLESTONE * SAND * GRAVEL * OAK_LOG * SPRUCE_LOG * BIRCH_LOG * TORCH * COAL * COAL_BLOCK * RAW_COPPER * COPPER_INGOT * RAW_IRON * IRON_INGOT * RAW_GOLD * GOLD_INGOT * DIAMOND * EMERALD * WHEAT * BREAD * APPLE * CARROT * POTATO * BAKED_POTATO * BEETROOT * MELON_SLICE * SWEET_BERRIES * GLOW_BERRIES * COOKIE * PUMPKIN_PIE * COOKED_CHICKEN * COOKED_PORKCHOP * COOKED_BEEF * COOKED_MUTTON * COOKED_RABBIT * COOKED_COD Default diamond pricing is 32 coal before market pressure adjustments. ===== Persistence ===== Market stock is stored in SQLite in the ''market_stock'' table. Restarting the server does not reset market pressure.