Skip to content
ASArcaneMP Scripting APIScripting reference
Runtime classServer APIGenerated

Character

Defined in: server/api.d.ts:2934

A server-placed character (vendor, ghost, house-elf, the Sorting Hat) rendered the same on every client. No AI, no owner, no health. It stands where it was placed, or walks a path the server authors (moveAlong, or follow after another entity), which every client plays on the server clock. Assigning position teleports it.

  • ServerEntity.ServerEntity

new Character(id): Character

Defined in: server/api.d.ts:2939

Wraps a character entity id without spawning it.

number

Network id of the server entity to wrap.

Character

clearProp(): void

Defined in: server/api.d.ts:3024

Takes the prop out of this character’s hand, on every client.

void


destroy(): boolean

Defined in: server/api.d.ts:2999

Destroys this character entity.

boolean


equipProp(path, options?): void

Defined in: server/api.d.ts:3106

Attaches a mesh to a socket of this character’s body, replacing the prop it held, the way player.equipProp does for a player; every client shows it, players who arrive later included. Humans, ghosts, goblins, house-elves, busts and the T3 looks share the biped skeleton: WandSocket, SKT_RightHandSocket, SKT_LeftHandSocket, prop_hand_r_SKT and prop_hand_l_SKT. A centaur has none of those, but its hand bones SKT_RightHand and SKT_LeftHand take a prop; the hat and the Howler have no hands. A socket the body lacks leaves the prop at its origin. The default socket is the wand’s, so take the wand away or name another. Throws a RangeError for a path that is not an asset path.

string

A StaticMesh or SkeletalMesh asset path.

socket defaults to “WandSocket” (the right hand); offset is relative to it, scale defaults 1.

{ pitch?: number; roll?: number; scale?: number; x?: number; y?: number; yaw?: number; z?: number; }

number

number

number

number

number

number

number

string

void


follow(target, options?): boolean

Defined in: server/api.d.ts:3085

Walks after the target until stop() or a new command, replacing any path (characterMoveEnded “replaced”): one straight leg at a time to distanceCm short of it, re-laid as it moves on. It rests inside distanceCm, facing the target, and walks again once the target pulls 100 cm past it. While the target is in another virtual world, on a broom or on a flying mount it waits where it is; past teleportBeyond the server puts it beside the target. Legs are straight lines, so keeping them clear of walls is the script’s job. characterMoveEnded “targetGone” when the target leaves. False when the character is gone; throws on a target that is not a live entity, bad options, or a body Character.isMovable refuses.

Player | Character | Beast | NPC

Whom to follow; not this character.

CharacterFollowOptions

Gait or speed, distanceCm (100..3000, default 200), teleportBeyond in metres (default 60, 0 never), ground and turn rate.

boolean


moveAlong(waypoints, options?): boolean

Defined in: server/api.d.ts:3069

Walks from where the character stands now through the waypoints, replacing any path (characterMoveEnded “replaced”). False when the character is gone; throws on bad input or on a body Character.isMovable refuses.

CharacterWaypoint[]

1..64 points, z a player’s origin as in Character.create.

CharacterMoveOptions

Gait or speed, loop, ground and turn rate.

boolean


moveTo(x, y?, z?, options?): boolean

Defined in: server/api.d.ts:3078

moveAlong with one point.

number | Vector3Like

World X (cm).

number

World Y (cm).

number

A player’s origin Z (cm).

CharacterMoveOptions

Gait or speed, ground and turn rate.

boolean


pause(): void

Defined in: server/api.d.ts:3009

Freezes the path or follow where it is; its clock and its events stop until resume.

void


playClip(clipPath, options?): boolean

Defined in: server/api.d.ts:3092

Plays an AnimSequence on this character on every client, the way LocalPlayer.playClip plays one on the player, replacing the clip it plays. Every client samples it at the server clock, so they show the same frame and a player who arrives later joins it there; a one-shot without hold that has already ended is not replayed for them. A new path (moveAlong or moveTo) ends it, since its pose holds the whole body. Character.canPlayClip says which bodies can, and the clip must be for the human skeleton (the Hu_ clips are); a body whose skeleton the clip does not fit keeps its idle. False when the character is gone; throws on a path that is not an asset path, a rate out of range, or a body that cannot play clips.

string

An AnimSequence asset path, e.g. ‘/Game/Animation/Human/Hu_Crouch_RF_Idle_anm.Hu_Crouch_RF_Idle_anm’.

loop and hold default true; hold (a one-shot keeps its last frame) applies only when loop is false; rate 0.01..10, default 1.

boolean

boolean

number

boolean


resume(): void

Defined in: server/api.d.ts:3014

Continues a paused path or follow from the same spot.

void


setVirtualWorld(world, map?): void

Defined in: server/api.d.ts:3113

Moves this entity into another virtual world, within a map: there it meets the players in the same world of the same map, so world N of a dungeon is one instance of it.

number

Virtual-world identifier used to partition replication and visibility.

string

The map it is in, as player.location().areaId names it; “Overland” or “” for the shared map. Left out, it stays in its current map.

void


setVisibleTo(player): void

Defined in: shared.d.ts:82

