Town
Root component of the town slice of Swords and Sandals NG, attached to `Mounts/mount_town` by the scene entrypoint at play start. Sets the final late-afternoon light, sky and golden height haze; builds the town (`game.town.build`); spawns Livia, the blacksmith, the armorer, the t…
game.town.Town
Root component of the town slice of Swords and Sandals NG, attached to Mounts/mount_town by the scene
entrypoint at play start. Sets the final late-afternoon light, sky and golden height haze; builds the
town (game.town.build); spawns Livia, the blacksmith, the armorer, the taberna keeper and townsfolk;
runs talk prompts (E), dialogue, the two gear shops, tavern side quests and Livia's romance
(game.town.story, game.town.panels); opens the bout board when the player walks into the arena gate.
Publishes R.services.town = { openShop, talk, close, state, choose, buy }.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.town.Town — the explorable town of Swords and Sandals NG. Attached to Mounts/mount_town by the scene entrypoint at play start. It: * owns the final light and atmosphere (sun / ambient / sky + golden height haze) * builds the town under its mount (game.town.build) and hides Mounts/StandIns * spawns the townsfolk (Livia, Tiberius the smith, Octavia the armorer, Marcia of the taberna, and six townsfolk, three of them walking rounds) * shows "[E] Talk to ..." through R.services.ui.prompt and runs the conversation, shop, quest-tracker and romance-ending screens of its own (game.town.panels), with logic in game.town.story * opens the bout board (R.call('ui','show','bouts')) when the player walks into the arena gate at z = -68 Publishes R.services.town = { openShop(id), talk(npcId), close(), state() }.
quatYaw(deg: number) → void
helpers
| arg | type | description |
|---|---|---|
| deg | number |
ent(v: ?) → void
| arg | type | description |
|---|---|---|
| v | ? |
playerPos( ) → void
keyPressed(k: string) → boolean
| arg | type | description |
|---|---|---|
| k | string |
uiCurrent( ) → string
toast(t: string) → void
| arg | type | description |
|---|---|---|
| t | string |
flushStoryToasts( ) → void
setPrompt(t: string?) → void
| arg | type | description |
|---|---|---|
| t | string? |
holdPlayer(hold: boolean) → void
| arg | type | description |
|---|---|---|
| hold | boolean |
applyAtmosphere( ) → void
light and atmosphere
dressNpc(e: ?, look: ?) → void
townsfolk
| arg | type | description |
|---|---|---|
| e | ? | |
| look | ? |
spawnNpc(id: string) → void
| arg | type | description |
|---|---|---|
| id | string |
tintPending( ) → void
setClip(n: ?, walking: boolean) → void
| arg | type | description |
|---|---|---|
| n | ? | |
| walking | boolean |
faceNpc(n: ?, tx: number, tz: number, dt: number, rate: number) → void
| arg | type | description |
|---|---|---|
| n | ? | |
| tx | number | |
| tz | number | |
| dt | number | |
| rate | number |
tickNpcs(dt: number, px: number?, pz: number?) → void
| arg | type | description |
|---|---|---|
| dt | number | |
| px | number? | |
| pz | number? |
marker(name: string) → void
quest markers: a floating gold lozenge over whoever or wherever a quest wants you
| arg | type | description |
|---|---|---|
| name | string |
refreshMarkers(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
closePanels( ) → void
panels
showDialogue( ) → void
openTalk(npcId: string) → void
| arg | type | description |
|---|---|---|
| npcId | string |
showShop( ) → void
openShop(id: string) → void
| arg | type | description |
|---|---|---|
| id | string |
showEnding( ) → void
choose(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
buy(itemId: string) → void
| arg | type | description |
|---|---|---|
| itemId | string |
onCallback(id: string, data: any) → void
| arg | type | description |
|---|---|---|
| id | string | |
| data | any |
tracker( ) → void
awake( ) → void
lifecycle
state( ) → void
buy(itemId: string) → void
| arg | type | description |
|---|---|---|
| itemId | string |
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
onDestroy( ) → void
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.