mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-23 00:58:33 +02:00
UnifyPayments (megachange)
This commit is contained in:
+59
-27
@@ -1,25 +1,66 @@
|
||||
# Wowgue Game Configuration
|
||||
|
||||
# Game Mode Selection (required)
|
||||
# PAID_SINGLE: Users pay per game, get 2x for escape, 3x with treasure
|
||||
# PAID_CREDITS: Users buy 10 credits, play 10 times, no payouts
|
||||
# FREE: Free play mode, no payments required
|
||||
GAME_MODE=PAID_SINGLE
|
||||
# -----------------------------------------------------------------------------
|
||||
# Unified Payment System (recommended configuration)
|
||||
# -----------------------------------------------------------------------------
|
||||
PAYMENTS_ENABLED=true
|
||||
|
||||
# Cryptocurrency Configuration
|
||||
# Enable one or both modes (comma separated list: direct,credits)
|
||||
PAYMENT_MODES=direct,credits
|
||||
|
||||
# Direct mode settings
|
||||
DIRECT_PAYMENT_ENABLED=true
|
||||
DIRECT_GAME_PRICE=100000000000 # 1 WOW in atomic units
|
||||
DIRECT_REQUIRES_ADDRESS=true
|
||||
DIRECT_ALLOW_GUEST_PLAY=false
|
||||
DIRECT_PAYOUTS_ENABLED=true
|
||||
DIRECT_PAYOUT_ESCAPE=2.0
|
||||
DIRECT_PAYOUT_TREASURE=3.0
|
||||
|
||||
# Credits mode settings
|
||||
CREDITS_ENABLED=true
|
||||
CREDITS_PER_GAME=1
|
||||
CREDITS_REQUIRES_ADDRESS=true
|
||||
ALLOW_MIXED_MODE=true
|
||||
PREFER_CREDITS_FIRST=true
|
||||
CREDITS_PAYOUTS_ENABLED=false
|
||||
CREDITS_PAYOUT_BASE=50000000000 # 0.5 WOW per credit payout baseline
|
||||
CREDITS_PAYOUT_ESCAPE=1.5
|
||||
CREDITS_PAYOUT_TREASURE=2.0
|
||||
CREDITS_PACKAGES='[
|
||||
{"id":"small","credits":10,"price":"500000000000","bonus":0},
|
||||
{"id":"medium","credits":25,"price":"1000000000000","bonus":2},
|
||||
{"id":"large","credits":100,"price":"3500000000000","bonus":15}
|
||||
]'
|
||||
|
||||
# Global payouts / limits
|
||||
PAYOUTS_ENABLED=true
|
||||
PAYOUT_MIN_AMOUNT=10000000000 # 0.1 WOW minimum payout
|
||||
PAYOUT_MAX_PER_GAME=10000000000000
|
||||
PAYOUT_BATCH_INTERVAL=300 # seconds (5 minutes)
|
||||
PAYOUT_MAX_RETRIES=3
|
||||
MAX_PAYOUT_BATCH_SIZE=50
|
||||
|
||||
# Anti-abuse limits
|
||||
MAX_GAMES_PER_HOUR=60
|
||||
MAX_PAYOUTS_PER_DAY=100
|
||||
MAX_CREDIT_PURCHASE_PER_DAY=100000000000000
|
||||
GAME_COOLDOWN_SECONDS=5
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Legacy overrides (optional). These mirror the old configuration style and
|
||||
# are primarily kept for backwards compatibility or quick testing.
|
||||
# -----------------------------------------------------------------------------
|
||||
# GAME_MODE accepts FREE, PAID_SINGLE, PAID_CREDITS. When set it overrides
|
||||
# PAYMENT_MODES. Leave unset to rely on unified config above.
|
||||
GAME_MODE=
|
||||
|
||||
# Legacy per-mode prices (still read as fallbacks if PAYMENT_MODES unset)
|
||||
CRYPTO_TYPE=WOW
|
||||
# Payment amounts in atomic units (piconeros for XMR, tacoshis for WOW)
|
||||
# XMR: 0.005 XMR = 5000000000 piconeros
|
||||
# WOW: 1 WOW = 100000000000 tacoshis
|
||||
# You can use plain integers, scientific notation (e.g. 5e9), or underscores (e.g. 5_000_000_000)
|
||||
# The parser will coerce to an integer atomic unit amount.
|
||||
SINGLE_GAME_PRICE=1e11 # 1 WOW
|
||||
CREDITS_PACKAGE_PRICE=5e11 # 5 WOW
|
||||
# SINGLE_GAME_PRICE=5e9 # 0.005 XMR (was 5000000000)
|
||||
# CREDITS_PACKAGE_PRICE=5e10 # 0.05 XMR (was 50000000000)
|
||||
# Alternative readable style:
|
||||
# SINGLE_GAME_PRICE=5_000_000_000
|
||||
# CREDITS_PACKAGE_PRICE=50_000_000_000
|
||||
SINGLE_GAME_PRICE=1e11 # 1 WOW (atomic units)
|
||||
CREDITS_PACKAGE_PRICE=5e11 # 5 WOW (atomic units)
|
||||
# SINGLE_GAME_PRICE=5e9 # 0.005 XMR (5000000000)
|
||||
# CREDITS_PACKAGE_PRICE=5e10 # 0.05 XMR (50000000000)
|
||||
|
||||
# Wallet RPC Configuration
|
||||
PRIMARY_WALLET_ENDPOINT=http://127.0.0.1:34570
|
||||
@@ -55,12 +96,3 @@ NODE_ENV=production
|
||||
BLOCK_SOURCE=daemon
|
||||
# SIMULATED_BLOCKS=false
|
||||
# FORCE_SIMULATED_BLOCKS=false
|
||||
|
||||
# Payout Configuration
|
||||
PAYOUT_BATCH_INTERVAL=300000
|
||||
MAX_PAYOUT_BATCH_SIZE=50
|
||||
|
||||
# Credits Mode Optional Payouts
|
||||
# Set to true to enable payouts (same multipliers as single mode) when using PAID_CREDITS
|
||||
# Default is false meaning credits mode is purely consumptive / no rewards.
|
||||
CREDITS_PAYOUT_ENABLED=false
|
||||
|
||||
Reference in New Issue
Block a user