Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

NpcProps

NpcProps = { avatar: string; base?: string | IdleMotionHandle; children?: ReactNode; collisionMask?: CollisionMask | null; color?: undefined; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: AnimationCulling; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model?: undefined; movement?: Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }>; movementMode?: NpcMovementMode | "nav-walking" | "walking"; name: string; nameplate?: boolean; position?: Position; radius?: number; routines?: Routines; shape?: undefined; title?: string; unseen?: Unseen; } | { avatar?: undefined; base?: string | IdleMotionHandle; children?: ReactNode; collisionMask?: CollisionMask | null; color?: undefined; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: undefined; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model: string; movement?: Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }>; movementMode?: NpcMovementMode | "nav-walking" | "walking"; name: string; nameplate?: boolean; position?: Position; radius?: number; routines?: Routines; shape?: undefined; title?: string; unseen?: Unseen; } | { avatar?: undefined; base?: string | IdleMotionHandle; children?: ReactNode; collisionMask?: CollisionMask | null; color?: ColorRepresentation; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: undefined; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model?: undefined; movement?: Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }>; movementMode?: NpcMovementMode | "nav-walking" | "walking"; name: string; nameplate?: boolean; position?: Position; radius?: number; routines?: Routines; shape?: "box" | "sphere" | "capsule" | PlaceholderShape; title?: string; unseen?: Unseen; }

What an Npc takes. It wears one look, as a CharacterSpawn does: an avatar, a registered model with its clips, or a primitive in a colour, the capsule when it names none. Where a CharacterSpawn lets an avatar win over a model it is also handed, an Npc refuses the second look by type, so a look named in vain fails the typecheck.

{ avatar: string; base?: string | IdleMotionHandle; children?: ReactNode; collisionMask?: CollisionMask | null; color?: undefined; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: AnimationCulling; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model?: undefined; movement?: Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }>; movementMode?: NpcMovementMode | "nav-walking" | "walking"; name: string; nameplate?: boolean; position?: Position; radius?: number; routines?: Routines; shape?: undefined; title?: string; unseen?: Unseen; }

Name Type Default value Description
avatar string - The avatar it wears, a name registerAvatar registered, as a CharacterSpawn’s avatar.
base? string | IdleMotionHandle - What it stands on that an idle motion floats, such as a boat: the id of a map prop with an idleMotion, or a handle defineIdleMotion declared, which an <IdleMotion motion> draws. Its drawing rides the deck under its feet, upright, turning only with the deck’s yaw, while its body, its transform and the room’s stream stay where they stand, as the float moves only what is drawn. A prop the Landscape’s map lacks, or one that does not float, throws as it mounts; while no <IdleMotion> that draws the handle is mounted, it is drawn where it stands. Named for Unreal’s movement base, which a walking character follows in position and yaw (SetBase, bIgnoreBaseRotation false); Godot’s CharacterBody3D carries the position alone, and Unity’s parenting tilts it with the platform. Each of them moves the body, where this moves only the drawing, since an idle motion moves no body.
children? ReactNode - Behaviours on it, such as <Interact prompt="Talk" />.
collisionMask? CollisionMask | null - The layers its sweeps and contacts meet, null for every one. A chaser’s default leaves out both of the characters’ layers; a game lists characters.collisionLayers.players again for a body that blocks the character.
color? undefined - -
controller? Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }> - The character controller’s settings it walks by, each laid over its defaults: its step, its steepest slope and its jump.
cullingMode? AnimationCulling - Whether its avatar is posed while the camera shows it small or not at all, as Unity’s Animator.cullingMode. An avatar’s alone: a model is posed every frame, as the player’s is.
facing? number - Radians about y at spawn.
faction? "friendly" | "neutral" | "hostile" | Faction - Whose side it is on.
height? number 0 Metres above the feet the head stands.
leash? number - Metres from its spawn it may walk; left out, its route bounds it.
level? number - A number a game reads, such as the level a quest asks for.
model? undefined - -
movement? Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }> - How it moves, each setting laid over the defaults, as a CharacterSpawn’s movement: { speed: 1.4 } walks rather than runs, as Unity’s NavMeshAgent.speed and Roblox’s WalkSpeed set it. Read at spawn.
movementMode? NpcMovementMode | "nav-walking" | "walking" - How it moves while it needs no physics, over the prefab’s: see the prefab’s movementMode. Read at spawn; setTrait on NpcMovementModeTrait changes it later.
name string - Drawn over its head, and how the AI tree names it.
nameplate? boolean - Whether its name and title are drawn over its head, as Roblox’s DisplayDistanceType hides a humanoid’s; off for a figure that dresses a scene. A line it says shows either way.
position? Position - Where it spawns; the first step stands it on the ground.
radius? number 0 Metres from the axis to the side.
routines? Routines - What it does, as routines() built it. Left out, it stands and plays idle.
shape? undefined - -
title? string - Drawn under its name, such as “Herbalist”: WoW’s subname.
unseen? Unseen - What it does while no page wants it under interest culling: Unseen.Suspend leaves it where it stands with its routine held, Unseen.Throttle walks its routine on one tick in four along the navmesh, and Unseen.Simulate as while a player watches. Read at spawn; setTrait on UnseenTrait changes it later.

