# godot-economy-system

Guides game economy architecture in Godot using wallet singletons, weighted loot, and shop logic. Works for RPGs and resource management titles.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 455 installs · ★ 893
- Author: thedivergentai
- License: LGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-economy-system/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-economy-system

## What it does

This skill establishes an architectural standard for game economies in Godot projects. The core loop requires `wallet_manager_singleton.gd` for balance tracking and `transaction_manager.gd` to validate spend calls. UI never mutates balances directly. Instead, scenes send requests and subscribe to engine signals.

Standard currencies are stored as integers in the smallest unit. Floating-point types are prohibited for money because arithmetic drift breaks save files. Large idle values exceeding 32-bit limits require BigInt structures instead. The rule set strictly enforces buy and sell spreads to stop infinite money exploits. Currency sinks like repair fees prevent runaway inflation.

Loot drops rely on `loot_table_weighted.gd` Resource assets rather than hardcoded script percentages. When vendor systems alter prices at runtime, scripts call `duplicate()` on item data to avoid mutating shared template files. Barter mechanics run through `trade_contract_resource.gd`, and `economy_logger.gd` records gold-per-minute metrics.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-economy-system -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/godot-economy-system/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/godot-economy-system/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-economy-system -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/godot-economy-system/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-economy-system -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-economy-system/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install thedivergentai/Game-Dev-Agentic-Skills godot-economy-system
```

2. **Manually: put the files in place**
- File: `.github/skills/godot-economy-system/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-economy-system -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/thedivergentai/Game-Dev-Agentic-Skills --path skills/godot-economy-system
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/godot-economy-system/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-economy-system -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-economy-system/SKILL.md

## When to use it
- eliminate floating-point precision drift by tracking currencies in integer cents
- enforce server or singleton transaction validation before deducting player balances
- configure weighted loot drop tables through engine Resource files
- prevent infinite currency exploits by enforcing buy and sell price spreads
- isolate UI display logic through signals without polling balances in _process

## Example prompts
- Configure an Autoload wallet using wallet_manager_singleton.gd with balance clamping
- Create a weighted drop table using loot_table_weighted.gd and rarity tiers
- Implement a shop inventory with buy and sell spreads based on shop_item_data.gd

## Similar
- [godot-ui-control](https://affpapa.org/en/nevibecode/skills/godot-ui-control.md) — skill · 6700 installs
- [godot-gdscript](https://affpapa.org/en/nevibecode/skills/godot-gdscript.md) — skill · 6500 installs
- [godot-best-practices](https://affpapa.org/en/nevibecode/skills/godot-best-practices.md) — skill · 2100 installs
- [cli-anything-godot](https://affpapa.org/en/nevibecode/skills/cli-anything-godot.md) — skill · 548 installs
- [godot-prompter](https://affpapa.org/en/nevibecode/plugins/godot-prompter.md) — plugin · ★ 867
- [godot](https://affpapa.org/en/nevibecode/rules/godot.md) — rule · ★ 3579

From the same set: [thedivergentai/game-dev-agentic-skills](https://affpapa.org/en/nevibecode/by/thedivergentai/game-dev-agentic-skills.md) — 51 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
