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

Sounds

Audience: Content creators, semi-technical · Prereqs: None

Canonical source: server-client/src/client-static/src/apollon/Apollo.js

LegacyShell replaced the original game's audio with its own Howler.js-based wrapper, Apollo - see Sound and Apollo for the API a plugin uses to register and play sounds in code; this page covers adding/replacing sound files as a content creator.

Where sound files live

server-client/src/client-static/sound/ - organized into subfolders per weapon/category (eggk47/, csg1/, dozenGauge/, cluck9mm/, ambiance/) plus flat top-level files (ammo.mp3, death.mp3, etc.).

Format and fallback

Apollo loads sounds by filename + logical name, and if an .mp3 fails to load, automatically retries the same path with the extension swapped to .ogg - shipping both formats side by side is the existing convention (ammo.mp3 and ammo.ogg both present) for broader browser codec compatibility, though .mp3 alone works in effectively every modern browser today.

If a sound fails to load entirely (neither format works, or the file is missing), Apollo plays a built-in fallback tone (fallBack.mp3/fallBack.ogg) instead of silently failing - so a broken sound reference is usually audible as "the same fallback sound plays for everything," not silence, which is a useful signal when something's misconfigured.

Replacing an existing sound

Overwrite the file in place, keeping the same filename and format(s) - the game references sounds by their existing path/name, so no code or config change is needed to swap the audio content itself.

Adding a new sound

Adding a genuinely new sound effect (not replacing an existing one) means it also needs to be referenced somewhere in the game logic that decides when to play it - which is a code change, not just a file drop. If you're doing this as part of a plugin (e.g. a new gamemode with its own sound cues), see Sound and Apollo for the loadSounds hook and the functions that actually trigger playback.

Common Issues

I replaced a sound file and it still plays the old audio. Browsers aggressively cache audio assets - a hard refresh (bypassing cache) on the client, or a cache-busting change on the server side, is usually needed to see a replaced sound take effect for players who already loaded the page once.

A sound plays as the generic fallback tone instead of my audio. The file failed to load in both formats - check the file actually exists at the expected path and isn't corrupted; a 0-byte or malformed audio file triggers the same fallback behavior as a missing one.

Next: Gamemodes.


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