godot-economy-system
Installation
SKILL.md
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.