{ avatar?: undefined; base?: string | IdleMotionHandle; children?: ReactNode; collisionMask?: CollisionMask | null; color?: undefined; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: undefined; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model: string; movement?: Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }>; movementMode?: NpcMovementMode | "nav-walking" | "walking"; name: string; nameplate?: boolean; position?: Position; radius?: number; routines?: Routines; shape?: undefined; title?: string; unseen?: Unseen; }

Name Type Default value Description
avatar? undefined - -
base? string | IdleMotionHandle - What it stands on that an idle motion floats, such as a boat: the id of a map prop with an idleMotion, or a handle defineIdleMotion declared, which an <IdleMotion motion> draws. Its drawing rides the deck under its feet, upright, turning only with the deck’s yaw, while its body, its transform and the room’s stream stay where they stand, as the float moves only what is drawn. A prop the Landscape’s map lacks, or one that does not float, throws as it mounts; while no <IdleMotion> that draws the handle is mounted, it is drawn where it stands. Named for Unreal’s movement base, which a walking character follows in position and yaw (SetBase, bIgnoreBaseRotation false); Godot’s CharacterBody3D carries the position alone, and Unity’s parenting tilts it with the platform. Each of them moves the body, where this moves only the drawing, since an idle motion moves no body.
children? ReactNode - Behaviours on it, such as <Interact prompt="Talk" />.
collisionMask? CollisionMask | null - The layers its sweeps and contacts meet, null for every one. A chaser’s default leaves out both of the characters’ layers; a game lists characters.collisionLayers.players again for a body that blocks the character.
color? undefined - -
controller? Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }> - The character controller’s settings it walks by, each laid over its defaults: its step, its steepest slope and its jump.
cullingMode? undefined - -
facing? number - Radians about y at spawn.
faction? "friendly" | "neutral" | "hostile" | Faction - Whose side it is on.
height? number 0 Metres above the feet the head stands.
leash? number - Metres from its spawn it may walk; left out, its route bounds it.
level? number - A number a game reads, such as the level a quest asks for.
model string - The name of a registered model it wears, as a CharacterSpawn’s model: where its file has clips, it plays the ones its pose asks for, idle at rest, walk and run blended by its speed, and jump off the ground, under the clip names its registration gives.
movement? Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }> - How it moves, each setting laid over the defaults, as a CharacterSpawn’s movement: { speed: 1.4 } walks rather than runs, as Unity’s NavMeshAgent.speed and Roblox’s WalkSpeed set it. Read at spawn.
movementMode? NpcMovementMode | "nav-walking" | "walking" - How it moves while it needs no physics, over the prefab’s: see the prefab’s movementMode. Read at spawn; setTrait on NpcMovementModeTrait changes it later.
name string - Drawn over its head, and how the AI tree names it.
nameplate? boolean - Whether its name and title are drawn over its head, as Roblox’s DisplayDistanceType hides a humanoid’s; off for a figure that dresses a scene. A line it says shows either way.
position? Position - Where it spawns; the first step stands it on the ground.
radius? number 0 Metres from the axis to the side.
routines? Routines - What it does, as routines() built it. Left out, it stands and plays idle.
shape? undefined - -
title? string - Drawn under its name, such as “Herbalist”: WoW’s subname.
unseen? Unseen - What it does while no page wants it under interest culling: Unseen.Suspend leaves it where it stands with its routine held, Unseen.Throttle walks its routine on one tick in four along the navmesh, and Unseen.Simulate as while a player watches. Read at spawn; setTrait on UnseenTrait changes it later.

{ avatar?: undefined; base?: string | IdleMotionHandle; children?: ReactNode; collisionMask?: CollisionMask | null; color?: ColorRepresentation; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: undefined; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model?: undefined; movement?: Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }>; movementMode?: NpcMovementMode | "nav-walking" | "walking"; name: string; nameplate?: boolean; position?: Position; radius?: number; routines?: Routines; shape?: "box" | "sphere" | "capsule" | PlaceholderShape; title?: string; unseen?: Unseen; }

Name Type Default value Description
avatar? undefined - -
base? string | IdleMotionHandle - What it stands on that an idle motion floats, such as a boat: the id of a map prop with an idleMotion, or a handle defineIdleMotion declared, which an <IdleMotion motion> draws. Its drawing rides the deck under its feet, upright, turning only with the deck’s yaw, while its body, its transform and the room’s stream stay where they stand, as the float moves only what is drawn. A prop the Landscape’s map lacks, or one that does not float, throws as it mounts; while no <IdleMotion> that draws the handle is mounted, it is drawn where it stands. Named for Unreal’s movement base, which a walking character follows in position and yaw (SetBase, bIgnoreBaseRotation false); Godot’s CharacterBody3D carries the position alone, and Unity’s parenting tilts it with the platform. Each of them moves the body, where this moves only the drawing, since an idle motion moves no body.
children? ReactNode - Behaviours on it, such as <Interact prompt="Talk" />.
collisionMask? CollisionMask | null - The layers its sweeps and contacts meet, null for every one. A chaser’s default leaves out both of the characters’ layers; a game lists characters.collisionLayers.players again for a body that blocks the character.
color? ColorRepresentation - The colour of its primitive.
controller? Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }> - The character controller’s settings it walks by, each laid over its defaults: its step, its steepest slope and its jump.
cullingMode? undefined - -
facing? number - Radians about y at spawn.
faction? "friendly" | "neutral" | "hostile" | Faction - Whose side it is on.
height? number 0 Metres above the feet the head stands.
leash? number - Metres from its spawn it may walk; left out, its route bounds it.
level? number - A number a game reads, such as the level a quest asks for.
model? undefined - -
movement? Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }> - How it moves, each setting laid over the defaults, as a CharacterSpawn’s movement: { speed: 1.4 } walks rather than runs, as Unity’s NavMeshAgent.speed and Roblox’s WalkSpeed set it. Read at spawn.
movementMode? NpcMovementMode | "nav-walking" | "walking" - How it moves while it needs no physics, over the prefab’s: see the prefab’s movementMode. Read at spawn; setTrait on NpcMovementModeTrait changes it later.
name string - Drawn over its head, and how the AI tree names it.
nameplate? boolean - Whether its name and title are drawn over its head, as Roblox’s DisplayDistanceType hides a humanoid’s; off for a figure that dresses a scene. A line it says shows either way.
position? Position - Where it spawns; the first step stands it on the ground.
radius? number 0 Metres from the axis to the side.
routines? Routines - What it does, as routines() built it. Left out, it stands and plays idle.
shape? "box" | "sphere" | "capsule" | PlaceholderShape - The primitive it wears.
title? string - Drawn under its name, such as “Herbalist”: WoW’s subname.
unseen? Unseen - What it does while no page wants it under interest culling: Unseen.Suspend leaves it where it stands with its routine held, Unseen.Throttle walks its routine on one tick in four along the navmesh, and Unseen.Simulate as while a player watches. Read at spawn; setTrait on UnseenTrait changes it later.