The District of Joban MTR:Custom BVE Train Sound

MTR:Custom BVE Train Sound

From The District of Joban
Revision as of 19:40, 22 August 2022 by LX86 (talk | contribs) (Created page with "{{DraftBox}} ===== Note: This tutorial only covers BVE4/OpenBVE Sound ===== === Prerequisite === # 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) === Process === # Make a copy of your BVE Train # Find the directory of the sound folder, they're...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Draft

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

Prerequisite

  1. Basic knowledge of adding custom Minecraft sound and the json format.
  2. An existing BVE4/OpenBVE Train
  3. An Custom MTR Mod Trains (Livery included).
  4. Software that is capable of exporting .ogg file (e.g. Audacity)
  5. Bulk renaming software (e.g. PowerRename with PowerToys)

Process

  1. Make a copy of your BVE Train
  2. 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)
  3. If you find another sound folder, put all the sound file inside to the BVE Train Folder.
  4. Delete all files except .wav, train.dat and sound.cfg.
  5. 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
  6. Add the following to sound.cfg, below Version 1.0

[MTR]

MotorNoiseDataType = 4

MotorVolumeMultiply = 10

DoorCloseSoundLength = 1


The end result of sound.cfg should look something like this: MTR-BVE1.png 7. Rename your train folder to be lower case and without space. (You may use underscore to replace space)

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 sound_id_filename

Your sound.json in the end should look something like this (I used kksp as my train folder name): MTR-BVE2.png.png Finally, add the following line to your custom train, replace soundID to your actual sound ID/Train Folder Name

"bve_sound_base_id": "soundID"

Your train in mtr_custom_resources.json should now look something like this:MTR-BVE3.pngNow start your game, and everything should work.

Notes

  • point.ogg is 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.
  • You can add "const_playback_speed": true to your train, this will make the acceleration play back at a constant speed no matter your acceleration.