Jump to content

Recommended Posts

Posted

I see all the tutorials on making models, textures, entities, etc, but nothing on audio. I want to replace the thunder audio, and if possible, add a larger variety of sounds to it. I imagine I can just swap the audio files, but, I would prefer something a bit more refined than that. Plus, it would be nice to upload it for others to use as well.

I've never made a mod, and am a novice with coding in C#, but figured an audio mod couldn't be that hard to start with, right?

I just need to be pointed in the right direction, but any help on the topic would be greatly appreciated!

  • Solution
Posted

There's no tutorials because it's mostly the same as replacing a texture. At least as far as I can think, the instructions should be basically identical. Just use .oggs instead of .pngs.

Check out this mod. Download the zip, unzip it, take a look around. This mod replaces several of the insect sounds with silent audio files to mute them. Basically no code needed, no C#, just replace add the audio files to your mod at the same location that the game has them in its own asset folders, and the game will override them all automatically.

For adding additional variety for sounds that currently only play 1 sound effect, that may require a little C# tomfoolery depending on the sound. I think weather might be that type of sound. For sounds that already have variety, for example elk-hurt1, elk-hurt2, elk-hurt3... you can just add additional sounds and the game references them all as "elk-hurt*" so you're already good to go there.

Posted
1 hour ago, Diff said:

There's no tutorials because it's mostly the same as replacing a texture. At least as far as I can think, the instructions should be basically identical. Just use .oggs instead of .pngs.

Check out this mod. Download the zip, unzip it, take a look around. This mod replaces several of the insect sounds with silent audio files to mute them. Basically no code needed, no C#, just replace add the audio files to your mod at the same location that the game has them in its own asset folders, and the game will override them all automatically.

For adding additional variety for sounds that currently only play 1 sound effect, that may require a little C# tomfoolery depending on the sound. I think weather might be that type of sound. For sounds that already have variety, for example elk-hurt1, elk-hurt2, elk-hurt3... you can just add additional sounds and the game references them all as "elk-hurt*" so you're already good to go there.

Ahh, yeah. As soon as I made the post I managed to find what I needed to get started. I've been learning gamedev recently, so was really overthinking it. I'm so used to having to code the actual functions and when/where they happen lol. I forgot I only needed to add onto an existing system in this case.

Thank you for the mod example! I was struggling to get my audio to play in game, but it was just because I misunderstood the file path. I thought I needed the assets folder to have a file named after my mod id, but since I was replacing vanilla assets, it just needed to be in a file called "game".

I should hopefully be able to figure out how to get multiple sounds. I'll just need to figure out how to properly set up an array for it.

  • Like 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.