@wildshard/shard-format 0.15.0 → 0.16.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.
- package/package.json +34 -2
- package/src/format/baked-terrain.golden.json +2760 -0
- package/src/format/colliders.golden.json +1619 -0
- package/src/format/colliders.ts +568 -0
- package/src/format/contentBounds.ts +6 -0
- package/src/format/forest-placement.golden.json +4588 -0
- package/src/format/forest-placement.ts +385 -0
- package/src/format/geometry-layout.golden.json +180 -0
- package/src/format/grass-field.ts +287 -0
- package/src/format/headless-sections.ts +49 -0
- package/src/format/interact-table.golden.json +340 -0
- package/src/format/interact-table.ts +541 -0
- package/src/format/item-catalogue.golden.json +2310 -0
- package/src/format/item-catalogue.ts +148 -0
- package/src/format/mover-pose.ts +46 -0
- package/src/format/native-geometry-channels.ts +64 -0
- package/src/format/noise.ts +106 -0
- package/src/format/road-light.ts +47 -0
- package/src/format/seeded-rng.golden.json +857 -0
- package/src/format/seeded-rng.ts +111 -0
- package/src/format/small-laws.golden.json +57 -0
- package/src/format/terrain-field.golden.json +3998 -0
- package/src/format/terrain-field.ts +405 -0
- package/src/format/whole-partition.ts +170 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/* oxlint-disable capitalized-comments, curly, id-length, import/exports-last, import/group-exports, max-lines-per-function, max-params, max-statements, no-inline-comments, no-magic-numbers, no-negated-condition, prefer-destructuring, sort-vars, typescript/explicit-member-accessibility, typescript/prefer-readonly-parameter-types, unicorn/no-negated-condition, unicorn/no-zero-fractions -- verbatim port of the engine's law (SDK-SPLIT SP4); bit-exact output is pinned by golden vectors, so it keeps the engine's form */
|
|
2
|
+
/** SDK-SPLIT SP4d (Q35): the `GrassField` class moved from engine `shared/game/systems/looks/grassField.ts`; the page's
|
|
3
|
+
* binding to the installed terrain and the active level (`grassBaseHeightAt`, `configureGrassField`) stays in the engine. */
|
|
4
|
+
import { Noise2D, smoothstep, lerp } from './noise.ts'
|
|
5
|
+
/**
|
|
6
|
+
* The painterly grass *field*: how tall the grass stands, how golden it is and which flowers grow, as pure
|
|
7
|
+
* functions of (x, z). The GPU blade rings (src/shards/level/look/grass.ts bakes this field into its textures) and the senses
|
|
8
|
+
* (stealth, wolf AI through `grassHeightAt` in GrassTrample.ts) read the same numbers, so the CPU knows the height the
|
|
9
|
+
* GPU draws without any readback.
|
|
10
|
+
*
|
|
11
|
+
* grassBaseHeightAt(x, z) metres (0 = bare: water, trail bed, rock, snow, yurt floor) — before trampling
|
|
12
|
+
* flowerPatchAt(x, z) 0..1 flower-drift strength (GrassField.sample channels: 1 tone, 3 species, 7 bloom)
|
|
13
|
+
*
|
|
14
|
+
* The field is sampled on a 4 m lattice (cached per chunk) and bilinearly interpolated, so it is smooth, cheap
|
|
15
|
+
* to query many times a frame, and identical for the grass and the senses.
|
|
16
|
+
*
|
|
17
|
+
* the authored meadow (`docs/design/nalati/stealth-and-storms.md`, `geography-and-map.md` §3): short trodden grass only in the
|
|
18
|
+
* camp yard, the corral, the bridge heads, the summer hearth and inside the balbal circle; bare yurt floors and road
|
|
19
|
+
* beds with a lush verge right up to the dirt; a knee-high 0.66–0.72 m meadow everywhere else (look pass: the
|
|
20
|
+
* mockups carry lush grass and flower drifts everywhere); **1.0–1.25 m feather-grass stealth fields** — hand-placed
|
|
21
|
+
* (river banks, the wolf spur by the east gully, five plateau fields) plus elongated E–W bands in the plateau's
|
|
22
|
+
* folds. Other shards get a plain meadow with noise bands.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const LATTICE = 4
|
|
26
|
+
|
|
27
|
+
/** tall-grass height of the stealth fields (m) */
|
|
28
|
+
const TALL_GRASS = 1.12
|
|
29
|
+
|
|
30
|
+
export interface Zone {
|
|
31
|
+
x: number
|
|
32
|
+
z: number
|
|
33
|
+
r: number
|
|
34
|
+
h: number
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Authored meadow geography is supplied by the level plugin. */
|
|
38
|
+
export interface GrassFieldLayout {
|
|
39
|
+
short: readonly Zone[]
|
|
40
|
+
tall: readonly Zone[]
|
|
41
|
+
bare: readonly Zone[]
|
|
42
|
+
valley: number
|
|
43
|
+
plateau: number
|
|
44
|
+
riverZ: (x: number) => number
|
|
45
|
+
riverHalf: (x: number) => number
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The samplers a grass field reads (SF72): the page binds the installed terrain (the baked grid's height, normal and splat, the
|
|
50
|
+
* level's trails, pads and water) and the level's paint; a renderer-free host binds the same grid and terrain field directly.
|
|
51
|
+
*/
|
|
52
|
+
export interface GrassFieldPorts {
|
|
53
|
+
/** the noise seed (the page's level SEED) and the chunk's half-size (m) */
|
|
54
|
+
readonly seed: number
|
|
55
|
+
readonly half: number
|
|
56
|
+
readonly heightAt: (x: number, z: number) => number
|
|
57
|
+
readonly normalAt: (
|
|
58
|
+
x: number,
|
|
59
|
+
z: number,
|
|
60
|
+
eps: number,
|
|
61
|
+
) => readonly [number, number, number]
|
|
62
|
+
readonly splatAt: (
|
|
63
|
+
x: number,
|
|
64
|
+
z: number,
|
|
65
|
+
) => readonly [number, number, number, number]
|
|
66
|
+
readonly trailDistance: (x: number, z: number) => number
|
|
67
|
+
readonly cabinMask: (x: number, z: number) => number
|
|
68
|
+
readonly pondMask: (x: number, z: number) => number
|
|
69
|
+
readonly waterLevel: () => number
|
|
70
|
+
/** the ground colour under the grass (the level's `groundColor`) into `out`, false when the level paints none */
|
|
71
|
+
readonly paint: (
|
|
72
|
+
x: number,
|
|
73
|
+
z: number,
|
|
74
|
+
y: number,
|
|
75
|
+
slope: number,
|
|
76
|
+
out: [number, number, number],
|
|
77
|
+
) => boolean
|
|
78
|
+
/** the authored meadow, or null (a plain meadow with noise bands) */
|
|
79
|
+
readonly layout: GrassFieldLayout | null
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const STRIDE = 8 // per corner: height, tone, flower drift, drift species, ground r, g, b, grass bloom
|
|
83
|
+
|
|
84
|
+
function zoneWeight(z: Zone, x: number, zz: number, falloff: number): number {
|
|
85
|
+
const d = Math.hypot(x - z.x, zz - z.z)
|
|
86
|
+
return 1 - smoothstep(z.r, z.r * (1 + falloff), d)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* One grass field over its samplers: the 4 m lattice (126 corners a side over a 500 m chunk), filled lazily and bilinearly
|
|
91
|
+
* sampled. The page's module functions below read the one it binds to the installed terrain; a renderer-free host builds
|
|
92
|
+
* its own over the same baked grid (SF72), so its senses read the numbers the page's do.
|
|
93
|
+
*/
|
|
94
|
+
export class GrassField {
|
|
95
|
+
private readonly noise: Noise2D
|
|
96
|
+
private readonly noise2: Noise2D
|
|
97
|
+
private readonly ln: number
|
|
98
|
+
private readonly lattice: Float32Array
|
|
99
|
+
private readonly rgb: [number, number, number] = [0, 0, 0]
|
|
100
|
+
private readonly ports: GrassFieldPorts
|
|
101
|
+
|
|
102
|
+
constructor(ports: GrassFieldPorts) {
|
|
103
|
+
this.ports = ports
|
|
104
|
+
this.noise = new Noise2D(ports.seed + 911)
|
|
105
|
+
this.noise2 = new Noise2D(ports.seed + 912)
|
|
106
|
+
this.ln = Math.ceil((ports.half * 2) / LATTICE) + 1
|
|
107
|
+
this.lattice = new Float32Array(this.ln * this.ln * STRIDE).fill(Number.NaN)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private inChunk(x: number, z: number, margin: number): boolean {
|
|
111
|
+
const half = this.ports.half
|
|
112
|
+
return Math.abs(x) <= half - margin && Math.abs(z) <= half - margin
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** the raw field at one point: [height m, tone 0..1, flower drift 0..1, drift species 0..1, ground colour (linear rgb)] */
|
|
116
|
+
private evalField(x: number, z: number, out: Float32Array, o: number): void {
|
|
117
|
+
const P = this.ports,
|
|
118
|
+
noise = this.noise,
|
|
119
|
+
noise2 = this.noise2,
|
|
120
|
+
rgb = this.rgb
|
|
121
|
+
const y = P.heightAt(x, z)
|
|
122
|
+
const ny = P.normalAt(x, z, 1.5)[1]
|
|
123
|
+
// the painted ground under the grass (the def's own palette): roots and the far carpet fade into it
|
|
124
|
+
if (!P.paint(x, z, y, 1 - ny, rgb)) {
|
|
125
|
+
rgb[0] = 0.12
|
|
126
|
+
rgb[1] = 0.2
|
|
127
|
+
rgb[2] = 0.05
|
|
128
|
+
}
|
|
129
|
+
out[o + 4] = rgb[0]
|
|
130
|
+
out[o + 5] = rgb[1]
|
|
131
|
+
out[o + 6] = rgb[2]
|
|
132
|
+
if (!this.inChunk(x, z, 0.5)) {
|
|
133
|
+
out[o] = 0
|
|
134
|
+
out[o + 1] = 0
|
|
135
|
+
out[o + 2] = 0
|
|
136
|
+
out[o + 3] = 0
|
|
137
|
+
out[o + 7] = 0
|
|
138
|
+
return
|
|
139
|
+
}
|
|
140
|
+
const meadow = P.layout
|
|
141
|
+
const n1 = noise.fbm(x * 0.021, z * 0.021, 3) // meadow undulation
|
|
142
|
+
const tone0 = meadow !== null ? smoothstep(2, 26, y) : 0.35
|
|
143
|
+
let tone = Math.min(
|
|
144
|
+
1,
|
|
145
|
+
Math.max(0, tone0 + 0.22 * noise2.fbm(x * 0.013, z * 0.013, 2)),
|
|
146
|
+
)
|
|
147
|
+
// base meadow
|
|
148
|
+
let h =
|
|
149
|
+
(meadow !== null ? lerp(meadow.valley, meadow.plateau, tone0) : 0.55) *
|
|
150
|
+
(1 + 0.16 * n1)
|
|
151
|
+
if (meadow !== null) {
|
|
152
|
+
// plateau folds: elongated E–W bands of feather grass (x stretched 2.4×)
|
|
153
|
+
if (y > 22) {
|
|
154
|
+
const band = smoothstep(
|
|
155
|
+
0.18,
|
|
156
|
+
0.42,
|
|
157
|
+
noise.fbm(x * 0.0085 + 17.3, z * 0.021 - 4.1, 3),
|
|
158
|
+
)
|
|
159
|
+
h = lerp(
|
|
160
|
+
h,
|
|
161
|
+
TALL_GRASS * (0.94 + 0.1 * n1),
|
|
162
|
+
band * smoothstep(22, 28, y),
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
// river banks: a strip of tall grass just outside the gravel corridor, not at the bridge (camp: short zone)
|
|
166
|
+
const half = meadow.riverHalf(x)
|
|
167
|
+
const dr = Math.abs(z - meadow.riverZ(x))
|
|
168
|
+
const bank =
|
|
169
|
+
smoothstep(half + 2, half + 5, dr) *
|
|
170
|
+
(1 - smoothstep(half + 12, half + 18, dr)) *
|
|
171
|
+
smoothstep(22, 34, Math.abs(x)) *
|
|
172
|
+
(y < 2 ? 1 : 0)
|
|
173
|
+
h = lerp(h, TALL_GRASS * 0.95, bank)
|
|
174
|
+
for (const zn of meadow.tall)
|
|
175
|
+
h = lerp(h, zn.h * (0.95 + 0.1 * n1), zoneWeight(zn, x, z, 0.5))
|
|
176
|
+
for (const zn of meadow.short)
|
|
177
|
+
h = lerp(h, zn.h, zoneWeight(zn, x, z, 0.8))
|
|
178
|
+
// the Crags: short above +45, bare snow / rock above +54
|
|
179
|
+
h *= 1 - smoothstep(38, 48, y) * 0.7
|
|
180
|
+
if (y > 54) h = 0
|
|
181
|
+
// the valley by the river is fresh green, the escarpment spurs in between
|
|
182
|
+
const near = 1 - smoothstep(half, half + 30, dr)
|
|
183
|
+
// the chunk's splat is [grass, gravel + dirt, rock, snow]: grass only where the ground is painted grass
|
|
184
|
+
h *= smoothstep(0.3, 0.65, P.splatAt(x, z)[0])
|
|
185
|
+
tone = Math.max(0, tone - near * 0.25)
|
|
186
|
+
} else {
|
|
187
|
+
const band = smoothstep(
|
|
188
|
+
0.25,
|
|
189
|
+
0.5,
|
|
190
|
+
noise.fbm(x * 0.012 + 3.1, z * 0.024, 3),
|
|
191
|
+
)
|
|
192
|
+
h = lerp(h, TALL_GRASS, band)
|
|
193
|
+
}
|
|
194
|
+
// slopes too steep for turf; yurt / cabin pads grazed; no grass in water
|
|
195
|
+
h *= smoothstep(0.62, 0.8, ny)
|
|
196
|
+
h *= 1 - 0.85 * P.cabinMask(x, z)
|
|
197
|
+
if (P.pondMask(x, z) > 0.02 || y < P.waterLevel() + 0.15) h = 0
|
|
198
|
+
out[o] = h
|
|
199
|
+
out[o + 1] = tone
|
|
200
|
+
// flower drifts: blobs 8–25 m across, sharp-edged (a drift, not a sprinkle), each mostly one species (the
|
|
201
|
+
// dressing reads these for its 3D lupins / daisies)
|
|
202
|
+
out[o + 2] = smoothstep(
|
|
203
|
+
0.22,
|
|
204
|
+
0.42,
|
|
205
|
+
noise2.fbm(x * 0.045 + 40, z * 0.045 - 12, 2),
|
|
206
|
+
)
|
|
207
|
+
// the grass's own bloom: the drifts above plus broad soft meadows of flowers 20–60 m across (only the grass's
|
|
208
|
+
// small heads use it — the dressing's 3D lupins / daisies stay on the tighter drifts)
|
|
209
|
+
out[o + 7] = Math.max(
|
|
210
|
+
out[o + 2] ?? 0,
|
|
211
|
+
0.7 * smoothstep(0.0, 0.35, noise2.fbm(x * 0.02 - 13, z * 0.02 + 57, 2)),
|
|
212
|
+
)
|
|
213
|
+
out[o + 3] = 0.5 + 0.5 * noise.get(x * 0.021 - 71, z * 0.021 + 33)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
private corner(ix: number, iz: number): number {
|
|
217
|
+
const ln = this.ln,
|
|
218
|
+
cx = Math.min(ln - 1, Math.max(0, ix)),
|
|
219
|
+
cz = Math.min(ln - 1, Math.max(0, iz))
|
|
220
|
+
const o = (cz * ln + cx) * STRIDE
|
|
221
|
+
if (Number.isNaN(this.lattice[o] ?? Number.NaN))
|
|
222
|
+
this.evalField(
|
|
223
|
+
cx * LATTICE - this.ports.half,
|
|
224
|
+
cz * LATTICE - this.ports.half,
|
|
225
|
+
this.lattice,
|
|
226
|
+
o,
|
|
227
|
+
)
|
|
228
|
+
return o
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** bilinear sample of channel `ch` of the cached lattice */
|
|
232
|
+
sample(x: number, z: number, ch: number): number {
|
|
233
|
+
const half = this.ports.half,
|
|
234
|
+
lattice = this.lattice
|
|
235
|
+
const fx = (x + half) / LATTICE,
|
|
236
|
+
fz = (z + half) / LATTICE
|
|
237
|
+
const ix = Math.floor(fx),
|
|
238
|
+
iz = Math.floor(fz)
|
|
239
|
+
const u = fx - ix,
|
|
240
|
+
v = fz - iz
|
|
241
|
+
const a = lattice[this.corner(ix, iz) + ch] ?? 0,
|
|
242
|
+
b = lattice[this.corner(ix + 1, iz) + ch] ?? 0
|
|
243
|
+
const c = lattice[this.corner(ix, iz + 1) + ch] ?? 0,
|
|
244
|
+
d = lattice[this.corner(ix + 1, iz + 1) + ch] ?? 0
|
|
245
|
+
return lerp(lerp(a, b, u), lerp(c, d, u), v)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** trails: a bare bed (1.6 m half-width, the authored meadow's roads 3.9 m), a grazed verge, the field back ~5 m further — per point, a 4 m
|
|
249
|
+
* lattice cannot hold a 3 m path */
|
|
250
|
+
trailGrass(h: number, td: number): number {
|
|
251
|
+
// the authored meadow's roads are painted dirt ~3.6–4.4 m either side of the centreline (the def's groundColor)
|
|
252
|
+
// a lush verge right up to the dirt: a short fringe for half a metre, the full meadow a metre and a half out
|
|
253
|
+
const bed = this.ports.layout !== null ? 3.9 : 1.6
|
|
254
|
+
if (td >= bed + 1.8) return h
|
|
255
|
+
return td < bed
|
|
256
|
+
? 0
|
|
257
|
+
: lerp(Math.min(h, 0.22), h, smoothstep(bed + 0.3, bed + 1.8, td)) *
|
|
258
|
+
smoothstep(bed, bed + 0.35, td)
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Grass height before trampling, metres (0 = no grass). `td` = trailDistance(x, z) when the caller has it
|
|
263
|
+
* (the seeder skips it for cells far from any trail: pass Infinity). `exact` also tests the chunk's splat at the
|
|
264
|
+
* point (the seeder does on edge cells; the senses need not).
|
|
265
|
+
*/
|
|
266
|
+
baseHeightAt(
|
|
267
|
+
x: number,
|
|
268
|
+
z: number,
|
|
269
|
+
td: number = this.ports.trailDistance(x, z),
|
|
270
|
+
exact = false,
|
|
271
|
+
): number {
|
|
272
|
+
const P = this.ports
|
|
273
|
+
if (!this.inChunk(x, z, 0.5)) return 0
|
|
274
|
+
if (P.heightAt(x, z) < P.waterLevel() + 0.15) return 0
|
|
275
|
+
const h = this.trailGrass(this.sample(x, z, 0), td)
|
|
276
|
+
const meadow = P.layout
|
|
277
|
+
if (meadow === null || h <= 0) return h
|
|
278
|
+
// the yurt floors stay bare
|
|
279
|
+
for (const y of meadow.bare) {
|
|
280
|
+
const dx = x - y.x,
|
|
281
|
+
dz = z - y.z
|
|
282
|
+
if (dx * dx + dz * dz < (y.r + 0.3) ** 2) return 0
|
|
283
|
+
}
|
|
284
|
+
// `exact`: also read the painted ground at the point (a road bed / gravel bar edge the 4 m lattice blurs)
|
|
285
|
+
return exact ? h * smoothstep(0.35, 0.6, P.splatAt(x, z)[0]) : h
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* oxlint-disable curly, import/group-exports, typescript/explicit-function-return-type -- verbatim port of the engine's law (SDK-SPLIT SP4); golden vectors pin it, so it keeps the engine's form */
|
|
2
|
+
/** SDK-SPLIT SP4f1 (Q35): moved from engine `shared/host/headlessSections.ts`; the build and the headless worker read one list. */
|
|
3
|
+
import { parsePlatformDataSection } from './platformDataSections.ts'
|
|
4
|
+
|
|
5
|
+
/** One defining context catalogue for author-build intake and worker transport. */
|
|
6
|
+
export const HEADLESS_CONTEXT_SECTIONS = [
|
|
7
|
+
'actors/species-programs',
|
|
8
|
+
'view/modules',
|
|
9
|
+
'sim/scripts',
|
|
10
|
+
'actors/spawn-scripts',
|
|
11
|
+
'actors/return-scripts',
|
|
12
|
+
'actors/moves',
|
|
13
|
+
'actors/strikes',
|
|
14
|
+
'world/targets',
|
|
15
|
+
'sim/runtime-plan',
|
|
16
|
+
'sim/bodies',
|
|
17
|
+
] as const
|
|
18
|
+
|
|
19
|
+
/** Explicit admitted decision/move context crossing the worker boundary; no ABI is inferred from bytes. */
|
|
20
|
+
export function headlessSections(
|
|
21
|
+
input?: ReadonlyMap<string, unknown>,
|
|
22
|
+
): Map<string, unknown> {
|
|
23
|
+
const sections = new Map<string, unknown>()
|
|
24
|
+
for (const name of HEADLESS_CONTEXT_SECTIONS) {
|
|
25
|
+
if (input?.has(name) === true)
|
|
26
|
+
sections.set(name, parsePlatformDataSection(name, input.get(name)))
|
|
27
|
+
}
|
|
28
|
+
return sections
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** What a shard product lends this list: its sections by name (the engine's `ShardProduct`, structurally). */
|
|
32
|
+
export interface HeadlessSectionSource {
|
|
33
|
+
readonly has: (name: string) => boolean
|
|
34
|
+
readonly section: (name: string) => unknown
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Forward the complete verified native context, including targets and plan selection. */
|
|
38
|
+
export function productHeadlessSections(
|
|
39
|
+
product: HeadlessSectionSource,
|
|
40
|
+
): Map<string, unknown> {
|
|
41
|
+
return headlessSections(
|
|
42
|
+
new Map(
|
|
43
|
+
HEADLESS_CONTEXT_SECTIONS.filter(name => product.has(name)).map(name => [
|
|
44
|
+
name,
|
|
45
|
+
product.section(name),
|
|
46
|
+
]),
|
|
47
|
+
),
|
|
48
|
+
)
|
|
49
|
+
}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
{
|
|
2
|
+
"about": "SDK-SPLIT SP4f2: engine world/interact/types.ts and game/plugin/quests.ts compileQuestTable over interact-table.golden-specs.ts",
|
|
3
|
+
"flags": [
|
|
4
|
+
[
|
|
5
|
+
"open:sea-chest",
|
|
6
|
+
["open:sea-chest", "chest:any", "key:cellar", "found:map"],
|
|
7
|
+
["talked:castaway", "key:hold"]
|
|
8
|
+
],
|
|
9
|
+
["taken:hold-key", ["taken:hold-key", "key:hold"], ["dead:sailor"]],
|
|
10
|
+
["open:sluice", ["open:sluice"], ["plate:p1", "lever:jam", "key:cellar"]],
|
|
11
|
+
["lever:jam", ["lever:jam", "jammed"], []],
|
|
12
|
+
["lever:loose", ["lever:loose"], []],
|
|
13
|
+
["plate:p1", ["plate:p1"], []],
|
|
14
|
+
[null, [], []],
|
|
15
|
+
["taken:flint", ["taken:flint", "has:flint"], ["jammed"]],
|
|
16
|
+
["lit:b-lit", ["lit:b-lit"], []],
|
|
17
|
+
["used:seat", ["used:seat"], ["lit:b-lit"]],
|
|
18
|
+
["used:altar", ["used:altar"], ["shard:1", "shard:2"]]
|
|
19
|
+
],
|
|
20
|
+
"transient": ["plate:"],
|
|
21
|
+
"compiled": [
|
|
22
|
+
{
|
|
23
|
+
"ok": {
|
|
24
|
+
"marks": [],
|
|
25
|
+
"rows": [
|
|
26
|
+
{
|
|
27
|
+
"id": "flint",
|
|
28
|
+
"act": 1,
|
|
29
|
+
"at": "flint",
|
|
30
|
+
"needs": [{ "none": ["jammed"] }, { "none": ["taken:flint"] }],
|
|
31
|
+
"sets": ["taken:flint", "has:flint"]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "seat",
|
|
35
|
+
"act": 2,
|
|
36
|
+
"at": "seat",
|
|
37
|
+
"needs": [{ "all": ["lit:b-lit"] }],
|
|
38
|
+
"sets": ["used:seat"]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "jam",
|
|
42
|
+
"act": 3,
|
|
43
|
+
"at": "jam",
|
|
44
|
+
"needs": [{ "none": ["lever:jam"] }],
|
|
45
|
+
"sets": ["lever:jam"]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{ "error": "Unsupported quest table action loose" },
|
|
51
|
+
{ "error": "Unsupported quest table action nobody" },
|
|
52
|
+
{ "error": "Unsupported quest table action sea-chest" }
|
|
53
|
+
],
|
|
54
|
+
"placements": [
|
|
55
|
+
[
|
|
56
|
+
{
|
|
57
|
+
"ok": [
|
|
58
|
+
{
|
|
59
|
+
"id": "sea-chest",
|
|
60
|
+
"kind": "chest",
|
|
61
|
+
"x": 0,
|
|
62
|
+
"y": 1,
|
|
63
|
+
"z": -0.5,
|
|
64
|
+
"yaw": 0
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "hold-key",
|
|
68
|
+
"kind": "key",
|
|
69
|
+
"x": 2.5,
|
|
70
|
+
"y": 2,
|
|
71
|
+
"z": -1.5,
|
|
72
|
+
"yaw": 0.1
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "sluice",
|
|
76
|
+
"kind": "door",
|
|
77
|
+
"x": 5,
|
|
78
|
+
"y": 3,
|
|
79
|
+
"z": -2.5,
|
|
80
|
+
"yaw": 0.2
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "jam",
|
|
84
|
+
"kind": "lever",
|
|
85
|
+
"x": 7.5,
|
|
86
|
+
"y": 4,
|
|
87
|
+
"z": -3.5,
|
|
88
|
+
"yaw": 0.30000000000000004
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "loose",
|
|
92
|
+
"kind": "lever",
|
|
93
|
+
"x": 10,
|
|
94
|
+
"y": 5,
|
|
95
|
+
"z": -4.5,
|
|
96
|
+
"yaw": 0.4
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "p1",
|
|
100
|
+
"kind": "plate",
|
|
101
|
+
"x": 12.5,
|
|
102
|
+
"y": 6,
|
|
103
|
+
"z": -5.5,
|
|
104
|
+
"yaw": 0.5
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "b1",
|
|
108
|
+
"kind": "barrel",
|
|
109
|
+
"x": 15,
|
|
110
|
+
"y": 7,
|
|
111
|
+
"z": -6.5,
|
|
112
|
+
"yaw": 0.6000000000000001
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "flint",
|
|
116
|
+
"kind": "pickup",
|
|
117
|
+
"x": 17.5,
|
|
118
|
+
"y": 8,
|
|
119
|
+
"z": -7.5,
|
|
120
|
+
"yaw": 0.7000000000000001
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "b-lit",
|
|
124
|
+
"kind": "beacon",
|
|
125
|
+
"x": 20,
|
|
126
|
+
"y": 9,
|
|
127
|
+
"z": -8.5,
|
|
128
|
+
"yaw": 0.8
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "seat",
|
|
132
|
+
"kind": "bench",
|
|
133
|
+
"x": 22.5,
|
|
134
|
+
"y": 10,
|
|
135
|
+
"z": -9.5,
|
|
136
|
+
"yaw": 0.9
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "altar",
|
|
140
|
+
"kind": "altar",
|
|
141
|
+
"x": 25,
|
|
142
|
+
"y": 11,
|
|
143
|
+
"z": -10.5,
|
|
144
|
+
"yaw": 1
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"ok": {
|
|
150
|
+
"external": ["dead:sailor", "talked:castaway"],
|
|
151
|
+
"rows": [
|
|
152
|
+
{
|
|
153
|
+
"kind": "chest",
|
|
154
|
+
"id": "sea-chest",
|
|
155
|
+
"at": { "poi": "world", "x": 0, "y": 1, "z": -0.5, "yaw": 0 },
|
|
156
|
+
"lock": "hold",
|
|
157
|
+
"contents": [
|
|
158
|
+
{ "item": "coin", "n": 3 },
|
|
159
|
+
{ "key": "cellar", "label": "Cellar key" },
|
|
160
|
+
{ "flag": "found:map", "label": "A map" }
|
|
161
|
+
],
|
|
162
|
+
"requires": { "all": ["talked:castaway"] },
|
|
163
|
+
"sets": ["chest:any"]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"kind": "key",
|
|
167
|
+
"id": "hold-key",
|
|
168
|
+
"at": { "poi": "world", "x": 2.5, "y": 2, "z": -1.5, "yaw": 0.1 },
|
|
169
|
+
"key": "hold",
|
|
170
|
+
"label": "Hold key",
|
|
171
|
+
"showWhen": { "any": ["dead:sailor"] }
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"kind": "door",
|
|
175
|
+
"id": "sluice",
|
|
176
|
+
"at": { "poi": "world", "x": 5, "y": 3, "z": -2.5, "yaw": 0.2 },
|
|
177
|
+
"w": 2,
|
|
178
|
+
"h": 3,
|
|
179
|
+
"look": "sluice",
|
|
180
|
+
"opensWhen": { "all": ["plate:p1"], "none": ["lever:jam"] },
|
|
181
|
+
"latch": true,
|
|
182
|
+
"lock": "cellar"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"kind": "lever",
|
|
186
|
+
"id": "jam",
|
|
187
|
+
"at": {
|
|
188
|
+
"poi": "world",
|
|
189
|
+
"x": 7.5,
|
|
190
|
+
"y": 4,
|
|
191
|
+
"z": -3.5,
|
|
192
|
+
"yaw": 0.30000000000000004
|
|
193
|
+
},
|
|
194
|
+
"label": "Jam",
|
|
195
|
+
"latch": true,
|
|
196
|
+
"sets": ["jammed"]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "lever",
|
|
200
|
+
"id": "loose",
|
|
201
|
+
"at": { "poi": "world", "x": 10, "y": 5, "z": -4.5, "yaw": 0.4 },
|
|
202
|
+
"label": "Loose"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"kind": "plate",
|
|
206
|
+
"id": "p1",
|
|
207
|
+
"at": {
|
|
208
|
+
"poi": "world",
|
|
209
|
+
"x": 12.5,
|
|
210
|
+
"y": 6,
|
|
211
|
+
"z": -5.5,
|
|
212
|
+
"yaw": 0.5
|
|
213
|
+
},
|
|
214
|
+
"size": 1.5,
|
|
215
|
+
"by": "barrel"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"kind": "barrel",
|
|
219
|
+
"id": "b1",
|
|
220
|
+
"at": {
|
|
221
|
+
"poi": "world",
|
|
222
|
+
"x": 15,
|
|
223
|
+
"y": 7,
|
|
224
|
+
"z": -6.5,
|
|
225
|
+
"yaw": 0.6000000000000001
|
|
226
|
+
},
|
|
227
|
+
"leash": 12
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"kind": "pickup",
|
|
231
|
+
"id": "flint",
|
|
232
|
+
"at": {
|
|
233
|
+
"poi": "world",
|
|
234
|
+
"x": 17.5,
|
|
235
|
+
"y": 8,
|
|
236
|
+
"z": -7.5,
|
|
237
|
+
"yaw": 0.7000000000000001
|
|
238
|
+
},
|
|
239
|
+
"look": "flint",
|
|
240
|
+
"item": "flint",
|
|
241
|
+
"label": "Flint",
|
|
242
|
+
"sets": ["has:flint"],
|
|
243
|
+
"requires": { "none": ["jammed"] }
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"kind": "beacon",
|
|
247
|
+
"id": "b-lit",
|
|
248
|
+
"at": { "poi": "world", "x": 20, "y": 9, "z": -8.5, "yaw": 0.8 },
|
|
249
|
+
"label": "Beacon"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"kind": "bench",
|
|
253
|
+
"id": "seat",
|
|
254
|
+
"at": {
|
|
255
|
+
"poi": "world",
|
|
256
|
+
"x": 22.5,
|
|
257
|
+
"y": 10,
|
|
258
|
+
"z": -9.5,
|
|
259
|
+
"yaw": 0.9
|
|
260
|
+
},
|
|
261
|
+
"label": "Sit",
|
|
262
|
+
"showWhen": { "all": ["lit:b-lit"] }
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"kind": "altar",
|
|
266
|
+
"id": "altar",
|
|
267
|
+
"at": { "poi": "world", "x": 25, "y": 11, "z": -10.5, "yaw": 1 },
|
|
268
|
+
"label": "Altar",
|
|
269
|
+
"fills": ["shard:1", "shard:2"],
|
|
270
|
+
"socketLook": "token"
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
[
|
|
277
|
+
{
|
|
278
|
+
"ok": [
|
|
279
|
+
{ "id": "hold-key", "kind": "key", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
280
|
+
{ "id": "sluice", "kind": "door", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
281
|
+
{ "id": "jam", "kind": "lever", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
282
|
+
{ "id": "loose", "kind": "lever", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
283
|
+
{ "id": "p1", "kind": "plate", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
284
|
+
{ "id": "b1", "kind": "barrel", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
285
|
+
{ "id": "flint", "kind": "pickup", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
286
|
+
{ "id": "b-lit", "kind": "beacon", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
287
|
+
{ "id": "seat", "kind": "bench", "x": 0, "y": 0, "z": 0, "yaw": 0 },
|
|
288
|
+
{ "id": "altar", "kind": "altar", "x": 0, "y": 0, "z": 0, "yaw": 0 }
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
{ "error": "Incomplete interactable placements" }
|
|
292
|
+
],
|
|
293
|
+
[
|
|
294
|
+
{ "error": "Invalid or duplicate interactable placement" },
|
|
295
|
+
{ "error": "Invalid or duplicate interactable placement" }
|
|
296
|
+
],
|
|
297
|
+
[
|
|
298
|
+
{ "error": "Invalid or duplicate interactable placement" },
|
|
299
|
+
{ "error": "Invalid or duplicate interactable placement" }
|
|
300
|
+
],
|
|
301
|
+
[
|
|
302
|
+
{ "error": "Invalid interactable placement rows" },
|
|
303
|
+
{ "error": "Invalid interactable placement rows" }
|
|
304
|
+
]
|
|
305
|
+
],
|
|
306
|
+
"places": [
|
|
307
|
+
{ "ok": { "x": 3, "z": 4, "y": 2, "yaw": 0 } },
|
|
308
|
+
{ "ok": { "x": 25, "z": 0, "y": 1.7, "yaw": 0 } },
|
|
309
|
+
{
|
|
310
|
+
"ok": {
|
|
311
|
+
"x": 12.215313703214393,
|
|
312
|
+
"z": -4.303949331880392,
|
|
313
|
+
"y": -0.15098243002841472,
|
|
314
|
+
"yaw": 1
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"ok": {
|
|
319
|
+
"x": 12.215313703214393,
|
|
320
|
+
"z": -4.303949331880392,
|
|
321
|
+
"y": 7,
|
|
322
|
+
"yaw": 0.6
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{ "ok": { "x": -28, "z": 15, "y": 0.6980690824569424, "yaw": 1.1 } },
|
|
326
|
+
{ "ok": { "x": -31, "z": 10, "y": 3.5, "yaw": 0 } },
|
|
327
|
+
{
|
|
328
|
+
"ok": {
|
|
329
|
+
"x": -31.36805547124873,
|
|
330
|
+
"z": 12.358363262049016,
|
|
331
|
+
"y": 0.7004632940187168,
|
|
332
|
+
"yaw": -2.1
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{ "ok": { "x": 4, "z": 5, "y": -0.3332291921975812, "yaw": 0.2 } },
|
|
336
|
+
{ "error": "Missing quest frame cave" },
|
|
337
|
+
{ "error": "Invalid quest placement coordinate" }
|
|
338
|
+
],
|
|
339
|
+
"floors": [2, 1.4, -0.2799225651577502]
|
|
340
|
+
}
|