Skip to content
ASArcaneMP Scripting APIScripting reference
Runtime classServer APIGenerated

Beast

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

A server-owned tame creature. Every nearby client builds it as the game’s own creature, one client runs its AI, and players care for it with the game’s petting brush and creature feed (see the beastCared event).

  • ServerEntity.ServerEntity

new Beast(id): Beast

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

Wraps a beast entity id without spawning it.

number

Network id of the server entity to wrap.

Beast

addHappiness(amount): boolean

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

Moves this beast’s happiness, clamped into 0 to 100. Every client moves its copy through the game’s own writer, which fires the gained or lost effect. Read the result from happiness; to assign a value, pass the difference.

number

Delta to apply; negative takes happiness away. Rejected at zero or beyond 100 either way.

boolean

True when the change was accepted and sent.


cancelAbility(channel?): boolean

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

Ends what react or playAbility started on that channel, on every client’s copy; its AI takes the body back.

string

The Able channel; default “FullBody”.

boolean

False when the beast is gone, down or ridden.


capturableFor(player): boolean

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

Whether this player may catch the beast: their override, or capturable. Caged beasts still refuse.

Player

The player to ask about.

boolean


destroy(): void

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

Despawns the beast everywhere.

void


dismount(): boolean

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

Orders the rider off through the game’s own dismount (beastDismounted “script” follows once they stand), or withdraws a mount the rider’s game has not answered yet (beastMountFailed “cancelled”).

boolean

False when nobody rides it or was ordered on.


follow(target, options?): boolean

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

Walks after the target and keeps about 1.5 m off, until stop() or a new command. With air a flier flies after an airborne or distant target, holding about 4 m behind and 3 m above it, and lands beside it once it is back on the ground nearby. A followed player’s own client runs the beast. beastMoveEnded “targetGone” when the target leaves.

Player | Character | Beast | NPC

Whom to follow.

BeastFollowOptions

gait (default: beast.gait), teleportBeyond: metres behind the target past which the server puts it beside them (default 60, 0 never), and air (fliers only): take off while the target is airborne or more than 30 m away.

boolean

False when the beast no longer exists.


kill(options?): boolean

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

Runs the game’s death on every client’s copy and leaves the body lying there (or kneeling) until revive() or destroy(). Its rider is put down first, a running command ends as “stopped”, and while it is down it takes no command, rider, care or catch. beastLifeChanged follows. Throws on a bad argument.

wounded: take the game’s near-death kneel instead of dying, as its own magical beasts do.

boolean

boolean

False when the beast no longer exists.


mount(player): boolean

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

Puts a player on the beast through the game’s own mount handler: they possess it and ride it with the game’s controls, flight included, and every other player sees them ride. Ends a running command as “stopped”. beastMounted fires once their game has seated them, beastMountFailed when it could not; they get off with the game’s dismount key (beastDismounted). Throws on a bad argument.

Player

The rider; their client runs the beast for the whole ride.

boolean

False when it cannot start: the beast is not mountable, not alive, already ridden or being caught, or the player is down, already riding, in an animal form, in another world or more than 30 m away.


moveAlong(waypoints, options?): boolean

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

Walks the waypoints through the game’s own path following, ending any running command as “replaced”. beastWaypoint fires on each arrival (before its wait), beastMoveEnded at the end. Throws on bad input.

BeastWaypoint[]

1 to 64 points, each a player’s origin (as player.position) with an optional wait (seconds), the gait of the leg that arrives there, and air (fliers only).

BeastMoveOptions

gait (default: beast.gait), loop (“once”, “loop” or “pingpong”) and then (“relax”, “wander” or “stand”, the idle after a “once” path; default “stand”).

boolean

False when the beast no longer exists.


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

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

moveAlong with one waypoint.

number | Vector3Like

World x of a player’s origin.

number

World y.

number

World z.

BeastMoveOptions & object

As moveAlong’s; air flies there (fliers only).

boolean

False when the beast no longer exists.


pause(): void

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

