Godot economy system

From thedivergentai/GD-Agentic-Skills · View interactive version

Godot economy system is an AI agent skill from the GitHub repository thedivergentai/GD-Agentic-Skills. Expert patterns for game economies including currency management (multi-currency, wallet system), shop systems (buy/sell prices, stock limits), dynamic pricing (supply/demand), loot tables (weighted drops, rarity tiers), and economic balance (inflation control, currency sinks). Use for RPGs, trading

How to use this skill

Skill file

Decision Tree: Currency Representation

| Economy type | Store as | Why |

|--------------|----------|-----|

| Soft currency (gold, scrap) with UI decimals | int cents / smallest unit | Exact math; display value / 100.0 |

| Premium / idle quantities >> 2^31 | BigInt / multi-limb int (or carefully scaled float only if approx OK) | 32-bit int caps ~2.1B |

| Multiplayer / persistent wallet | Authoritative int (or BigInt) on server | Client never finalizes spends |

| Prices with fractional display only | Still int smallest unit | Avoid 0.1 + 0.2 float drift |

NEVER mix "use float for money" and "never use float for money" without this tree — pick one column and stick to it.

NEVER Do in Economy Systems


Golden Path (MANDATORY)

  1. currency_resource.gd — denomination metadata
  2. wallet_manager_singleton.gd — balances + signals
  3. transaction_manager.gd — validated spend/grant pipeline
  4. Shop / loot / UI only after wallet+transactions exist

Delete ad-hoc EconomyManager gold tutorials — do not re-inline wallet logic in scenes.

Decision Points → Scripts

| Task | Load | Do NOT Load |

|------|------|-------------|

| Balances / Autoload wallet | wallet_manager_singleton.gd | Inline gold ints on Player |

| Spend/grant validation | transaction_manager.gd | UI calling gold -= n |

| Shop buy/sell + stock | shop_item_data.gd + shop_system_logic.gd | Equal buy/sell prices |

| Sales / reputation pricing | dynamic_price_modifier.gd | — |

| Weighted loot | loot_table_weighted.gd | Hardcoded % in enemy scripts |

| Loot → wallet bridge | loot_drop_economy_bridge.gd | — |

| HUD sync | currency_label_sync.gd | Polling wallet in _process without signals |

| Save wallet | economy_persistence_handler.gd | — |

| Pickup VFX | currency_pickup_effect.gd | — |

| Multi-item barter | trade_contract_resource.gd | — |

Available Scripts (full catalog)

Elite Deltas

MANDATORY for GPM logging, dynamic valuation, and moved shop/loot tutorials: economy-elite-patterns.md. Do NOT Load for wallet + transaction golden path only.

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation

Related Skills

Prerequisites
Complements
Downstream / consumers
Master
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.