Loading...
Loading...
In-game economy design: currencies, faucets/sinks, inflation control, time-to-earn, trading systems, marketplace design. Use when designing or balancing game economies.
npx skill4agent add tabooharmony/roblox-brain roblox-economyItem: Legendary Sword
Price: 10,000 Gold
Average gold/min (new player): 50/min → 200 min (3.3 hours)
Average gold/min (level 20): 150/min → 67 min (1.1 hours)| Goal Type | Time to Earn |
|---|---|
| Early goals (first hour) | 5-15 minutes |
| Session goals | 30-60 minutes |
| Multi-session goals | 2-5 hours |
| Long-term goals | 10-50 hours |
| Prestige/completionist | 100+ hours |
-- Server-side trade execution
local function executeTrade(player1Data, player2Data, offer1, offer2): boolean
-- Verify both players still have their offered items
if not hasItems(player1Data, offer1) then return false end
if not hasItems(player2Data, offer2) then return false end
-- Execute atomically
removeItems(player1Data, offer1)
removeItems(player2Data, offer2)
addItems(player1Data, offer2)
addItems(player2Data, offer1)
-- Apply tax (remove currency portion)
local tax1 = math.floor(offer1.currency * 0.1)
local tax2 = math.floor(offer2.currency * 0.1)
player1Data.Gold -= tax1
player2Data.Gold -= tax2
return true
end-- Log economy metrics per player session
AnalyticsService:LogEconomyEvent(player, {
flowType = Enum.AnalyticsEconomyFlowType.Source, -- or Sink
currencyType = "Gold",
amount = amount,
transactionType = "QuestReward", -- or "Purchase", "Trade", etc.
itemSKU = itemId, -- what was bought/earned
})