Holds the current command (or an idle beast) still in the game’s cinematic wait; resume() continues it. A new command or stop() ends the hold.

void


playAbility(classPath, channel?, seconds?): boolean

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

Plays an Able ability on every client’s copy of the beast, as react does for the named ones. One that loops holds its channel until seconds have passed or cancelAbility. Throws on a path that is not an ability class path.

string

An Able ability class path ending ‘_C’, e.g. ‘/Game/Pawn/NPC/Creature/Abilities/ABL_Creature_Upset.ABL_Creature_Upset_C’.

string

The Able channel; default “FullBody”.

number

Ends it after this long, 0 to 600; 0 (default) lets it run.

boolean

False when the beast is gone, down or ridden.


react(name): boolean

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

Plays one of the game’s own creature reactions on every client’s copy: the beast’s AI steps aside for it and carries on after. Throws a RangeError for an unknown name.

BeastReaction

One of Beast.reactions().

boolean

False when the beast is gone, down or ridden.


resume(): void

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

Continues the command pause() held, from where it stopped.

void


revive(): boolean

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

Brings a wounded or dead beast back: every copy stands up and its AI runs again. beastLifeChanged follows.

boolean

False when the beast no longer exists.


setCapturableFor(player, value): boolean

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

Overrides capturable for one player, on their client too, so their Nab-Sack refuses or allows the beast before a catch starts. Dropped when the player leaves.

Player

The player the setting is for.

boolean | null

Whether that player may catch it; null returns them to capturable.

boolean

False when the beast or player is gone.


setPassenger(player): boolean

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

Seats a second player behind the rider of a ridden beast, on every client: they ride along in the rider’s seat pose, cannot walk, and leave with the rider, when they die or disconnect, or when a script passes null (bind a key for it; a passenger put down in flight falls). beastMounted and beastDismounted fire with seat “passenger”. Throws on a bad argument.

Player | null

Who sits behind the rider; null takes the passenger off.

boolean

False when refused (nobody rides the beast, the seat is taken, or the player is the rider, down, already riding, in an animal form, in another world or more than 30 m away), or when null found no passenger.


setScale(scale): void

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

Sets the uniform actor scale on every client’s copy of the beast.

number

Uniform actor scale (1 = native size).

void


setVirtualWorld(world, map?): void

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

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


stop(then?): void

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

Ends the running command as “stopped” and holds the beast there.

"stand" | "relax" | "wander"

The idle to take up (it becomes beast.idle); default “stand”.

void


toString(): string

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

Returns a debug string for this beast.

string


static bagOf(player): CapturedBeast[]

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

The beasts in a player’s bag: their catches this connection and whatever giveCaptured put there. The bag belongs to the connection; save it yourself (beastCaptured, beastReleased) and give it back on join.

Player

Whose bag.

CapturedBeast[]


static catalog(): BeastSpeciesInfo[]

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

Every species Beast.create accepts: the 13 nurturable adults and their young, each with whether it flies and can be ridden, its colors, their spawn weights, and whether a color is an effect rather than a coat.

BeastSpeciesInfo[]


static create(species, opts?): Beast

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

Spawns a tame native beast. Throws on an unknown species or a color the species does not have.

BeastSpecies

The game’s species id; Beast.catalog() lists them.

BeastSpawnOptions

Spawn options; every field is optional.

Beast


static giveCaptured(player, beast): CapturedBeast | null

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

Puts a beast in a player’s bag, as the game’s own bag record, without the catch notification. Throws on an unknown species, a color the species does not have, a bad gender, or a name over 64 bytes.

Player

Whose bag.

CapturedBeastInit

The beast; an omitted color is rolled on the game’s own weights.

CapturedBeast | null

The bag entry, or null when the player is not connected.


static reactions(): BeastReaction[]

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

The names beast.react accepts.

BeastReaction[]


static takeCaptured(player, id): boolean

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

Takes a beast out of a player’s bag, in their game too. False when the bag holds no such entry.

