BveTs Map 2.00: utf-8
#飾磨2番線より網干線0.3キロ地点まで

$Shikama + 0;
RollingNoise.Change(0);
Track['ForAboshi'].Position(0, 0);
Track['Height'].Position(0, -0.5);
Repeater['Ground'].Begin0('Height', 0, 24.99, 25.00, 'grass1');
$TB_Track = 'ForAboshi'; $TB_interval = 5; $TB_distance = $Shikama; include 'TrackBegin.txt';
Repeater['FormAboshiL'].Begin0('ForAboshi', 1, 4.99, 5.00, 'FormEdge');
Repeater['FormAboshiR'].Begin('ForAboshi', 0, 0, 5.10, 0, 180, 0, 1, 4.99, 5.00, 'FormEdge');
Repeater['FormUmeda'].Begin0('ForUmeda', 1, 4.99, 5.00, 'FormEdge');
Repeater['FormHimeji'].Begin('ForHimeji', 0, 0, 5.10, 0, 180, 0, 1, 4.99, 5.00, 'FormEdge');
Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');
Structure['Line44'].Put0('ForAboshi', 1, 43.99);

Track['ForHimeji'].Position(-12.3, 0);
$TB_Track = 'ForHimeji'; $TB_interval = 5; $TB_distance = $Shikama; include 'TrackBegin.txt';

Track['ForUmeda'].Position(11, 0);
$TB_Track = 'ForUmeda'; $TB_interval = 5; $TB_distance = $Shikama; include 'TrackBegin.txt';

#Section.Begin(0, 2, 7, 8);
Section.Begin(0, 0, 7, 8);	#出発信号に合わせて前方Rでもノーコードにする

$Shikama + 5;
Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');

$Shikama + 6;	#ここから橋上駅舎
Track['ForHimeji'].Position(-12.4, 0);
Track['ForUmeda'].Position(11.1, 0);

$Shikama + 10;	#ここまで橋上駅舎
Track['ForHimeji'].Position(-12.3, 0);
Track['ForUmeda'].Position(11.3, 0);

Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');

$Shikama + 15;
Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');

$Shikama + 19;	#架線柱

$Shikama + 20;
Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');

$Shikama + 25;
Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');

$Shikama + 30;	#停車位置
Station['SY40'].Put(1, -2, 2);	#右側を自動で閉めて、左側を手動で閉める
Track['ForHimeji'].Position(-11.8, 0);
Track['ForUmeda'].Position(10.8, 0);

Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');

$Shikama + 35;
Structure['platform'].PutBetween('ForAboshi', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'ForAboshi');

$Shikama + 38;
Repeater['FormAboshiL'].End();
Repeater['FormAboshiR'].End();

$Shikama + 39;	#ここで屋根終わる
Track['ForHimeji'].Position(-9.9, 0);
Track['ForUmeda'].Position(10.8, 0);
Track['dammy1'].Position(-2, 0);
Track['dammy2'].Position(1.75, 0);


$Shikama + 44;
Structure['poleC26'].Put('ForAboshi', 1, 0, 0, 0, 0, 0, 0, 0);	#架線柱
Structure['Line15'].Put0('ForAboshi', 1, 14.99);
Track['ForHimeji'].Position(-9.40, 0);
Track['ForUmeda'].Position(10.48, 0);
Structure['poleC20'].Put('ForAboshi', 1, 0, 15, 0, 0, 0, 0, 0);	#架線柱
Structure['poleC15'].Put('ForAboshi', 1.3, 0, 36.75, 0, 0, 0, 0, 0);	#架線柱

$Shikama + 45;
Section.Begin(0, 3, 7, 8);
Signal['GYR'].Put(0, 'ForAboshi', -2, 0);
Structure['SigPole'].Put('ForAboshi', -2, 0, 0.01, 0, 0, 0, 0, 0);
Structure['Sig_GYR'].Put('ForAboshi', -2, 0, 0.01, 0, 0, 0, 0, 0);
Beacon.Put(122, 0, 0);	#出発信号機直下(列選の表示を消す)

distance - 30;
Beacon.Put(121, 0, 2);	#S点だが、山陽線内なのでT点扱い

