@wildshard/sdk 0.3.2 → 0.3.3

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 (79) hide show
  1. package/GUIDE.md +19 -6
  2. package/bin/wildshard.mjs +4 -0
  3. package/docs/api/EXPORT-TIERS.md +3 -2
  4. package/lint/export-tiers.json +1 -0
  5. package/lint/sdk-plugin.d.mts +2 -0
  6. package/lint/sdk-plugin.mjs +39 -1
  7. package/package.json +10 -9
  8. package/scripts/capture-hero.mjs +48 -18
  9. package/scripts/ci21-sdk-tail-lint.mjs +95 -0
  10. package/scripts/keep-copy.mjs +172 -0
  11. package/scripts/land.mjs +34 -4
  12. package/scripts/lane-live.mjs +136 -0
  13. package/scripts/leftovers-report.mjs +47 -0
  14. package/scripts/lint-dispatch.mjs +5 -0
  15. package/scripts/music/export-midi.mjs +3 -2
  16. package/scripts/prepare-product.mjs +3 -2
  17. package/scripts/scratch-dir.d.mts +3 -0
  18. package/scripts/scratch-dir.mjs +33 -14
  19. package/scripts/scratch-sweep.mjs +15 -23
  20. package/scripts/typecheck.mjs +15 -0
  21. package/scripts/worktree-reap.mjs +46 -104
  22. package/scripts/worktree.mjs +35 -13
  23. package/skills/wildshard/SKILL.md +3 -1
  24. package/src/cli/content-command.ts +44 -0
  25. package/src/cli/content.ts +287 -0
  26. package/src/cli/help.ts +7 -2
  27. package/src/cli/hero/hero.ts +6 -1
  28. package/src/cli/hero/scene-card.ts +46 -0
  29. package/src/cli/hero/stamp.ts +5 -3
  30. package/src/sharddev/authorManifest.ts +20 -2
  31. package/src/sharddev/cli.ts +1 -1
  32. package/src/sharddev/dev.ts +23 -4
  33. package/src/sharddev/newProject.ts +27 -8
  34. package/src/sharddev/project.ts +2 -2
  35. package/src/sharddev/refusals.ts +1 -0
  36. package/src/sharddev/scene/author.ts +22 -1
  37. package/src/sharddev/scene/budget.ts +87 -0
  38. package/src/sharddev/scene/creature.ts +171 -0
  39. package/src/sharddev/scene/description.ts +41 -0
  40. package/src/sharddev/scene/lower.ts +127 -3
  41. package/src/sharddev/scene/shardfile.ts +196 -14
  42. package/src/sharddev/shardSource.ts +2 -2
  43. package/src/sharddev/test/diskScriptScenario.ts +4 -2
  44. package/src/sharddev/test/ownedScratch.ts +14 -0
  45. package/src/sharddev/test/scriptScenario.ts +18 -13
  46. package/src/sharddev/tsconfig.json +3 -0
  47. package/src/sharddev/watch/pageEntry.ts +1 -19
  48. package/src/sharddev/watch/parity-baseline.json +6 -6
  49. package/src/sharddev/watch/parity.mjs +24 -0
  50. package/src/sharddev/watch/watch.ts +10 -2
  51. package/src/shards/_template/behaviour/boss.as +13 -4
  52. package/src/shards/_template/behaviour/door.as +8 -3
  53. package/src/shards/_template/behaviour/hooks.json +35 -0
  54. package/src/shards/_template/card/landscape.jpg +0 -0
  55. package/src/shards/_template/card/portrait.jpg +0 -0
  56. package/src/shards/_template/card/thumb.jpg +0 -0
  57. package/src/shards/_template/data/bossDecision.json +11 -1
  58. package/src/shards/_template/data/card.json +49 -1
  59. package/src/shards/_template/data/clientScripts.json +411 -0
  60. package/src/shards/_template/data/creatures.json +280 -2
  61. package/src/shards/_template/data/items.json +1 -1
  62. package/src/shards/_template/data/layout.json +32 -1
  63. package/src/shards/_template/data/ledger.json +45 -0
  64. package/src/shards/_template/data/npcs/hermit.json +72 -0
  65. package/src/shards/_template/data/quests.json +297 -11
  66. package/src/shards/_template/data/rows.json +154 -0
  67. package/src/shards/_template/data/skins.json +14 -0
  68. package/src/shards/_template/data/targets.json +47 -0
  69. package/src/shards/_template/data/text.json +4 -1
  70. package/src/shards/_template/generators/lift.ts +71 -0
  71. package/src/shards/_template/generators/product.ts +19 -5
  72. package/src/shards/_template/generators/templatePropsSource.ts +5 -4
  73. package/src/shards/_template/generators/terrain.ts +10 -2
  74. package/src/shards/_template/generators/world.ts +42 -7
  75. package/src/shards/_template/hero.json +6 -6
  76. package/src/shards/_template/manifest.json +49 -1
  77. package/src/shards/authoring-slice/generators/shard.ts +2 -1
  78. package/src/shards/authoring-slice/generators/world.ts +8 -1
  79. package/tsconfig.author.json +24 -0
