Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld c6375dd0-0…

valley

The Ashen Valley: the ground everything stands on and its surfaces, the rain-slick road, the ruined chapel with the site of grace, the broken watchtower, the standing stones and the drowned trees — and the atmosphere (fog, sun, sky) the whole game is seen through. It replaces the…

by◐Sh·posted 4d ago
What it does

game.valley — the valley slice

The Ashen Valley: the ground everything stands on and its surfaces, the rain-slick road, the ruined chapel with the site of grace, the broken watchtower, the standing stones and the drowned trees — and the atmosphere (fog, sun, sky) the whole game is seen through. It replaces the scene's stand-in ground and owns the final values on sun, ambient, sky and air.

Owns /zero/source/game/valley.module/ and /zero/source/game/valley/. Hangs its components on the mount entity Game/valley.

References it must match: design/references/06-the-ashen-valley.png and design/references/04-site-of-grace.png. Read design/spec.md for the interface and what "done" means.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

game/valley.module/init.luau — the `valley` slice. The Ashen Valley: the ground and its surfaces, the rain-slick road, the ruined chapel with the site of grace, the broken watchtower, the standing stones and drowned trees, and the atmosphere the whole game is seen through. The scene (`scenes/main.scene/build.luau`) made this slice the mount `Game/valley` and the stand-in `ground`, the lights, the sky and the air. This module hangs the real valley on that mount and takes the stand-in down. The shape is `game.valley.terrain`: ONE height function that the rendered mesh, the physics heightfield and every landmark's footing all read. The models in the world are SLOTS — the right thing in the right place at the right size, in a plain material, named in `M.SLOTS` for the polish pass.

mount( ) → void

The entity this slice owns, or nil while the scene is still building. If the mount is gone the slice re-makes it rather than building nothing: a missing mount used to make this slice bail out silently, which is how the whole valley once disappeared without one line saying so.

buildTerrain(mount: ?) → void

argtypedescription
mount?

buildRoad(mount: ?) → void

argtypedescription
mount?

setAtmosphere( ) → void

The last word on the light and the air. It is the low amber sun behind a bank of cloud, and the fog that pools in the low ground and clears on the ridge: the same air the valley's own picture is seen through.

dress(mount: ?) → void

argtypedescription
mount?

build( ) → boolean

buildSafely(tag: string) → void

A module body runs ONCE per session, so building only here would leave the valley missing after the next scene load or mode flip. This module instead attaches itself to the engine's own events and builds whenever the world has been loaded — the point where the scene's entities exist and components may be added at all. The build is idempotent (it despawns this slice's own children first), so a duplicate subscription cannot double the valley; it only costs a rebuild.

argtypedescription
tagstring

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.

18+items
◐❒asset
▲ 0↑ born
▣
module · born here
❒asset
# game.valley.landmarks — the things standing in the Ashen Valley Everything that stands on the valley floor, placed against `terrain.groundAt(x, z)` so a landmark sits on the ground wherever the height function says the ground is. Nothing here is placed by eye and nothing floats. `L.build(mount)` raises the whole set under the given mount and returns the list of slots it left: - **The ruined chapel**, roofless, on its own raised shelf west of the road — flagstone floor, four walls with the south side broken open where the door was and its east half fallen further than its west, a stub of the north wall still standing above the rest, and an overturned altar. - **The site of grace** at the chapel's centre: the shattered sword, the golden wisp, and a point light in `Rules.PALETTE.grace` — the only warm light in the world, and the reason nothing else may be lit amber. - **The broken watchtower**, west of the road, its crown gone and its two standing corners at different heights. - **Seven standing stones** in a rough ring, each a different height and turn. - **Fourteen drowned trees** and **fourteen black rock outcrops**, scattered from one deterministic sequence, so every load raises the same valley. The scatter is `scatter(i, lo, hi, salt)` over a fixed hash — never a random seed — which is what makes the valley the same valley twice. These are slots: the right thing, in the right place, at the right size, in a plain material, named in the returned list for the polish pass. Called by `game.valley`.
▲ 0↑ born
▣
module · born here
❒asset
# game.rules — ASHEN VIGIL's constants and rules The one sheet of paper every slice of ASHEN VIGIL argues from. `require("game.rules")` gives the game's constants — the title and the art-direction sentence, the palette in linear RGB, the sun, the three stats and what a level buys, the soul cost curve, the flask, every combat timing (light, heavy, roll, guard, the turn rates, poise), movement and stamina, lock-on, grace, death, the boss and the common foe, and the names of the five slice mounts the scene makes. It also carries the four pure rules the slices share rather than duplicate: `levelCost(level)`, `statsAt(levels)`, `inArc(swingYaw, hitYaw, arcDegrees)`, and the `SLICES` list. It touches no engine API and reads no scene state: it is data and arithmetic, so it can be called from a component, a scene build, a tool or a test with the same answer. A number that lives in two slices is a bug — it lives here instead. Who reads it: every slice (`game.vigil`, `game.valley`, `game.foes`, `game.screens`, `game.sound`) and `scenes/main.scene/build.luau`.
▲ 0↑ born
◐❒asset
▲ 0↑ born
▣
module · born here
❒asset
# game.valley.terrain — the shape of the Ashen Valley ONE height function, `T.height(x, z)`, is the authority on where the ground is. The rendered mesh, the physics heightfield and every landmark's footing are all sampled from it, so what is drawn and what is stood on are the same surface by construction rather than by agreement. `T.height` composes the valley out of its own parts, each a named term: the floor falling gently down-valley with the dead ground's roll, the valley walls climbing away from the centre line, the higher ridge on the +X side (the viewpoint the establishing shot is taken from), the raised shelf the chapel stands on, and the road — a corridor cut and flattened through all of the above so it stays walkable where the ground does not. Also here: `T.roadX(z)` (the road's centre line), `T.normalAt(x, z)` (the surface normal by central difference), `T.meshGeometry()` (the terrain mesh as positions/indices/normals/uvs), `T.collider()` (the same grid as a `HeightfieldCollider`'s rows, cols, extent and heights), and `T.roadGeometry()` (the road ribbon laid on the corridor the height function already cut). The named places — `T.CHAPEL`, `T.RIDGE_TOP`, `T.HEART` — are what the rest of the valley is laid against. Called by `game.valley` (which builds it) and `game.valley.landmarks` (which places everything standing on it) and by `game.foes` (which stands the Ash Warden's camp on it).
▲ 0↑ born
◐❒asset
▲ 0↑ born
backing path · game/valley.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.