Bve trainsim > Create scenario > File formats
BveTs Map 2.00:UTF-8 | File header must be described at the beginning of the file. |
Curve.SetGauge(1.067); | A semicolon ( ; ) is required after a statement. |
Track['Right'].X.Interpolate(3.8); | General statement is composed of map element, key, function, and arguments. |
0; | Statement consisting only numerical values defines the current distance. |
123; Curve.BeginTransition(); SpeedLimit.Begin(90); | Multiple syntax may be on one line. |
Track [ 'Right' ] . Cant . BeginTransition ( ) ; 234 ; | Blanks (spaces or tabs) may be inserted between tokens. |
Curve.Begin( 600, 0.105 ); |
Linefeeds may be inserted between tokens. (One syntax may be described on multiple lines.) |
TRACK['RIGHT'].CANT.BEGIN(0.105); | No case-sensitive. |
345; # End of circular curve | String from a sharp ( # ) or a double slash ( // ) to a linefeed is a comment. |
The file format must be described always at the beginning of the file.
The character encoding of the file may be described after the file format. If the character encoding is omitted, UTF-8 is used.
For example, the file header of ISO 8859-1 is shown below:
BveTs Map 2.02:ISO_8859-1
Text from a sharp ( # ) or a double slash ( // ) until the end of the line is a comment, and is ignored.
A general statement is constructed as follows:
mapElement.function(argument, argument, ...)
mapElement[key].function(argument, argument, ...)
mapElement[key].mapElement.function(argument, argument, ...)
Curve.SetGauge(value) [Old ver] Curve.Gauge(value)
Sets the track gauge in front of current distance. This value is used to convert cant to angle.
value: Track gauge [m]
Curve.SetCenter(x) NEW
Sets the rotational center of cant in front of current distance.
x: X-coordinate from the track center [m] (Positive: Inside of curve, Negative: Outside of curve)
Curve.SetFunction(id) NEW
Sets the function of transition curves in front of current distance.
id: Type of function (0: Half sin wave, 1: Linear)
Curve.BeginTransition()
Starts a transition curve from current distance.
Curve.Begin(radius, cant) [Old ver] Curve.BeginCircular(radius, cant)
Curve.Begin(radius) NEW
Starts a lateral circular curve from current distance. Curve.BeginTransition is required to describe before Curve.Begin(radius, cant) but is not required before Curve.Begin(radius).
radius: Radius of cruve [m] (Positive: Right, Negative: Left)
cant: Cant [m]
Curve.End()
Ends the lateral curve and starts a straight from current distance.
Curve.Interpolate(radius, cant) NEW
Curve.Interpolate(radius) NEW
Curve.Interpolate() NEW
Sets the radius and cant of the lateral curve at current distance. Interpolates with last Curve.Interpolate or Curve.Change. The interpolation function is set by Curve.SetFunction. Curve.Interpolate without argument sets the values of last Curve.Interpolate with arguments.
radius: Radius of cruve [m] (Positive: Right, Negative: Left, 0: Straight)
cant: Cant [m]
Curve.Change(radius) NEW
Sets the radius of the lateral curve in front of current distance. Equivalent to Curve.Begin(radius).
radius Radius of cruve [m] (Positive: Right, Negative: Left, 0: Straight)
Gradient.BeginTransition()
Starts a vertical curve from current distance.
Gradient.Begin(gradient) [Old ver] Gradient.BeginConst(gradient)
Ends the vertival curve and starts a constant gradient from current distance.
gradient Gradient [‰]
Gradient.End()
Ends the vertival curve and starts a level from current distance.
Gradient.Interpolate(gradient) NEW
Gradient.Interpolate() NEW
Sets the gradient at current distance. Linearly interpolates with last Gradient.Interpolate. Gradient.Interpolate without argument sets the value of last Gradient.Interpolate with argument.
gradient Gradient [‰]
Track[trackKey].X.Interpolate(x, radius) NEW
Track[trackKey].X.Interpolate(x) NEW
Track[trackKey].X.Interpolate() NEW
Sets the x-position of the other track at current distance. Linearly interpolates with last Track[].X.Interpolate. Track[].X.Interpolate without argument sets the value of last Track[].X.Interpolate with argument.
trackKey: Track name (Any string)
x: X-coordinate from own track [m]
radius: Relative radius of lateral curve from own track in front of current distance [m] (0: Straight)
Track[trackKey].Y.Interpolate(y, radius) NEW
Track[trackKey].Y.Interpolate(y) NEW
Track[trackKey].Y.Interpolate() NEW
Sets the y-position of the other track at current distance. Linearly interpolates with last Track[].Y.Interpolate. Track[].Y.Interpolate without argument sets the value of last Track[].Y.Interpolate with argument.
trackKey: Track name (Any string)
y: Y-coordinate from own track [m]
radius: Relative radius of vertical curve from own track in front of current distance [m] (0: Straight)
Track[trackKey].Position(x, y, radiusH, radiusV)
Track[trackKey].Position(x, y, radiusH)
Track[trackKey].Position(x, y)
Sets the position of the other track at current distance. Equivalent to describing both Track[].X.Interpolate and Track[].Y.Interpolate. But blank argument sets 0.
trackKey: Track name (Any string)
x: X-coordinate from own track [m]
y: Y-coordinate from own track [m]
radiusH: Relative radius of lateral curve from own track in front of current distance [m] (0: Straight)
radiusV: Relative radius of vertical curve from own track in front of current distance [m] (0: Straight)
Track[trackKey].Cant.SetGauge(gauge) [Old ver] Track[trackKey].Gauge(gauge)
Sets the gauge of the other track in front of current distance. This value is used to convert cant to angle.
trackKey: Track name (Any string)
gauge: Track gauge [m]
Track[trackKey].Cant.SetCenter(x) NEW
Sets the rotational center of cant of the other track in front of current distance.
trackKey: Track name (Any string)
x: X-coordinate from the track center [m] (Positive: Inside of curve, Negative: Outside of curve)
Track[trackKey].Cant.SetFunction(id) NEW
Sets the function of transition curves of the other track in front of current distance.
trackKey: Track name (Any string)
id: Type of function (0: Half sin wave, 1: Linear)
Track[trackKey].Cant.BeginTransition() NEW
Starts a cant transition of the other track from current distance.
trackKey: Track name (Any string)
Track[trackKey].Cant.Begin(cant) NEW
Ends the cant transition and starts a constant cant of the other track from current distance.
trackKey: Track name (Any string)
cant: Cant [m] (Positive: Roll right, Negative: Roll left)
Track[trackKey].Cant.End() NEW
Ends the cant transition and starts a level of the other track from current distance.
trackKey: Track name (Any string)
Track[trackKey].Cant.Interpolate(cant) [Old ver] Track[trackKey].Cant(cant)
Track[trackKey].Cant.Interpolate() NEW
Sets the cant of the other track at current distance. Interpolates with last Track[].Cant.Interpolate. The interpolation function is set by Track[].Cant.SetFunction. Track[].Cant.Interpolate without argument sets the values of last Track[].Cant.Interpolate with argument.
trackKey: Track name (Any string)
cant: Cant [m] (Positive: Roll right, Negative: Roll left)
Structure.Load(filePath)
Loads structures according to the structure list file.
filePath: Relative path of the structure list file from this map file
Structure[structureKey].Put(trackKey, x, y, z, rx, ry, rz, tilt, span)
Puts a structure.
structureKey: Structure name (The string defined in the structure list file)
trackKey: Destination track name (0: Own track)
x: X-coordinate from the destination track [m]
y: Y-coordinate from the destination track [m]
z: Z-coordinate from current distance [m]
rx: 軌道に対する x 軸回りの角 [deg]
ry: 軌道に対する y 軸回りの角 [deg]
rz: 軌道に対する z 軸回りの角 [deg]
tilt: 傾斜オプション (0: 常に水平, 1: 勾配に連動, 2: カントに連動, 3: 勾配とカントに連動)
span: 曲線における弦の長さ [m]
Structure[structureKey].Put0(trackKey, tilt, span)
ストラクチャーを設置します。Structure[].Put 構文の x, y, z, rx, ry, rz に 0 を設定したことと同じです。
structureKey: Structure name (structure list fileで定義した文字列)
trackKey: 配置先のTrack name (0: Own track)
tilt: 傾斜オプション (0: 常に水平, 1: 勾配に連動, 2: カントに連動, 3: 勾配とカントに連動)
span: 曲線における弦の長さ [m]
Structure[structureKey].PutBetween(trackKey1, trackKey2, flag) NEW
Structure[structureKey].PutBetween(trackKey1, trackKey2)
ストラクチャーをcurrent distanceの 2 つの軌道の間に設置します。ストラクチャーは、軌道間の距離に応じて変形します。
trackKey1: 一方の軌道のTrack name (0: Own track)
trackKey2: 他方の軌道のTrack name
flag: 変形方向 (0: x および y 方向に変形, 1: x 方向のみに変形)
Repeater[repeaterKey].Begin(trackKey, x, y, z, rx, ry, rz, tilt, span, interval, structureKey1, structureKey2, ... , structureKeyN)
ストラクチャーの連続配置をcurrent distanceから開始します。ストラクチャーは、軌道に沿って一定間隔に配置されます。
repeaterKey: Structure array name (Any string)
trackKey: 配置先のTrack name (0: Own track)
x: 軌道からの x 座標 [m]
y: 軌道からの y 座標 [m]
z: 軌道からの z 座標 [m]
rx: 軌道に対する x 軸回りの角 [deg]
ry: 軌道に対する y 軸回りの角 [deg]
rz: 軌道に対する z 軸回りの角 [deg]
tilt: 傾斜オプション (0: 常に水平, 1: 勾配に連動, 2: カントに連動, 3: 勾配とカントに連動)
span: 曲線における弦の長さ [m]
interval: 配置間隔 [m]
structureKey1, ... , structureKeyN: Structure name (structure list fileで定義した文字列)
interval の整数倍の距離程 (dist) にストラクチャーが配置されます。ストラクチャーを N 個記述した場合、(dist / interval) mod N + 1 番目に記述したストラクチャーが配置されます。
Repeater[repeaterKey].Begin0(trackKey, tilt, span, interval, structureKey1, structureKey2, ... , structureKeyN)
ストラクチャーの連続配置をcurrent distanceから開始します。Repeater[].Begin 構文の x, y, z, rx, ry, rz に 0 を設定したことと同じです。
repeaterKey: Structure array name (Any string)
trackKey: 配置先のTrack name (0: Own track)
tilt: 傾斜オプション (0: 常に水平, 1: 勾配に連動, 2: カントに連動, 3: 勾配とカントに連動)
span: 曲線における弦の長さ [m]
interval: 配置間隔 [m]
structureKey1, ... , structureKeyN: Structure name (structure list fileで定義した文字列)
Repeater[repeaterKey].End()
ストラクチャーの連続配置をcurrent distanceで終了します。
repeaterKey: Structure array name
Background.Change(structureKey)
背景を変更します。
structureKey: Structure name
Station.Load(filePath)
station list fileにもとづいて停車場を定義します。Station.Put 構文を使用する前にこの構文を記述する必要があります。
filePath: このファイルからstation list fileへの相対パス
Station[stationKey].Put(door, margin1, margin2)
この列車の停止位置をcurrent distanceに設定します。列車停止位置目標ストラクチャーを設置するには Structure.Put を使用してください。
stationKey: Station name (station list fileで定義した文字列)
door: 開くドアの方向 (-1: 左, 1: 右)
margin1: 停止位置誤差の後方許容範囲 (負の値で設定)
margin2: 停止位置誤差の前方許容範囲
Section.Begin(signal0, signal1, ... , signalN) [Old ver] Section.BeginNew(signal0, signal1, ... , signalN)
新しい閉そくをcurrent distanceから開始します。
signal0: 先行列車がこの閉そくに存在する場合の信号インデックス
signal1: 先行列車が 1 閉そく先に存在する場合の信号インデックス
signalN: 先行列車が n 閉そく先に存在する場合の信号インデックス
Section.SetSpeedLimit(v0, v1, ... , vn) [Old ver] Signal.SpeedLimit(v0, v1, ... , vn)
信号現示の許容速度を設定します。
v0, v1, ... , vn: 走行速度 [km/h] (null: 許容速度なし)
Signal.Load(filePath)
signal aspects list fileにもとづいて信号現示を定義します。Signal.Put 構文を使用する前にこの構文を記述する必要があります。
filePath: このファイルからsignal aspects list fileへの相対パス
Signal[signalAspectKey].Put(section, trackKey, x, y)
Signal[signalAspectKey].Put(section, trackKey, x, y, z, rx, ry, rz, tilt, span)
地上信号機をcurrent distanceに設置します。
signalAspectKey: 信号現示名 (signal aspects list fileで定義した文字列)
section: 関連づける閉そくの相対インデックス
trackKey: 配置先のTrack name
x: 軌道からの x 座標 [m]
y: 軌道からの y 座標 [m]
z: 軌道からの z 座標 [m]
rx: 軌道に対する x 軸回りの角 [deg]
ry: 軌道に対する y 軸回りの角 [deg]
rz: 軌道に対する z 軸回りの角 [deg]
tilt: 傾斜オプション (0: 常に水平, 1: 勾配に連動, 2: カントに連動, 3: 勾配とカントに連動)
span: 曲線における弦の長さ [m]
Beacon.Put(type, section, sendData)
地上子の送信イベントをcurrent distanceに定義します。地上子ストラクチャーを設置するには Structure[].Put 構文を使用してください。
type: 保安装置に送る地上子種別 (整数)
section: 関連づける閉そくの相対インデックス
sendData: 保安装置に送る値 (整数)
SpeedLimit.Begin(v)
速度制限をcurrent distanceから開始します。速度制限標識ストラクチャーを設置するには Structure.Put 構文を使用してください。
v: 走行速度 [km/h]
SpeedLimit.End()
速度制限をcurrent distanceで終了します。速度制限解除標識ストラクチャーを設置するには Structure.Put 構文を使用してください。
PreTrain.Pass(time)
PreTrain.Pass(second)
先行列車がcurrent distanceを通過する時刻を設定します。
time: 時刻を表す文字列 ('hh:mm:ss')
second: 00:00:00 からの経過時間 [sec]
Light.Ambient(red, green, blue)
環境光の色 (アンビエント色) を設定します。この構文は、マップファイルに 1 回のみ記述可能です。
red: 赤成分 (0 ~ 1)
green: 緑成分 (0 ~ 1)
blue: 青成分 (0 ~ 1)
Light.Diffuse(red, green, blue)
平行光の色 (ディフューズ色) を設定します。この構文は、マップファイルに 1 回のみ記述可能です。
red: 赤成分 (0 ~ 1)
green: 緑成分 (0 ~ 1)
blue: 青成分 (0 ~ 1)
Light.Direction(pitch, yaw)
距離程 0 において、平行光が指す方向を設定します。この構文は、マップファイルに 1 回のみ記述可能です。
Fog.Interpolate(density, red, green, blue) [Old ver] Fog.Set(density, red, green, blue)
Fog.Interpolate(density) NEW
Fog.Interpolate() NEW
current distanceにおける霧効果を設定します。2 つの Fog.Interpolate の間は線形補間されます。
density: 濃度
red: 赤成分 (0 ~ 1)
green: 緑成分 (0 ~ 1)
blue: 青成分 (0 ~ 1)
DrawDistance.Change(value)
current distance以降の風景の描画距離を設定します。[設定] ウィンドウで設定される描画距離と、ここで設定する描画距離の短い方が適用されます。
value: 距離 [m] (0: [設定] ウィンドウで設定される描画距離を適用)
CabIlluminance.Interpolate(value) [Old ver] CabIlluminance.Set(value)
CabIlluminance.Interpolate() NEW
current distanceにおける運転台の明るさを設定します。2 つの CabIlluminance.Interpolate の間は線形補間されます。
value: 昼間画像と夜間画像の混合比 (0: 夜間画像 ~ 1: 昼間画像)
Irregularity.Change(x, y, r, lx, ly, lr)
current distance以降の軌道変位を設定します。
x: 左右変位 (左と右のレールの通り変位の平均に相当) の標準偏差 [m]
y: 上下変位 (左と右のレールの高低変位の平均に相当) の標準偏差 [m]
r: ロール変位 (水準変位を軌間で除した値に相当) の標準偏差 [rad]
lx: 左右変位の遮断波長 [m]
ly: 上下変位の遮断波長 [m]
lr: ロール変位の遮断波長 [m]
Adhesion.Change(a)
Adhesion.Change(a, b, c)
current distance以降の車輪-レール間の粘着特性を設定します。
a: 走行速度 0 km/h における粘着係数
b: 粘着係数の走行速度に対する変化を表す係数
c: 粘着係数の走行速度に対する変化を表す係数
ここで、v: 走行速度 [km/h]
Sound.Load(filePath)
sound list fileにもとづいてサウンドを読み込みます。
filePath: このファイルからsound list fileへの相対パス
Sound[soundKey].Play()
current distanceを通過するときにサウンドを 1 回再生します。
Sound3D.Load(filePath)
sound list fileにもとづいてサウンドを読み込みます。
filePath: このファイルからsound list fileへの相対パス
Sound3D[soundKey].Put(x, y)
地上に固定された音源をcurrent distanceに設置します。サウンドは連続再生されます。
x: 軌道からの x 座標 [m]
y: 軌道からの y 座標 [m]
RollingNoise.Change(index)
current distance以降の車輪転動音を設定します。
index: vehicle sound fileの [Run] セクションで定義したインデックス
FlangeNoise.Change(index)
current distance以降のフランジきしり音を設定します。
index: vehicle sound fileの [Flange] セクションで定義したインデックス
JointNoise.Play(index)
current distanceを通過するときに分岐器通過音を走行速度に応じて再生します。
index: vehicle sound fileの [Joint] セクションで定義したインデックス
Train.Add(trainKey, filePath, trackKey, direction)
Train[trainKey].Load(filePath, trackKey, direction) NEW
他列車ファイルにもとづいて他列車を定義します。
trainKey: Other train name (Any string)
filePath: このファイルから他列車ファイルへの相対パス
trackKey: 走行する軌道
direction: 進行方向 (-1: 対向, 1: 並走)
Train[trainKey].Enable(time)
Train[trainKey].Enable(second)
自列車がcurrent distanceを通過し、かつ設定された時刻になったとき、他列車の動作を有効にします。
trainKey: Other train name
time: 時刻を表す文字列 ('hh:mm:ss')
second: 00:00:00 からの経過時間 [sec]
Train[trainKey].Stop(decelerate, stopTime, accelerate, speed)
他列車をcurrent distanceに一旦停車させます。
trainKey: Other train name
decelerate: 減速度 [km/h/s]
stopTime: 停車時間 [s]
accelerate: 加速度 [km/h/s]
speed: 加速後の走行速度 [km/h]
Numerical values or strings can be temporarily stored in variables.
$foo = 1.067;
$bar = 'Hello';
By the variable is set to arguments or keys, the assigned value is referenced.
Track[$bar].Gauge($foo); # Equivalent to Track['Hello'].Gauge(1.067)
$foo2 = $foo; # 1.067 is assigned to $foo2
Either numerical values or strings can be assigned to variables. A string should be enclosed in quotes ( ' ). A dollar ( $ ) is required at the beginning of a variable name. Characters allowed in variable names are follows: alphabetic characters (A - Z、a - z), numeric characters (0 - 9), and underscore ( _ ).
Examples of incorrect use are shown below.
foo = 1;
$foo.bar = 1;
$foo = $bar = 1;
1 = $foo;
$bar = Hello;
Curve.Gauge($foo = 1);
Curve.Gauge('$foo');
$bar = 'Curve.Gauge'; $bar(1.067);
Operators can be used for variable assignments, arguments, and keys.
$foo = 1 + 2; # Equivalent to $foo = 3
Curve.Gauge(1067 / 1000); # Equivalent to Curve.Gauge(1.067)
The following operators can be used. Increment, decrement, and compound assignment operators are not supported.
Operator | Description |
+ | Addition or string concatenation |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Remainder |
Plus sign ( + ) is represents an addition if the operands are numbers, and is represents a string concatenation if the operands are strings. If operands are a combination of a number and a string, the number is converted to string, the string concatenation is performed.
$bar = 'Hello' + 'World'; # Equivalent to $bar = 'HelloWorld'
Track[$bar + 10].Gauge(1.067); # Equivalent to Track['HelloWorld10'].Gauge(1.067)
$bar = 1 + 2 + '3' # Equivalent to $bar = '33'
Operator precedence is as follows.
Precedence | Operator |
1 | ( ) |
2 | Unary operator |
3 | * / |
4 | + - |
Calculation result of the following formula is 15.
1 - 2 * -(3 + 4)
Examples of incorrect use are shown below.
$foo = 2 (3 - 1);
$foo = 1 / {(2 + 3) * 4};
$foo * 1000 = 1067;
$bar = 'Hello' * 2;
If the statement is as follows, the current distance is defined.
The distance should be a positive real number. The current distance is assigned to the variable "distance" (Dollar ( $ ) is not required).
Any of the following statement also define the current distance. However, a numerical value is assigned to $foo.
1000; # Set the current distance to 1000
1000 - 25; # Set the current distance to 975
distance + 0.5; # Set the current distance to 975.5
$foo; # Set the current distance to the answer of $foo
ここで設定する距離程は、実際の路線の距離程と同じである必要はありません。値が大きいとシミュレーションにおける演算誤差も大きくなるため、できる限り値が小さくなるように設定することを推奨します。
abs(value) | value の絶対値を返します。 | |
atan2(y, x) | 4 象限逆正接 (アークタンジェント) を返します。 | |
ceil(value) | value 以上の最小の整数を返します (value の切り上げ)。 | |
cos(value) | value の余弦 (コサイン) を返します。 | |
exp(value) | 自然対数の底 (e) の value 乗を返します。 | |
floor(value) | value 以下の最大の整数を返します (value の切り捨て)。 | |
log(value) | value の自然対数を返します。 | |
pow(x, y) | x の y 乗を返します。 | |
rand(value) rand() |
0 以上 value 未満の乱数を返します。 引数を省略した場合、0 以上 1 未満の乱数を返します。 |
|
sin(value) | value の正弦 (サイン) を返します。 | |
sqrt(value) | value の平方根を返します。 |
The include directive makes it possible to insert the contents of other maps into position.
include 'submap.txt';
The file header is also required in the map file to be inserted. But file header is not inserted.
© 2016 mackoy