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

Items and Skins

Audience: Content creators, semi-technical · Prereqs: Dealing with Babylon Models

Canonical source: src/shell/constants.js (ItemType, CharClass), server-services/src/items/*.js (real examples)

Adding a new weapon skin, hat, or stamp to the shop - the catalog/inventory system, not to be confused with pickup items (ammo/grenades/health packs, a completely separate in-world-collectible system covered in Plugin Development).

Two ways to add one

  • Directly editing the database - fine for a single server you run yourself, not distributed to anyone else. See The Database for how to open it, or use the web SQL tool's [items] Insert New Item template.
  • Shipping it as a plugin - the right approach if you want this distributed, reusable, or reinstalled automatically on every boot. See Content Packs - this requires a small amount of JavaScript (a file exporting the item definitions), but no gameplay coding.

Either way, the item shape itself is identical - only how it gets into the database differs.

The item shape

A real example (server-services/src/items/CSG1.js):

{
    "meta_id": 0,
    "id": 3400,
    "name": "CSG1",
    "price": 0,
    "item_type_id": 3,
    "item_type_name": "Primary",
    "category_name": "Ranger Primary Weapons",
    "exclusive_for_class": 2,
    "item_data": { "class": "CSG1", "meshName": "gun_csg1", "tags": ["DefaultUnlocks"] },
    "is_available": false
}
FieldWhat it means
meta_idLegacyShell's own item numbering - see Content Packs for the range convention plugins should stay within.
idThe item's actual database/wire ID. For a skin variant of an existing weapon type, pick the next unused number in that weapon's existing range (see the table below) - for anything else, the simplest safe approach is checking the generated database schema and picking a number that doesn't collide with what's already in the items table.
nameShown in the shop UI.
priceIn eggs (the in-game currency). 0 for something unlocked by default rather than purchasable.
item_type_id / item_type_nameSee the type table below - these must match each other.
category_nameA free-text shop category label (groups items in the UI).
exclusive_for_classRestricts the item to one character class - see the class table below. Omit/leave unset for items available to every class.
item_dataA JSON blob: class (which weapon/hat/stamp family this is a skin of), meshName (the model to render - see Dealing with Babylon Models), tags (string tags - "DefaultUnlocks" marks something every new account starts with; other tags are used by seasonal shop rotation logic).
is_availableWhether it currently shows up in the shop's rotating selection. Most items are false here and get toggled on/off by the shop-rotation algorithm rather than being permanently visible.

item_type_id / item_type_name

item_type_iditem_type_name
1Hat
2Stamp
3Primary
4Secondary

exclusive_for_class

ValueClassPrimary weapon family
0SoldierEggk47
1ScramblerDozen Gauge
2RangerCSG1 (Free Ranger)
3EggsploderRPEGG

Secondary weapon skins (Cluck9mm variants) and most hats/stamps are typically class-unrestricted - only set exclusive_for_class when the item genuinely should be locked to one class, as primary weapon skins usually are.

Common Issues

My item doesn't show up in the shop. Check is_available - most items need the weekly shop-rotation algorithm to actually select them before they're purchasable, rather than being permanently visible. For something you want always available (not subject to rotation), check how similar always-available items in the existing catalog are configured rather than assuming a single flag controls this.

The skin shows the wrong model, or no model at all. item_data.meshName doesn't match an actual mesh name in the relevant .babylon file - see Dealing with Babylon Models for the model files and their contents.

Next: Hats and Stamps.


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
Map Blocks
Next
Hats and Stamps