$Shikama + 40;
Structure['platform'].PutBetween('dammy1', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'dammy2');
Repeater['FormWallH'].Begin0('dammy1', 1, 4.99, 5.00, 'FormWall40');
Repeater['FormWallU'].Begin('dammy2', 0, 0, 5.00, 0, 180, 0, 1, 4.99, 5.00, 'FormWall40');
SpeedLimit.Begin(30);

$Shikama + 44;	#架線柱
Track['ForHimeji'].Position(-9.4, 0);
Track['ForUmeda'].Position(10.5, 0);

$Shikama + 45;
Structure['platform'].PutBetween('dammy1', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'dammy2');

$Shikama + 50;	#分岐開始
#分岐器半径は、起点からは20.5m弱で線路が触れる程度
#→半径280mで分岐すると仮定する
Curve.BeginTransition();
Curve.Begin(-280);
Track['dammy1'].Position(-1.7, 0, 280);
Track['dammy2'].Position(2, 0, 280);
Track['SY40_2-3'].Position(0,0,140);
$TB_Track = 'SY40_2-3'; $TB_interval = 5; $TB_distance = $Shikama + 50; include 'TrackBegin.txt';

Structure['platform'].PutBetween('dammy1', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'dammy2');

$Shikama + 55;
Structure['platform'].PutBetween('dammy1', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'dammy2');

$Shikama + 59;	#架線柱
Track['ForHimeji'].Position(-7.1, 0);
Track['ForUmeda'].Position(8.9, 0);
Structure['Line22'].Put0('ForAboshi', 1, 21.74);

$Shikama + 60;
Structure['platform'].PutBetween('dammy1', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'dammy2');

$Shikama + 65;
Structure['platform'].PutBetween('dammy1', 'ForHimeji');
Structure['platform'].PutBetween('ForUmeda', 'dammy2');

$Shikama + 70;	#1番線ホーム終わり
Track['SY40_2-3'].Position(1.5, 0, 0);
Repeater['FormHimeji'].End();
Track['dammy1'].Position(-0.5, 0);
Repeater['FormWallH'].End();

Structure['platform'].PutBetween('ForUmeda', 'dammy2');

$Shikama + 74;
Curve.BeginTransition();
Curve.End();
Curve.BeginTransition();
Curve.Begin(170);

$Shikama + 75;	#3番線ホーム終わり
Repeater['FormUmeda'].End();
Track['dammy2'].Position(3.5, 0, 0);
Repeater['FormWallU'].End();

$Shikama + 81;	#架線柱
Track['ForHimeji'].Position(-2.6, 0);
Track['SY40_2-3'].Position(3.1, 0, -200);
Track['ForUmeda'].Position(8.5, 0);
Structure['Line22'].Put0('ForAboshi', 1, 22.24);

$Shikama + 90;
Curve.BeginTransition();
Curve.End();

$Shikama + 105;	#再度カーブ開始
Curve.BeginTransition();
Curve.Begin(500);

$Shikama + 103;	#架線柱
Track['SY40_2-3'].Position(3.5, 0);
Track['ForUmeda'].Position(8.0, 0, -600);
Structure['poleS15'].Put('ForAboshi', 5, 0, 0, 0, 0, 0, 0, 0);	#架線柱(コンクリ製かもしれない)
Structure['Line36'].Put0('ForAboshi', 1, 35.49);

$Shikama + 107;	#下り線と合流
Track['ForHimeji'].Position(0, 0);
Curve.BeginTransition();
Curve.End();

$Shikama + 116;	#ここまで直線
Curve.BeginTransition();
Curve.Begin(160);

$Shikama + 125;	#ここで本線と分岐
Curve.BeginTransition();
Curve.End();
Track['ForHimeji'].Position(0, 0, 160);

$Shikama + 138.5;	#架線柱
Track['ForHimeji'].Position(1, 0, 160);
Track['SY40_2-3'].Position(4.4, 0, 160);
Track['ForUmeda'].Position(7.3, 0, 0);
Structure['poleS15'].Put('ForAboshi', 4.5, 0, 0, 0, 0, 0, 0, 0);	#架線柱
Structure['Line24'].Put0('ForAboshi', 1, 23.49);

$Shikama + 152;	#本線カーブ終わり
Track['ForHimeji'].Position(2.0, 0, 0);
Track['SY40_2-3'].Position(5.6, 0, 0);
Track['ForUmeda'].Position(6.8, 0, 0);