@@ -13,13 +13,25 @@
13
13
  "template.lamp.c",
14
14
  "template.lamp.reported",
15
15
  "template.lamp.done",
16
- "dead:barrow-warden"
16
+ "dead:barrow-warden",
17
+ "template.warden.paid",
18
+ "template.chest.opened",
19
+ "template.chest.paid",
20
+ "template.ledge.found",
21
+ "template.ledge.paid",
22
+ "template.hermit.accepted",
23
+ "template.hermit.reported",
24
+ "template.hermit.done",
25
+ "dead:mossling:1",
26
+ "dead:mossling:2",
27
+ "dead:mossling:3",
28
+ "dead:mossling:4"
17
29
  ],
18
30
  "quests": [
19
31
  {
20
32
  "id": "template.quest",
21
33
  "title": "A first adventure",
22
- "track": false,
34
+ "track": true,
23
35
  "completeFlag": "template.complete",
24
36
  "steps": [
25
37
  {
@@ -29,7 +41,20 @@
29
41
  "all": [
30
42
  "template.hut"
31
43
  ]
32
- }
44
+ },
45
+ "hint": "The grey hut is just north of the moss gate",
46
+ "markers": [
47
+ {
48
+ "id": "hut.marker",
49
+ "label": "Grey hut",
50
+ "short": "Hut",
51
+ "at": {
52
+ "poi": "world",
53
+ "x": -4,
54
+ "z": -11.5
55
+ }
56
+ }
57
+ ]
33
58
  },
34
59
  {
35
60
  "id": "blob",
@@ -38,7 +63,20 @@
38
63
  "all": [
39
64
  "template.blob"
40
65
  ]
41
- }
66
+ },
67
+ "hint": "The grey blob wanders past the hut: hit it until it pops",
68
+ "markers": [
69
+ {
70
+ "id": "blob.marker",
71
+ "label": "Grey blob",
72
+ "short": "Blob",
73
+ "at": {
74
+ "poi": "world",
75
+ "x": 2.5,
76
+ "z": -16.5
77
+ }
78
+ }
79
+ ]
42
80
  }
43
81
  ],
44
82
  "onComplete": {
@@ -63,7 +101,25 @@
63
101
  "all": [
64
102
  "template.lamp.a"
65
103
  ]
66
- }
104
+ },
105
+ "hint": "Brazier A stands by the training ground, east of the hut",
106
+ "markers": [
107
+ {
108
+ "id": "brazier-a.marker",
109
+ "label": "Brazier A",
110
+ "short": "A",
111
+ "at": {
112
+ "poi": "world",
113
+ "x": 5.9,
114
+ "z": -12.8
115
+ },
116
+ "hideWhen": {
117
+ "all": [
118
+ "template.lamp.a"
119
+ ]
120
+ }
121
+ }
122
+ ]
67
123
  },
68
124
  {
69
125
  "id": "b",
@@ -72,7 +128,25 @@
72
128
  "all": [
73
129
  "template.lamp.b"
74
130
  ]
75
- }
131
+ },
132
+ "hint": "Brazier B is across the pond, on its west bank",
133
+ "markers": [
134
+ {
135
+ "id": "brazier-b.marker",
136
+ "label": "Brazier B",
137
+ "short": "B",
138
+ "at": {
139
+ "poi": "world",
140
+ "x": -27.6,
141
+ "z": 0.2
142
+ },
143
+ "hideWhen": {
144
+ "all": [
145
+ "template.lamp.b"
146
+ ]
147
+ }
148
+ }
149
+ ]
76
150
  },
77
151
  {
78
152
  "id": "c",
@@ -81,7 +155,25 @@
81
155
  "all": [
82
156
  "template.lamp.c"
83
157
  ]
84
- }
158
+ },
159
+ "hint": "Brazier C waits by the barrow ring",
160
+ "markers": [
161
+ {
162
+ "id": "brazier-c.marker",
163
+ "label": "Brazier C",
164
+ "short": "C",
165
+ "at": {
166
+ "poi": "world",
167
+ "x": 9.6,
168
+ "z": -5.4
169
+ },
170
+ "hideWhen": {
171
+ "all": [
172
+ "template.lamp.c"
173
+ ]
174
+ }
175
+ }
176
+ ]
85
177
  },
86
178
  {
87
179
  "id": "warden",
@@ -90,7 +182,25 @@
90
182
  "all": [
91
183
  "dead:barrow-warden"
92
184
  ]
93
- }
185
+ },
186
+ "hint": "The Warden wakes in the barrow ring: watch the ground ring, dodge, then strike its open core",
187
+ "markers": [
188
+ {
189
+ "id": "warden.marker",
190
+ "label": "Barrow ring",
191
+ "short": "Warden",
192
+ "at": {
193
+ "poi": "world",
194
+ "x": 24.5,
195
+ "z": -2
196
+ },
197
+ "hideWhen": {
198
+ "all": [
199
+ "dead:barrow-warden"
200
+ ]
201
+ }
202
+ }
203
+ ]
94
204
  },
95
205
  {
96
206
  "id": "report",
@@ -99,13 +209,167 @@
99
209
  "all": [
100
210
  "template.lamp.reported"
101
211
  ]
102
- }
212
+ },
213
+ "hint": "The Lamplighter waits on the path east of spawn",
214
+ "markers": [
215
+ {
216
+ "id": "lamplighter.marker",
217
+ "label": "The Lamplighter",
218
+ "short": "Lamp",
219
+ "at": {
220
+ "poi": "world",
221
+ "x": 1.1,
222
+ "z": -6.4
223
+ }
224
+ }
225
+ ]
103
226
  }
104
227
  ],
105
228
  "onComplete": {
106
229
  "coins": 25,
107
230
  "fact": "template.lamplighter"
108
231
  }
