@wildshard/shard-format 0.15.0 → 0.17.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 +36 -3
- package/src/format/assetAdmission.ts +5 -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/creature-perch-admission.ts +86 -0
- package/src/format/creature-perch.ts +269 -0
- package/src/format/creatures.ts +11 -8
- 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/shardSchema.ts +3 -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,269 @@
|
|
|
1
|
+
import {
|
|
2
|
+
array,
|
|
3
|
+
check,
|
|
4
|
+
finite,
|
|
5
|
+
maxLength,
|
|
6
|
+
maxValue,
|
|
7
|
+
minLength,
|
|
8
|
+
minValue,
|
|
9
|
+
number,
|
|
10
|
+
pipe,
|
|
11
|
+
regex,
|
|
12
|
+
strictObject,
|
|
13
|
+
string,
|
|
14
|
+
tuple,
|
|
15
|
+
picklist,
|
|
16
|
+
intersect,
|
|
17
|
+
object,
|
|
18
|
+
} from 'valibot'
|
|
19
|
+
|
|
20
|
+
import { BodySlotsSchema } from './bodySlots.ts'
|
|
21
|
+
import { MixedPopulationSchema } from './mixedPopulation.ts'
|
|
22
|
+
import { BodyLaunchSchema } from './nativeItems.ts'
|
|
23
|
+
import { ReturnProgramWireDocumentSchema } from './returnProgramDocument.ts'
|
|
24
|
+
|
|
25
|
+
import type { BodySlotsData } from './bodySlots.ts'
|
|
26
|
+
import type {
|
|
27
|
+
MixedPopulationRows,
|
|
28
|
+
MixedPopulationRowsInput,
|
|
29
|
+
} from './mixedPopulation.ts'
|
|
30
|
+
import type { ReturnProgramDocumentInput } from './returnProgramDocument.ts'
|
|
31
|
+
import type { GenericSchema, InferInput, InferOutput } from 'valibot'
|
|
32
|
+
|
|
33
|
+
type Frozen<Value> = Value extends readonly (infer Item)[]
|
|
34
|
+
? readonly Frozen<Item>[]
|
|
35
|
+
: Value extends object
|
|
36
|
+
? { readonly [Key in keyof Value]: Frozen<Value[Key]> }
|
|
37
|
+
: Value
|
|
38
|
+
|
|
39
|
+
type Stream = 'ai' | 'spawn' | 'gameplay' | 'cosmetic'
|
|
40
|
+
type PolicyInput = MixedPopulationRowsInput['perch'] & { attackStream: Stream }
|
|
41
|
+
type Policy = MixedPopulationRows['perch'] & { attackStream: Stream }
|
|
42
|
+
|
|
43
|
+
/** One shared physical pool and explicit native perch-body authority. */
|
|
44
|
+
interface CreaturePerchBodyInput {
|
|
45
|
+
id: string
|
|
46
|
+
sites: { at: [number, number, number]; base: [number, number, number] }[]
|
|
47
|
+
program: unknown
|
|
48
|
+
policy: PolicyInput
|
|
49
|
+
projectile: {
|
|
50
|
+
strike: string
|
|
51
|
+
launch: InferInput<typeof BodyLaunchSchema>
|
|
52
|
+
pool: BodySlotsData
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** Defaults and serialization stay with each existing defining child schema. */
|
|
56
|
+
interface CreaturePerchBody {
|
|
57
|
+
id: string
|
|
58
|
+
sites: { at: [number, number, number]; base: [number, number, number] }[]
|
|
59
|
+
program: ReturnProgramDocumentInput
|
|
60
|
+
policy: Policy
|
|
61
|
+
projectile: {
|
|
62
|
+
strike: string
|
|
63
|
+
launch: InferOutput<typeof BodyLaunchSchema>
|
|
64
|
+
pool: BodySlotsData
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const ID_MAX = 128
|
|
69
|
+
const COORD_MAX = 250
|
|
70
|
+
const ZERO = 0
|
|
71
|
+
const ONE = 1
|
|
72
|
+
const TWO = 2
|
|
73
|
+
const SITE_MAX = 1024
|
|
74
|
+
|
|
75
|
+
const identifier = pipe(
|
|
76
|
+
string(),
|
|
77
|
+
regex(/^[a-z][a-z0-9.:-]*$/u),
|
|
78
|
+
maxLength(ID_MAX),
|
|
79
|
+
)
|
|
80
|
+
const coordinate = pipe(
|
|
81
|
+
number(),
|
|
82
|
+
finite(),
|
|
83
|
+
minValue(-COORD_MAX),
|
|
84
|
+
maxValue(COORD_MAX),
|
|
85
|
+
)
|
|
86
|
+
const point = tuple([coordinate, coordinate, coordinate])
|
|
87
|
+
const native = MixedPopulationSchema.entries.perch
|
|
88
|
+
const rootNames = [
|
|
89
|
+
['drop', 'drop'],
|
|
90
|
+
['velocity', 'vy'],
|
|
91
|
+
['land', 'land'],
|
|
92
|
+
['climb', 'climb'],
|
|
93
|
+
['height', 'perchH'],
|
|
94
|
+
['baseX', 'bx'],
|
|
95
|
+
['baseZ', 'bz'],
|
|
96
|
+
['x', 'px'],
|
|
97
|
+
['z', 'pz'],
|
|
98
|
+
] as const
|
|
99
|
+
|
|
100
|
+
function validPolicy(row: Frozen<Policy>): boolean {
|
|
101
|
+
const { root } = row
|
|
102
|
+
const names = rootNames.every(
|
|
103
|
+
([key, name]: readonly [string, string]): boolean =>
|
|
104
|
+
Reflect.get(root, key) === name,
|
|
105
|
+
)
|
|
106
|
+
const { actions } = row
|
|
107
|
+
return (
|
|
108
|
+
names &&
|
|
109
|
+
root.gravity > ZERO &&
|
|
110
|
+
root.speed > ZERO &&
|
|
111
|
+
root.landing >= ZERO &&
|
|
112
|
+
Math.abs(row.sourceHeight) <= COORD_MAX &&
|
|
113
|
+
Math.abs(row.targetHeight) <= COORD_MAX &&
|
|
114
|
+
actions.stateKey === 'st' &&
|
|
115
|
+
actions.states.join('|') ===
|
|
116
|
+
'perch|ground-idle|attack|drop|ground|return|climb' &&
|
|
117
|
+
actions.actions.length === TWO &&
|
|
118
|
+
new Set(
|
|
119
|
+
actions.actions.map(
|
|
120
|
+
(action: Frozen<Policy['actions']['actions'][number]>): string =>
|
|
121
|
+
action.effect,
|
|
122
|
+
),
|
|
123
|
+
).size === TWO &&
|
|
124
|
+
actions.actions.every(
|
|
125
|
+
(action: Frozen<Policy['actions']['actions'][number]>): boolean =>
|
|
126
|
+
(action.effect === 'bite' || action.effect === 'throw') &&
|
|
127
|
+
action.state === TWO &&
|
|
128
|
+
action.phase >= ZERO &&
|
|
129
|
+
action.phase <= ONE &&
|
|
130
|
+
action.once.key === 'hit' &&
|
|
131
|
+
action.once.value === ONE &&
|
|
132
|
+
action.once.test === 'falsy' &&
|
|
133
|
+
action.when?.key === 'bite' &&
|
|
134
|
+
action.when.test === (action.effect === 'bite' ? 'truthy' : 'falsy'),
|
|
135
|
+
)
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const requiredStream = object({
|
|
140
|
+
attackStream: picklist(['ai', 'spawn', 'gameplay', 'cosmetic']),
|
|
141
|
+
})
|
|
142
|
+
const policy: GenericSchema<PolicyInput, Policy> = pipe(
|
|
143
|
+
intersect([native, requiredStream]),
|
|
144
|
+
check<Policy, string>(
|
|
145
|
+
validPolicy,
|
|
146
|
+
'Existing native perch memory and body protocol',
|
|
147
|
+
),
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
const site = strictObject({ at: point, base: point })
|
|
151
|
+
const sites = pipe(array(site), minLength(ONE), maxLength(SITE_MAX))
|
|
152
|
+
|
|
153
|
+
/** Complete data only: native admission still verifies module bytes and references. */
|
|
154
|
+
const CreaturePerchBodySchema: GenericSchema<
|
|
155
|
+
CreaturePerchBodyInput,
|
|
156
|
+
CreaturePerchBody
|
|
157
|
+
> = pipe(
|
|
158
|
+
strictObject({
|
|
159
|
+
id: identifier,
|
|
160
|
+
sites,
|
|
161
|
+
program: ReturnProgramWireDocumentSchema,
|
|
162
|
+
policy,
|
|
163
|
+
projectile: strictObject({
|
|
164
|
+
strike: identifier,
|
|
165
|
+
launch: BodyLaunchSchema,
|
|
166
|
+
pool: BodySlotsSchema,
|
|
167
|
+
}),
|
|
168
|
+
}),
|
|
169
|
+
check<CreaturePerchBody, string>(
|
|
170
|
+
(row: Frozen<CreaturePerchBody>): boolean =>
|
|
171
|
+
row.program.script.side === 'sim' &&
|
|
172
|
+
new Set(
|
|
173
|
+
row.sites.map(
|
|
174
|
+
(position: Frozen<CreaturePerchBody['sites'][number]>): string =>
|
|
175
|
+
position.at.join(','),
|
|
176
|
+
),
|
|
177
|
+
).size === row.sites.length,
|
|
178
|
+
'Unique declared perch sites and a simulation-owned return program',
|
|
179
|
+
),
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
const BODY_MAX = 64
|
|
183
|
+
const POOL_MAX = 128
|
|
184
|
+
function boundedCatalogue(rows: readonly Frozen<CreaturePerchBody>[]): boolean {
|
|
185
|
+
return (
|
|
186
|
+
new Set(rows.map((row: Frozen<CreaturePerchBody>): string => row.id))
|
|
187
|
+
.size === rows.length &&
|
|
188
|
+
rows.reduce(
|
|
189
|
+
(total: number, row: Frozen<CreaturePerchBody>): number =>
|
|
190
|
+
total + row.projectile.pool.count,
|
|
191
|
+
ZERO,
|
|
192
|
+
) <= POOL_MAX
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
/** Catalogue identities own shared bounded pools, independently of actor count. */
|
|
196
|
+
const CreaturePerchBodiesSchema: GenericSchema<
|
|
197
|
+
CreaturePerchBodyInput[],
|
|
198
|
+
CreaturePerchBody[]
|
|
199
|
+
> = pipe(
|
|
200
|
+
array(CreaturePerchBodySchema),
|
|
201
|
+
maxLength(BODY_MAX),
|
|
202
|
+
check<CreaturePerchBody[], string>(
|
|
203
|
+
boundedCatalogue,
|
|
204
|
+
'Unique perch bodies and at most 128 physical slots',
|
|
205
|
+
),
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
interface BrainIdentity {
|
|
209
|
+
readonly id: string
|
|
210
|
+
readonly kind?: string
|
|
211
|
+
readonly pattern?: string
|
|
212
|
+
}
|
|
213
|
+
interface BodyReference {
|
|
214
|
+
readonly id: string
|
|
215
|
+
readonly policy: { readonly kind: string; readonly strike: string }
|
|
216
|
+
}
|
|
217
|
+
interface SpawnReference {
|
|
218
|
+
readonly brain: string | null
|
|
219
|
+
readonly species?: string
|
|
220
|
+
readonly strike?: string | null
|
|
221
|
+
readonly home?: unknown
|
|
222
|
+
readonly perchBody?: string
|
|
223
|
+
}
|
|
224
|
+
/** Reference checks run with the existing creature section before a host exists. */
|
|
225
|
+
function creaturePerchRules(
|
|
226
|
+
content: Readonly<{
|
|
227
|
+
brains: readonly BrainIdentity[]
|
|
228
|
+
perchBodies?: readonly BodyReference[]
|
|
229
|
+
spawns: readonly SpawnReference[]
|
|
230
|
+
}>,
|
|
231
|
+
): string[] {
|
|
232
|
+
const catalogue = new Map(
|
|
233
|
+
(content.perchBodies ?? []).map(
|
|
234
|
+
(row: BodyReference): readonly [string, BodyReference] => [row.id, row],
|
|
235
|
+
),
|
|
236
|
+
)
|
|
237
|
+
const errors: string[] = []
|
|
238
|
+
for (const spawn of content.spawns) {
|
|
239
|
+
if (spawn.perchBody !== undefined) {
|
|
240
|
+
const authority = catalogue.get(spawn.perchBody)
|
|
241
|
+
const brain = content.brains.find(
|
|
242
|
+
(row: BrainIdentity): boolean => row.id === spawn.brain,
|
|
243
|
+
)
|
|
244
|
+
if (
|
|
245
|
+
authority === undefined ||
|
|
246
|
+
spawn.home === undefined ||
|
|
247
|
+
authority.policy.kind !== spawn.species ||
|
|
248
|
+
authority.policy.strike !== spawn.strike ||
|
|
249
|
+
!(
|
|
250
|
+
brain?.kind === 'perch-hunter' ||
|
|
251
|
+
(brain?.kind === 'guardian' && brain.pattern === 'perch')
|
|
252
|
+
)
|
|
253
|
+
) {
|
|
254
|
+
errors.push('declared perch body authority')
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return errors
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export {
|
|
262
|
+
CreaturePerchBodySchema,
|
|
263
|
+
CreaturePerchBodiesSchema,
|
|
264
|
+
creaturePerchRules,
|
|
265
|
+
type CreaturePerchBody,
|
|
266
|
+
type CreaturePerchBodyInput,
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export { creaturePerchAdmissionRows } from './creature-perch-admission.ts'
|
package/src/format/creatures.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CreaturePerchBodiesSchema, creaturePerchRules } from './creature-perch.ts';
|
|
2
|
+
import type { CreaturePerchBodyInput, CreaturePerchBody } from './creature-perch.ts';
|
|
1
3
|
import { StrikeDebrisSchema } from './strike-debris.ts';
|
|
2
4
|
import type { StrikeDebrisPolicy } from './strike-debris.ts';
|
|
3
5
|
import * as v from 'valibot';
|
|
@@ -20,7 +22,7 @@ const brain = v.pipe(v.strictObject({ id, kind: v.literal('pursue'), awareRadius
|
|
|
20
22
|
v.check((b) => b.stopDistance <= b.awareRadius && b.awareRadius <= b.leashRadius && b.wanderRadius <= b.leashRadius, 'ordered brain radii'));
|
|
21
23
|
/** One authored body's home; never inferred from a species or another actor. */
|
|
22
24
|
export const CreatureHomeSchema: v.GenericSchema<ShardCreatureHomeInput, ShardCreatureHome> = v.strictObject({ x: coord, y: coord, z: coord, r: v.pipe(radius, v.minValue(Number.MIN_VALUE)) });
|
|
23
|
-
/** Bounded per-spawn home
|
|
25
|
+
/** Bounded per-spawn home for an admitted home-aware or perch policy. */
|
|
24
26
|
|
|
25
27
|
const memoryKey = v.pipe(v.string(), v.regex(/^[a-zA-Z][a-zA-Z0-9._-]{0,63}$/u),
|
|
26
28
|
v.check(key => !['constructor', 'prototype', '__proto__'].includes(key), 'safe memory key'));
|
|
@@ -60,14 +62,14 @@ const phase = v.pipe(finite, v.minValue(-2 * Math.PI), v.maxValue(2 * Math.PI));
|
|
|
60
62
|
const RESPAWN_MAX = 3600, RESPAWN_MIN = 1;
|
|
61
63
|
const respawn = v.pipe(finite, v.minValue(RESPAWN_MIN), v.maxValue(RESPAWN_MAX));
|
|
62
64
|
/** Social membership names no controller; the species temperament owns assistance. */
|
|
63
|
-
const spawn = v.strictObject({ group: v.exactOptional(id), phaseOffset: v.optional(phase), home: v.optional(CreatureHomeSchema), respawn: v.optional(respawn), id, species: id, variant: id, brain: v.nullable(id), strike: v.nullable(id), seed: v.pipe(finite, v.integer(), v.minValue(0), v.maxValue(0xffffffff)), scale: v.pipe(finite, v.minValue(0.1), v.maxValue(10)), at: v.tuple([coord, coord, coord]), yaw: finite });
|
|
65
|
+
const spawn = v.strictObject({ perchBody: v.exactOptional(id), group: v.exactOptional(id), phaseOffset: v.optional(phase), home: v.optional(CreatureHomeSchema), respawn: v.optional(respawn), id, species: id, variant: id, brain: v.nullable(id), strike: v.nullable(id), seed: v.pipe(finite, v.integer(), v.minValue(0), v.maxValue(0xffffffff)), scale: v.pipe(finite, v.minValue(0.1), v.maxValue(10)), at: v.tuple([coord, coord, coord]), yaw: finite });
|
|
64
66
|
/** Pure-data creature archetypes and stable spawn layouts, expanded before the local sim boots. */
|
|
65
|
-
export const CreaturesSchema: v.GenericSchema<ShardCreaturesInput, ShardCreatures> = v.pipe(v.strictObject({ brains: v.pipe(v.array(v.variant('kind', [brain, SkirmisherSchema, GuardianSchema, PerchHunterSchema, ScriptBrainSchema, RamGrazerSchema, ChallengeGrazerSchema, OrbitDiverSchema, PatrolDiverSchema, BurstFlyerSchema, GrazerSchema, DiverSchema, GuardianPatternsSchema, StalkerSchema])), v.maxLength(64)), groups: v.optional(v.pipe(v.array(GroupBrainSchema), v.maxLength(64)), []), spawns: v.pipe(v.array(spawn), v.maxLength(10000)) }),
|
|
67
|
+
export const CreaturesSchema: v.GenericSchema<ShardCreaturesInput, ShardCreatures> = v.pipe(v.strictObject({ perchBodies: v.exactOptional(CreaturePerchBodiesSchema), brains: v.pipe(v.array(v.variant('kind', [brain, SkirmisherSchema, GuardianSchema, PerchHunterSchema, ScriptBrainSchema, RamGrazerSchema, ChallengeGrazerSchema, OrbitDiverSchema, PatrolDiverSchema, BurstFlyerSchema, GrazerSchema, DiverSchema, GuardianPatternsSchema, StalkerSchema])), v.maxLength(64)), groups: v.optional(v.pipe(v.array(GroupBrainSchema), v.maxLength(64)), []), spawns: v.pipe(v.array(spawn), v.maxLength(10000)) }),
|
|
66
68
|
v.check((c) => creatureRules(c).length === 0, 'creature reference rules'));
|
|
67
69
|
/** Validated brain parameters and spawn layout, with no rig or runtime closure. */
|
|
68
70
|
|
|
69
71
|
/** Unique ids and brain references; species and strikes are resolved against the loader's declared catalogues. */
|
|
70
|
-
export function creatureRules(content: { brains: readonly { id: string; kind?: string; pattern?: string }[]; groups?: readonly { id: string; members: readonly string[] }[]; spawns: readonly { id: string; brain: string | null; home?: unknown; phaseOffset?: unknown }[] }): string[] {
|
|
72
|
+
export function creatureRules(content: { brains: readonly { id: string; kind?: string; pattern?: string }[]; groups?: readonly { id: string; members: readonly string[] }[]; perchBodies?: readonly { id: string; policy: { kind: string; strike: string }; projectile: { pool: { count: number } } }[]; spawns: readonly { id: string; species?: string; strike?: string | null; brain: string | null; home?: unknown; phaseOffset?: unknown; perchBody?: string }[] }): string[] {
|
|
71
73
|
const errors: string[] = [], brains = new Set(content.brains.map((b) => b.id));
|
|
72
74
|
if (brains.size !== content.brains.length) errors.push('unique brain ids');
|
|
73
75
|
for (const group of content.groups ?? []) { if (brains.has(group.id)) errors.push('unique controller ids'); brains.add(group.id); }
|
|
@@ -79,10 +81,11 @@ export function creatureRules(content: { brains: readonly { id: string; kind?: s
|
|
|
79
81
|
|| (policy?.kind === 'grazer' && policy.pattern === 'circle-challenge'))) errors.push('declared per-body circle phase policy');
|
|
80
82
|
if (body.home === undefined) continue;
|
|
81
83
|
if (policy === undefined || !(policy.kind === 'ram-grazer' || policy.kind === 'orbit-diver'
|
|
82
|
-
|| policy.kind === 'patrol-diver' || policy.kind === 'burst-flyer' || policy.kind === 'diver'
|
|
84
|
+
|| policy.kind === 'patrol-diver' || policy.kind === 'burst-flyer' || policy.kind === 'diver' || policy.kind === 'perch-hunter'
|
|
85
|
+
|| (policy.kind === 'guardian' && policy.pattern === 'perch')
|
|
83
86
|
|| (policy.kind === 'grazer' && policy.pattern === 'wander-ram'))) errors.push('declared per-body home policy');
|
|
84
87
|
}
|
|
85
|
-
errors.push(...groupBrainRules(content.groups ?? [], content.spawns, content.brains.map((row) => row.id)));
|
|
88
|
+
errors.push(...creaturePerchRules(content), ...groupBrainRules(content.groups ?? [], content.spawns, content.brains.map((row) => row.id)));
|
|
86
89
|
return errors;
|
|
87
90
|
}
|
|
88
91
|
|
|
@@ -165,8 +168,8 @@ export interface CreatureMemoryActionsRows { stateKey: string; states: (string)[
|
|
|
165
168
|
export interface CreatureBodyRecipeRowsInput { actions?: CreatureMemoryActionsRowsInput; offset?: { field: string; from: number; to: number; }; kind: 'animal'; motion: 'ground' | 'flight'; attack: 'keeper' | 'unlimited'; stunned: 'none' | 'look-hold'; contact: ({ kind: 'environment'; halfArc: number; }) | ({ kind: 'actor'; halfArc: number; move: string; }); }
|
|
166
169
|
export interface CreatureBodyRecipeRows { actions?: CreatureMemoryActionsRows; offset?: { field: string; from: number; to: number; }; kind: 'animal'; motion: 'ground' | 'flight'; attack: 'keeper' | 'unlimited'; stunned: 'none' | 'look-hold'; contact: ({ kind: 'environment'; halfArc: number; }) | ({ kind: 'actor'; halfArc: number; move: string; }); }
|
|
167
170
|
// oxlint-disable-next-line typescript/consistent-type-definitions -- Valibot's readonly defaults need the alias's implicit dictionary compatibility.
|
|
168
|
-
export type ShardCreaturesInput = { brains: (({ id: string; kind: 'pursue'; awareRadius: number; leashRadius: number; speed: number; returnSpeed: number; stopDistance: number; turnRate: number; thinkDivisor: number; attackCooldownTicks: number; wanderRadius: number; wanderEveryTicks: number; }) | (v.InferInput<typeof SkirmisherSchema>) | (v.InferInput<typeof GuardianSchema>) | (v.InferInput<typeof PerchHunterSchema>) | (v.InferInput<typeof ScriptBrainSchema>) | (v.InferInput<typeof RamGrazerSchema>) | (v.InferInput<typeof ChallengeGrazerSchema>) | (v.InferInput<typeof OrbitDiverSchema>) | (v.InferInput<typeof PatrolDiverSchema>) | (v.InferInput<typeof BurstFlyerSchema>) | (v.InferInput<typeof GrazerSchema>) | (v.InferInput<typeof DiverSchema>) | (v.InferInput<typeof GuardianPatternsSchema>) | (v.InferInput<typeof StalkerSchema>))[]; groups?: (v.InferInput<typeof GroupBrainSchema>)[] | undefined; spawns: ({ group?: string; phaseOffset?: number | undefined; respawn?: number | undefined; home?: ShardCreatureHomeInput | undefined; id: string; species: string; variant: string; brain: (string) | null; strike: (string) | null; seed: number; scale: number; at: [number, number, number]; yaw: number; })[]; };
|
|
169
|
-
export interface ShardCreatures { brains: (({ id: string; kind: 'pursue'; awareRadius: number; leashRadius: number; speed: number; returnSpeed: number; stopDistance: number; turnRate: number; thinkDivisor: number; attackCooldownTicks: number; wanderRadius: number; wanderEveryTicks: number; }) | (v.InferOutput<typeof SkirmisherSchema>) | (v.InferOutput<typeof GuardianSchema>) | (v.InferOutput<typeof PerchHunterSchema>) | (v.InferOutput<typeof ScriptBrainSchema>) | (v.InferOutput<typeof RamGrazerSchema>) | (v.InferOutput<typeof ChallengeGrazerSchema>) | (v.InferOutput<typeof OrbitDiverSchema>) | (v.InferOutput<typeof PatrolDiverSchema>) | (v.InferOutput<typeof BurstFlyerSchema>) | (v.InferOutput<typeof GrazerSchema>) | (v.InferOutput<typeof DiverSchema>) | (v.InferOutput<typeof GuardianPatternsSchema>) | (v.InferOutput<typeof StalkerSchema>))[]; groups: (v.InferOutput<typeof GroupBrainSchema>)[]; spawns: ({ group?: string; phaseOffset?: number | undefined; respawn?: number | undefined; home?: ShardCreatureHome | undefined; id: string; species: string; variant: string; brain: (string) | null; strike: (string) | null; seed: number; scale: number; at: [number, number, number]; yaw: number; })[]; }
|
|
171
|
+
export type ShardCreaturesInput = { perchBodies?: CreaturePerchBodyInput[]; brains: (({ id: string; kind: 'pursue'; awareRadius: number; leashRadius: number; speed: number; returnSpeed: number; stopDistance: number; turnRate: number; thinkDivisor: number; attackCooldownTicks: number; wanderRadius: number; wanderEveryTicks: number; }) | (v.InferInput<typeof SkirmisherSchema>) | (v.InferInput<typeof GuardianSchema>) | (v.InferInput<typeof PerchHunterSchema>) | (v.InferInput<typeof ScriptBrainSchema>) | (v.InferInput<typeof RamGrazerSchema>) | (v.InferInput<typeof ChallengeGrazerSchema>) | (v.InferInput<typeof OrbitDiverSchema>) | (v.InferInput<typeof PatrolDiverSchema>) | (v.InferInput<typeof BurstFlyerSchema>) | (v.InferInput<typeof GrazerSchema>) | (v.InferInput<typeof DiverSchema>) | (v.InferInput<typeof GuardianPatternsSchema>) | (v.InferInput<typeof StalkerSchema>))[]; groups?: (v.InferInput<typeof GroupBrainSchema>)[] | undefined; spawns: ({ perchBody?: string; group?: string; phaseOffset?: number | undefined; respawn?: number | undefined; home?: ShardCreatureHomeInput | undefined; id: string; species: string; variant: string; brain: (string) | null; strike: (string) | null; seed: number; scale: number; at: [number, number, number]; yaw: number; })[]; };
|
|
172
|
+
export interface ShardCreatures { perchBodies?: CreaturePerchBody[]; brains: (({ id: string; kind: 'pursue'; awareRadius: number; leashRadius: number; speed: number; returnSpeed: number; stopDistance: number; turnRate: number; thinkDivisor: number; attackCooldownTicks: number; wanderRadius: number; wanderEveryTicks: number; }) | (v.InferOutput<typeof SkirmisherSchema>) | (v.InferOutput<typeof GuardianSchema>) | (v.InferOutput<typeof PerchHunterSchema>) | (v.InferOutput<typeof ScriptBrainSchema>) | (v.InferOutput<typeof RamGrazerSchema>) | (v.InferOutput<typeof ChallengeGrazerSchema>) | (v.InferOutput<typeof OrbitDiverSchema>) | (v.InferOutput<typeof PatrolDiverSchema>) | (v.InferOutput<typeof BurstFlyerSchema>) | (v.InferOutput<typeof GrazerSchema>) | (v.InferOutput<typeof DiverSchema>) | (v.InferOutput<typeof GuardianPatternsSchema>) | (v.InferOutput<typeof StalkerSchema>))[]; groups: (v.InferOutput<typeof GroupBrainSchema>)[]; spawns: ({ perchBody?: string; group?: string; phaseOffset?: number | undefined; respawn?: number | undefined; home?: ShardCreatureHome | undefined; id: string; species: string; variant: string; brain: (string) | null; strike: (string) | null; seed: number; scale: number; at: [number, number, number]; yaw: number; })[]; }
|
|
170
173
|
export type CreatureStrikeRowsInput = CreatureStrikeRows;
|
|
171
174
|
export interface CreatureStrikeRows { debris?: StrikeDebrisPolicy; id: string; shape: ({ kind: 'arc'; radius: number; halfAngle: number; yawOffset?: number; }) | ({ kind: 'lane'; length: number; width: number; }) | ({ kind: 'ring'; inner: number; outer: number; }) | ({ kind: 'wedge'; length: number; halfAngle: number; }) | ({ kind: 'point'; radius: number; exclusive?: boolean; }) | ({ kind: 'sphere'; radius: number; }); windup: number; active: number; recover: number; cooldown: number; range: (number) | null; damage: number; tags: (`${string}.${string}`)[]; weight: ({ kind: 'constant'; value: number; }) | ({ kind: 'horizontal-distance'; above: number; far: number; near: number; }); units?: 'world' | 'actor'; alternatives?: (({ kind: 'arc'; radius: number; halfAngle: number; yawOffset?: number; }) | ({ kind: 'lane'; length: number; width: number; }) | ({ kind: 'ring'; inner: number; outer: number; }) | ({ kind: 'wedge'; length: number; halfAngle: number; }) | ({ kind: 'point'; radius: number; exclusive?: boolean; }) | ({ kind: 'sphere'; radius: number; }))[]; motion?: { speed?: number; delay?: number; track?: 'none' | 'lead' | 'follow'; overshoot?: number; skid?: number; }; eligibility?: { maxDy?: number; jumpDodges?: boolean; }; }
|
|
172
175
|
export type CreatureStrikesInput = unknown;
|