Jump to content

Figured out how to mod audio


Recommended Posts

I have figured out how to mod audio into the game.

There are a few things to note before you start modding your own audio:

1. Griftlands uses FMOD, which is basically a thing that makes adaptive audio. It is basically what makes the adaptive negotiation/battle music work in this game. To mod audio into the game, you need to install FMOD studio.

2. The result of a FMOD studio project are several .bank files. There are currently no good way to reverse engineer a .bank file, so don't rely on the game's bank files.

3. There can only be one master bus in a given game. If multiple master bus are loaded, it just can't. Therefore, using a normal project and export it won't work. You need some tricky steps.

Okay, here are the steps to mod it into the game.

  1. Make a FMOD project like normal. I won't show how to make one here because I am trying to figure this one out myself. Just look up some documentations.
  2. Before exporting the project to a bank file, you need to make sure your project's master bus guid matches the game's guid. In order to do that, you need to find your project's master bus' guid, and replace it with Griftlands'.
    • To find out about your master bus' guid, go to Windows > Mixer, and on the right under "master bus", right click on the correct spot where the option "Copy GUID" appears. Then paste it somewhere.
    • There is no good way to modify the guid with the FMOD editor, so you need to go to the project folder and replace all reference to your old bus guid with Griftlands' bus' guid (which is afd9334f-b320-4b4e-8719-ac15b8a5d780). I used vs code's find and replace feature, but as long as you replace it, it's all good. Just make sure only the guid part is replaced and not the brackets that appears in the copy and paste.
    • (Side note: As of the writing of this article, klei has not published their fmod project, or a project package. As mentioned before, there is no good way to reverse engineer exported .bank files, and the game's default engine does not allow access to master bus' guid in lua so we need another way to figure out the game's master bus' guid. Luckily, FMOD can be used by Unity with minimal setup, and there is an FMOD method allowing access to the guid of a bus, so I loaded the bank file to Unity and wrote some script to access the master bus' guid. The guid of the master bus is afd9334f-b320-4b4e-8719-ac15b8a5d780)
  3. Export the project once you're done. Under your project's export folder, you should see the exported bank file. There should be at least two, with one being a string bank.
  4. Copy the exported bank file to your mod folder and load it using AUDIO:LoadBank(filepath, async). For small projects, set async to false because you don't really need it.

And there you go! If your bank file is successfully loaded, you should see your bank listed when you type DBG(AUDIO.sound_banks) into the debug console.

(Now referencing the sound event is a bit more tricky. I'll make a tutorial later)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...