Skip to content

Custom Sound System

Melvin "Dumbass" Shwuaner edited this page Apr 19, 2025 · 11 revisions

NeoModLoader now allows you to load your own custom sounds from your mod into the game. these sounds must have the .WAV file format. sounds also have a data storer which stores data (is 3D, volume, Type (music / sound), loopcount, Ramp) which is stored in a .json file with the same name as the .wav file (not required), you can also set this data using the ModifyWavData function in the custom soundmanager.

these sounds can be called using musicbox.playsound (recommended) or CustomSoundManager.LoadCustomSound once the sound is created, a channel is created that plays the sound, you can access this channel in CustomSoundManager.ChannelList (you can edit some custom stuff about the channel, like velocity, pitch, etc)

the typical .json file that stores the data looks like

{"3D":true,"Volume":100.0,"Type":1,"LoopCount":0,"Ramp":true}

Type 1 means Sound, Type 0 means Music, Type 2 means UI

Ramp is used if the sound is very short, to prevent the sound from being glitched

If the Sound is 3D, it will only be heard from the region it was played in

Clone this wiki locally