232
+ },
233
+ {
234
+ "id": "template.warden",
235
+ "title": "The Barrow Warden",
236
+ "track": false,
237
+ "completeFlag": "template.warden.paid",
238
+ "steps": [
239
+ {
240
+ "id": "warden",
241
+ "objective": "Put down the Barrow Warden",
242
+ "done": {
243
+ "all": [
244
+ "dead:barrow-warden"
245
+ ]
246
+ }
247
+ }
248
+ ],
249
+ "onComplete": {
250
+ "fact": "template.warden",
251
+ "coins": 10
252
+ }
253
+ },
254
+ {
255
+ "id": "template.chest",
256
+ "title": "The old chest",
257
+ "track": false,
258
+ "completeFlag": "template.chest.paid",
259
+ "steps": [
260
+ {
261
+ "id": "chest",
262
+ "objective": "Open the old chest by the sign",
263
+ "done": {
264
+ "all": [
265
+ "template.chest.opened"
266
+ ]
267
+ }
268
+ }
269
+ ],
270
+ "onComplete": {
271
+ "fact": "template.chest",
272
+ "coins": 10
273
+ }
274
+ },
275
+ {
276
+ "id": "template.ledge",
277
+ "title": "The ledge cache",
278
+ "track": false,
279
+ "completeFlag": "template.ledge.paid",
280
+ "steps": [
281
+ {
282
+ "id": "ledge",
283
+ "objective": "Ride the lift up to the ledge cache",
284
+ "done": {
285
+ "all": [
286
+ "template.ledge.found"
287
+ ]
288
+ }
289
+ }
290
+ ],
291
+ "onComplete": {
292
+ "fact": "template.ledge",
293
+ "coins": 15
294
+ }
295
+ },
296
+ {
297
+ "id": "template.hermit",
298
+ "title": "The pond hermit's pests",
299
+ "completeFlag": "template.hermit.done",
300
+ "startWhen": {
301
+ "all": [
302
+ "template.hermit.accepted"
303
+ ]
304
+ },
305
+ "steps": [
306
+ {
307
+ "id": "pack",
308
+ "objective": "Drive off the mossling pack",
309
+ "chip": "Mosslings",
310
+ "count": [
311
+ "dead:mossling:1",
312
+ "dead:mossling:2",
313
+ "dead:mossling:3",
314
+ "dead:mossling:4"
315
+ ],
316
+ "done": {
317
+ "all": [
318
+ "dead:mossling:1",
319
+ "dead:mossling:2",
320
+ "dead:mossling:3",
321
+ "dead:mossling:4"
322
+ ]
323
+ },
324
+ "hint": "They circle, then bite: strike the one that comes in",
325
+ "markers": [
326
+ {
327
+ "id": "mosslings.marker",
328
+ "label": "Mossling meadow",
329
+ "short": "Pack",
330
+ "at": {
331
+ "poi": "world",
332
+ "x": 36.0,
333
+ "z": -98.0
334
+ },
335
+ "hideWhen": {
336
+ "all": [
337
+ "dead:mossling:1",
338
+ "dead:mossling:2",
339
+ "dead:mossling:3",
340
+ "dead:mossling:4"
341
+ ]
342
+ }
343
+ }
344
+ ]
345
+ },
346
+ {
347
+ "id": "report",
348
+ "objective": "Tell the Pond Hermit",
349
+ "done": {
350
+ "all": [
351
+ "template.hermit.reported"
352
+ ]
353
+ },
354
+ "hint": "The hermit waits on the pond's north bank",
355
+ "markers": [
356
+ {
357
+ "id": "hermit.marker",
358
+ "label": "Pond Hermit",
359
+ "short": "Hermit",
360
+ "at": {
361
+ "poi": "world",
362
+ "x": -15.2,
363
+ "z": 7.0
364
+ }
365
+ }
366
+ ]
367
+ }
368
+ ],
369
+ "onComplete": {
370
+ "coins": 15,
371
+ "fact": "template.hermit"
372
+ }
109
373
  }
110
374
  ],
111
375
  "triggers": [
@@ -161,6 +425,22 @@
161
425
  "template.lamp.accepted"
162
426
  ]
163
427
  }
428
+ },
429
+ {
430
+ "id": "template.chest.near",
431
+ "kind": "region",
432
+ "flag": "template.chest.opened",
433
+ "x": -8.2,
434
+ "z": -7.6,
435
+ "radius": 1.6
436
+ },
437
+ {
438
+ "id": "template.ledge.near",
439
+ "kind": "region",
440
+ "flag": "template.ledge.found",
441
+ "x": 8.5,
442
+ "z": 6.4,
443
+ "radius": 1.4
164
444
  }
165
445
  ],
166
446
  "dialogue": [
@@ -173,7 +453,8 @@
173
453
  "id": "offer",
174
454
  "lines": [
175
455
  "The braziers of the Hollow have gone cold, and the Warden stirs in the barrow ring.",
176
- "Light all three, then put the Warden down. Will you?"
456
+ "Light all three, then put the Warden down. Will you?",
457
+ "Find your feet first: see the grey hut and beat the blob, then come back to me."
177
458
  ],
178
459
  "choices": [
179
460
  {
@@ -182,7 +463,12 @@
182
463
  "next": "waiting",
183
464
  "sets": [
184
465
  "template.lamp.accepted"
185
- ]
466
+ ],
467
+ "when": {
468
+ "all": [
469
+ "template.complete"
470
+ ]
471
+ }
186
472
  }
187
473
  ]
188
474
  },
@@ -73,6 +73,81 @@
73
73
  ],
