A really slick feature that could be done is to get an exported list of all event names in an FMOD Studio project (or bank file). This could then be fed into a code generator (written by the user) to turn all events into constants in the code for a game. Is this already a thing?
Building the master bank automatically generates a “.strings.bank” file that contains the name, path, and GUID of every event in the project, as well as each bank’s folder path. If you load this file in the FMOD Engine, you can get the list of events in each bank, then get the path of each event from its event description.
Hey Joseph, thank you for the reply. I think that is something I can work with! I will give this a go this week and report back.
Thought about this more. The problem your approach brings is that we need code that integrates with the FMOD API just to get a list of strings. This means running the game twice: once to read the bank file and generate the constant, then once again after using the newly-generated constant in the code. What I am imagining is just writing a python or golang script that I can run independently on the side to read a simple file of event names and generate the code needed for whatever game I am using. Sure I could make my side script integrate with the FMOD API, but that is a lot of work to do something fairly simple.
We are reluctant to allow users to access the content of FMOD Studio banks without using the FMOD API.
Does the “Export GUIDs header” example script that is included in every installation of FMOD Studio suit your needs? You can find it in the “FMOD Examples” submenu of FMOD Studio’s “Scripts” menu.
This might do the trick. I could probably make a script to read this in. Are we able to modify or write our own FMOD Studio scripts?
Of course. As mentioned in the Scripting chapter of the FMOD Studio User Manual, FMOD Studio can load user-created scripts from .js files from its system scripts directory, built-in scripts directory, and project scripts directory. If you want to edit or modify any of our example scripts to better suit your personal workflow, you’ll find them in the built-in scripts directory.
Awesome. This is exactly what I needed. Thank you.
This has worked great. I have created a const generator using FMOD Studio scripting. Is there a way to use the script to open up a “choose a file” Windows dialog box by chance?
There is no way to open an operating system file picker dialog from an FMOD Studio script at this time.
Ok, put that on the feature request list then. I did come up with a workaround at least. It involves creating an additional file next to the root of your FMOD Studio project. Ideally, I would like to be able to open a dialog and pass in an optional parameter that specifies which directory the folder picker should start in. That way, whenever the user selects a file, I can snag the directory they chose and store it away so future runs of the script open up in the last place the user saved the file. Here is what I came up with for now. Thanks for the help.
I’m glad to hear you were able to get it working.
I’ll add the feature you suggested to our feature/improvement tracker.
After some investigation, I’ve dicovered that it is possible to open an operating system file picker dialog from an FMOD Studio script, by calling for a PathLineEdit
widgetType and clicking the “Browse…” button in the dialog that appears. For an example of creating dialogs, see the Batch Rename example script included with FMOD Studio.
Oh wow this is perfect. It supports “directories only” and also lets me pre-populate the text box. Thank you for finding this!
Oh wait. Is it possible to open string.bank using FMOD API?
I know that FMOD Studio can use js scripts so I have one question.
I am involved in game modding, which, of course, requires connecting an additional bank file for new sounds. I have no problem with this, but here’s the problem: for the additional bank to work, I need an fspro project with the names and guids of the events, as in the original .bank files. If it is still possible to open a string.bank using the FMOD API, then could you help me with a js script so that it would create events with the same names and paths as in the original?
Technically, there is no copyright infringement or malicious use of the sound designer’s audio content, because specifically in my new project events should be empty.
If what I’ve described isn’t doable, is there a better, easier way to mod audio for games without infringing copyright?
We will not help you do this.
This support forum exists to assist developers making games using FMOD - which is to say, it exists to serve their interests. If a game developer chooses not to make their game’s FMOD Studio project information available to modders, we must assume that they do not intend to support player-created mods, and so shall respect their wishes by not supporting players who are trying to mod their games.
Of course, if a developer does want to support player-created mods for their game, we gladly answer their modders’ questions.
The best way is for the developer to release a stripped-down packaged version of their FMOD Studio project, as described in the User-generated Content sections of the FMOD Studio User Manual. If the developer excludes sampledata and metadata they don’t want to make public when creating the package, they can avoid (for example) making the game’s source audio assets available for copying while still allowing modders to create new events and buses routed into the game’s existing mixer structure.
I recommend contacting the developers of the game you’re interested in, and politely asking them for permission to create a mod, as well as for a stripped-down copy of their FMOD Studio project containing the mixer metadata and nothing else. This will mean you can route new events you create into their buses, but you won’t be able to view or edit any of their game’s existing events and assets. Of course, they might say no, but many developers really like the idea of players making mods for their games, and so will be willing to help if they can do so without releasing their audio assets.