STSharedAudioLib

v0.0.3·Updated 2025-03-03

A standalone Component storing Lists of AudioClips to access from different mods.

About this mod Author’s original text

The Library

Introduction:

Have multiple mods that add AudioClips to an object that only takes one AudioClip at a time?

This library might be able to help bridge the gap between mods, by letting you add a component with lists of AudioClips to the object that can then be accessed from any mod that references this library's assembly. It also comes with a handful of methods to check for this library's SharedAudioComponent component, AudioList ScriptableObject, and to browse or shuffle through any given AudioList's weightedClipsList.

Simply follow the steps and methods listed under Usage and implement it with your own mods' code, and get the ability to patch multiple AudioClips to features that would otherwise only be able to store one AudioClip at a time.

Usage

I will be listing's Wiki page to keep the information about this library and its usage up-to-date, so I recommend looking there first. But there is also a notepad file called 'USAGE' in the package for this library, although that will only update every time the package itself gets updated (nor am I certain if it will show up listing).

Creation:

  • I primarily made this for myself because I couldn't find a readily-available way of doing such a thing for my own mods after searching through the Lethal Company and its APIs & Libraries section.
  • I also made it as an exercise to see if I'd learned programming well enough to be able to do something like this, to potentially demonstrate it professionally.
  • So if I accidentally reinvented the wheel by making something someone else already had, then my apologies. I really was unable to find such a thing for a time, but I do not intend to freeload on or copy other people's work.
  • And by no means did I intend to deliver a professional fool-proof solution to fill a gap in the market. I just wanted to get this kind of end-result and see if I could do it, so I'm sorry if this isn't as clear or efficient as it could be. But there will probably be updates to stamp out bugs, bring quality-of-life changes, or anything that would require attention.
  • And I do realize this library is far more complicated to use than the simplicity of mods such as Lethal Company's CustomSounds mod made by Clementinise, that just add or replace sounds by dropping a file into an easily accessible folder. But, again, I made this to solve my own problems, and practice my own skills, my apologies.
  • But by all means, feel free to make use of this library if you'd like to expand your own mods. If anyone wants to use it for other Unity games, I hope nobody then claims it then as their own. I just hope this kind of tool can help expand the possibilities for creating cool mods and modpacks, both for myself and for others.

Credits:

  • My knowledge of libraries and coding were based on examples I saw and worked with while modding Lethal Company, made by Zeekerss ( and using a library for that game called LethalLib made by Evaisa (
  • Both of these also indirectly taught me about things such as default parameters and method overloading, so without those examples a lot of quality-of-life things in this library would not have happened.
  • I also got help with a handful of methods and their implementation from a programmer at my college, and even though he probably won't see this, I'd still like to extend my thanks to him.
  • Development of this library started with getting all loaded PluginInfo's from BepInEx's Chainloader, which I learned through a combination of decompiling the mod LethalExpansion and this websearch ( so I would like to thank these people too for their indirect help.
  • I found a method of removing elements from a list while searching it from this article ( and woul

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
STSharedAudioLib-0.0.3.zip
File size
47.9 KiB