EventMap
Defined in: server/api.d.ts:7
Native events dispatched through Events.on. Each property is the exact callback argument tuple for that event.
Properties
Section titled “Properties”consoleCommand
Section titled “consoleCommand”consoleCommand: [
string,string[]]
Defined in: server/api.d.ts:501
Dispatched for a line typed into the server console that no built-in command (help, ensure, refresh, …) claimed. args is the rest of the line, split on whitespace. The console is the operator’s, so this is the place for commands no player may run.
containerChange
Section titled “containerChange”containerChange: [
Player,number,InventoryItem[]]
Defined in: server/api.d.ts:156
Dispatched when a player’s game reports what a container holds now, after they put something in or took something out. To refuse a transfer, refuse the player’s inventoryChange, which reverts the container with it.
containerClose
Section titled “containerClose”containerClose: [
Player,number]
Defined in: server/api.d.ts:151
Dispatched when the player holding a container closes its menu; anyone may open it again.
containerOpen
Section titled “containerOpen”containerOpen: [
Player,number]
Defined in: server/api.d.ts:146
Dispatched when a player opens a container nobody else holds. Return false to keep it shut.
doorChange
Section titled “doorChange”doorChange: [
Player,number,boolean]
Defined in: server/api.d.ts:136
Dispatched when a player opens or closes a door. Return false to refuse: their door swings back.
entityStateChange
Section titled “entityStateChange”entityStateChange: [
Entity,string,any,any]
Defined in: server/api.d.ts:496
Dispatched when one key of an entity’s state changes: on the server when a script writes it, on a client when the write arrives. value is undefined when the key was removed and previous is undefined when it held nothing before, so a stored null stays distinguishable from an absent key. The entity is whatever the game’s WrapScriptEntity answers, and the base Entity handle by default.
inventoryChange
Section titled “inventoryChange”inventoryChange: [
Player,InventoryDelta[]]
Defined in: server/api.d.ts:171
Dispatched when a player’s game reports a change the server would accept: looting, buying, crafting, using an item. Return false to refuse it: the server keeps its record and sends it back to their game, and any container involved keeps what it held. Changes a script made itself do not raise it.
itemDrop
Section titled “itemDrop”Defined in: server/api.d.ts:161
Dispatched when a player drops an item. Return false to refuse: the item leaves the world and goes back into their inventory.
itemPickUp
Section titled “itemPickUp”Defined in: server/api.d.ts:166
Dispatched when a player picks up a loose item, before they get it: a dropped or spawned item, or a placed reference by its form ID as ref. Return false to refuse; the item stays where it is.
lockChange
Section titled “lockChange”lockChange: [
Player,number,boolean]
Defined in: server/api.d.ts:141
Dispatched when a player picks, unlocks or locks a lock. Return false to refuse: their lock goes back.
mineLaid
Section titled “mineLaid”mineLaid: [
Mine]
Defined in: server/api.d.ts:391
Dispatched once a player’s mine settles and is armed. Return false to refuse: it leaves the world unexploded.
mineRemove
Section titled “mineRemove”mineRemove: [
Mine]
Defined in: server/api.d.ts:401
Dispatched when a mine goes, whatever took it: its blast, a disarm, its owner leaving or a script. The handle still reads.
mineTrigger
Section titled “mineTrigger”Defined in: server/api.d.ts:396
Dispatched when a player walks onto another player’s mine, before it goes off. Return false to keep it armed; the player’s game asks again every half second while they stand on it.
npcActivate
Section titled “npcActivate”Defined in: server/api.d.ts:421
Dispatched when a player activates an NPC, the Activate button on its body: what a shopkeeper, a quest giver or any interaction starts from. Raised whether or not setActivationBlocked stops the game’s own greeting and dialogue.
npcArrive
Section titled “npcArrive”npcArrive: [
Npc]
Defined in: server/api.d.ts:441
Dispatched once when an NPC reaches where goTo sent it; it then stands there until stopGoing or the next goTo. Sent after a body, it is raised again each time it catches up after the body walked off.
npcAttack
Section titled “npcAttack”npcAttack: [
Npc,Player,number,"direct"|"blast",string|null,number|null,HitInfo]
Defined in: server/api.d.ts:411
Dispatched when an NPC lands a hit on a player, before the victim takes it. Return false to drop the hit, except on a player whose own game runs the NPC (getSimulator), who took it already: that one is told so scripts learn of it. damage is the game’s own, from the client that runs the NPC. limb is the body part struck, as the game names its types (“Head1”, “LeftArm1”, “Torso”…), null for a blast or none; weapon is the weapon form the hit came from, null for none. hit says whether it was a bash, and its setDamage changes what is dealt, as for playerHit.
npcCommand
Section titled “npcCommand”npcCommand: [
Npc,Player,string,number|Player|Npc|null,Vector3]
Defined in: server/api.d.ts:431
Dispatched when a player gives their companion a command in the game’s command mode: command is one of npc.command’s, target the player, NPC or placed reference (by form ID) it is aimed at, null for a point on the ground or something only that player’s game knows, and position where it is. The game carries it out already; a script answers it, with a bark, a cost, or another command.
npcDeath
Section titled “npcDeath”Defined in: server/api.d.ts:416
Dispatched once when an NPC dies. killer is the last player who hit it, or null. It comes back on its own a while later; npcRespawn follows.
npcHit
Section titled “npcHit”npcHit: [
Player,Npc,number,"direct"|"blast"|"vats",number,string|null,number|null,HitInfo]
Defined in: server/api.d.ts:406
Dispatched when a player’s game lands a hit on an NPC, before the NPC takes it. Return false to drop the hit, except on an NPC the attacker’s own game runs (getSimulator), which took it already: that one is told so scripts learn who hit it, and the attacker is still the killer npcDeath names. damage is the attacker’s game’s own; kind is a shot or a blow, an explosion’s blast, or a shot of a VATS attack, whose hit the attacker’s game rolled against the chance it showed: refusing one decides VATS hits on the server. vatsChance is the chance the attacker’s VATS showed, 0 to 1, and 0 for any other kind, as for playerHit. limb is the body part struck, as the game names its types (“Head1”, “LeftArm1”, “Torso”…), null for a blast or none; weapon is the weapon form the hit came from, null for none. hit says whether it was a bash, and its setDamage changes what is dealt, as for playerHit.
npcLeaderChange
Section titled “npcLeaderChange”Defined in: server/api.d.ts:456
Dispatched when an NPC becomes a player’s companion (setLeader), or follows nobody any more (leader null): let go, or its leader left.
npcMouthChange
Section titled “npcMouthChange”npcMouthChange: [
Npc,number|null]
Defined in: server/api.d.ts:436
Dispatched when what a dog holds in its mouth changes, as the game that runs it has it: it took an item (carryInMouth, or one it fetched), or dropped it (item null).
npcRespawn
Section titled “npcRespawn”npcRespawn: [
Npc]
Defined in: server/api.d.ts:446
Dispatched when an NPC is back at its placement, whole: on its own after its death, or from respawn.
npcSimulatorChange
Section titled “npcSimulatorChange”Defined in: server/api.d.ts:451
Dispatched when another player’s game takes over running an NPC, or when nobody near does any more (simulator null) and the server walks it.
npcTarget
Section titled “npcTarget”Defined in: server/api.d.ts:426
Dispatched when the player or NPC an NPC fights changes, as the game that runs it decides: it noticed an enemy, switched to another, or stopped fighting (target null, also on its death). Where aggro, bounties and wanted levels start.
playerActivatePlayer
Section titled “playerActivatePlayer”Defined in: server/api.d.ts:56
Dispatched when a player activates another player’s body, the Activate button on them: where a trade, a search, a handover or any player-to-player interaction starts. The two stand within reach in the same space.
playerAddicted
Section titled “playerAddicted”playerAddicted: [
Player,number|null]
Defined in: server/api.d.ts:301
Dispatched when a player becomes addicted. item is the chem or drink that did it. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerAppearanceChange
Section titled “playerAppearanceChange”playerAppearanceChange: [
Player]
Defined in: server/api.d.ts:46
Dispatched when a player’s game reports a new look after the one they joined with: the look editor closed, or setLook, randomizeLook or setAppearance changed it. getAppearance reads it.
playerAssault
Section titled “playerAssault”playerAssault: [
Player]
Defined in: server/api.d.ts:311
Dispatched when the game’s crime system records an assault by a player on one of its NPCs. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerAttack
Section titled “playerAttack”playerAttack: [
Player,string]
Defined in: server/api.d.ts:66
Dispatched when a player swings a melee weapon or their fists, before it is shown to the players around them. event is the animation event their game took, meleeattackStart among others.
playerBobblehead
Section titled “playerBobblehead”playerBobblehead: [
Player]
Defined in: server/api.d.ts:386
Dispatched when a player collects a bobblehead. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerBookRead
Section titled “playerBookRead”playerBookRead: [
Player,number|null]
Defined in: server/api.d.ts:276
Dispatched when a player reads a book or magazine, the TESObjectBOOK form ID. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerBountyChange
Section titled “playerBountyChange”playerBountyChange: [
Player,number,number,number]
Defined in: server/api.d.ts:211
Dispatched when the bounty a player owes a crime faction changes in their game: a crime of theirs the faction saw, a payment, or setBounty / addBounty. bounty is the crime gold now, violent and not together. Where wanted levels and police chases start.
playerCharacterLoad
Section titled “playerCharacterLoad”playerCharacterLoad: [
Player]
Defined in: server/api.d.ts:176
Dispatched once a player’s character is established, shortly after they join: adopted from their game. Restore a kept character here with setCharacter. Character methods work from here.
playerChat
Section titled “playerChat”playerChat: [
Player,string]
Defined in: server/api.d.ts:106
Dispatched for a chat line, before anyone sees it. Return false to swallow it.
playerCommand
Section titled “playerCommand”playerCommand: [
Player,string,string[]]
Defined in: server/api.d.ts:111
Dispatched for a /command arg... line; command has no slash.
playerConnect
Section titled “playerConnect”playerConnect: [
Player]
Defined in: server/api.d.ts:11
Dispatched once a connecting player’s entity exists. It has no position yet; wait for playerReady to place them.
playerConnecting
Section titled “playerConnecting”playerConnecting: [
PendingConnection]
Defined in: server/api.d.ts:521
Dispatched when a player asks to join, before the connection exists: they hold no player slot, are not counted as online, and are sent nothing – no resource list, no download, no body. The request waits until every handler has returned and every Promise a handler returned has settled, then it is let in if a player slot is free (otherwise it is refused as full). connection.reject() turns it away instead, and so does a handler that throws or rejects, or handlers that have not settled within the server’s admission timeout (30 seconds by default, restarted by every connection.update()). With no handler at all, every request is let in at once.
playerContainerLoot
Section titled “playerContainerLoot”playerContainerLoot: [
Player,number|null]
Defined in: server/api.d.ts:271
Dispatched when a player takes something from a container. container is the container reference’s form ID. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerCorpseEat
Section titled “playerCorpseEat”playerCorpseEat: [
Player]
Defined in: server/api.d.ts:361
Dispatched when a player feeds on a corpse, as the Cannibal perk lets them. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerCraft
Section titled “playerCraft”playerCraft: [
Player,number|null,number|null,number|null,number]
Defined in: server/api.d.ts:266
Dispatched when a player makes something at a workbench: cooking, chemistry, or a weapon or armor mod. workbench is the bench’s base furniture, recipe the constructible object used, item what it makes and count how many, as the recipe says. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerCriticalHit
Section titled “playerCriticalHit”playerCriticalHit: [
Player,number|null,boolean]
Defined in: server/api.d.ts:326
Dispatched when a player lands a sneak attack (critical false) or a critical hit (true) on an actor, as their HUD says it. weapon is the weapon’s form ID, null for bare hands. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerDeath
Section titled “playerDeath”Defined in: server/api.d.ts:26
Dispatched once when a player dies. killer is the last player who hit them, or null. Nothing brings them back on its own: call player.respawn.
playerDisarm
Section titled “playerDisarm”playerDisarm: [
Player,number|null]
Defined in: server/api.d.ts:381
Dispatched when a player knocks the weapon out of an actor’s hands. target is the actor disarmed. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerDisconnect
Section titled “playerDisconnect”playerDisconnect: [
Player]
Defined in: server/api.d.ts:21
Dispatched while a player is leaving, before their entity is destroyed, so the handle still reads. Anything keyed on the player is cleaned up here.
playerExplosion
Section titled “playerExplosion”Defined in: server/api.d.ts:71
Dispatched when a player’s game sets off an explosion: a grenade, a mine, a missile, an explosive round, or one an NPC it simulates set off (npc, its network ID). explosion is the BGSExplosion form ID. Return false to refuse it: nobody else sees it and its blast lands on no one.
playerFastTravel
Section titled “playerFastTravel”playerFastTravel: [
Player,number]
Defined in: server/api.d.ts:226
Dispatched when a player’s game is about to fast travel: a marker picked on the Pip-Boy map, or the game’s own scripts. destination is the reference they would arrive at, a map marker’s form ID. Their game waits for the answer. Return false to refuse it: they stay where they are. Otherwise they travel.
playerFusionCore
Section titled “playerFusionCore”playerFusionCore: [
Player,"consumed"|"inserted"|"ejected",number|null,number]
Defined in: server/api.d.ts:101
Dispatched when a player’s game takes a fusion core into their power armor or launches it out. consumed: the suit’s core ran out and their game loaded the next one they carry. inserted: a core went into the empty suit as it reached them. ejected: they launched the core out of the suit (Nuclear Physicist), core null. condition is the core’s charge in percent. Return false to refuse a core taken in: it goes back to their inventory, the suit keeps the charge it had and takes no other core until setPowerArmorBattery gives it a charge or they get out. A launch cannot be refused.
playerFusionCoreConsume
Section titled “playerFusionCoreConsume”playerFusionCoreConsume: [
Player]
Defined in: server/api.d.ts:336
Dispatched when a fusion core runs out in a player’s game: their power armor’s, or the last shot of one they fired. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerFusionCoreEject
Section titled “playerFusionCoreEject”playerFusionCoreEject: [
Player]
Defined in: server/api.d.ts:341
Dispatched when a fusion core is ejected from power armor in a player’s game. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerHit
Section titled “playerHit”playerHit: [
Player,Player,number,"direct"|"blast"|"hazard"|"vats",number,string|null,number|null,HitInfo]
Defined in: server/api.d.ts:51
Dispatched when a player’s game lands a hit on another player, before the victim takes it. Return false to drop the hit. damage is the attacker’s game’s own. kind is a shot or a blow, an explosion’s blast, a hazard the attacker left (a radiation or gas cloud), which casts its spell and carries no damage figure, or a shot of a VATS attack, whose hit the attacker’s game rolled against the chance it showed: refusing one decides VATS hits on the server (their chances are the game’s fVATS* settings, setGameSetting). vatsChance is the chance the attacker’s VATS showed for the shot, 0 to 1, and 0 for any other kind; with setVatsRolledByServer every such shot strikes on the attacker’s screen, and the handler rolls it, as Math.random() < vatsChance. limb is the body part struck, as the game names its types (“Head1”, “LeftArm1”, “Torso”…), null for a blast or none; weapon is the weapon form the hit came from, null for none. hit says whether it was a bash, and its setDamage changes what the victim is dealt, as a durability or armor system scales it: hit.setDamage(damage * 0.5).
playerHolotape
Section titled “playerHolotape”playerHolotape: [
Player,number|null,boolean]
Defined in: server/api.d.ts:351
Dispatched when a player’s holotape starts, pauses, resumes or stops: holotape is the tape’s form ID and playing whether it runs now. A tape that plays a recording; one that opens a terminal or a game is not reported. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerInvest
Section titled “playerInvest”playerInvest: [
Player]
Defined in: server/api.d.ts:366
Dispatched when a player invests caps in one of the game’s vendors. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerJetpack
Section titled “playerJetpack”playerJetpack: [
Player,boolean]
Defined in: server/api.d.ts:91
Dispatched once when the jetpack of a player’s power armor starts thrusting and once when it stops, as their game reports it.
playerJunkFound
Section titled “playerJunkFound”playerJunkFound: [
Player,number]
Defined in: server/api.d.ts:346
Dispatched when junk enters a player’s inventory, picked up or given, with the count their game adds to its junk collected stat. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerLevelChange
Section titled “playerLevelChange”playerLevelChange: [
Player,number,number]
Defined in: server/api.d.ts:186
Dispatched when the character’s level moves, by XP or by a script.
playerLocationChange
Section titled “playerLocationChange”playerLocationChange: [
Player,number|null,number|null]
Defined in: server/api.d.ts:231
Dispatched when a player’s game moves them into another named location (a BGSLocation form ID), or out into the open (null). previous is null for the first one they report after joining.
playerLocationCleared
Section titled “playerLocationCleared”playerLocationCleared: [
Player]
Defined in: server/api.d.ts:321
Dispatched when the game marks the location a player is in as cleared; Player.getLocation names it. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerLocationDiscover
Section titled “playerLocationDiscover”playerLocationDiscover: [
Player,number|null]
Defined in: server/api.d.ts:331
Dispatched when a player discovers a location by coming up to it. marker is the map marker reference, the one Player.discoverLocations takes; what a script reveals that way is not reported. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerLockPick
Section titled “playerLockPick”playerLockPick: [
Player]
Defined in: server/api.d.ts:261
Dispatched when a player picks a lock in the lockpicking minigame. lockChange follows with the reference. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerLockpickStart
Section titled “playerLockpickStart”playerLockpickStart: [
Player,number]
Defined in: server/api.d.ts:241
Dispatched when a player’s game is about to open the lockpicking minigame on a locked door or container (ref, the placed reference’s form ID). Their game waits for the answer. Return false to refuse it: the lock stays shut and no pick is spent. Otherwise their game opens it, still checking their bobby pins and whether the lock can be picked at all. playerLockPick and lockChange follow a pick.
playerMapWaypoint
Section titled “playerMapWaypoint”Defined in: server/api.d.ts:236
Dispatched when a player drops their own marker on the Pip-Boy map, or removes it (position null). Return false to refuse it: their game puts back what they had.
playerMineDisarm
Section titled “playerMineDisarm”playerMineDisarm: [
Player]
Defined in: server/api.d.ts:286
Dispatched when a player disarms a mine. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerMurder
Section titled “playerMurder”playerMurder: [
Player]
Defined in: server/api.d.ts:316
Dispatched when the game’s crime system records a murder by a player. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerMysteriousStranger
Section titled “playerMysteriousStranger”playerMysteriousStranger: [
Player]
Defined in: server/api.d.ts:376
Dispatched when the Mysterious Stranger turns up for a player in VATS. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerPerkChange
Section titled “playerPerkChange”playerPerkChange: [
Player,number,boolean]
Defined in: server/api.d.ts:196
Dispatched when a perk rank was added to or taken from the character, by their game or by a script.
playerPerkRequest
Section titled “playerPerkRequest”playerPerkRequest: [
Player,number,"buy"|"grant"|"remove"]
Defined in: server/api.d.ts:191
Dispatched when the player’s game changes a perk rank: bought on the perk chart (after the server checked points, level, the rank below and SPECIAL), given by something in the game such as a magazine, or taken away. Return false to refuse it: their game undoes it.
playerPickpocket
Section titled “playerPickpocket”playerPickpocket: [
Player,number|null,boolean]
Defined in: server/api.d.ts:281
Dispatched when a player takes an item by pickpocketing. victim is the actor robbed. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerPowerArmor
Section titled “playerPowerArmor”playerPowerArmor: [
Player,boolean]
Defined in: server/api.d.ts:76
Dispatched once when a player gets into a power armor frame (entered) and once when they get out, however it happened.
playerPowerArmorBattery
Section titled “playerPowerArmorBattery”playerPowerArmorBattery: [
Player,number,number]
Defined in: server/api.d.ts:96
Dispatched when the charge of the fusion core in a player’s power armor changes, in whole units: their game drains it (a jump, among others), a new core is loaded, or setPowerArmorBattery set it. Not on getting in.
playerProjectile
Section titled “playerProjectile”Defined in: server/api.d.ts:36
Dispatched when a player’s game launches a projectile: a missile, a grenade in flight, a flame, or one an NPC it simulates launched (npc). projectile is the BGSProjectile form ID. Return false to refuse: nobody else sees it. It still flies on the shooter’s own screen.
playerReady
Section titled “playerReady”playerReady: [
Player]
Defined in: server/api.d.ts:16
Dispatched once the player’s world is synced and they stand in it: the moment to spawn, dress and equip them. Their inventory record follows shortly after, with their first report.
playerReload
Section titled “playerReload”playerReload: [
Player,string]
Defined in: server/api.d.ts:61
Dispatched when a player starts a reload, before it is shown to the players around them. event is the animation event their game played.
playerRicochet
Section titled “playerRicochet”playerRicochet: [
Player]
Defined in: server/api.d.ts:371
Dispatched when a shot at a player bounces back and kills the shooter, the Ricochet perk’s doing. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerSandmanKill
Section titled “playerSandmanKill”playerSandmanKill: [
Player]
Defined in: server/api.d.ts:356
Dispatched when a player kills a sleeping actor with the Mister Sandman kill. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerShoot
Section titled “playerShoot”playerShoot: [
Player]
Defined in: server/api.d.ts:31
Dispatched when a player fires, before the shot is shown to the players around them.
playerSleepWait
Section titled “playerSleepWait”playerSleepWait: [
Player,number,boolean]
Defined in: server/api.d.ts:251
Dispatched when a player’s game is about to open the sleep and wait menu: sleep true for a bed they activated, false for waiting in a seat they sit in (ref, the placed reference’s form ID; 0 for one placed at runtime). Their game waits for the answer. Return false to refuse it: no menu opens and no hours pass. Otherwise it opens as the game would, still refused by the game itself with enemies near, in the air, taking damage and so on. The hours a player then sleeps or waits pass on their own game only and their health heals; the server’s clock is the World’s, and their game’s clock goes back to it once the menu closes.
playerSpaceChange
Section titled “playerSpaceChange”playerSpaceChange: [
Player,PlayerSpace,PlayerSpace|null]
Defined in: server/api.d.ts:41
Dispatched when a player’s game reports them in another worldspace or interior: through a door, a fast travel or teleport. previous is null for the first space they report after joining.
playerSpeechChallenge
Section titled “playerSpeechChallenge”playerSpeechChallenge: [
Player]
Defined in: server/api.d.ts:291
Dispatched when a player passes a speech challenge in a dialogue. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerSteal
Section titled “playerSteal”playerSteal: [
Player,number]
Defined in: server/api.d.ts:296
Dispatched when a player’s game counts a theft: items taken that belong to someone else. count is how many. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerSwim
Section titled “playerSwim”playerSwim: [
Player,boolean]
Defined in: server/api.d.ts:81
Dispatched once when a player starts swimming and once when they are back on their feet, as their game reports it.
playerTerminalHack
Section titled “playerTerminalHack”playerTerminalHack: [
Player,number|null]
Defined in: server/api.d.ts:256
Dispatched when a player hacks a terminal: the password was found. terminal is the terminal reference’s form ID. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerTerminalOpen
Section titled “playerTerminalOpen”playerTerminalOpen: [
Player,number]
Defined in: server/api.d.ts:246
Dispatched when a player sits at a terminal (ref, the placed reference’s form ID) and their game is about to open it. Their game waits for the answer, the player seated. Return false to refuse it: they get up without it opening. Otherwise it opens, its hacking minigame first while it is locked. The client’s References.getTerminal reads what it holds.
playerTrespass
Section titled “playerTrespass”playerTrespass: [
Player]
Defined in: server/api.d.ts:306
Dispatched when a player is caught trespassing by the game’s own crime system. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.
playerUnderwater
Section titled “playerUnderwater”playerUnderwater: [
Player,boolean]
Defined in: server/api.d.ts:86
Dispatched once when the water reaches above a player’s neck (player.isUnderwater) and once when it no longer does, as their game reports it.
playerValueChange
Section titled “playerValueChange”playerValueChange: [
Player,string,number,number]
Defined in: server/api.d.ts:206
Dispatched when an actor value base on the character’s record moved, by their game or by a script.
playerValueRequest
Section titled “playerValueRequest”playerValueRequest: [
Player,string,number,number]
Defined in: server/api.d.ts:201
Dispatched when the player’s game moves a SPECIAL base: the SPECIAL menu, a bobblehead, a book. value is its editor ID. Return false to refuse it: their game puts it back.
playerVoiceStart
Section titled “playerVoiceStart”playerVoiceStart: [
Player]
Defined in: server/api.d.ts:506
Dispatched when a player starts speaking, as isPlayerTalking turns true.
playerVoiceStop
Section titled “playerVoiceStop”playerVoiceStop: [
Player]
Defined in: server/api.d.ts:511
Dispatched shortly after a player’s last voice frame, as isPlayerTalking turns false. A player who disconnects while talking gets no stop, so clear them on disconnect too.
playerVoiceTierChange
Section titled “playerVoiceTierChange”playerVoiceTierChange: [
Player,number]
Defined in: server/api.d.ts:516
Dispatched when a player switches voice tier themselves: 0 whisper, 1 normal, 2 shout. setPlayerTier does not raise it.
playerWeatherRegionChange
Section titled “playerWeatherRegionChange”playerWeatherRegionChange: [
Player,number,number]
Defined in: server/api.d.ts:126
Dispatched when a player’s game finds them under another weather region, as they change cell: region is the TESRegion form ID, 0 for none. Its weathers come from World.getRegionWeathers.
playerXpGain
Section titled “playerXpGain”playerXpGain: [
Player,number]
Defined in: server/api.d.ts:181
Dispatched when the player’s game awards XP: a kill, a quest, a lock, a terminal, a workshop build. amount is the game’s, Intelligence included. Return false to refuse it: their game takes it back.
resourceStart
Section titled “resourceStart”resourceStart: [
string]
Defined in: server/api.d.ts:486
Dispatched after a resource entry point has run and immediately before the resource becomes running.
resourceStop
Section titled “resourceStop”resourceStop: [
string]
Defined in: server/api.d.ts:491
Dispatched while a resource is stopping, before its stop callback, timers, exports and event handlers are cleaned up.
workshopBuild
Section titled “workshopBuild”Defined in: server/api.d.ts:461
Dispatched when a player builds an object in a settlement, before anyone else sees it. Return false to refuse: their game takes it back out. The recipe’s components are theirs to have spent; the server cannot refund them.
workshopEnter
Section titled “workshopEnter”workshopEnter: [
Player,number]
Defined in: server/api.d.ts:471
Dispatched when a player enters workshop mode at a workbench, the workbench reference’s form ID.
workshopLeave
Section titled “workshopLeave”workshopLeave: [
Player,number]
Defined in: server/api.d.ts:476
Dispatched when a player leaves workshop mode, or enters it at another workbench.
workshopMove
Section titled “workshopMove”workshopMove: [
Player,WorkshopItem,Vector3,Vector3]
Defined in: server/api.d.ts:466
Dispatched when a player moves a built object, before anyone else sees it. Return false to refuse: the object is put back where it was for everyone, as a new WorkshopItem, and the old handle reads nothing.
workshopScrap
Section titled “workshopScrap”workshopScrap: [
Player,WorkshopItem]
Defined in: server/api.d.ts:481
Dispatched when a player scraps or stores a built object, before it goes for everyone. Return false to refuse: the object is put back for everyone, as a new WorkshopItem, and the old handle reads nothing. The player keeps what their game gave them for it.
worldDayChange
Section titled “worldDayChange”worldDayChange: [
WorldDate,number]
Defined in: server/api.d.ts:131
Dispatched when the running clock passes midnight into a new day, with the new date and day count. World.setDate and World.setDaysPassed do not raise it.
worldHourChange
Section titled “worldHourChange”worldHourChange: [
number]
Defined in: server/api.d.ts:116
Dispatched when the running clock reaches a new whole hour, 0 to 23. World.setHour does not raise it.
worldLightning
Section titled “worldLightning”worldLightning: [
number]
Defined in: server/api.d.ts:121
Dispatched when the server strikes lightning on its own, for a thundery weather a sky is held to: the World’s, or one a player was given. World.strikeLightning does not raise it.
zoneEnter
Section titled “zoneEnter”zoneEnter: [
Player,number,string]
Defined in: server/api.d.ts:216
Dispatched when a player comes into a zone Zone.create made, or is in it when it is made.
zoneLeave
Section titled “zoneLeave”zoneLeave: [
Player,number,string]
Defined in: server/api.d.ts:221
Dispatched when a player goes out of a zone, or the zone is removed around them. A player who leaves the server is not told.