Restricts replication to one player’s connection, within the usual range and visibility checks; null lifts it.

Entity | null

void


setWand(shown, style?): void

Defined in: server/api.d.ts:3099

Puts a wand in this character’s right hand (its WandSocket) or takes it away, on every client. Throws on a style that is not a row key, and on showing one on a body Character.canHoldWand refuses.

boolean

true puts a wand in the right hand, false takes it away.

string

A DT_CustomWandStyle row (e.g. ‘T003_M01_H007_M02’); omitted, the plain base wand (T000_M00).

void


stop(): void

Defined in: server/api.d.ts:3004

Ends the path or follow (characterMoveEnded “stopped”) and stands where it is.

void


stopClip(): void

Defined in: server/api.d.ts:3019

Ends the clip on every client; the body goes back to its idle.

void


toString(): string

Defined in: shared.d.ts:74

string


static canHoldWand(characterId): boolean

Defined in: server/api.d.ts:3062

Whether a character built from this id can hold a wand (setWand): false for the centaurs, the Sorting Hat and the Howler, which have no WandSocket.

string

Registry character id to test.

boolean


static canPlayClip(characterId): boolean

Defined in: server/api.d.ts:3056

Whether a character built from this id can playClip: true for the human ids and for the ghosts, goblins, house-elves and T3 looks, which share the human skeleton; false for the centaurs (another skeleton), the busts, the Sorting Hat and the Howler.

string

Registry character id to test.

boolean


static create(key, characterId, opts): Character | undefined

Defined in: server/api.d.ts:3032

Creates or replaces an interest-streamed character, standing at the given spot until a path moves it. With look, a human id’s body wears that look instead of the id’s own, as a player’s body does: gender, face, hair, gear, hood, body sliders and a visual scale, and a full scale on top of scale. Throws on a look player.setLook would refuse (INVALID_APPEARANCE), on one with no preset or no gear, and on a look for a non-human id, which builds the game’s own class.

string

Stable string key; creating again replaces the entity.

string

Registry character id (e.g. ‘GerboldOllivander’, ‘SortingHat’). Throws if not in the built-in list.

CharacterSpawnOptions

Placement, nameplate, prompt and look options.

Character | undefined


static destroy(key): boolean

Defined in: server/api.d.ts:3038

Destroys the character stored under a stable key.

string

Stable key passed to create.

boolean


static isAllowed(characterId): boolean

Defined in: server/api.d.ts:3044

Whether Character.create accepts a registry character id: the built-in human list, plus the ghosts, house-elves, goblins, busts, T3 crowd looks and centaurs with a look of their own, the Sorting Hat and the Howler.

string

Registry character id to test.

boolean


static isMovable(characterId): boolean

Defined in: server/api.d.ts:3050

Whether a character built from this id can walk a path: false for the Sorting Hat, the Howler and the busts, which have no walk.

string

Registry character id to test.

boolean

readonly characterId: string

Defined in: server/api.d.ts:2954

Registry character id this character is built from.


readonly clip: { hold: boolean; loop: boolean; path: string; rate: number; } | null

Defined in: server/api.d.ts:2969

The clip playClip set, or null. A one-shot without hold that has ended still reads here until stopClip or a new path.


readonly id: number

Defined in: shared.d.ts:65

Network id, stable for the entity’s lifetime.


readonly label: string

Defined in: server/api.d.ts:2959

Nameplate text, or empty.


readonly look: LookJson | null

Defined in: server/api.d.ts:2984

The look Character.create dressed it in, sanitized as player.setLook sanitizes one; null when it wears its registry id’s own.


readonly movement: CharacterMovementState

Defined in: server/api.d.ts:2979

The running command: mode “path” while one runs (walking, waiting or paused) or “follow” while it follows, the waypoint it walks to or waits at, the lap, and the followed entity’s id (0 otherwise).


position: Vector3

Defined in: shared.d.ts:67

World position. Read, call set(...), then assign back.


readonly prop: { offset: { pitch: number; roll: number; scale: number; x: number; y: number; yaw: number; z: number; }; path: string; socket: string; } | null

Defined in: server/api.d.ts:2974

The prop equipProp attached, or null.


rotation: Vector3 | Quaternion

Defined in: shared.d.ts:69

Reads as a quaternion; assignments also accept Euler angles in degrees.


readonly scale: number

Defined in: server/api.d.ts:2964

Uniform actor scale.


readonly state: StateBag

Defined in: shared.d.ts:71

This entity’s key/value state: the server writes it, and every client that can see the entity receives it. See StateBag.


readonly virtualWorld: number

Defined in: server/api.d.ts:2994

The virtual world scripts put this entity in. Outside the shared map (Overland) replication combines it with the entity’s map, as it does a player’s.


readonly wand: boolean

Defined in: server/api.d.ts:2944

Whether this character holds a wand (see setWand).


readonly wandStyle: string

Defined in: server/api.d.ts:2949

The DT_CustomWandStyle row setWand named; empty when it named none (the plain base wand, T000_M00) or there is no wand.


readonly waypoints: CharacterWaypoint[]

Defined in: server/api.d.ts:2989

The running path’s points as given (speed resolved from gait); empty when idle or following.