$Shikama + 162;	#架線柱
Track['ForHimeji'].Position(3.7, 0);
Track['SY40_2-3'].Position(7.3, 0);
Track['ForUmeda'].Position(7.2, 0);
Structure['poleS14'].Put('ForAboshi', 4.5, 0, 0, 0, 0, 0, 0, 0);	#架線柱
Structure['Line25'].Put0('ForAboshi', 1, 24.99);

$Shikama + 170;	#上り線合流
Track['ForHimeji'].Position(4.5, 0);
Track['ForUmeda'].Position(8.4, 0);
Track['SY40_2-3'].Position(8.4, 0);

$Shikama + 187;	#本線分岐
Track['ForHimeji'].Position(6.8, 0);
Track['ForUmeda'].Position(10.3, 0);
Track['SY40_2-3'].Position(10.3, 0);
Track['SY40_2-Dep'].Position(6.8, 0);
$TB_Track = 'SY40_2-Dep'; $TB_interval = 5; $TB_distance = $Shikama + 192; include 'TrackBegin.txt';
SpeedLimit.Begin(35);
Structure['poleS15'].Put('ForAboshi', 3.3, 0, 0, 0, 0, 0, 0, 0);	#架線柱
Structure['Line8'].Put0('ForAboshi', 1, 7.99);

$Shikama + 195;
Track['ForHimeji'].Position(7.8, 0);
Track['ForUmeda'].Position(11.4, 0);
Track['SY40_2-3'].Position(11.39, 0);
Track['SY40_2-Dep'].Position(7.79, 0);
Structure['poleS18'].Put('ForAboshi', 7.0, 0, 0, 0, 0, 0, 0, 0);	#架線柱
Structure['Line30'].Put0('ForAboshi', 1, 18.99);

$Shikama = $Shikama + 11;	#キロポストをもとに誤差補正(こんな誤差出るんかなぁ?と思ったけど実測でも0キロポストまで210mあった)
$Shikama + 200;
Gradient.BeginTransition();
$Height = 0;
Track['Height'].Y.Interpolate(-0.5, -2297.133143808623);

$Shikama + 214;	#架線柱(本線またぐ最後のやつの次で、本線とつながってるやつ)
Track['SY40_2-Dep'].Position(11.4, 0);
Track['SY40_2-3'].Position(15.0, 0);
Track['ForHimeji'].Position(15.0, 0);
Track['ForUmeda'].Position(18.7, 0);
Structure['poleD9'].Put('ForAboshi', 2.5, 0, 0, 0, 0, 0, 0, 0);	#架線柱
Structure['Line29'].Put0('ForAboshi', 1, 28.99);

$Shikama + 243;	#架線柱
Track['SY40_2-Dep'].Position(15.1, -0.35);
Track['SY40_2-3'].Position(18.7, -0.35);
Track['ForHimeji'].Position(23.5, -0.35);
Track['ForUmeda'].Position(28.6, -0.35);
SpeedLimit.Begin(90);
Structure['poleCL'].Put0('ForAboshi', 0, 0);	#架線柱
Structure['Line52'].Put0('ForAboshi', 1, 51.99);

$Shikama + 262;	#勾配開始
$Height = $Height + 0.8368475123268203;
Gradient.Begin(27);
Track['Height'].Y.Interpolate($Height * (-1) - 0.5, 0);
Track['SY40_2-Dep'].Position(15.65, -0.8);
Track['SY40_2-3'].Position(19.2, -0.8);
Track['ForHimeji'].Position(31, -0.8);
Track['ForUmeda'].Position(36.2, -0.8);

$Shikama + 295;	#架線柱
Track['SY40_2-Dep'].Position(15.9, -1.491);
Track['SY40_2-3'].Position(19.5, -1.491);
Track['ForHimeji'].Position(52.8, -1.491);
Track['ForUmeda'].Position(58.3, -1.491);
Structure['poleD5'].Put0('ForAboshi', 0, 0);	#架線柱
Structure['Line45'].Put0('ForAboshi', 1, 44.99);

#車庫は別マップに記述するのでいったんこれで
$TB_Track = 'SY40_2-3'; $TB_distance = $Shikama + 295; include 'TrackEnd.txt';
$TB_Track = 'SY40_2-Dep'; $TB_distance = $Shikama + 295; include 'TrackEnd.txt';
