LegacyShell WikiLegacyShell Wiki
Back to LegacyShell
Home
Wiki
Plugins
Docs
Back to LegacyShell
Home
Wiki
Plugins
Docs
  • Documentation

    • Getting Started

      • What is LegacyShell?
      • Speed Setup
      • Requirements
      • Installation
      • First Run
      • Config Files
      • Making an Account
      • Troubleshooting (Getting Started)
    • Running a Server

      • Architecture Overview
      • The Database
      • Users and Ranks
      • Adding Game Servers
      • Client Mirrors
      • Perpetual
      • Backups
      • Rate Limiting
      • Moderation
      • Closed Mode
      • Deployment
      • Troubleshooting (Running a Server)
      • Hosting for Someone Else's Instance
    • Content Creation

      • Maps
      • Dealing with Babylon Models
      • Map Blocks
      • Items and Skins
      • Hats and Stamps
      • Sounds
      • Gamemodes
      • Seasonal Events
    • Plugin Development

      • Quickstart
      • I Want To...
      • Anatomy of a Plugin
      • Lifecycle
      • Dependencies
      • Events (Concept)
      • Event Reference

        • services: events
        • game: events — shared logic (src/shell/)
        • game: events — main-thread server process
        • game: events — per-connection client object
        • game: events — room lifecycle & tick loop
        • game: events — in-browser gameplay
        • client: events — client server & build pipeline
      • Commands
      • Client-Side Code
      • Static Assets
      • Content Packs
      • Networking
      • Workers and State
      • Prediction and Authority
      • Recipes

        • Recipe: Killstreaks
        • Recipe: New Pickup Item
        • Recipe: New Gamemode
        • Recipe: Custom Weapon
        • Recipe: UI Modification
        • Recipe: Discord Integration
        • Recipe: Replacing Core Behaviour
        • Recipe: Persistent Plugin Storage
        • Recipe: Rewarding Players with Currency
        • Recipe: Custom Per-Player Data
        • Recipe: Custom Theme
      • Publishing
      • Pitfalls
      • Modifiers
      • Sound and Apollo
    • Codebase Reference

      • Repo Layout
      • Shared Shell Layer
      • Server-Only Markers
      • The ss Object
      • Build Pipeline
      • Stamps and Babylons
      • Game Loop
      • Rooms and Workers
      • Wire Protocol
      • Generated

        • Wire Protocol Opcodes
        • Enums & Lookup Tables
        • Database Schema
        • Config Reference
        • Slash Command Reference
      • Services Internals
      • Catalog and Items
      • Permissions Internals
      • Physics and Collision
      • Known Quirks
      • Codebase Anecdotes
      • Development Timeline
    • Contributing

      • Documentation Style Guide
      • Generators
      • For AI Agents

game: events — in-browser gameplay

Audience: Plugin authors and AI agents · Prereqs: Events (concept)

Every plugins.emit(...) call site found in the files below, extracted directly from source - not hand-maintained. Unprefixed at the call site; PluginManager.emit adds game: before checking for listeners, so e.g. the first row below actually fires as game:startUp.

