|
Home >
Rail
Simulation >
BVE Trainsim > Train.dat
Motor Section
TRAIN.DAT
MOTOR SECTION
The motor section
of a train.dat is regarded as one of the most hardest
sections to code. Here light is raised on the formulas with
help from Matty Smithson and Philip So. You can use
the links below to skip to a particular section.
INTRODUCTION
For
each section of 'MOTOR' coding, you need two throttle and
two braking. An example is:
|
#MOTOR_P1 |
MOTOR_P1 and MOTOR_P2
are played at the same time and can allow you to have two different
sounds played at the same time. This rule also applies to MOTOR_B1 and
MOTOR_B2. You need to use as many 'MOTORX.wav'
as you feel is needed to make an accurate sound. The
red "X"
refers to the actual number or the MOTOR.wav file. For instance if you
wanted to play "MOTOR1.wav" you would place a "1" where the "0" is. The
coding needs to be just like above, but the "0,150,190" can be
substituted with correct numbers for the motor section.
Each section
needs 800 lines (e.g. MOTOR_P1 counts as one section) and NO MISTAKES -
otherwise you will have errors with the train. Believe me it's hard to
isolate out of 32,000 lines where the fault is, so try and be careful
when coding!
0 = Motor wave file number.
(-1 = none)
150 = Pitch of wave file.
190 = Volume of wave file. |
|
0, 150, 190 |
|
0, 150, ... |
|
#MOTOR_P2 |
|
0, 150, 190 |
|
0, 150, ... |
|
#MOTOR_B1 |
|
0, 150, 190 |
|
0, 150, ... |
|
#MOTOR_B2 |
|
0, 150, 190 |
|
0, 150, ... |
MOTOR WAVE FILE
If '0,150,190' is
part of a code, this is the motor wave file number. In each
train file you will have 'x' many 'MOTORX.wav' files which
are the files which makes the train sound accurate (such as
revving and acceleration, etc). For instance the '0' in this
occasion refers to 'MOTOR0.wav'
MOTOR1.wav =
Motor Sound file 1, found in the train (e.g. CoxTrain)
folder. Below is the usual location:
C:\Program Files\BVE\Train\CoxTrain\MOTOR1.wav
WAVE FILE PITCH
Time to now look
at pitch, which is the red bit of "0,150,190". The pitch can
be made to go as high as is required or as low as required.
But what is 'pitch'? Well here is a rough definition:
"Pitch is used to
make a sound higher or lower. If we compare a high pitch
code number to a Cat Meow, and a low pitch code number to a
Dog Bark, you then should realise that the higher the pitch
code number, the more it sounds like a Cat Meow."
With that now
under your belt, you should now know how to improve a sound
using the pitch section. Please be aware that this section
requires much trial and error.
WAVE FILE VOLUME
The final part of
the line is the volume of the sound, highlighted in
red
'0,150,190'. The volume can go from as low or as high as
need be. The volume section tells the sound to be played
loud or quiet. The higher the number in
red, the louder the
sound is. It is important to get the mix right for BVE
trains! |