74
74
  "weight": 3,
75
75
  "speed": 0
76
+ },
77
+ {
78
+ "id": "template.sow.ram",
79
+ "shape": {
80
+ "kind": "lane",
81
+ "length": 5,
82
+ "width": 1.2
83
+ },
84
+ "windup": 0.7,
85
+ "active": 0.5,
86
+ "recover": 0.9,
87
+ "cooldown": 3,
88
+ "range": 6,
89
+ "damage": 12,
90
+ "tags": [
91
+ "creature.boar"
92
+ ],
93
+ "weight": 1,
94
+ "speed": 7
95
+ },
96
+ {
97
+ "id": "template.wisp.dive",
98
+ "shape": {
99
+ "kind": "sphere",
100
+ "radius": 1.6
101
+ },
102
+ "windup": 1.0,
103
+ "active": 1.0,
104
+ "recover": 0.6,
105
+ "cooldown": 5,
106
+ "range": 12,
107
+ "damage": 8,
108
+ "tags": [
109
+ "creature.greyBlob"
110
+ ],
111
+ "weight": 1,
112
+ "speed": 0
113
+ },
114
+ {
115
+ "id": "template.warden.sweep",
116
+ "shape": {
117
+ "kind": "arc",
118
+ "radius": 2.2,
119
+ "halfAngle": 1.3
120
+ },
121
+ "windup": 0.9,
122
+ "active": 0.3,
123
+ "recover": 1.0,
124
+ "cooldown": 2.5,
125
+ "range": 7,
126
+ "damage": 16,
127
+ "tags": [
128
+ "creature.barrowWarden"
129
+ ],
130
+ "weight": 1,
131
+ "speed": 0
132
+ },
133
+ {
134
+ "id": "template.warden.throw",
135
+ "shape": {
136
+ "kind": "wedge",
137
+ "length": 6,
138
+ "halfAngle": 0.1
139
+ },
140
+ "windup": 1.3,
141
+ "active": 0.2,
142
+ "recover": 0.8,
143
+ "cooldown": 3,
144
+ "range": 18,
145
+ "damage": 14,
146
+ "tags": [
147
+ "creature.barrowWarden"
148
+ ],
149
+ "weight": 1,
150
+ "speed": 0
76
151
  }
77
152
  ],
78
153
  "weather": [
@@ -399,6 +474,85 @@
399
474
  }
400
475
  }
401
476
  ]
477
+ },
478
+ {
479
+ "id": "mossling",
480
+ "kind": "greyBlob",
481
+ "label": "Mossling",
482
+ "aggressive": true,
483
+ "lockable": true,
484
+ "dims": {
485
+ "bodyY": 0.65,
486
+ "bodyHalfLen": 0.4,
487
+ "bodyRadius": 0.55,
488
+ "headRadius": 0.3,
489
+ "legLen": 0.6,
490
+ "feet": [],
491
+ "halfWidth": 0.65
492
+ },
493
+ "variants": [
494
+ {
495
+ "id": "moss",
496
+ "label": "Mossling",
497
+ "rarity": "common",
498
+ "weight": 1,
499
+ "scale": [
500
+ 0.5,
501
+ 0.6
502
+ ],
503
+ "hp": 24,
504
+ "mods": {
505
+ "speed": 1.3,
506
+ "chargeDist": 1,
507
+ "damageTaken": 1,
508
+ "chargeDamage": 6,
509
+ "relentless": false
510
+ }
511
+ }
512
+ ]
513
+ },
514
+ {
515
+ "id": "bog-wisp",
516
+ "kind": "greyBlob",
517
+ "label": "Bog wisp",
518
+ "aggressive": true,
519
+ "lockable": true,
520
+ "dims": {
521
+ "bodyY": 0.65,
522
+ "bodyHalfLen": 0.4,
523
+ "bodyRadius": 0.55,
524
+ "headRadius": 0.3,
525
+ "legLen": 0.6,
526
+ "feet": [],
527
+ "halfWidth": 0.65
528
+ },
529
+ "variants": [
530
+ {
531
+ "id": "bog",
532
+ "label": "Bog wisp",
533
+ "rarity": "common",
534
+ "weight": 1,
535
+ "scale": [
536
+ 0.4,
537
+ 0.45
538
+ ],
539
+ "hp": 30,
540
+ "mods": {
541
+ "speed": 1,
542
+ "chargeDist": 1,
543
+ "damageTaken": 1,
544
+ "chargeDamage": 25,
545
+ "relentless": false
546
+ }
547
+ }
548
+ ],
549
+ "flight": {
550
+ "above": "ground",
551
+ "altitude": 5,
552
+ "climbRate": 5,
553
+ "diveRate": 14,
554
+ "lockRange": 25
555
+ }
402
556
  }
