builder
The shared map builder. `C.build(spec, opts)` turns a map SPEC (baked ground, water, lighting, bases, gold mines, wood groves, obstacles, decoration props, scatter, keep-clear discs) into a built map with deterministic resource node ids (`wf.<map>.node.<n>`) so every peer agrees.…
skirmishMapBuilder.builder
The shared map builder. C.build(spec, opts) turns a map SPEC (baked ground, water, lighting, bases, gold mines, wood groves, obstacles, decoration props, scatter, keep-clear discs) into a built map with deterministic resource node ids (wf.<map>.node.<n>) so every peer agrees. Helpers: C.mirror, C.rng, C.segmentBlockers, C.discBlockers, C.clearOf. Used by each map module and by Maps.register with a SPEC table.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2skirmishMapBuilder.builder: the shared builder behind skirmish maps for rtsKit games (Warfront's seven maps use it). A map module describes its battlefield as a SPEC (data) and calls `Common.build(spec, opts)`, which spawns everything as plain local scenery under one root entity, deterministic from the seed, and returns the layout table of the Maps contract (see rtsSkirmishKit.maps). Every resource node (gold mine, tree) gets the id `wf.<mapId>.node.<n>`, the same on every peer, so a match that builds the map locally everywhere can name its nodes by id. Props come from the environment kits this package installs: desertProps (desert flora, rocks, ruins), tropicalProps (palms, beach rocks, driftwood, piers), alpineProps (snowy conifers, granite, huts), forestProps (oaks, beeches, birches, logs, stumps, ferns) and arcticProps (sea ice, seracs, snow drifts, huts, bones). A prop is named `{ family, kind, scale, ... }` where family is "desert" | "tropical" | "alpine" | "forest" | "arctic".
rng(seed: number) → void
A deterministic random generator: `rand()` in [0,1), `rand(a, b)` in [a, b).
| arg | type | description |
|---|---|---|
| seed | number |
yawQuat(yaw: number) → void
| arg | type | description |
|---|---|---|
| yaw | number |
mirror(p: { number }) → void
Mirror a point through the map centre (team 2's half is team 1's turned half a turn: fair by construction).
| arg | type | description |
|---|---|---|
| p | { number } |
kitLook(look: string?) → string
the art style a Warfront look maps to, in the kits' own look names
| arg | type | description |
|---|---|---|
| look | string? |
partsOf(family: string, kind: string, variant: number, lod: number, look: string, extra: { [string]: any }?) → void
the draws { { mesh, material } } of one prop kind
| arg | type | description |
|---|---|---|
| family | string | |
| kind | string | |
| variant | number | |
| lod | number | |
| look | string | |
| extra | { [string]: any }? |
prop(ctx: any, parent: any, p: { [string]: any }, x: number, y: number, z: number, yaw: number, scale: number) → any
| arg | type | description |
|---|---|---|
| ctx | any | |
| parent | any | |
| p | { [string]: any } | |
| x | number | |
| y | number | |
| z | number | |
| yaw | number | |
| scale | number |
nodeEntity(ctx: any, parent: any, name: string, x: number, z: number) → any
| arg | type | description |
|---|---|---|
| ctx | any | |
| parent | any | |
| name | string | |
| x | number | |
| z | number |
lighting(root: any, L: { [string]: any }) → void
| arg | type | description |
|---|---|---|
| root | any | |
| L | { [string]: any } |
clearOf(spec: any, x: number, z: number, pad: number) → boolean
is (x, z) clear of every keep-open disc (bases, mines, paths' yards) by `pad` metres?
| arg | type | description |
|---|---|---|
| spec | any | |
| x | number | |
| z | number | |
| pad | number |
segmentBlockers(points: { { number } }, half: number, out: { any }) → void
Nav blocker boxes along a polyline { { x, z } ... }, `half` metres either side; appended to `out`. The map's nav blockers are static axis-aligned boxes (navKit takes no rotation), so a line at any angle is covered by square boxes `half` across stepped along it no more than `half` apart: a wall with no gaps whatever way the line runs.
| arg | type | description |
|---|---|---|
| points | { { number } } | |
| half | number | |
| out | { any } |
discBlockers(x: number, z: number, r: number, out: { any }) → void
Nav blocker boxes covering a disc (a pond, an oasis, a rock outcrop), appended to `out`. The map's blockers are axis-aligned (navKit takes no rotation), so the disc is covered by a cross of two long boxes and a square between them: an octagon reaching `r` on the axes and about `r` on the diagonals, with no corners sticking out past it.
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| r | number | |
| out | { any } |
pick(rand: any, list: { any }) → any
| arg | type | description |
|---|---|---|
| rand | any | |
| list | { any } |
build(spec: { [string]: any }, opts: { [string]: any }?) → void
Build a map from its spec. opts: seed (7), look (Warfront look id), parent, lighting (true). Returns the layout.
| arg | type | description |
|---|---|---|
| spec | { [string]: any } | |
| opts | { [string]: any }? |
free(x: number, z: number, d: number) → boolean
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| d | number |
spotsOf(g: any) → void
a grove is a disc { x, z, r, n } filled at random, or a WOOD { rect = { x0, z0, x1, z1 }, grid = spacing } filled as a jittered hex grid (a closed wall of trunks that workers cut paths through; `block` sets how much ground each trunk holds, opened again when the tree is felled)
| arg | type | description |
|---|---|---|
| g | any |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.