Author Topic: How do i replace the default brick sounds via client add-on?  (Read 1773 times)

I know that you can replace sounds with an add-on by specifying an audio datablock that already exists and just use whatever sound file you want, but it doesn't seem to work for default sounds

To replace the synth menu sounds from Electrk's menu sounds add-on, i just put
Code: [Select]
new AudioProfile(MenuSound_Synth<NUMBER>) {
   fileName = "./lr_menuHighlight.wav";
description = AudioGui;
   preload = "1";
};
And it works, but trying to replace the brick sounds the same way doesn't seem to work

I've tried
Code: [Select]
new AudioProfile(LR_BrickMoveSound : BrickMoveSound) {
   fileName = "./lr_clickMove.wav";
   description = "AudioClose3d";
   preload = "1";
};
...then
Code: [Select]
new AudioProfile(BrickMoveSound) {
   fileName = "./lr_clickMove.wav";
   description = "AudioClose3d";
   preload = "1";
};
...then i even tried renaming the file to just 'clickMove'
Code: [Select]
new AudioProfile(BrickMoveSound) {
   fileName = "./clickMove.wav";
   description = "AudioClose3d";
   preload = "1";
};

But none of them worked, so is there actually a way to replace the default sounds with an add-on or does it only work with non-default sounds?

Try going into Blockland\base\data\sound\ replacing the sound files, and setting them to read only?

Try going into Blockland\base\data\sound\ replacing the sound files, and setting them to read only?
I'd rather not do that, i'm making a mod that replaces various sounds with sounds from Lego Racers, and i want people to have an easy time installing and uninstalling it

Also, i believe Badspot hates when people replace default files and makes them read-only as it could mess things up

Write a script that replaces them on execution then, every time someone launches the game it'll revert back to the old sounds, so no harm done if they want to uninstall it.

Wait... so you want to replace the sounds in the default folder? Just use fileCopy(%original, %new);, and there you go. Maybe?? Haven't tested this.