The package is one library with three integration levels. Ship Tier 1 first.
| Tier | Features | Game jam | Indie RPG | Enterprise sim |
|---|---|---|---|---|
| 1 — Core | generateRPGEvent(), built-in library, addTrainingData() |
✅ Start here | ✅ | ❌ |
| 2 — Orchestrator | Templates, rules, modifiers, optional AI | ⚠️ Opt-in | ✅ | ⚠️ |
| 3 — Toolkit | World sim, DB, workers, engine export | ❌ | ⚠️ Lore only | ⚠️ |
Entry points: generateRPGEvent(context) or new RPGEventGenerator().generateEvent(context)
What you get:
addTrainingData()test/core.test.jsWhat you don't get:
UNDERWORLD)addTrainingData() is ignoredJam recommendation: use Tier 1 only for the first ship.
→ Getting Started · Custom Content
Wraps Tier 1 with optional layers:
| Layer | Enable | Notes |
|---|---|---|
| Templates | enableTemplates + templateLibrary |
Without a loaded library, always falls through to core |
| Environmental modifiers | enableModifiers (default on) |
Uses player weather, timeOfDay, season |
| Rule engine | enableRuleEngine |
Difficulty scaling, custom rules |
| AI enhancement | aiEnhancement config |
Experimental; errors swallowed |
| Localization | language option |
Non-English packs |
generateFromGenre() is deprecated — returns null. Use generateEvent(context).
→ Templates & Rules · Configuration
Real code, not wired into event generation by default:
| Feature | Use for |
|---|---|
generateWorld(seed) |
Seeded regions, factions, history JSON |
getWorldLore(location) |
One-line lore hook for a location |
simulateWorldYears(n) |
Advance world history |
| Database adapters | Template storage at scale |
| Engine export scripts | Unity/Godot/Unreal template dumps |
| Parallel workers | Batch generation |
World sim does not change player events automatically. Copy lore into your game or call getWorldLore() yourself.
→ World Building · Advanced Tooling
The product: offline procedural RPG events with context-flavoured text. One function to start.
Also in the box: templates, world sim, DB, export scripts — use when you need them, not on day one.