Player

Whose bag.

number

The bag entry’s id.

boolean

aiPaused: boolean

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

Holds the whole AI in the game’s cinematic wait, across commands, until set false; the beast stands and idles. Like NPC.aiPaused.


area: { radius: number; x: number; y: number; z: number; } | null

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

Keeps it idling inside a sphere (a player’s origin and a radius in cm): the game picks idle destinations inside it, and the beast walks back if it ends up outside. Commands are not clipped by it. Null clears it.


byproduct: number | null

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

A vivarium beast’s byproduct, 0 to 1 on the game’s own cycle: it fills over 25 minutes, and reaching 1 clears its needs. A player harvests it once both needs are met (beastByproductRequest), which sets it back to 0. Null outside a vivarium, where assigning throws.


caged: boolean

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

Refused by the Nab-Sack as caged (“Caged beasts cannot be rescued”), for everyone, whatever capturable says. Changes nothing else about the beast.


capturable: boolean

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

Whether players may catch it with the Nab-Sack, unless setCapturableFor says otherwise for one of them. False by default. A player who may not is refused by the Nab-Sack itself (“This beast cannot be rescued”).


readonly color: string

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

Color variation, one of the species’ catalogued colors, identical on every client.


gait: MoveGait

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

The gait follow() and moveAlong() use when their options name none; a running command keeps its own. The species’ own walk, jog and sprint speeds; default “walk”.


readonly gender: "male" | "female" | undefined

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

The beast’s native creature gender, or undefined once the beast has despawned.


readonly happiness: number

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

Happiness, 0 to 100, held by the server. Accepted care adds the game’s 11; every client’s copy follows this value.


readonly id: number

Defined in: shared.d.ts:65

Network id, stable for the entity’s lifetime.


idle: BeastIdle

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

What it does with no command: “relax” (stays near where it was put, sitting and lying; the default), “wander” (explores, grazes and rests around its area) or “stand”.


readonly life: BeastLife

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

“alive”, “wounded” (the game’s near-death kneel) or “dead” (see kill and revive).


readonly mountable: boolean

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

Whether the game can seat a rider on it: a Hippogriff, Thestral or Graphorn, full grown and not living in a vivarium.


readonly movement: BeastMovementState

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

The running command: mode (“idle”, “path” or “follow”), the waypoint it heads for or waits at, the path’s length, completed laps, whether pause() or aiPaused holds it, the followed entity’s id (0 otherwise), and whether it is airborne now. The idle state once the beast is gone.


readonly name: string

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

Custom native creature name, or empty when the localized species name is used.


needs: { fed: boolean; petted: boolean; } | null

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

A vivarium beast’s needs this cycle, met by the creature feed and the petting brush, each once until the byproduct fills. Assigning sets the fields given. Null outside a vivarium, where assigning throws.


readonly ownerId: number

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

Network id of the player whose client advances the native AI (0 while dormant).


readonly passenger: Player | null

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

The player seated behind the rider (setPassenger), or null.


position: Vector3

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

Authoritative world-space position. Assigning it teleports the beast on every client and ends a running command as “stopped”.


readonly pregnancy: { endsIn: number; father: Beast | null; pen: number; stage: "gestation" | "incubation"; } | null

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

A vivarium mother’s pregnancy: gestation, then for an egg-layer incubation, the pen, the father and the seconds left in the stage. Null for any other beast.


readonly rider: Player | null

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

The player riding it, once their game has seated them, or null.


readonly room: string | null

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

The Room of Requirement whose vivarium it lives in, 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:1599

Current uniform actor scale (1 = native size).


readonly species: BeastSpecies

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

The game’s species id, e.g. “Hippogriff” or “NifflerOffspring”.


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:1699

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 vivarium: "Forest" | "Swamp" | "Coastal" | "Grassland" | null

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

The vivarium of a Room of Requirement it lives in (see Sanctuary.beasts), or null for a beast in the world.


readonly waypoints: BeastWaypoint[]

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

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