Skip to content
ASArcaneMP Scripting APIScripting reference
Runtime classServer APIGenerated

Fx

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

A server-owned, interest-streamed visual effect handle (a Niagara or Cascade system placed in the world).

  • ServerEntity.ServerEntity

new Fx(id): Fx

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

Wraps an effect entity id without spawning it.

number

Network id of the server entity to wrap.

Fx

attachTo(entity, offset?): boolean

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

Makes the effect ride an entity’s body on every client until detach. Each client moves it onto that body every frame instead of parenting it, so it stays visible while a player is hidden with setVisible. The effect is destroyed when the entity is. False for a missing entity or one of another kind.

ServerEntity

A player, NPC, creature, world object or character.

Offset in cm in the entity’s frame, so it turns with it.

number

number

number

boolean


destroy(): boolean

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

Destroys this effect entity; every client drops its component.

boolean


detach(): boolean

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

Leaves an attached effect where its entity is. False when it was not attached.

boolean


setColor(name, color): boolean

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

Overrides a color parameter of a Niagara effect on every client, including late joiners. Only systems that expose the color as a LinearColor user parameter change; others, and Cascade effects, ignore it. Calling it again with the same name replaces the color. False for a fifth distinct name or a name over 64 characters.

string

The system’s LinearColor user parameter, e.g. ‘User.Color’.

Linear color; values above 1 glow. Alpha defaults to 1.

number

number

number

number

boolean


setVirtualWorld(world, map?): void

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

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


toString(): string

Defined in: shared.d.ts:74

string


static catalog(): object[]

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

Curated shipped effect systems (fire, explosions, smoke, weather, water, ambient, magic). A starting point, not an allowlist: any well-formed effect path spawns.

object[]


static create(key, path, opts): Fx | undefined

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

Creates or replaces an interest-streamed visual effect that every client in range renders.

string

Stable string key; creating again replaces the entity.

string

Niagara or Cascade system asset path (‘/Game/VFX/…/VFX_NS_X.VFX_NS_X’). Throws when malformed.

FxSpawnOptions

Placement (x, y, z, pitch, yaw, roll, scale), ttl in seconds, streamRange and drawDistance in cm.

Fx | undefined


static destroy(key): boolean

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

Destroys the effect stored under a stable key.

string

Stable key passed to create.

boolean

readonly attachedTo: number

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

Network id of the entity it rides, or 0 when placed.


drawDistance: number

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

Client cull distance in cm: players who have the effect stop drawing it beyond this. 0 never culls; -1 is the default and keeps the system’s own culling. Set, a Niagara effect also leaves the game’s scalability culling, so it keeps simulating while out of view. A change that crosses -1 restarts the effect on clients.


readonly id: number

Defined in: shared.d.ts:65

Network id, stable for the entity’s lifetime.


readonly path: string

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

Effect-system asset path this effect renders.


position: Vector3

Defined in: shared.d.ts:67

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


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

Uniform 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.


streamRange: number

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

Interest radius in cm: only players this close receive the effect. Clamped to 100-200000; default 50000 (500 m).


readonly ttl: number

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

Seconds until the server destroys it, or 0 when it lives until destroy.


readonly virtualWorld: number

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

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.