403
557
  ],
404
558
  "looks": [],
@@ -94,5 +94,19 @@
94
94
  "critical": false
95
95
  }
96
96
  ]
97
+ },
98
+ {
99
+ "species": "mossling",
100
+ "look": "template.look.mossling",
101
+ "skin": "97ec4d8f75f5fa6239ee919444d6dc19fd35896bb305930c1f050ac6e0e0e6a6",
102
+ "glb": "2bf489fdb15f1734ddb4c4f32d500ec6da85c765ec7a4eb28dc6781160e7ec8c",
103
+ "files": []
104
+ },
105
+ {
106
+ "species": "bog-wisp",
107
+ "look": "template.look.bogWisp",
108
+ "skin": "97ec4d8f75f5fa6239ee919444d6dc19fd35896bb305930c1f050ac6e0e0e6a6",
109
+ "glb": "2bf489fdb15f1734ddb4c4f32d500ec6da85c765ec7a4eb28dc6781160e7ec8c",
110
+ "files": []
97
111
  }
98
112
  ]
@@ -89,6 +89,28 @@
89
89
  "visibleWhenMatched": true,
90
90
  "colliders": [],
91
91
  "activeWhenMatched": true
92
+ },
93
+ {
94
+ "panel": "template.south-gate",
95
+ "scope": "shared",
96
+ "fieldId": 105,
97
+ "equals": 1,
98
+ "visibleWhenMatched": false,
99
+ "colliders": [
100
+ "template.south-gate"
101
+ ],
102
+ "activeWhenMatched": false
103
+ },
104
+ {
105
+ "panel": "template.ledge",
106
+ "scope": "shared",
107
+ "fieldId": 112,
108
+ "equals": 1,
109
+ "visibleWhenMatched": true,
110
+ "colliders": [
111
+ "template.ledge"
112
+ ],
113
+ "activeWhenMatched": true
92
114
  }
93
115
  ],
94
116
  "itemActions": [
@@ -101,6 +123,16 @@
101
123
  "scene": "template.lantern.refill",
102
124
  "item": "tool.template-lantern",
103
125
  "action": 4
126
+ },
127
+ {
128
+ "scene": "template.chest.open",
129
+ "item": "tool.template-lantern",
130
+ "action": 4
131
+ },
132
+ {
133
+ "scene": "template.rack.take",
134
+ "item": "weapon.sword-iron",
135
+ "action": 3
104
136
  }
105
137
  ],
106
138
  "itemFields": [
@@ -146,5 +178,20 @@
146
178
  "radius": 2.5,
147
179
  "label": "Talk to the Lamplighter",
148
180
  "dialogue": "template.lamplighter"
181
+ },
182
+ "chest": {
183
+ "id": "template.chest.use",
184
+ "radius": 2.2,
185
+ "scene": "template.chest.open"
186
+ },
187
+ "rack": {
188
+ "id": "template.rack.use",
189
+ "radius": 2,
190
+ "scene": "template.rack.take"
191
+ },
192
+ "lever": {
193
+ "id": "template.lever.use",
194
+ "radius": 2,
195
+ "scene": "template.lever.pull"
149
196
  }
150
197
  }
@@ -8,5 +8,8 @@
8
8
  "Light brazier A",
9
9
  "Light brazier B",
10
10
  "Light brazier C"
11
- ]
11
+ ],
12
+ "chest": "Open the old chest (lantern oil)",
13
+ "rack": "Take the iron sword",
14
+ "lever": "Pull the gate lever"
12
15
  }