# CarForgeCar
Lives under every Car Forge car (built there by `carForge.vehicle`, on every peer) and gives it what vehiclesKit does not: head and tail lamps that switch on at dusk with worldClockKit's shared day and night clock, brake, reverse and indicator lamps read from the car's motion so every player sees them, flashing roof beacons on the invented service cars, damage stages (scratched, dented, wrecked) from replicated hard hits with loose panels shed on a wreck, and a low-poly body plus no spot lights far from the camera. Methods: `damage()`, `setDamage(v)`, `repair()`. Needs the vehiclesKit `Vehicle` on the car's root.
# FarTraffic
The one updater behind `carForge.fleet`'s far traffic. It sits on the root entity `Fleet.farTraffic` builds and moves every low-poly car under it along its lane (a polyline with arc length, both directions when the road has two), on this peer only: no physics, no Vehicle, no per-car scripts. Each frame it walks each car's segment forward (constant time per car), fills flat position and heading arrays, and writes them to the engine through retained entity bindings and typed CPU buffers, one copy per field for the whole group; spinning wheels add one more. Fields: `speed` (m/s), `spinWheels`, `running`. Methods: `setup(group)` (called by `Fleet.farTraffic`), `stats()` → `{ cars, wheels, lastMs, avgMs, fast }`, `resetStats()`. Needs nothing else on the entity; the cars are its children.
# api
The front door of Car Forge, `require("~carForge.api")`: `describe(seed, { preset, lock })` makes a car as plain data; `spawn` and `display` turn it into a drivable car or a showroom model; `settings`, `groups`, `presets`, `looks`, `styles`, `roles`, `regions`, `paints` list what can be set; `random(preset)`, `check`, `fingerprint`, `bodyFingerprint`, `encode`/`decode`, `plate`, `summary`; `saveVariant`/`loadVariant`/`variants` for named variants; `bake(preset, count, opts)` for batches with a manifest; `stats` for mesh sharing.
# Car Forge Studio
An editor panel for designing Car Forge cars live, in edit mode or in play. Open it from the editor's **Content** menu (**Car Forge Studio**); it docks on the right.
What a person does in it:
- **Pick a preset** (22 of them: city hatchback, town taxi, Ward Patrol patrol car, …) and a **seed**, or press **Reroll** for a new seed.
- **Change any setting.** Every setting of the kit is listed under its group (Identity, Size, Shape, Details, Paint, Wheels, Drive) with its range: sliders with a typed value for numbers and whole numbers, dropdowns for choices, switches for on/off. The preview car in the viewport rebuilds as you go; rebuilds are debounced so a slider drag stays smooth. An edited value is marked with a dot and holds until the next reroll.
- **Lock a setting** with its padlock. Locked settings keep their value when you reroll; everything unlocked varies around them. Group headers count locked settings; **Unlock all** and **Reset edits** clear them.
- **Read the car report**: name, number plate, fingerprint, top speed, mass, size, drivetrain, seats, the preview's build time, the kit's check issues (errors and warnings by setting) and the car's short code.
- **Save a named variant** (name field + **Save variant**). It is written to `carForgeVariants/<name>.variant.json` in the world source with every setting locked, so it comes back identical after a restart. The list below shows every saved variant with its preset, seed and fingerprint; **Load** brings one back and confirms its fingerprint matches the file; **Delete** removes it.
- **Spawn drivable** puts a real drivable copy beside the preview (walk up and press E in play). In edit mode the copy is session-only and is never saved into the scene; **Remove spawned** takes them away.
- **Preview here** moves the preview in front of the editor camera; **Turn** rotates it 45°.
The preview is a showroom model (`Cars.display`) under a temporary `CarForgeStudio Preview` entity, so nothing the panel builds is saved into a scene. Closing the tab removes it. The layout wraps, so the panel also works in a narrow (phone-width) dock.
Built on `carForge.api` (describe, check, fingerprint, summary, encode, saveVariant, loadVariant, variants, display, spawn) and the `edui` editor-panel framework.
# dents
Lasting dents for Car Forge cars through the crash car kit (crashCars 0.3.4 or later), **on by default whenever crashCars is installed**.
- `Dents.register(desc)` turns a generated car's shape into a crashCars spec (length, overhangs, sill, bonnet, belt, roof and tail heights, windscreen and roof stations, rear style, mass) under a deterministic id on every peer. `carForge.vehicle` calls it when a car is built.
- `Dents.attach(root, desc)` (owner, in play) gives the car a soft shell carrying its own body mesh and the stock `CrashCar` crush lanes, and fits the rigid hull to the cabin (`Dents.fitHull`), so the car crumples where it is hit, keeps the dent and every player sees it. A 58 km/h wall hit crushes the front about 0.68 m and absorbs the car's ½mv².
- `Dents.fitHull(root, desc)` shrinks vehiclesKit's full-length `vk_hull` box to the cabin (firewall to rear crush zone, 15 cm inside each side), the way crashCars builds its own chassis, so the lanes, not a rigid box, meet a wall. `CarForgeCar` calls it on every peer once a shell exists.
- `Dents.shellOf(root)` finds the shell; `Dents.available()` says whether the hookup is on and crashCars is installed.
- `Dents.enable(false)` turns the hookup off for the whole game. `Dents.kit` is the function that loads crashCars; a test can replace it to stand in for a world without crashCars.
**Cost policy.** A shell is a soft body: about 12 to 16 ms of soft-body physics a step while it is awake, nothing once it sleeps. So only a car a player drives gets one: `CarForgeCar` attaches it the first time someone sits in the driver's seat, once per car. Parked, AI and showroom cars keep Car Forge's own damage stages.
**Without crashCars** (or with the hookup off), `CarForgeCar`'s scratched, dented and wrecked stages swap in as the car takes hits.
# design
Turns a Car Forge description into what a car is made of, identically on every peer: `shape` (axles, belt line, pillars, roof line), `spec` (the body in torqueCars bodygen's loft vocabulary, with liveries, two-tone, decals and trim painted through its colour hook, and roof racks, spoilers, tow bars and service beacons as extras), `layout` (seats, eye point, wheels with springs sized to the weight, and collider boxes that follow the body so a pickup's bed stays open), `kind` (the vehiclesKit vehicle: mass, balance, engine curve, gearing, brakes, assists), `topSpeed` and `plate` (an invented number plate). Used by `carForge.mesh` and `carForge.vehicle`.
# deviceCheck
Measures Car Forge on the device it runs on and saves the result to the player's own account, so a desktop, a browser and a tablet (app or browser) list their results together wherever that account opens the world. `Check.run({ label = "tablet app" })` (inside `task.spawn`, about 6 minutes, hands off) measures describing a car, building a new car the first time and again from the cache, baking 48 variants in memory with and without their meshes, the six golden fingerprints of the test suite (the cross-device contract: the same seed and settings must give the same fingerprint everywhere), and four short benchKit runs of the street (empty, 100 parked cars, one AI-driven car, and one 60-car fleet, 30 on a tablet or phone); the cost of the parked cars and of the AI car is the engine CPU each adds over the empty street. `Check.status()` says what it is doing, `Check.list()` reads back every record of this account, and `Check.table()` lays the newest record per device side by side. Nothing is written to the world. In the showcase gallery, the **Measure this device** button on the on-screen picker starts it for any player, on keyboard, gamepad or touch, so a tablet needs no shell.
# fleet
City traffic from one seed. `Fleet.make(seed, n, mix)` draws N Car Forge descriptions from a mix of body styles, era, regional colours, wear and dirt, and roles, the same on every machine for the same seed and mix (seedKit rng streams; one stream per car, so car 7 is car 7 however long the fleet is). Then three ways to put a fleet in a street, each costing what it has to:
| Call | What you get | Cost |
|---|---|---|
| `Fleet.parkRow(descs, opts)` | Rows of parked cars: static models on carForge's shared meshes (body, four wheels, a cabin drawn up close), one box collider each so nobody walks through. No physics, no Vehicle, no scripts. Built locally on every peer. | entities only |
| `Fleet.wake(car)` | Turns one parked car into a real drivable car (a synced vehiclesKit car via `Cars.spawn`) in its bay; every peer swaps its own parked copy out. | one vehicle |
| `Fleet.drive(descs, path, opts)` | Cars that really drive: synced Car Forge vehicles with an aiDrivers `AiDriver` each, spaced along a roadPieces road or point list. Host only; the host owns and drives them. | one vehicle + AI each |
| `Fleet.farTraffic(descs, path, opts)` | Far-off traffic: low-poly cars sliding along a road, both directions, optional spinning wheels, all moved by one `FarTraffic` updater through batched typed-buffer transform writes. Built locally on every peer. | well under 1 ms a frame for 100+ |
```luau
local Fleet = require("~carForge.fleet")
local Roads = require("~roadPieces.roads")
local street = Fleet.make(2024, 24, {
styles = { hatchback = 3, saloon = 2, panelVan = 1 }, -- shares of body styles
era = { modern = 9, ["80s"] = 1 }, -- or "modern", "classic", { modern = 8, classic = 1 }
region = "harbourCity", -- or regions = { harbourCity = 3, metro = 1 }
roles = { civilian = 20, taxi = 2, delivery = 1 }, -- or "police"
wear = { 0.2, 0.6 }, dirt = { 0, 0.3 }, -- ranges (or a number)
})
local row = Fleet.parkRow(street, { start = { 0, 0, 0 }, dir = { 1, 0, 0 }, angle = "parallel" })
Fleet.wake(row.cars[5]) -- the fifth one can now be driven
local loop = Roads.spline(points, { style = "country", loop = true })
Fleet.drive(Fleet.make(31, 3), loop, { spacing = 25, personality = "commuter" }) -- host only
Fleet.farTraffic(Fleet.make(99, 120), loop, { speed = 14, spinWheels = true })
```
## The mix
Every part is optional; what is left out is a believable city street: mostly modern everyday cars (hatchbacks, saloons, crossovers, estates, SUVs), a few vans, pickups and minivans, the odd sports car or convertible, 8 % classics (more 80s and 90s than 60s), 90 % civilian with taxis, couriers and the occasional police car, works truck or ambulance, one home region's palette for most cars, light wear and dirt.
- `styles` (alias `style`): `{ style = weight }`, a style name, or a list of names. Unknown names raise.
- `era`: `"modern"`, `"classic"`, `{ modern = w, classic = w }`, or decades `{ modern = w, ["70s"] = w, classic90s = w }` (keys `60s`/`70s`/`80s`/`90s` or the classic style names).
- `region` / `regions`: one of `Cars.regions()` or weights.
- `roles` (alias `role`): weights over `civilian taxi delivery police ambulance service`. A service car takes a body that service drives (`Fleet.ROLE_STYLES`), limited to the styles in the mix when they overlap.
- `wear`, `dirt`: `{ lo, hi }` or a number.
- `look` (every car), `preset` (default `anyCar`), `lock` (any other settings locked on every car).
`Fleet.census(descs)` counts styles, roles and regions; `Fleet.withLook(d, look)` gives the same car in another look.
## Options
- `parkRow(descs, { start, dir, spacing, gap = 1.0, angle = "parallel" | "perpendicular" | "angled" | degrees, side = "right" | "left", reverse, jitter = true, collider = true, cabin = true, parent, key, name })` → `{ root, cars, slots, key }`. Without `spacing`, cars stand bumper to bumper `gap` metres apart by their own lengths (widths when perpendicular).
- `wake(car, opts)` → the vehicle entity. `Fleet.nearestParked(pos, maxDist)` → `(entity, desc, distance)` finds the car a player stands next to; `Fleet.parkedInfo(entity)` → its description.
- `drive(descs, path, { loop, personality = "commuter", personalities = { ... }, spacing = 14, startAt, lane = 1.8, roadWidth = 8, laneOffset, speedLimit, pace, name })` → `{ entity }` (empty on a non-host peer).
- `farTraffic(descs, path, { loop, speed = 12, spacing, lane = 1.8, bothWays = true, look = "lowpoly", spinWheels = false, wheels = true, startAt, parent, name })` → `{ root, cars, component }`; `component:stats()` reports its cost.
- `clear(handle)` removes what `parkRow` / `farTraffic` returned, or the list `drive` returned.
A path is a roadPieces road entity (its centreline via `pathOf`), a list of points, or `{ points, loop }`.
## Multiplayer
Parked rows and far traffic are local, temporary entities built from the seed: run the same calls on every peer (a scene's entrypoint does this) and every player sees the same cars without anything replicating. AI cars are synced vehicles that only the host spawns; their AI runs on the host. A woken parked car is a synced vehicle named after its bay (`FleetCar@<row>.<n>`); each peer's watcher removes its own parked copy of that bay when it appears.
## Known limits
- Building a parked row costs the shared meshes it needs: about 30 ms per new body on desktop the first time a body shape is seen (a fleet of all-different cars builds one body each), nothing for repeats. Build rows at load, not mid-play.
- Far traffic slides on the path: it does not stop for other cars or junctions, and it does not collide. Keep it where players cannot reach it, or use `drive`.
# fleetBench
The Car Forge traffic-fleet benchmark for benchKit: the same street, camera path and still views as `carForge.streetBench`, with one fleet as the whole load. That fleet is 60 cars from a single `Fleet.make` call (30 on a tablet or phone, from `Fleet.budget()`): the first 4 drive the loop beside the street with AI drivers and the rest move as low-poly far traffic on the ring road. There are no parked rows. Run `zero benchKit run carForge.fleetBench` on any device and compare reports with `zero benchKit compare`; `require("~carForge.fleetBench").shapes()` answers how many distinct body and wheel shapes the fleet uses (at most 12).
# make-a-family-of-cars
A step-by-step run for making a family of Car Forge cars of your own: it picks the preset closest to the family you describe, has you tweak and lock the shared settings in Car Forge Studio (Content → Car Forge Studio), saves the cars you like as named variants, bakes the rest of the family from the preset with those locks into saved cars with a `manifest.json`, and finally checks every car and proves each one reloads with the same fingerprint. By the end, the family lives as `.variant.json` files and a baked folder under `/zero/source/carFamilies/<family>` (or the folder you pass) and comes back identical after a restart and on every machine.
Start it with `zero workflow start --name carForge.make-a-family-of-cars --args '{"family":"a 1970s taxi company","count":24}'`. It needs Car Forge installed; every step can be answered by a person in the editor or by an agent with the API.
# mesh
Builds and caches Car Forge's GPU meshes and materials per peer: body meshes (lofted through torqueCars bodygen, shared by every car with the same body settings and look), dented bodies for the damage stages, parametric wheels in thirteen rim styles (shared by wheel settings), cabin interiors (seats, dashboard, steering wheel, door cards), and paint materials on the carForgeBody shader (shared by paint, finish and damage stage, with the lamps bound to the car's named values). `stats()` reports how much is shared. Used by `carForge.vehicle` and `CarForgeCar`.
# schema
Every Car Forge setting as one seedKit generator: identity (style, role, region, look, doors), size, shape, details, paint, wheels and drive, each with its range, default, group and a range that follows the settings before it (wheelbase from length, track from width, mass from size and class, springs from mass). Also the named presets (city hatchback, family estate, 1970s coupe, delivery van, town taxi and more) and the rules a car is checked against. Read through `carForge.api`.
# carForgeBody
The surface every Car Forge car is drawn with: a whole car body (or wheel) in one draw call. The mesh's vertex colours carry each part's colour and their alpha says which part it is, so painted panels, a second paint tone for two-tone schemes and liveries, tinted glass, chrome, glossy and rough trim, and seven separately switched lamps (head, tail with brake, left and right indicators, reverse, and two alternating roof beacons) all live on one mesh. Paint colour, metallic flake, clear coat, wear (hazed coat and paint chips), road dirt (built up from the sills), damage scratches and a brush-stroke "painted" look are material properties, so cars that share a body mesh differ only in their material. The lamp inputs are meant to be bound to the car's named values (`car.headlights`, `car.brake`, `car.indicatorL`, …). Inner faces render as dark cabin trim and the glass opens from inside, so the cabin reads correctly from the driver's seat.
# similarity
How alike two Car Forge cars look, and a set of seeds whose cars all look different. `Sim.distance(a, b, spread)` is 0 for identical cars and 1 for cars of a different style, look or role; within one style, look and role it weighs paint (main colour and accent), body shape (every shape setting, measured against `Sim.spread(cars)`, the variety of the cars being compared), the detail options and the wheel style. It was calibrated by eye: two courier vans or two pickups below about 0.30 read as the same vehicle side by side. `Sim.distinctSeeds(preset, n, { start, threshold = 0.33 })` walks the seeds in order and skips any whose car is too close to one already kept, so a gallery, a showroom or a car picker shows `n` cars that all look different; the list is the same on every machine. The showcase gallery takes its preset views from it, and `Cars.lookDistance` / `Cars.distinctSeeds` reach it from the api.
# streetBench
The Car Forge street benchmark for benchKit: a street of 100 parked cars in two rows, 4 cars really driving with AI drivers on a loop beside it and 60 low-poly far-traffic cars, built from fixed seeds away from the gallery with `carForge.fleet`, measured along a drive down the street and from three still views (3 repeats). Run `zero benchKit run carForge.streetBench` on a desktop, in a browser and on a tablet, and `zero benchKit compare` the reports; knobs `parked`, `driving` and `far` change the street's size. Called by benchKit's runner.
# styles
The data behind Car Forge: the sixteen body styles (microcar to panel van, sports car and 1960s to 1990s classics) with the size windows, proportions, detail and drivetrain weights that suit each; the six roles and the liveries of the invented services (Lantern Cabs, Parcelwing Couriers, Ward Patrol, Lifeline Rescue, Metroworks); regional and era paint palettes; rim styles, grilles, lamps, bumpers; and engine torque characters. Pure data read by `carForge.schema` and `carForge.design`.
# carForge tests
Checks that Car Forge makes the same car from the same seed and settings everywhere (six golden fingerprints and the seed hash pinned on desktop: run the suite in a browser or on a phone to prove that platform builds identical cars), that every preset stays inside its rules over 30 seeds, that locking one setting leaves the others alone, that sports cars are low and vans tall, that codes, saved variants and bakes round-trip, that a repaint shares the body and wheel meshes, that every style, role and look builds, that a pickup's colliders leave its bed open, that wheels sit on the ground inside the body, and that vehiclesKit resolves a Car Forge preset name into a drivable kind and builds a showroom model with a cabin. It does not drive cars in play or measure frame cost (the fleet and gallery scenes cover those).
# validate
Proof that a Car Forge car is sound, by written rules checked on the car's real geometry, colliders, wheels and physics numbers. Used by the carForge test suite (a sample of every preset) and for full sweeps (every preset x 200 seeds; see `RESULTS.md`).
```luau
local Validate = require("~carForge.validate")
local r = Validate.car(Cars.describe(42, { preset = "workPickup" })) -- { ok, failures = { { rule, part, message } }, metrics }
local c = Validate.sweep(nil, 200) -- every preset, seeds 1..200: { cars, failed, byRule, byPreset, examples, ms }
local p = Validate.settle(list, { release = true }) -- play mode: spawn, settle, measure every wheel
```
- `Validate.car(d, opts)` builds the body (torqueCars bodygen), wheel and cabin straight from the generators, with no GPU upload and no caching, so a sweep of thousands of cars leaves the shared mesh caches alone. `opts.geometry = false` checks the physics numbers only.
- `Validate.sweep(presets, seeds, opts)` checks every seed of every preset (`seeds` a count or a list) and counts failures by rule and preset, with a few examples per rule.
- `Validate.settle(list, opts)` (play mode) spawns the cars as real, local vehiclesKit vehicles on a flat slab far from everything, lets them settle and reads each wheel back: where the tyre meets the ground, where the wheel centre stands in the chassis frame and how far the spring compressed, against the analytic rest. `release = true` releases meshes the test itself made (`Mesh.release`).
- `Validate.RULES` holds every rule in words, `Validate.MASS` the kerb weight window of each body style, `Validate.LIMITS` the tolerances.
## The rules
| rule | what must hold |
|---|---|
| `geom.finite` | every position and normal of body, wheel and cabin is finite; normals unit length |
| `geom.indices` | indices in threes, each naming a vertex |
| `geom.degenerate` | no triangle under 1e-9 m2 |
| `geom.normals` | vertex normals agree with each triangle's winding |
| `geom.bounds` | body within its length / width (+ flare, mirrors) / height, shell above the ride height; wheel within radius and width; cabin inside the body shell (an open car's cockpit above the belt excepted) |
| `shell.closed` | the body's main shell is closed and consistently wound (welded at 0.5 mm, every edge once each way) |
| `collide.cover` | colliders hold >= 85% of the body's volume (10 cm grid, less a 3 cm skin); their bottom within 6 cm of the floor |
| `collide.overhang` | <= 6% of the colliders' volume outside the body (wheel openings excepted) |
| `collide.bedOpen` | a pickup's bed is open: nothing above its floor |
| `wheel.arch` | axle on its arch's axle; inner face inboard of the body side; outer face at most 1 cm outside it |
| `wheel.clear` | no point of the drawn wheel inside the body, at loaded rest, straight and at full lock both ways |
| `wheel.ground` | at rest under its weight every wheel centre is at its radius above the ground in the chassis frame (1 cm), compression leaves >= 20% travel |
| `weight.mass` | mass inside the style's real-world window (electric +15%) |
| `weight.balance` | 38-66% on the front axle; static stability factor >= 0.95 |
| `weight.springs` | ride frequency 0.9-3.2 Hz, damping ratio 0.2-0.9 |
# vehicle
The bridge from Car Forge to vehiclesKit: registers a preset resolver for names that start with `carforge:`, whose rest is the car's code, so any peer that sees a vehicle's synced `preset` string rebuilds the identical car (body, wheels, cabin, colliders, weight, drivetrain) and anyone can walk up, get in, drive and get out. `presetName`, `describeName`, `spawn` (a shared drivable car) and `display` (a showroom model).
# seedKit
The generic half of a seeded generator kit, kept apart from any one generator so the same approach serves cars, street props, trees, animals or buildings. A kit gives seedKit its settings, presets and rules as data; seedKit turns a **seed** (plus an optional preset and any settings you lock) into a **description**: plain data, cheap to make and cheap to send, identical on every computer, phone and browser.
## What it does
- **Settings with ranges, defaults and groups** (`number`, `int`, `enum`, `bool`, each with `min`/`max`/`step`/`default`/`options`, a `group` and a `desc`). A setting's range can depend on the settings before it (`range = function(s) ... end`), which is how a generator keeps its settings coherent: a longer wheelbase forces a longer car.
- **Presets**: fixed values, narrower ranges and enum weights. A random design stays inside its preset.
- **Locks**: pass any settings you care about; the rest vary. Each setting draws from its own stream (seed x setting id), so locking one never reshuffles the others.
- **Check**: `Gen:check(d)` reports every missing, out-of-range or incoherent setting and every rule the kit declares, as `{ ok, issues = { { setting, message, severity } } }`.
- **Fingerprint**: `Gen:fingerprint(d)` is 16 hex characters; equal fingerprints mean equal designs. `ignore` leaves settings out (group designs that share a body but not a paint).
- **Codes**: `Gen:encode(d)` is the short recipe (kit, version, seed, preset, locks); `Gen:fromCode(code)` rebuilds the design. `encode(d, { all = true })` locks every setting.
- **Variants and bakes** (`seedKit.store`): save a design as a named variant that comes back identical after a restart; bake N designs from a preset into files with a manifest of what was made.
Determinism: all hashing and random numbers are 32-bit integer maths carried exactly in doubles (`seedKit.rng`), and numbers are quantised to their `step`, so a seed means the same design everywhere.
## Use
```luau
local Seed = require("~seedKit.generator")
local Gen = Seed.define({
kit = "trees", version = 1,
settings = {
{ id = "height", group = "Shape", kind = "number", min = 2, max = 30, step = 0.01, default = 8 },
{ id = "trunk", group = "Shape", kind = "number", min = 0.05, max = 2, step = 0.005,
range = function(s) return s.height * 0.02, s.height * 0.06 end },
{ id = "leaf", group = "Look", kind = "enum", options = { "broad", "needle" } },
},
presets = { { id = "oak", label = "Oak", ranges = { height = { 10, 22 } }, fixed = { leaf = "broad" } } },
})
local d = Gen:describe(42, { preset = "oak", lock = { height = 12 } })
print(Gen:fingerprint(d), Gen:encode(d), Gen:check(d).ok)
```
Modules: `seedKit.generator` (define, describe, random, check, fingerprint, encode/decode, settings, presets, groups), `seedKit.rng` (hash, streams), `seedKit.store` (variants, bake). Car Forge (`carForge.package` in the same world) is the worked example.
# store
Named variants and batch bakes for any seedKit generator. `saveVariant` writes a design (every setting locked, plus its fingerprint) as a `.variant.json` file that reads back identical after a restart; `loadVariant` and `listVariants` read them; `bake(gen, preset, count, opts)` resolves N distinct designs from a preset, calls the kit's own `make` for each, and writes a `manifest.json` listing every seed, code, fingerprint and file made. Called by kit front doors (Car Forge's api) and editor panels.
# rng
Deterministic hashing and random-number streams for seedKit generators: FNV-1a hashing mixed with a seed, independent named streams (`Rng.new(seed, name)`) with `float`, `range`, `int`, `chance`, `pick`, `weighted` and a bounded `normal`. Everything is 32-bit integer maths carried exactly in doubles, so a seed gives the same numbers on desktop, browser and phone. Called by `seedKit.generator` and by any generator that needs its own streams (Car Forge uses it for dent placement).
# generator
The core of seedKit: `define({ kit, version, settings, presets, rules })` makes a generator from data. A generator resolves a seed with a preset and locked settings into a plain-data description (`describe`, `random`), lists its settings with ranges, defaults and groups (`settings`, `groups`, `presets`), checks a description and reports what is wrong (`check`), fingerprints it (`fingerprint`, optionally ignoring settings) and turns it into a short code and back (`encode`, `decode`, `fromCode`). Settings can take ranges that depend on earlier settings, which keeps designs coherent. Called by generator kits such as Car Forge's schema.