Jump to content

Recommended Posts

Sorry for bothering this forum again but is there a way to change the volume of a sound in the code? I tried using FMOD designer but it can't open fev or fsb files, and I don't have the fdp file anymore. So I was wondering if you could change the volume of a certain sound in the code?

Thanks for reading.

Link to comment
https://forums.kleientertainment.com/forums/topic/105608-sound-volume/
Share on other sites

Do you mean like the volume for a sound every time it plays in-game?

A while back I was looking for something similar in this thread https://forums.kleientertainment.com/forums/topic/100843-changing-sound-volumes/   but I never did find a way to do it through code.

But I did kind of find another way.

what I was able to do was launch an empty world and record audio of the game's sounds being played. Then threw those sound bites into FMOD, created a project with it, end exported it into a "sound" folder in my mod file. You can then actually overwrite the existing in-game sounds from your modmain.

 

Assets = {
	Asset("SOUNDPACKAGE", "sound/smash_sounds.fev"),
	Asset("SOUND", "sound/smash_sounds_bank00.fsb"),
}

RemapSoundEvent( "dontstarve/creatures/krampus/kick_whoosh", "smash_sounds/remaps/kick_woosh" )
RemapSoundEvent( "dontstarve/wilson/attack_whoosh", "smash_sounds/remaps/attack_woosh" )
RemapSoundEvent( "dontstarve/wilson/attack_firestaff", "smash_sounds/remaps/attack_firestaff" )
RemapSoundEvent( "dontstarve/common/together/spawn_vines/spawnportal_idle_LP", "smash_sounds/remaps/AND_NEVER_COME_BACK" )

It's tedious and ugly, but it ended up working alright for me.

except the spawn portal idle noise. it's still there and as annoying as ever. Maybe one day i'll find out how to rid myself of that cursed sound

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...