This article is a work in progress.
Informations might not be complete and will be improved overtime.
Note: This tutorial only covers BVE4/OpenBVE Sound
- Basic knowledge of adding custom Minecraft sound and the json format.
- An existing BVE4/OpenBVE Train
- An Custom MTR Mod Trains (Livery included).
- Software that is capable of exporting .ogg file (e.g. Audacity)
- Bulk renaming software (e.g. PowerRename with PowerToys)
- Make a copy of your BVE Train
- Find the directory of the sound folder, they're either located right in the BVE Train Folder, or there might be another Sound Folder. (They usually contains bunch of .wav file)
- If you find another sound folder, put all the sound file inside to the BVE Train Folder.
- Delete all files except .wav, train.dat and sound.cfg.
- Rename all files in that folder to lowercase letter file name, you can do it with any bulk renaming software, or by manually renaming each one of them
- Add the following to sound.cfg, below
MotorNoiseDataType = 4
MotorVolumeMultiply = 1
DoorCloseSoundLength = 1
MotorNoiseDataType = 4indicates that this is a BVE 4 format (train.dat) motor sound data.
MotorVolumeMultiply = 1requires some explain. Due to the different nature of the two games, sometimes the volume setting used by the train's creator in BVE is a bit quiet when used in Minecraft, so this setting is introduced to "multiply" the volume.
However, Minecraft puts a clamp of 100% on the volume that MTR can programatically assign, which makes things complex.
So, if the volume assigned in train.dat is moderate, but it's the WAV sound clips themselves that are quiet, then this settings won't have effect. (Let's say the originally assigned volume is 90%, you want to double it to get 180% by this setting, but Minecraft clamps it to 100%, and nearly no boost can be achieved by tweaking this setting.) In this case you need to dial up the volume of the WAV sound clips by the means of sound editing softwares like Audition.
On the other hand, if the WAV sound clips are loud enough, but very low volumes are assigned in train.dat, then dialing up this setting would be the way to go. (10% doubled will give you the correct 20%. without hitting the clamp.) 1 represents 100% the original volume, 2 for 200%, etc.
DoorCloseSoundLength = 1is used to determine the time that the door closing sound should start playing. This should be the length of the sound in seconds. However, due to MTR's limitations, value longer than 1s are not accepted.
This will be your sound ID to reference.
8a. Import all the sound to any audio editor and convert them to Mono Channel
8b. Export all the .wav/.flac file to .ogg file.
(For Audacity user, use File > Export > Export Multiple, and choose
Ogg Vorbis Files)
9. Copy the train folder to
Your Resource Pack/assets/mtr/sounds. (Make the folder if it doesn't exist)
10. Make a sound.json file in
Your Resource Pack/assets/mtr if you haven't already, an example could be found here.
11. Make a sound entry in sound.json of every file in
sound.cfg, the ID should be
Your sound.json in the end should look something like this (I used
kksp as my train folder name):
Finally, add the following line to your mtr_custom_resources.json, replace
soundID to your actual sound ID/Train Folder Name
point.oggis played whenever the train crosses a rail node, which is different from BVE's behavior (Crossing a junction). If you feel the sound doesn't fit, please remove it in sound.json
- Small motor noises will still be heard when coasting, this is to simulate train adding small bits of power to maintain it's speed.
- (Does not work on BVE Sound) You can add
"const_playback_speed": trueto your train, this will make the acceleration play back at a constant speed no matter your acceleration.