@ai-rpg-engine/starter-template 2.9.0 → 3.0.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 +32 -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.0.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,38 @@ 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): pass YOUR OWN ruleset's bare
113
+ // genre id as BOTH tradeGenre and craftingGenre — the ruleset `id` with
114
+ // any '-minimal'-style suffix your naming convention adds stripped off
115
+ // (myRuleset.id here is already bare: 'my-game', nothing to strip). Do
116
+ // NOT use manifest.genres — that is a free-text flavor-tag vocabulary,
117
+ // a DIFFERENT vocabulary than trade-core.ts's GENRE_BUYABLE_STOCK /
118
+ // crafting-recipes.ts's GENRE_RECIPES table keys (e.g. a pack tagged
119
+ // genres: ['western'] may key its table entry 'weird-west' instead — the
120
+ // bare ruleset id, not the flavor tag, is what selects genre-flavored
121
+ // stock/recipes). A genre with no matching table entry safely falls back
122
+ // to the universal/default tables — an honest degrade, not a bug.
123
+ //
124
+ // import { buildWorldStack, createPerceptionFilter } from '@ai-rpg-engine/modules';
125
+ // ...
126
+ // const worldStack = buildWorldStack({
127
+ // playerId: 'player',
128
+ // tradeGenre: myRuleset.id, // or a literal genre string
129
+ // craftingGenre: myRuleset.id,
130
+ // });
131
+ // ═══════════════════════════════════════════════════════════════════
132
+
101
133
  const engine = new Engine({
102
134
  manifest,
103
135
  seed: seed ?? 42,