EventLocationPayloadFires when
startUpserver-client/src/client-static/src/shellshock.min.js:99{ }The in-browser game client script finished its own top-level setup.
afterBullshitserver-client/src/client-static/src/shellshock.min.js:402{}Fires after an early setup block (the name is kept verbatim from the original game source).
LegacyShellOnMessageserver-client/src/client-static/src/shellshock.min.js:442{cmd, cmdName, input}Every incoming server packet, after opcode decoding, before dispatch — a general-purpose network message hook; data.input is a still-positioned Comm.In reader, so a plugin can read a custom opcode's payload here.
roomParamsUpdatedserver-client/src/client-static/src/shellshock.min.js:459{ roomParamsObj }A Comm.Code.updateRoomParams payload was just parsed (cheatsEnabled/Object.assign already handled by core) - lets a plugin render its own gameOptions.plugins-owned fields (e.g. legacyweather's weather/time rendering).
roundEndSFXserver-client/src/client-static/src/shellshock.min.js:507{roundLength, roundEndTime, betweenRounds}Round-end sound/UI cue.
playerDeathAnimationserver-client/src/client-static/src/shellshock.min.js:690{killedPlayer}A player's death animation is playing.
inGameSync1server-client/src/client-static/src/shellshock.min.js:797{ id, stateIdx, x, y, z, dx, dy, dz, climbing, pingLevelInt }First stage of processing an incoming per-player sync entry.
inGameSync2server-client/src/client-static/src/shellshock.min.js:893{ id, stateIdx, x, y, z, dx, dy, dz, climbing, pingLevelInt, dist, player }Second stage of processing an incoming per-player sync entry (remote players, distance-based detail).
inGameSync3server-client/src/client-static/src/shellshock.min.js:927{ id, stateIdx, x, y, z, dx, dy, dz, climbing, pingLevelInt, player }Third stage of processing an incoming per-player sync entry.
clearItemButtonsserver-client/src/client-static/src/shellshock.min.js:1336{ i, canvas }Shop/loadout UI item-button reset.
encloseRenderPageFuncserver-client/src/client-static/src/shellshock.min.js:1486{ i, b, canvas, renderingItem, locked, requiresPhysicalUnlock }Rendering one catalog item tile in the shop UI.
playerActorBodyMeshCreatedserver-client/src/client-static/src/shellshock.min.js:1746{ playerActor: this, bodyMesh: this.bodyMesh, player }A player's visual body mesh finished loading.
playerActorShadowRenderListserver-client/src/client-static/src/shellshock.min.js:1775{ playerActor: this, shadowGen: shadowGen }The player mesh was registered with the shadow generator.
playerActorRemoveFromPlayserver-client/src/client-static/src/shellshock.min.js:1958{ playerActor: this }A player's visual actor is being hidden (died or left).
playerActorRestoreToPlayserver-client/src/client-static/src/shellshock.min.js:1967{ playerActor: this }A player's visual actor is being restored (respawned).
bulletActorFiredserver-client/src/client-static/src/shellshock.min.js:2127{ bulletActor: this }A visual bullet actor was fired client-side.
gunActorSetupserver-client/src/client-static/src/shellshock.min.js:2198{ gunActor: this, shadowGen }A weapon's visual model finished setup.
onPageLoadedEndserver-client/src/client-static/src/shellshock.min.js:2996{}The game's HTML page finished loading.
joinGameserver-client/src/client-static/src/shellshock.min.js:3029{ joinGameIdPassed }The client is about to send its join request.
onExtraParamsserver-client/src/client-static/src/shellshock.min.js:3119{ extraParams }Extra join params (session, custom map, etc.) are being assembled.
clientOnExtraGameInfoserver-client/src/client-static/src/shellshock.min.js:3227{ extraInfo }Extra per-game info received from the server after joining.
onShadowGeneratorCreatedserver-client/src/client-static/src/shellshock.min.js:3383{ shadowGen }The Babylon shadow generator was created for the scene.
loadMaterialsserver-client/src/client-static/src/shellshock.min.js:3675{ scene }Core's built-in materials have just been defined - lets a plugin define its own right after (e.g. legacyweather's wetMaterial).
loadSoundsserver-client/src/client-static/src/shellshock.min.js:3729{ soundsList }Before the Apollo/Howler sound list is loaded.
createMapCellsMapLoadedserver-client/src/client-static/src/shellshock.min.js:3797{ minMap, SPS, gameScene, shadowGen, shadowLight }The raw map JSON has been fetched and is about to be turned into cells.
modifyMinMapserver-client/src/client-static/src/shellshock.min.js:3828eventA direct hook to rewrite the map data itself before cell generation.
createMapCellsserver-client/src/client-static/src/shellshock.min.js:3855{ minMap, SPS, gameScene, shadowGen, shadowLight }Map cells are being generated from minMap.
onMapCompleteBeforeSetupserver-client/src/client-static/src/shellshock.min.js:4112{ gameScene, minMap }Before final map setup finishes.
onMapCompleteserver-client/src/client-static/src/shellshock.min.js:4125{ gameScene }After final map setup finishes.
resetGamePlayerserver-client/src/client-static/src/shellshock.min.js:4396{player}Client-local counterpart to the server's resetGamePlayer — round-scoped UI/state reset.
addKillTextBeforeserver-client/src/client-static/src/shellshock.min.js:4761{msgs}Before the kill-feed text is rendered.
onBalanceUpdatedserver-client/src/client-static/src/shellshock.min.js:4783{balance: playerAccount.currentBalance}The player's currency balance display changed.
onResourcesLoadedEndserver-client/src/client-static/src/shellshock.min.js:4828{}All game resources (models/sounds/textures) finished loading.
shellFragBurstBeforeserver-client/src/client-static/src/shellshock.min.js:5922{ player, count, theSize, theAnimLength }Before a shell-casing particle burst effect plays.
syncToServerserver-client/src/client-static/src/shellshock.min.js:6485{loadout}The client is about to push a loadout change to the server.
waitForSetupAndAuthCompleteserver-client/src/client-static/src/shellshock.min.js:6722{waitIteration}The startup poll loop, waiting for auth and page setup to both finish, has started.
waitForSetupAndAuthCompleteCheckserver-client/src/client-static/src/shellshock.min.js:6735{waitIteration, customizer, authAttemptComplete, houseAdsLoaded}The startup poll loop is checking whether auth and page setup have both finished yet.
waitForSetupAndAuthCompleteReadyserver-client/src/client-static/src/shellshock.min.js:6738{waitIteration}The startup poll loop has confirmed both auth and page setup are ready.
setupCompleteserver-client/src/client-static/src/shellshock.min.js:6753{}The startup poll loop concluded successfully.
reachedEndserver-client/src/client-static/src/shellshock.min.js:7587{}End of the whole client script file, once.
loadMeshesBeforeMaterialserver-client/src/client-static/editor/js/mapEdit.js:88278{mesh}Same hook as the shared loading.js version, duplicated for the standalone map-editor page.

This page was drafted with AI assistance and reviewed for accuracy. If something looks wrong, please open a PR or flag it.

Edit this page on GitHub
Prev
game: events — room lifecycle & tick loop
Next
client: events — client server & build pipeline