Skip to content

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LobbyMusicLabAPI

A simple plugin for SCP: Secret Laboratory (LabAPI) that plays a single background music track while players are waiting in the lobby. The music stops automatically when the round starts.

Version: 3.0.2 · Author: Hanbin-GW


Features

  • Plays one looping track during the waiting (lobby) phase.
  • Stops the track on round start.
  • Configurable file path, volume, and loop behavior.
  • Creates the audio folder automatically on first run (path is printed in the server logs).

Requirements

  • SCP: Secret Laboratory server
  • LabAPI ≥ 1.1.5
  • AudioPlayerApi (for audio playback)
  • Recommended audio format: .ogg (Vorbis)

Build-time references used in this project include LabApi, AudioPlayerApi, NVorbis, and SharpCompress.


Installation

  1. Build the project to produce LobbyMusicLabAPI.dll (see Build below), or use a prebuilt DLL.
  2. Place LobbyMusicLabAPI.dll in your server's LabAPI plugins folder (e.g., <SCP_SL_Server>/LabApi/Plugins/ — use the folder where your LabAPI loads plugins).
  3. Start the server once. The plugin will create a music folder if it does not exist and print its path in the console logs:
    • Music Folder didn't exist create new: <path>
  4. Put your music file (e.g., 77.ogg) into that folder and update the config if needed.
  5. Restart the server.

Configuration

The plugin uses a YAML configuration. Default values (from code):

OnEnabled: true
Debug: true
LobbySongPath: "77.ogg"   # File name or path to your lobby music (recommended .ogg)
Volume: 0.9               # 0.0 ~ 1.0
Loop: true                # Whether to loop the lobby track

How It Works

  • On server start / Waiting For Players: the plugin gets (or creates) an AudioPlayer named "Lobby", adds a non-spatial speaker, and starts the track with the requested volume and loop settings.
  • On Round Start: the plugin clears the lobby player and stops all clips.

Build

  • Target Framework: .NET Framework 4.8
  • References: point these to your server/game DLLs or packages as appropriate
    • LabApi (tested with 1.1.4)
    • AudioPlayerApi
    • Assembly-CSharp.dll, Mirror.dll (from your game/server installation)
    • NVorbis, SharpCompress, YamlDotNet
  1. Build in Release to produce LobbyMusicLabAPI.dll.

💎 Premium Features

  • YouTube URL playback
  • Auto-download & caching
  • Smooth fade in/out
  • Per-track volume control

Troubleshooting

  • No music plays
    • Check the server logs for the music folder path and ensure your file (e.g., 77.ogg) exists there.
    • Verify OnEnabled: true in the config.
    • Ensure AudioPlayerApi and LabAPI are installed and loaded without errors.
  • Too quiet / too loud
    • Adjust Volume in the YAML (0.0–1.0).
  • Does not stop on round start
    • Confirm there are no conflicting plugins that also control lobby audio.

Credits

  • Plugin by Hanbin-GW (Ghost World Inc.).
  • Built on LabAPI and AudioPlayerApi.

About

During the waiting the players, the server plays a music

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages