npcs
One-paragraph description of what this module provides and who consumes it.
npcs
One-paragraph description of what this module provides and who consumes it.
Exports
M.exampleFn(arg) -> result— what it does and when to call it.M.exampleValue: type— what value it carries.
Usage
Replace <identity> with the string asset.create returned — this
module's source path with / written as . and each segment's type
suffix dropped, the way a module at /source/lib/thing.module is
lib.thing and one at /source/kit.package/thing.module is
kit.thing.
local M = require("<identity>")
M.exampleFn("foo")
Notes
- Anything callers need to know about THIS module: required runtime ordering, state ownership, side effects.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.characters.npcs — the cast of Sneaky Pooper, and the small props around them. local Npcs = require("game.characters.npcs") local h = Npcs.dress(markerEntity, "lifeguard_patrol") h.setMoving(true) -- walk / swim clip h.setMoving(false) -- idle clip h.playWhistle() -- whistle clip (~2.5 s) then back to idle/walk h.playPoint() -- accusing point (~3 s) then back h.model -- the spawned rig root under the marker (nil if dressing failed) kinds: lifeguard_tower, lifeguard_patrol, swimmer, sunbather, bartender, judge. dress() spawns the rigged builtin humanoid (Synty rig) under the marker as a child named "NpcModel", skins it, bone-parents the outfit (outfit.module) so clothes follow the clip, and plays a generated anim_gen clip through ClipPlayer. Root motion is cancelled (NpcInPlace) so the MARKER is what travels when gameplay moves it. The model faces the marker's forward (local -Z, what lookAt / transform.forward use). Variants (swimmers, sunbathers) are picked from attr `sp_variant` (1..3) or the id hash. Placement contract: swimmer markers sit at the water line (the model is sunk so the shoulders are just above it); every other marker stands on its floor. A sunbather brings its own striped lounger unless the marker carries `sp_lounger = false`. A lifeguard_tower marker with `sp_pose = "sit"` sits (marker at seat height). Props (each returns the root entity it built; parent/pos optional): Npcs.floater(parent?, pos?) glossy brown floater, ~0.17 m long (the evidence) Npcs.duck(parent?, pos?) yellow rubber duck, ~0.2 m Npcs.ring(parent?, pos?) coral/white striped swim ring, ~0.75 m Npcs.flamingo(parent?, pos?) pink flamingo float Npcs.lounger(parent?, pos?) striped canvas sun lounger
P(e: any) → any
| arg | type | description |
|---|---|---|
| e | any |
hashOf(s: string) → number
| arg | type | description |
|---|---|---|
| s | string |
propRoot(name: string, parent: any?, pos: { number }?) → any
| arg | type | description |
|---|---|---|
| name | string | |
| parent | any? | |
| pos | { number }? |
floater(parent: any?, pos: { number }?) → any
The evidence: a small glossy dark-brown curved log that floats on the water.
| arg | type | description |
|---|---|---|
| parent | any? | |
| pos | { number }? |
duck(parent: any?, pos: { number }?) → any
A classic yellow rubber duck.
| arg | type | description |
|---|---|---|
| parent | any? | |
| pos | { number }? |
ring(parent: any?, pos: { number }?) → any
A coral-and-white candy-striped inflatable swim ring, lying flat.
| arg | type | description |
|---|---|---|
| parent | any? | |
| pos | { number }? |
flamingo(parent: any?, pos: { number }?) → any
A pink inflatable flamingo float (ring body, curved neck, head and beak).
| arg | type | description |
|---|---|---|
| parent | any? | |
| pos | { number }? |
lounger(parent: any?, pos: { number }?) → any
A white-framed sun lounger with a coral/white striped canvas sling, back raised.
| arg | type | description |
|---|---|---|
| parent | any? | |
| pos | { number }? |
face(skin: string) → void
| arg | type | description |
|---|---|---|
| skin | string |
aviatorsDown(lens: string, frame: string) → void
| arg | type | description |
|---|---|---|
| lens | string | |
| frame | string |
noop( ) → void
setClip(sk: any, clip: string?, looping: boolean) → void
| arg | type | description |
|---|---|---|
| sk | any | |
| clip | string? | |
| looping | boolean |
spec(kind: string, v: number, e: any) → any
| arg | type | description |
|---|---|---|
| kind | string | |
| v | number | |
| e | any |
dress(e: any, kind: string) → any
Give an NPC marker its look and an idle clip. Returns hooks (never nil).
| arg | type | description |
|---|---|---|
| e | any | The npc marker entity (proxy or id). |
| kind | string | lifeguard_tower | lifeguard_patrol | swimmer | sunbather | bartender | judge |
base( ) → void
oneShot(clip: string, secs: number) → void
| arg | type | description |
|---|---|---|
| clip | string | |
| secs | number |
setMoving(on: boolean) → void
| arg | type | description |
|---|---|---|
| on | boolean |
playWhistle( ) → void
playPoint( ) → 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.