Forum Mod Bakery Docs

Meta.ini Command Possible??

Posted in Support
Please login to contribute to the conversation.
Hello Everyone! It's me once again with another question!

I want to know if this is possible and I'll try to explain it as best as I can.

Say I want to create a drop-down box in meta.ini for my mod that changes the phonebooth theme

Like, whatever option you select on the settings for my mod and I want it to load that selected RSD file into the game.
I know it's possible for a PURE 3D file, like for costumes and such, but what about music?

I hope this is possible, I want the people who might play my mod to have a different selection of music if they get bored of the same "Simpsons Theme" or Phonebooth Theme"
Forgot to mention (If it's possible) Someone post a link on how to do this
If I recall correctly, you can't directly redirect the RSD files for the game music, but you can redirect the RMS files that tell the game what music to play.

What you'd need to do is to create multiple RMS files for the various options you want (tutorial here: donutteam.com/forum/topic/1830).
You'd then need to place the RMS files in a folder called "Resources" in your mod folder.
In your Meta.ini you'd need to use a Multiple Choice type setting in your Meta.ini.
You'd also have to add Path Handlers for the RMS files the game loads.
The Path handler would have a script similar to the following:
Lua Script
local Selection = GetSettings()["Setting Name"] --Replace Setting Name from the Name in Meta.ini
if Selection == 1 then
    Redirect(GetModPath() .. "/Resources/RMS File 1.rms")
elseif Selection == 2 then
    Redirect(GetModPath() .. "/Resources/RMS File 2.rms")
end

That's a pretty basic overview, if you require any further help I'd suggestion joining the Discord server and asking in #mod-help.
This seems WAY too hard for me, the reason why is I'm a beginner at scripting and terrible at mission scripting

Probably Shouldn't have bothered asking lol.