Skip to content
FMFallout Multiplayer Scripting APIScripting guides and API
Runtime classServer APIGenerated

RadioStation

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

A radio station every player’s game carries. It joins each Pip-Boy’s station list once heard and plays through world radios tuned to it, everywhere in the world. The server says what is on air and since when, so every player hears the same moment of the same track. A station outlives the resource that created it until destroyed.

new RadioStation(id): RadioStation

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

Wraps the station with this ID; it creates nothing.

number

Network entity identifier.

RadioStation

Entity.constructor

destroy(): boolean

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

Takes the station off every player’s radio.

boolean

False once the station is gone.


play(sound, durationMs?): boolean

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

Puts a track on air from now, replacing what played. Only a player’s data files can tell whether the form is a sound descriptor, so a wrong one stays silent. No event marks the end of a track: the script schedules the next one itself, from the duration it knows.

string | number

A BGSSoundDescriptorForm form ID, as a number or hex string.

number

How long it runs. With it, a player tuning in until then still hears it; without it, a player’s radio drops it once it has played out.

boolean

False once the station is gone.


playStream(url, durationMs?): boolean

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

Puts an audio stream on air from now, replacing what played: a server-hosted file, a playlist entry, a live DJ. Each player’s game fetches it and plays it while their Pip-Boy radio is on and tuned to this station, at the position every other listener hears (a live stream plays from its live edge). World radios tuned to the station stay silent: only the Pip-Boy plays streams.

string

An http or https URL of an audio file (mp3, aac, wav, wma) or a live stream.

number

How long it runs, as for play. Leave it out for a live stream.

boolean

False once the station is gone, or for a URL that is not http or https.


setVirtualWorld(world): void

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

Moves this entity into another virtual world.

number

Virtual-world identifier used to partition replication and visibility.

void

Entity.setVirtualWorld


setVisibleTo(player): void

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

Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.

Entity | null

Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.

void

Entity.setVisibleTo


stop(): boolean

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

Takes the track off air: every player’s radio falls silent on this station.

boolean

False once the station is gone.


toString(): string

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

Formats this handle for logging.

string

The station’s network ID, name and frequency.

Entity.toString


static all(): RadioStation[]

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

Every station.

RadioStation[]

One handle per station.


static areVanillaStationsEnabled(): boolean

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

Whether the game’s own stations are on the radio.

boolean

True unless a script turned them off.


static create(name, frequency): RadioStation | null

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

Creates a silent station on every player’s radio.

string

What the Pip-Boy lists it as, up to 64 characters.

number

What it transmits on, 80 to 110, the Pip-Boy’s dial; no other station may hold it. A game station on the same frequency plays over it unless the game’s stations are off.

RadioStation | null

The station, or null when the name or frequency was refused.


static setVanillaStationsEnabled(enabled): void

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

Puts the game’s own stations (Diamond City Radio, Classical Radio, and the quest signals and distress beacons too) on or off every player’s radio. Each player’s game runs them alone, so no two players hear the same thing on them. Off, they leave the Pip-Boy’s list and every world radio, and the scenes behind them play out in person instead. A player joining later follows the setting.

boolean

False takes them off; true puts them back.

void

readonly duration: number

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

How long the track on air runs, in milliseconds, as given to play; 0 when not given.


readonly elapsed: number

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

How long the track on air has run, in milliseconds; 0 while it is silent.


readonly frequency: number

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

The frequency it transmits on; 0 once it is gone.


readonly id: number

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

Immutable network entity identifier.

Entity.id


readonly name: string

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

What the Pip-Boy lists it as; empty once it is gone.


position: Vector3

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

Authoritative world-space position; assignment forces replicated state.

Entity.position


rotation: Vector3 | Quaternion

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

Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.

Entity.rotation


readonly sound: number

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

The BGSSoundDescriptorForm form ID on air; 0 while it is silent or plays a stream.


readonly state: StateBag

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

Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.

Entity.state


readonly stream: string

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

The URL playStream put on air; empty while none is.


readonly virtualWorld: number

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

Current virtual-world identifier.

Entity.virtualWorld