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

Enums & Lookup Tables

Audience: Plugin authors, AI agents · Prereqs: Wire Protocol Opcodes

Every top-level, flat, all-number-valued object literal in src/shell/constants.js and src/shell/comm.js, extracted directly from source - whether or not it carries a JSDoc @enum tag (most of the real ones do; a few, like Team and CONTROL, don't but are unambiguously enum-shaped anyway). Deliberately excludes name→function maps (item_classes, Ease), name→string maps (item_classes_strings, inputToControlMap), and name→array maps (teamColors) even where they sit right next to genuine enums in the same file - those hold real values, not numeric codes. Comm.Code has its own dedicated page: see Wire Protocol Opcodes.

Slot

used in-game, e.g., me.weaponIdx. this may as well be a boolean.

Defined at src/shell/constants.js:129.

KeyValue
Primary0
Secondary1

ItemType

used for items, idk how to describe this

Defined at src/shell/constants.js:139.

KeyValue
Hat1
Stamp2
Primary3
Secondary4

CharClass

used for items but also for classIdx (its really confusing and inconsistent)

Defined at src/shell/constants.js:151.

KeyValue
Soldier0
Scrambler1
Ranger2
Eggsploder3

itemIdOffsetsByNameOLD

Defined at src/shell/constants.js:160.

KeyValue
Hat1000
Stamp2000
base3000
Cluck9mm3000
Eggk473100
CSG13400
DozenGauge3600
RPEGG3800
HatsitemIdOffsetsByNameOLD.Hat
StampsitemIdOffsetsByNameOLD.Stamp
PrimaryitemIdOffsetsByNameOLD.base
SoldieritemIdOffsetsByNameOLD.Eggk47
ScrambleritemIdOffsetsByNameOLD.DozenGauge
RangeritemIdOffsetsByNameOLD.CSG1
EggsploderitemIdOffsetsByNameOLD.RPEGG
SecondaryitemIdOffsetsByNameOLD.Cluck9mm

itemIdOffsetsOLD

legacyshell added just for converting old item ids to new ones

Defined at src/shell/constants.js:195.

KeyValue
[ItemType.Hat]itemIdOffsetsByNameOLD.Hat - 1
[ItemType.Stamp]itemIdOffsetsByNameOLD.Stamp - 1
[ItemType.Primary]{ base: itemIdOffsetsByNameOLD.base, [CharClass.Soldier]: itemIdOffsetsByNameOLD.Eggk47 - itemIdOffsetsByNameOLD.base, [CharClass.Scrambler]: itemIdOffsetsByNameOLD.DozenGauge - itemIdOffsetsByNameOLD.base, [CharClass.Ranger]: itemIdOffsetsByNameOLD.CSG1 - itemIdOffsetsByNameOLD.base, [CharClass.Eggsploder]: itemIdOffsetsByNameOLD.RPEGG - itemIdOffsetsByNameOLD.base }
[ItemType.Secondary]itemIdOffsetsByNameOLD.Cluck9mm

itemIdOffsetsByName

Defined at src/shell/constants.js:210.

KeyValue
Hat50000
Stamp100000
base150000
Cluck9mm150000
Eggk47200000
CSG1250000
DozenGauge300000
RPEGG350000
HatsitemIdOffsetsByName.Hat
StampsitemIdOffsetsByName.Stamp
PrimaryitemIdOffsetsByName.base
SoldieritemIdOffsetsByName.Eggk47
ScrambleritemIdOffsetsByName.DozenGauge
RangeritemIdOffsetsByName.CSG1
EggsploderitemIdOffsetsByName.RPEGG
SecondaryitemIdOffsetsByName.Cluck9mm

itemIdOffsets

legacyshell added (these constants shouldve been like this to begin with)

Defined at src/shell/constants.js:245.

KeyValue
[ItemType.Hat]itemIdOffsetsByName.Hat - 1
[ItemType.Stamp]itemIdOffsetsByName.Stamp - 1
[ItemType.Primary]{ base: itemIdOffsetsByName.base, [CharClass.Soldier]: itemIdOffsetsByName.Eggk47 - itemIdOffsetsByName.base, [CharClass.Scrambler]: itemIdOffsetsByName.DozenGauge - itemIdOffsetsByName.base, [CharClass.Ranger]: itemIdOffsetsByName.CSG1 - itemIdOffsetsByName.base, [CharClass.Eggsploder]: itemIdOffsetsByName.RPEGG - itemIdOffsetsByName.base }
[ItemType.Secondary]itemIdOffsetsByName.Cluck9mm

Team

Defined at src/shell/constants.js:258.

KeyValue
blue1
red2

CONTROL

Defined at src/shell/constants.js:271.

KeyValue
up1
down2
left4
right8
jump16
fire32

MAP

Defined at src/shell/constants.js:280.

KeyValue
blank0
ground1
block2
column3
halfBlock4
ramp5
ladder6
tank7
lowWall8
todo39
barrier10

Comm.Close

Close codes for communication errors or states.

Defined at src/shell/comm.js:335.

KeyValue
gameNotFound4000
gameFull4001
badName4002
mainMenu4003
masterServerBusy4004
masterServerOffline4005
booted4006
locked4007

Comm.Worker

Defined at src/shell/comm.js:346.

KeyValue
send0
close1
updateRoom2
boot3
closeAllWs4
terminate5
chat6

Comm.Chat

Defined at src/shell/comm.js:356.

KeyValue
user0
cmd1
blocked2
whisper3

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
Wire Protocol Opcodes
Next
Database Schema