FourTwenty DynMarket - Dynamic Market System & Real-time Economy
Watch Showcase Video
Introduction
Hey FiveM Community!
We’re FourTwenty, and we’re excited to share our advanced dynamic market system! This resource brings unlimited customizable markets to your server with real-time price fluctuations, modern NUI interface, and an engaging economy system. Perfect for servers looking to add dynamic trading and economic gameplay!
Core Features
Advanced Economic System
-
Dynamic Supply & Demand
- Prices react to player trading activity
- Market prices decrease when items are sold frequently
- Prices recover over time when items aren’t being sold
- Configurable impact rates and recovery speeds
- Prevents exploitation through smart price balancing
-
NEW: Counter-Item System
- Define items that influence other items’ prices
- Example: When players craft/sell burgers, burger ingredient prices increase
- Simulates real market dependencies
- Optional per-item configuration
- Creates meaningful economic loops
-- Example Configuration { name = "Burger Bun", item = "ing_bread", basePrice = 100, counterItem = "burger", -- Optional: Define a counter item counterEffect = 0.05 -- 5% price increase per counter item }
Dynamic Price System
- Real-time Price Fluctuations
- Base random fluctuations within set boundaries
- Supply & Demand impact
- Counter-item effects
- Time-based recovery
- Visual Trend Indicators
- Up/down arrows for price trends
- Color-coded price changes
- Supply level indicators
- Configurable Parameters
- Set minimum/maximum prices
- Adjust fluctuation ranges
- Configure update intervals
- Price History
- Track price changes
- Monitor market trends
- Analyze economic patterns
Market Management
- Unlimited Market Creation
- Food Markets
- Resource Traders
- Fish Markets
- Pawnshops
- Custom market types
- Individual Market Settings
- Custom locations
- Unique NPC configurations
- Market-specific price rules
- Category organization
- Visual Customization
- Custom map blips
- Market markers
- NPC appearance
- UI themes
Modern Interface
- Clean Design
- Responsive dark theme
- Intuitive layout
- Smooth animations
- Real-time Updates
- Live price changes
- Supply level indicators
- Market trend visualization
- User-Friendly Features
- Category filtering
- Bulk item selection
- Quick sell options
- Inventory management
How It Works
Supply & Demand System
-
Base Price Mechanics
- Every item has a configurable base price
- Prices fluctuate randomly within set boundaries
- Supply & Demand modifies these base calculations
-
Supply Impact
- Each sale decreases item prices
- Impact is configurable per market
- Automatic price recovery over time
supplyDemand = { enabled = true, impact = { sale = 0.02, -- 2% price decrease per sale recovery = 0.01, -- 1% recovery when not sold maximum = 0.40 -- Maximum 40% impact } }
-
Counter-Item System
- Optional feature for creating economic dependencies
- When counter-items are sold/crafted, base item prices increase
- Example: Selling processed items (like burgers) increases ingredient prices
- Fully configurable effect strength and duration
items = { { name = "Salmon", item = "fish_salmon", basePrice = 85, counterItem = "sushi", -- Optional counter item counterEffect = 0.04 -- 4% price increase per sushi } }
-
Price Calculation
Final Price = Base Price × (1 + Random Fluctuation) × (1 - Supply Impact + Counter Effect)
- All factors are configurable
- Built-in limits prevent extreme prices
- Automatic balancing system
Market Configuration Example
["fish_market"] = {
enabled = true,
name = "Fish Market",
blip = {
sprite = 356,
color = 59,
scale = 0.8
},
location = {
coords = vector3(-1816.5, -1193.8, 14.3),
heading = 319.0,
npcModel = "s_m_m_linecook"
},
priceSettings = {
minMultiplier = 0.6,
maxMultiplier = 1.8,
maxChangePercent = 20,
supplyDemand = {
enabled = true,
impact = {
sale = 0.02,
recovery = 0.01,
maximum = 0.40
}
}
},
items = {
{
name = "Salmon",
item = "farm_salmon",
basePrice = 85,
category = "Premium Fish",
counterItem = "sushi",
counterEffect = 0.04
}
-- Add more items...
}
}
Performance
- Resource Usage
- 0.0ms when inactive
- 0.01-0.02ms when active
- Optimization Features
- Smart distance checks
- Efficient database queries
- Event batching
- Price calculation optimization
- Memory usage optimization
Technical Details
Code is accessible Yes
Subscription-based No
Lines of code ~1500+
Requirements ESX, oxmysql
Support Yes
Version 1.2.0
Installation
- Download from GitHub
- Add to your resources folder
- Import SQL file:
fourtwenty_market_prices.sql
- Add to server.cfg:
ensure fourtwenty_dynmarket
- Configure in config.lua
- Restart your server
Documentation
-
GitHub Wiki
- Complete installation guide
- Configuration examples
- API documentation
- Troubleshooting guide
-
Discord Support
- Active community
- Direct developer support
- Regular updates
- Feature requests
Links
- GitHub: GitHub - FourTwentyDev/dynmarket
- Discord: fourtwenty devs
- Website: https://fourtwenty.dev
Updates & Support
- Regular feature updates
- Bug fixes
- Community-driven development
- Active Discord support
- Open to suggestions
Tags
free
market
economy
esx
opensource
trading
dynamic-prices
supply-demand
Made with by FourTwentyDev
Change Log v1.2.0
- Added Supply & Demand system
- Implemented Counter-Item feature
- Enhanced price calculation algorithm
- Improved performance optimization
- Added new configuration options
- Updated documentation