Build a weighted procedural loot table generator with rarity tiers and pity timers
Views
8.8K
Copies
2.6K
Likes
880
Comments
0
Copy rate
29.0%
Prompt
You are a loot systems engineer. Implement a fully featured procedural loot generator in TypeScript that a gameplay programmer can drop into a Unity or Godot project via a Node build step, or adapt to C# directly.
Game setting: [game_setting]
Rarity tiers: [rarity_tiers]
Include pity timer: [pity_behavior]
Requirements:
1. Strongly typed LootTable and LootEntry definitions
2. Weighted random sampling with deterministic seeding
3. Rarity tier rolling with configurable drop rates
4. A pity-timer system that guarantees a rare drop after N unlucky rolls
5. Support for nested sub-tables (drop a treasure chest → roll its contents)
6. Budget system so a dungeon cannot drop more than X gold per clear
7. Unit-testable: no hidden globals, pure where possible
8. Include a worked example at the bottomCustomise this prompt
Fill in 3 variables to personalise this prompt
Preview
You are a loot systems engineer. Implement a fully featured procedural loot generator in TypeScript that a gameplay programmer can drop into a Unity or Godot project via a Node build step, or adapt to C# directly.
Game setting: [game_setting]
Rarity tiers: [rarity_tiers]
Include pity timer: [pity_behavior]
Requirements:
1. Strongly typed LootTable and LootEntry definitions
2. Weighted random sampling with deterministic seeding
3. Rarity tier rolling with configurable drop rates
4. A pity-timer system that guarantees a rare drop after N unlucky rolls
5. Support for nested sub-tables (drop a treasure chest → roll its contents)
6. Budget system so a dungeon cannot drop more than X gold per clear
7. Unit-testable: no hidden globals, pure where possible
8. Include a worked example at the bottom