Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound Replacer / Custom Sound Handler #220

Merged
merged 4 commits into from
Jun 12, 2021
Merged

Sound Replacer / Custom Sound Handler #220

merged 4 commits into from
Jun 12, 2021

Conversation

MrPurple6411
Copy link
Member

@MrPurple6411 MrPurple6411 commented Jun 10, 2021

Changes made in this pull request

  • Added ability to register Sounds by preloaded Sound or FilePath to audio file.
  • Added ability to get other mods registered Sounds
  • Added ability to simply Play registered custom sounds
  • Tested ability to overwrite game sounds with custom sounds by registering a custom sound to the path of the original.
  • Tested ability of adding custom PDA entry sounds.
  • Tested and working on both Wav and MP3 formats so far but FMOD documentation says it SHOULD support 20 formats overall.

Can't yet override all game sounds but a LOT can be, more will come as we track down all the different ways UWE plays them.

Examples:

This will change the sound for the final break into objects like limestone and sandstone etc into whatever purple.mp3 is.

CustomSoundHandler.Main.RegisterCustomSound("event:/loot/break_breakable", "QMods\ModName\purple.mp3"); 

While this one will change the LifePod 17 dropped datapad PDA entry audio.

CustomSoundHandler.Main.RegisterCustomSound("{ed791d88-0de7-46e2-8f3f-72745b9c4777}", "QMods\ModName\purple.mp3");

As you can see some of the audio paths are in the format of event:/ and others are just the straight up guid of the audio file.
atm I am still trying to find a simpler way to deal with this and any ideas would be appreciated.

I do feel it is a good enough working start though to be put in as is and expand it later.

Test Files
SMLHelper_SN.STABLE.zip
SMLHelper_SN.EXP.zip

SMLHelper_BZ.EXP.zip
SMLHelper_BZ.STABLE.zip

Works for SOOOO many places already.
@MrPurple6411 MrPurple6411 changed the title Initial Functional Handler/Patcher. Sound Replacer / Custom Sound Handler Jun 12, 2021
Copy link
Contributor

@toebeann toebeann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calls for a minor version bump (2.10).
(This is just a note for when merging dev into master.)

@MrPurple6411 MrPurple6411 merged commit e813871 into dev Jun 12, 2021
@MrPurple6411 MrPurple6411 deleted the CustomSoundHandler branch June 12, 2021 20:56
@MrPurple6411 MrPurple6411 mentioned this pull request Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants