So, you want to build a train for BVE4?


In part 8 we studied the panel2.cfg config file and by now you should have done all that.  I'm now going to move on to the last two config files.

The next thing your train needs is a plugin config.  This is tricky to nail down as there are several plugins and each has its own configuration rules.

Commonly used plugins include the following:
Plugin file
Written by
Used for
UKDt.dll
Simon Gathercole
UK diesel locos.
UKSpt.dll
Simon Gathercole
UK "Sprinter" class DEMUs and other similar trains
UKMUt
Simon Gathercole
UK EMUs.
Os-Ats1.dll
Oskari Saarekas Modes for diesel, electic and steam trains.  Popular for
London Underground trains, due mainly I think to the
power-rail gap handling and door operation.

All of these have a config file which has the same name as the plugin, e.g. UKSpt.cfg. 

There are some notes here about configuring the UKSpt.dll plugin, the other 2 of Simon's plugins have similar features but they're not the same in all respects - e.g. the UKDt plugin has a speed limiter function, but the others don't.  Best bet for these plugins is to ask questions in the TSC technical forum, if you get stuck and can't find the answer by studying other trains.

Oskari's plugin can be downloaded here, and has notes with it about configuration. 

All the plugins listed above are rather work-in-progress, although sometimes it might not look like there's much progress!  Simon has said that his plugins will eventually have proper documentation, when he gets time to do it...

The final configuration file is sound.cfg.  In this, all the sounds for things like buzzers, AWS warning and clear notes, horns, arc noises, motor start and so on are determined.
Before starting this config file you need to have sorted out your sounds and made .wav files for them all.  You can see how these tend to be done by looking at other trains.  Note that some sounds are continuous "loop" sounds, while others are a single note.  Looped sounds need careful editing so that they join up nicely.
Anyway, we'll assume that you now have your sounds, and look at a sample sound config file, in this case from the class 156 which was controversially called "pro" - I'll add comments after each section.

Version 1.0


[Run]
0 = Run0.wav
1 = Run1.wav
2 = Run2.wav
3 = Run3.wav
4 = Run4.wav
5 = Run5.wav
6 = Run6.wav
7 = Run7.wav
These files are the ones defined in the BVETSS for track run sounds.  It's a good idea to make your train BVETSS compliant.

[Flange]
0 = Flange0.wav
The flange-rubbing noise you get on tight curves.

[Motor]
0 = Motor0.wav
1 = Motor1.wav
3 = Motor3.wav
4 = Motor4.wav
Sounds for motor running, these are the ones that you configure in train.dat, the easiest way is to use the train editor.  As ever, study the trains people have built and see what other builders have done.  Bascially, the motor sounds are varied in both pitch and volume, depending on train speed and power setting.  There are 4 sounds in train.dat.  If you start train editor, load the dat file for the train, then click the "motor sound" button, you get this panel, I've picked the class 323 as an example.
motor sound editing

AccSnd1 is selected.  There are 2 lines on the graph, one for pitch and one for volume.  By clicking the radio buttons you can edit the lines, for pitch and volume.  Suppose you have a traction motor whine noise, it'll start off low pitch and increas with speed, also it will likely get louder with speed.   When you've drawn the lines for AccSnd1, you assign the motor sounds you wish to use for that line by clicking the motorX.wav radio button, then selecting the file 0-7 in the dropdown box.  There's also "none".  In the example above, the very first bit of the lines (grey) is "none", the next little bit in blue is motor5.wav, then the orange colour is motor1.wav, and the green part motor3.wav.  Below is the panel with AccSnd2 selected:
motor sound editing 2

This uses a different set of sounds, first in red is motor0.wav, then in yellow motor2.wav, and in magenta motor7.wav.  The sound when under power is a combination of AccSnd1 and AccSnd2, plus a bit of the idle loop sound which runs all the time, if I've understood it correctly.  The BrkSnd 1 and 2 do similar things for braking.  You can have up to 8 motor/brake sounds, the colour sequence seems to go red, orange, yellow, green, cyan, blue, purple, magenta, from 0 to 7, with grey for "none".

I gather that train editor only configures sounds up to 160kph, so for fast trains, you're on your own!

[Switch]
0 = Point.wav
Track  sounds when crossing points or crossovers.

[Ats]
0 = 156_aws_bing.wav
1 = 156_aws_bingling.wav
2 = AWS.wav
3 = Eb.wav
4 = Buzzer.wav
5 = DrawFwd.wav
6 = SetBack.wav
7 = starterOn_lf.wav
8 = starterLoop.wav
9 = starterFade.wav
10 = engineFire.wav
11 = engineStall.wav
12 = loop.wav
13 = revvingup.wav
14 = revvingdown.wav
15 = engineStop.wav
16 = switchwiper.wav
17 = wetwipe.wav
18 = dryWipe.WAV
19 = raindrop.wav
20 = raindrop2.wav
21 = raindrop3.wav
22 = raindrop4.wav
22 = raindrop2.wav
24 = switch.wav
The soudns defined in the plugin - in order, they are:  AWS clear, [dunno],AWS warning, TPWS brake application[?], communication buzzer, Guard signals (forward and back), starter sounds (on, loop and off), engine start, engine fires and stalls,  engine idle loop,  revving up from idle and down to idle (for power on/off), engine shutdown, wiper switch noise, wiper noises for dry and wet screen, raindrops hitting screen (and it looks like there's an error in those) and lastly, generci switch noise.

[Brake]
BC Release High = AirZ.wav
BP Decomp = AirZ.wav
Air release to zero (sometimes, you'll see the file called "airzero.wav")

[Brake Handle]
Min = brakenotch.wav
apply = brakenotch.wav
Release = brakenotch.wav
Max = brakenotch.wav
Brake application sounds, one notch up and notch down.

[Master Controller]
Max = p_e.wav
Min = p_E.wav
Up =  p_E.wav
Down = p_E.wav

[Reverser]
On = RevFwd.wav
Off = RevN.wav
Sounds made by the power handle and reverser.

[Door]
Open Left = DoorOpnL.wav
Open Right = DoorOpnR.wav
Close Left = DoorClsL.wav
Close Right = DoorClsR.wav
Should be obvious!  Door close sounds include warning bleepers if appropriate.

[Horn]
Primary = Klaxon1.wav
Secondary = Klaxon0.wav
music = heaterfan.wav
Train horn sounds.  Primary is num-pad-enter, secondary num-pad-plus.  In this case, num-pad-minus doesn't play a horn, but the cab heater sound.  Not all trains have all 3.  Personally, I prefer to have the low note horn on primary and the high note on secondary.

[Suspension]
left = SUSL.wav
right = SUSR.wav
Suspension sounds.

[Compressor]
Attack = vent.wav
Air compressor sound.

[Pilot Lamp]
On = leave.wav
Sound that plays when the doors are closed and the train is safe to leave the station.

[others]
Shoe = brakeshoes.wav
Noise = enviroment.wav
Brake shoe noise and ambient sounds, such as station noises and birds...

Okay, that's a brief run-through of sounds.  The easiest way to check on anything that you're not sure about is to study other trains which work.  If you're still stuck, try asking in the forums for advice.  However, you need make a bit of effort yourself; posting something like "how do I make sounds work in my train?" won't necessarily get you much help, compared with "One of my motor sounds isn't working right evan after I've done x-y-z to the setup".  In other words, don't try to get someone to do the work for you!

Once you have the sound files properly configured, you're most of the way to having a functional train - it should by now be driveable, and you can now start debugging and fine-tuning.