@ai-rpg-engine/starter-template 2.9.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/setup.ts +35 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-rpg-engine/starter-template",
3
- "version": "2.9.0",
3
+ "version": "3.1.0",
4
4
  "description": "Starter template for ai-rpg-engine — scaffold a standalone game project from it",
5
5
  "type": "module",
6
6
  "engines": {
@@ -18,9 +18,9 @@
18
18
  "test": "vitest run"
19
19
  },
20
20
  "dependencies": {
21
- "@ai-rpg-engine/core": "^2.8.0",
22
- "@ai-rpg-engine/content-schema": "^2.8.0",
23
- "@ai-rpg-engine/modules": "^2.8.0"
21
+ "@ai-rpg-engine/core": "^3.0.0",
22
+ "@ai-rpg-engine/content-schema": "^3.0.0",
23
+ "@ai-rpg-engine/modules": "^3.0.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "typescript": "^5.7.0",
package/src/setup.ts CHANGED
@@ -98,6 +98,41 @@ export function createGame(seed?: number): Engine {
98
98
  cognition: { profiles: myIntentProfiles },
99
99
  });
100
100
 
101
+ // ═══════════════════════════════════════════════════════════════════
102
+ // STRATEGIC TIER (OPTIONAL) — buildWorldStack
103
+ // Every shipped starter adds a world-simulation layer (environment,
104
+ // factions, districts, economy/trade, crafting, companions, quests, ...)
105
+ // via ONE buildWorldStack({...}) call. This template stays combat-only by
106
+ // default — uncomment below to add it. Two things buildWorldStack itself
107
+ // requires registered BEFORE it (see its own file-header contract):
108
+ // cognition-core (already inside combat.modules above) and
109
+ // createPerceptionFilter() (import + register it in the modules array,
110
+ // ahead of ...worldStack.modules).
111
+ //
112
+ // GENRE WIRING (V3-GEN-1/2, v3.0 wave 2; F-V31-ECON-GENRE, v3.1): pass
113
+ // YOUR OWN ruleset's bare genre id as tradeGenre, craftingGenre, AND
114
+ // economyGenre — the ruleset `id` with any '-minimal'-style suffix your
115
+ // naming convention adds stripped off (myRuleset.id here is already
116
+ // bare: 'my-game', nothing to strip). Do NOT use manifest.genres — that
117
+ // is a free-text flavor-tag vocabulary, a DIFFERENT vocabulary than
118
+ // trade-core.ts's GENRE_BUYABLE_STOCK / crafting-recipes.ts's
119
+ // GENRE_RECIPES / economy-core.ts's GENRE_SUPPLY_DEFAULTS table keys
120
+ // (e.g. a pack tagged genres: ['western'] may key its table entries
121
+ // 'weird-west' instead — the bare ruleset id, not the flavor tag, is
122
+ // what selects genre-flavored stock/recipes/starting supply). A genre
123
+ // with no matching table entry safely falls back to the universal/
124
+ // default tables — an honest degrade, not a bug.
125
+ //
126
+ // import { buildWorldStack, createPerceptionFilter } from '@ai-rpg-engine/modules';
127
+ // ...
128
+ // const worldStack = buildWorldStack({
129
+ // playerId: 'player',
130
+ // tradeGenre: myRuleset.id, // or a literal genre string
131
+ // craftingGenre: myRuleset.id,
132
+ // economyGenre: myRuleset.id,
133
+ // });
134
+ // ═══════════════════════════════════════════════════════════════════
135
+
101
136
  const engine = new Engine({
102
137
  manifest,
103
138
  seed: seed ?? 42,