diff --git a/Scenarios/magicant/randommap/DEVELOP.md b/Scenarios/magicant/randommap/DEVELOP.md index 3f586ce..18fc7e2 100644 --- a/Scenarios/magicant/randommap/DEVELOP.md +++ b/Scenarios/magicant/randommap/DEVELOP.md @@ -28,11 +28,11 @@ map_misc フォルダーにあるファイルは上記以外のマップファ 停車場リストファイルは `stations_<時刻>h_.csv` 形式のファイル名をしており、例えば `stations_9h_0.csv` のようになる。 -`<時刻>` は最初の駅を出発する時刻が何時台かを示しており、例えば `stations_9h_0.csv` は最初の駅を午前 9 時台に出発するダイヤである。 +`<時刻>` は最後の駅に到着する時刻が何時台かを示している。例えば `stations_9h_0.csv` は最後の駅に午前 9 時台に到着するダイヤである。 `` は停車場リストのバリエーションの番号である。ID ごとに停車場リストの中身 (特に駅名) が異なっている。 -マップファイルからランダムに停車場リストファイルを選んで読み込むことで、駅名とダイヤが毎回変化するようにしてある。停車場リストファイルの内容を動的に生成することはできないので、駅名やダイヤはファイルごとに一定である。また、マップファイルからは停車場リストに書かれた内容を読み取ることができないので、最初の駅の出発時刻は時からおおよその分と秒が機械的に決まるようにしてある (こうしないと、自車のダイヤと先行列車のダイヤを合わせることができない)。具体的にいうと、最初の駅の出発時刻は必ず以下のどれか (もしくは高々その数分前) となる。 +マップファイルからランダムに停車場リストファイルを選んで読み込むことで、駅名とダイヤが毎回変化するようにしてある。停車場リストファイルの内容を動的に生成することはできないので、駅名やダイヤはファイルごとに一定である。また、マップファイルからは停車場リストに書かれた内容を読み取ることができないので、最後の駅の到着時刻は時からおおよその分と秒が機械的に決まるようにしてある (こうしないと、自車のダイヤと先行列車のダイヤを合わせることができない)。具体的にいうと、最後の駅の到着時刻は必ず以下の時刻よりも後になる。 - 5:31:00 - 6:51:35 @@ -54,8 +54,6 @@ map_misc フォルダーにあるファイルは上記以外のマップファ - 22:20:55 - 23:41:30 -また、最初の駅のパートファイルにおいて、先行列車は初期の `$pretrain_time` から 90 秒以内に最初の駅の出発信号より先に進んでいなければならない。(そうしないと先行列車が自車より後ろの位置に来る恐れがある) - ## マップファイルの生成 map フォルダーにある build.sh というシェルスクリプトファイルを実行することでマップファイルが大量に生成される。また、シナリオファイルに記載すべき `Route = ...` の値が標準出力に出力される。 @@ -64,13 +62,20 @@ map フォルダーにある build.sh というシェルスクリプトファイ なお、生成されるマップファイルが読み込むパートファイルの種類や順番はスクリプトを実行するたびに毎回ランダムに変化する。 +各パートファイルは路線を**逆方向**に生成してゆくことに注意すること。例えば一つ目のパートファイルが距離程 12300~12500 メートルの区間を生成したら、次のパートファイルは例えば 12000~12300 メートル区間を生成する (12500~12700 メートル区間とかではない)。念のため用語の意味を明示しておく: + + - 手前 (preceding) = 距離程の数字がより小さい + - 後 (following) = 距離程の数字がより大きい + - 次 (next) のパートファイル = より後に `include` されるパートファイル = より手前の区間を生成するパートファイル + - 前 (previous) のパートファイル = より先に `include` されるパートファイル = より後の区間を生成するパートファイル + ### パートファイルの選択 -各パートファイルには、`//NEXT: <ファイル名>` という形式のコメントが一つ以上書かれている。これにより、そのパートファイルが `include` された後にどのパートファイルが `include` されるかが決まる。コメントが複数ある場合はそれらの中からランダムに次のパートファイルが選択される。同じファイル名を指すコメントを何度も書くことでそのファイルが選ばれる確率が上がる。 +各パートファイルには、`//FOLLOWS: <ファイル名>` という形式のコメントが一つ以上書かれている。これにより、そのパートファイルが `include` された後にどのパートファイルが `include` されるか (つまりそのパートファイルが生成する区間の手前にどのような区間が生成されるか) が決まる。コメントが複数ある場合はそれらの中からランダムに次のパートファイルが選択される。同じファイル名を指すコメントを何度も書くことでそのファイルが選ばれる確率が上がる。 -パートファイルの中に `//DUMMY` というコメントがある場合、そのパートファイルはダミーとみなされる。ダミーのパートファイルは `include` されず、そこに書かれている `//NEXT:` のファイル名に従ってただ次のパートファイルが選択される。 +パートファイルの中に `//DUMMY` というコメントがある場合、そのパートファイルはダミーとみなされる。ダミーのパートファイルは `include` されず、そこに書かれている `//FOLLOWS:` のファイル名に従って再度パートファイルが選択される。 -ダミーファイルは、主に複数のパートファイルからランダムに選ぶのをやりやすくするために使用する。例えば grassland_s_any.txt というダミーファイルには名前が grassland_s で始まる種々のパートファイル (どれも草原を走る単線のパート) が次の候補として書かれている。これらのパートファイルをいちいち `//NEXT:` に列挙する代わりにダミーファイルを `//NEXT:` に指定することで、コメントの記述量も減るし、また新たに草原を走る単線のパートファイルが増えたときにはダミーファイルを書き換えるだけで他のパートファイルの続きとして候補に加えることができる。 +ダミーファイルは、主に複数のパートファイルからランダムに選ぶのをやりやすくするために使用する。例えば grassland_s_any.txt というダミーファイルには名前が grassland_s で始まる種々のパートファイル (どれも草原を走る単線のパート) が `//FOLLOWS:` 対象として書かれている。他のパートファイルに `//FOLLOWS:` を記載する際、たくさんのパートファイルをいちいち `//FOLLOWS:` に列挙する代わりにダミーファイルを `//FOLLOWS:` に指定することで、 `//FOLLOWS:` の記述量も減るし、また新たに草原を走る単線のパートファイルが増えたときにはダミーファイルを書き換えるだけで他のパートファイルの手前として候補に加えることができる。 なお、各マップファイルで最初に読み込まれるパートファイルは必ず any.txt で、これは全てのパートファイルからランダムに選択するためのダミーのファイルである。 @@ -89,9 +94,9 @@ map フォルダーにある build.sh というシェルスクリプトファイ `$` の直後にアルファベットが来る変数はパートファイル間で様々なデータを引き継ぐために使用する。以下はそのような変数の一覧である。一つのパートファイルの処理が終わり次のパートファイルの処理に移るとき、変数の値は以下に説明する通りになっている必要がある。 - `$distance` = パートファイルが切り替わる地点の位置。 - - `$next_station_number` = 次に駅のパートファイルが `include` された時に生成される駅の番号。駅の番号は初めから順に 0, 1, 2... と数える。 - - `$previous_station_location` = 一つ前の駅の停止位置。 - - `$previous_section_location` = 一つ前の閉塞の開始位置。 + - `$preceding_station_number` = 次に駅のパートファイルが `include` された時に生成される駅の番号。駅の番号は始発駅が 0 で、終着駅に向かって 1, 2, 3, ... と上がってゆく。 + - `$following_station_location` = 一つ後の駅の停止位置。 + - `$following_section_location` = 一つ後の閉塞の開始位置。 - `$pretrain_time` = `$distance` の位置を先行列車が通過する時刻 (0 時からの秒数)。 以下は全てのパートファイルで使われる変数ではあるが、最初のパートファイルが `include` される前に初期化され、各パートファイルの中では変更されない。 diff --git a/Scenarios/magicant/randommap/map/build.sh b/Scenarios/magicant/randommap/map/build.sh index c11c38a..bde3111 100755 --- a/Scenarios/magicant/randommap/map/build.sh +++ b/Scenarios/magicant/randommap/map/build.sh @@ -9,7 +9,7 @@ set -eu cd -P -- "$(dirname -- "$0")" IFS=$' \t\n\r' -# TODO Terminal stations should be chosen as the last station only. +# TODO The last non-terminal station should be followed by some sections. # $candidate_part_file = name of the candidate part file candidate_is_dummy() { @@ -24,11 +24,11 @@ candidate_is_station() { # $candidate_part_file [in-out] = name of the candidate part file next_candidate_part() { candidates=($( - sed -n 's|^//NEXT:[[:space:]]*||p' "$candidate_part_file" + sed -n 's|^//FOLLOWS:[[:space:]]*||p' "$candidate_part_file" )) if [ "${#candidates[@]}" -le 0 ] then - printf 'Error: Part file "%s" has no next part\n' "$candidate_part_file" >&2 + printf 'Error: Part file "%s" has no preceding part\n' "$candidate_part_file" >&2 return 1 fi candidate_part_file=${candidates[$((RANDOM % ${#candidates[@]}))]} diff --git a/Scenarios/magicant/randommap/map_misc/init.txt b/Scenarios/magicant/randommap/map_misc/init.txt index 4a169cf..0075f71 100644 --- a/Scenarios/magicant/randommap/map_misc/init.txt +++ b/Scenarios/magicant/randommap/map_misc/init.txt @@ -3,10 +3,10 @@ BveTs Map 2.02 // このファイルは、他の init_*.txt ファイルから一度だけ include される。 // 全てのマップに共通の初期化を行う。 -$distance = 0; -$next_station_number = 0; -$previous_station_location = 0; -$previous_section_location = 0; +$distance = 65536; +$preceding_station_number = 5; +$following_station_location = $distance; +$following_section_location = $distance; Structure.Load('../structures/structures_' + floor(rand()) + '.csv'); $ballast_5m_count = 2; diff --git a/Scenarios/magicant/randommap/map_misc/section.txt b/Scenarios/magicant/randommap/map_misc/section.txt index dbf17b1..9a094e9 100644 --- a/Scenarios/magicant/randommap/map_misc/section.txt +++ b/Scenarios/magicant/randommap/map_misc/section.txt @@ -1,7 +1,14 @@ BveTs Map 2.02 -// 新しい閉塞に対する ATS 地上子を設置する。 +// 一つ後の閉塞に対する ATS 地上子を設置する。 // このファイルは Section.Begin 文で新しい閉塞を区切った直後に include すること。 +// +// このファイルで設置する地上子は現地点 ($distance) にある閉塞に対する地上子ではなく +// 一つ後の閉塞 ($following_section_location) に対する地上子である。 +// これらの地上子を二つ以上手前の閉塞に設置すると地上子が情報を送信する閉塞の +// インデックスがずれるので、一つ手前の閉塞の位置 ($distance) が確定してから +// その位置に応じて地上子を設置する。 +// // このファイルを include する前に以下の変数を設定しておく必要がある。 // $distance = 現在位置 (Section.Begin 文のある位置) // $ats_stop_beacon_type = ATS-P 即時停止地上子の種別番号 @@ -13,68 +20,68 @@ BveTs Map 2.02 // $ats_update_m1_beacon_type = ATS-P パターン更新地上子の種別番号 // $ats_update_m1_beacon_value = ATS-P パターン更新地上子に送る値 // $ats_update_transponder = ATS-P パターン更新地上子ストラクチャーキー -// $previous_section_location = 直前の閉塞の開始位置 +// $following_section_location = 一つ後の閉塞の開始位置 // $_indexes = 新しい閉塞の信号インデックス設定 (信号現示受信地上子 (1012 番) に送る値) // このファイルの中で以下の変数が変更される。 -// $previous_section_location = この閉塞の開始位置 (= $distance) +// $following_section_location = この閉塞の開始位置 (= $distance) -$previous_section_location; +$distance + 0.01; Beacon.Put(1012, 1, $_indexes); // 即時停止地上子 -$distance - 25; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 25; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_stop_beacon_type, $ats_stop_beacon_section, 0); // 現示更新地上子 -$distance - 25; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 25; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_update_1_beacon_type, 1, $ats_update_1_beacon_value); Beacon.Put($ats_update_2_beacon_type, 2, $ats_update_2_beacon_value); Beacon.Put($ats_update_m1_beacon_type, -1, $ats_update_m1_beacon_value); distance - 3; Structure[$ats_update_transponder].Put0(0, 3, 0); -$distance - 50; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 50; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_update_1_beacon_type, 1, $ats_update_1_beacon_value); Beacon.Put($ats_update_2_beacon_type, 2, $ats_update_2_beacon_value); Beacon.Put($ats_update_m1_beacon_type, -1, $ats_update_m1_beacon_value); distance - 3; Structure[$ats_update_transponder].Put0(0, 3, 0); -$distance - 85; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 85; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_update_1_beacon_type, 1, $ats_update_1_beacon_value); Beacon.Put($ats_update_2_beacon_type, 2, $ats_update_2_beacon_value); Beacon.Put($ats_update_m1_beacon_type, -1, $ats_update_m1_beacon_value); distance - 3; Structure[$ats_update_transponder].Put0(0, 3, 0); -$distance - 130; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 130; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_update_1_beacon_type, 1, $ats_update_1_beacon_value); Beacon.Put($ats_update_2_beacon_type, 2, $ats_update_2_beacon_value); Beacon.Put($ats_update_m1_beacon_type, -1, $ats_update_m1_beacon_value); distance - 3; Structure[$ats_update_transponder].Put0(0, 3, 0); -$distance - 180; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 180; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_update_1_beacon_type, 1, $ats_update_1_beacon_value); Beacon.Put($ats_update_2_beacon_type, 2, $ats_update_2_beacon_value); Beacon.Put($ats_update_m1_beacon_type, -1, $ats_update_m1_beacon_value); distance - 3; Structure[$ats_update_transponder].Put0(0, 3, 0); -$distance - 280; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 280; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_update_1_beacon_type, 1, $ats_update_1_beacon_value); Beacon.Put($ats_update_2_beacon_type, 2, $ats_update_2_beacon_value); Beacon.Put($ats_update_m1_beacon_type, -1, $ats_update_m1_beacon_value); distance - 3; Structure[$ats_update_transponder].Put0(0, 3, 0); -$distance - 600; -(distance + $previous_section_location + abs(distance - $previous_section_location)) / 2; // max(distance, $previous_section_location) +$following_section_location - 600; +(distance + $distance + abs(distance - $distance)) / 2; // max(distance, $distance) Beacon.Put($ats_update_1_beacon_type, 1, $ats_update_1_beacon_value); Beacon.Put($ats_update_2_beacon_type, 2, $ats_update_2_beacon_value); Beacon.Put($ats_update_m1_beacon_type, -1, $ats_update_m1_beacon_value); distance - 3; Structure[$ats_update_transponder].Put0(0, 3, 0); -$previous_section_location = $distance; +$following_section_location = $distance; diff --git a/Scenarios/magicant/randommap/map_misc/station.txt b/Scenarios/magicant/randommap/map_misc/station.txt index 14ddcf7..5fa6538 100644 --- a/Scenarios/magicant/randommap/map_misc/station.txt +++ b/Scenarios/magicant/randommap/map_misc/station.txt @@ -1,10 +1,14 @@ BveTs Map 2.02 -// 駅の停止位置を設置する。また、TASC 地上子を設置する。 +// 駅の停止位置を設置する。また、次の地上子を設置する。 +// - この駅の停止位置直前の TASC 地上子 +// - この駅の停止位置直後に設置する、一つ後の駅のための TASC 地上子 +// - 一つ後の駅の停止位置 500 メートル手前の TASC 地上子 +// - 発車合図タイミング設定地上子 // このファイルを include する前に以下の変数を設定しておく必要がある。 // $distance = 停止位置 -// $next_station_number = 次の駅の番号 (始発駅は 0) -// $previous_station_location = 一つ前の駅の停止位置 +// $preceding_station_number = 設置する駅の番号 (始発駅は 0) +// $following_station_location = 一つ後の駅の停止位置 // $tasc_long_beacon_type = 前の駅の直後に置く TASC 地上子の番号 // $tasc_500m_beacon_type = 500 メートル手前に置く TASC 地上子の番号 // $tasc_11m_beacon_type = 11 メートル手前に置く TASC 地上子の番号 @@ -13,25 +17,25 @@ BveTs Map 2.02 // $_underrun_limit = 許容されるアンダーラン距離 // $_overrun_limit = 許容されるオーバーラン距離 // このファイルの中で以下の変数が変更される。 -// $next_station_number = 今回設置した駅の番号 -// $previous_station_location = 今回設置した駅の停止位置 +// $preceding_station_number = 次に設置する (一つ手前の) 駅の番号 +// $following_station_location = 今回設置した駅の停止位置 (= $distance) $distance; - Station['station_' + $next_station_number].Put($_door_direction, -$_underrun_limit, $_overrun_limit); + Station['station_' + $preceding_station_number].Put($_door_direction, -$_underrun_limit, $_overrun_limit); -$next_station_number = $next_station_number + 1; +$preceding_station_number = $preceding_station_number - 1; -// 前の駅を出た直後に TASC 地上子を置く -$__l = $previous_station_location + 11; -$__d = floor($distance - $__l); // 距離を確実に整数にする -$distance - $__d; +// この駅を出た直後に TASC 地上子を置く +$__l = $distance + 11; +$__d = floor($following_station_location - $__l); // 距離を確実に整数にする +$following_station_location - $__d; Beacon.Put($tasc_long_beacon_type, -1, $__d * 1000); -// 500 メートル手前に TASC 地上子を置く。 -// 駅が近いときは 500 メートル手前に設置できないことがあるが、その場合は -// $tasc_long_beacon_type の方の地上子が直後に来るので計算がずれることはない。 -$__l = $previous_station_location + 10; -$distance - 500; +// 一つ後の駅の 500 メートル手前に TASC 地上子を置く。 +// 駅が近いときは 500 メートルよりも近い位置に設置することになるが、その場合は +// $tasc_long_beacon_type の方の地上子が直後に来るので停止位置がずれることはない。 +$__l = $distance + 10.99; +$following_station_location - 500; (distance + $__l + abs(distance - $__l)) / 2; // max(distance, $__l) Beacon.Put($tasc_500m_beacon_type, -1, 0); @@ -43,4 +47,4 @@ $distance - 11; $distance - 11; Beacon.Put($conductor_timing_beacon_type, -1, floor(abs(rand(8) - 3) + 0.5)); -$previous_station_location = $distance; +$following_station_location = $distance; diff --git a/Scenarios/magicant/randommap/map_parts/any.txt b/Scenarios/magicant/randommap/map_parts/any.txt index ee8f83f..8decc0b 100644 --- a/Scenarios/magicant/randommap/map_parts/any.txt +++ b/Scenarios/magicant/randommap/map_parts/any.txt @@ -5,4 +5,4 @@ BveTs Map 2.02 ; -//NEXT: ../map_parts/grassland_s_any.txt +//FOLLOWS: ../map_parts/grassland_s_any.txt diff --git a/Scenarios/magicant/randommap/map_parts/grassland_s_0.txt b/Scenarios/magicant/randommap/map_parts/grassland_s_0.txt index d49ee80..1e296e7 100644 --- a/Scenarios/magicant/randommap/map_parts/grassland_s_0.txt +++ b/Scenarios/magicant/randommap/map_parts/grassland_s_0.txt @@ -2,9 +2,9 @@ BveTs Map 2.02 // 草原、単線、直線 -$_begin = $distance; +$_end = $distance; $_count = floor(2.5 + rand(3)); -$_end = $_begin + 100 * $_count; +$_begin = $_end - 100 * $_count; $_signal = $_end - 50.25; $_begin; @@ -18,7 +18,7 @@ $_signal; Section.Begin($signal_index_0, $signal_index_2, $signal_index_3, $signal_index_4, $signal_index_5); Signal[$signal_4a].Put(0, 0, -2.25, 3.8); Structure[$section_sign_10].Put(0, -2, 0.5 + rand(1), 0, 0, 0, 0, 0, 0); -$pretrain_time = $pretrain_time + ($_signal - $_begin) / ($max_speed / 3.6 * 0.75); +$pretrain_time = $pretrain_time - ($_end - $_signal) / ($max_speed / 3.6 * 0.75); PreTrain.Pass($pretrain_time); $distance = distance; $_indexes = 54320; @@ -30,7 +30,7 @@ $_end - 0.01; Repeater['wirepoles'].End(); Repeater['trolleywire'].End(); -$distance = $_end; -$pretrain_time = $pretrain_time + ($_end - $_signal) / ($max_speed / 3.6 * 0.75); +$distance = $_begin; +$pretrain_time = $pretrain_time - ($_signal - $_begin) / ($max_speed / 3.6 * 0.75); -//NEXT: ../map_parts/grassland_s_any.txt +//FOLLOWS: ../map_parts/grassland_s_any.txt diff --git a/Scenarios/magicant/randommap/map_parts/grassland_s_1.txt b/Scenarios/magicant/randommap/map_parts/grassland_s_1.txt index 0b34953..0c0cfeb 100644 --- a/Scenarios/magicant/randommap/map_parts/grassland_s_1.txt +++ b/Scenarios/magicant/randommap/map_parts/grassland_s_1.txt @@ -2,13 +2,13 @@ BveTs Map 2.02 // 草原、単線、曲線 -$_begin = $distance; -$_curve_begin = $_begin; -$_curve_enter = $_curve_begin + 100; // TODO 緩和曲線長のランダム化 +$_end = $distance; +$_curve_end = $_end; +$_curve_exit = $_curve_end - 100; // TODO 緩和曲線長のランダム化 $_count = floor(0.5 + rand(4)); -$_curve_exit = $_curve_enter + 100 * $_count; -$_curve_end = $_curve_exit + 100; // TODO 緩和曲線長のランダム化 -$_end = $_curve_end; +$_curve_enter = $_curve_exit - 100 * $_count; +$_curve_begin = $_curve_enter - 100; // TODO 緩和曲線長のランダム化 +$_begin = $_curve_begin; $_signal = $_curve_end - 50.25; $_begin; @@ -35,7 +35,7 @@ $_signal; Section.Begin($signal_index_0, $signal_index_2, $signal_index_3, $signal_index_4, $signal_index_5); Signal[$signal_4a].Put(0, 0, -2.25, 3.8); Structure[$section_sign_10].Put(0, -2, 0.5 + rand(1), 0, 0, 0, 0, 0, 0); -$pretrain_time = $pretrain_time + ($_signal - $_begin) / ($max_speed / 3.6 * 0.75); +$pretrain_time = $pretrain_time - ($_end - $_signal) / ($max_speed / 3.6 * 0.75); PreTrain.Pass($pretrain_time); $distance = distance; $_indexes = 54320; @@ -47,7 +47,7 @@ $_end - 0.01; Repeater['wirepoles'].End(); Repeater['trolleywire'].End(); -$distance = $_end; -$pretrain_time = $pretrain_time + ($_end - $_signal) / ($max_speed / 3.6 * 0.75); +$distance = $_begin; +$pretrain_time = $pretrain_time - ($_signal - $_begin) / ($max_speed / 3.6 * 0.75); -//NEXT: ../map_parts/grassland_s_any.txt +//FOLLOWS: ../map_parts/grassland_s_any.txt diff --git a/Scenarios/magicant/randommap/map_parts/grassland_s_any.txt b/Scenarios/magicant/randommap/map_parts/grassland_s_any.txt index d86f7fd..2d73767 100644 --- a/Scenarios/magicant/randommap/map_parts/grassland_s_any.txt +++ b/Scenarios/magicant/randommap/map_parts/grassland_s_any.txt @@ -5,7 +5,7 @@ BveTs Map 2.02 ; -//NEXT: ../map_parts/grassland_s_0.txt -//NEXT: ../map_parts/grassland_s_1.txt -//NEXT: ../map_parts/grassland_s_station_0.txt -//NEXT: ../map_parts/grassland_s_station_1.txt +//FOLLOWS: ../map_parts/grassland_s_0.txt +//FOLLOWS: ../map_parts/grassland_s_1.txt +//FOLLOWS: ../map_parts/grassland_s_station_0.txt +//FOLLOWS: ../map_parts/grassland_s_station_1.txt diff --git a/Scenarios/magicant/randommap/map_parts/grassland_s_station_0.txt b/Scenarios/magicant/randommap/map_parts/grassland_s_station_0.txt index 87bdefb..86ad56c 100644 --- a/Scenarios/magicant/randommap/map_parts/grassland_s_station_0.txt +++ b/Scenarios/magicant/randommap/map_parts/grassland_s_station_0.txt @@ -3,13 +3,13 @@ BveTs Map 2.02 //STATION // 草原、単線、一面一線右側ホーム -$_begin = $distance; +$_end = $distance; +$_begin = $_end - 250; $_stop = $_begin + 205; $_platform_end = $_begin + 210; $_signal = $_platform_end + 25; -$_end = $distance + 250; -$distance; +$_begin; Repeater['ground'].Begin(0, 0, -0.5, 0, 0, 0, 0, 3, 10, 10, 'ground_grass_10m'); Repeater['rails'].Begin0(0, 3, 5, 5, 'ballast_5m_' + floor(rand($ballast_5m_count))); Repeater['wirepoles'].Begin0(0, 0, 0, 50, 'wirepole_outer', 'wirepole_inner'); @@ -36,7 +36,7 @@ $_signal; Structure[$signal_pole_5m_r].Put(0, -2, 3.3, 0, 0, 0, 0, 0, 0); Structure[$signal_clamp_4a_r].Put(0, -2, 3.8, 0, 0, 0, 0, 0, 0); Structure[$section_sign_10].Put(0, -2, 0.5 + rand(1), 0, 0, 0, 0, 0, 0); -$pretrain_time = $pretrain_time + ($_signal - $_begin) / ($max_speed / 3.6 * 0.75) + 30 + rand(15); +$pretrain_time = $pretrain_time - ($_end - $_signal) / ($max_speed / 3.6 * 0.75); PreTrain.Pass($pretrain_time); $distance = distance; $_indexes = 54320; @@ -55,7 +55,7 @@ $_end - 0.01; Repeater['wirepoles'].End(); Repeater['trolleywire'].End(); -$distance = $_end; -$pretrain_time = $pretrain_time + ($_end - $_signal) / ($max_speed / 3.6 * 0.75); +$distance = $_begin; +$pretrain_time = $pretrain_time - ($_signal - $_begin) / ($max_speed / 3.6 * 0.75) - 30 - rand(15); -//NEXT: ../map_parts/grassland_s_any.txt +//FOLLOWS: ../map_parts/grassland_s_any.txt diff --git a/Scenarios/magicant/randommap/map_parts/grassland_s_station_1.txt b/Scenarios/magicant/randommap/map_parts/grassland_s_station_1.txt index a83fd2b..d85a2f2 100644 --- a/Scenarios/magicant/randommap/map_parts/grassland_s_station_1.txt +++ b/Scenarios/magicant/randommap/map_parts/grassland_s_station_1.txt @@ -3,13 +3,13 @@ BveTs Map 2.02 //STATION // 草原、単線、一面一線左側ホーム -$_begin = $distance; +$_end = $distance; +$_begin = $_end - 250; $_stop = $_begin + 205; $_platform_end = $_begin + 210; $_signal = $_platform_end + 25; -$_end = $distance + 250; -$distance; +$_begin; Repeater['ground'].Begin(0, 0, -0.5, 0, 0, 0, 0, 3, 10, 10, 'ground_grass_10m'); Repeater['rails'].Begin0(0, 3, 5, 5, 'ballast_5m_' + floor(rand($ballast_5m_count))); Repeater['wirepoles'].Begin(0, 0, 0, 0, 0, 180, 0, 0, 0, 50, 'wirepole_inner', 'wirepole_outer'); @@ -36,7 +36,7 @@ $_signal; Structure[$signal_pole_5m_l].Put(0, 2, 3.3, 0, 0, 0, 0, 0, 0); Structure[$signal_clamp_4a_l].Put(0, 2, 3.8, 0, 0, 0, 0, 0, 0); Structure[$section_sign_10].Put(0, 2, 0.5 + rand(1), 0, 0, 0, 0, 0, 0); -$pretrain_time = $pretrain_time + ($_signal - $_begin) / ($max_speed / 3.6 * 0.75) + 30 + rand(15); +$pretrain_time = $pretrain_time - ($_end - $_signal) / ($max_speed / 3.6 * 0.75); PreTrain.Pass($pretrain_time); $distance = distance; $_indexes = 54320; @@ -55,7 +55,7 @@ $_end - 0.01; Repeater['wirepoles'].End(); Repeater['trolleywire'].End(); -$distance = $_end; -$pretrain_time = $pretrain_time + ($_end - $_signal) / ($max_speed / 3.6 * 0.75); +$distance = $_begin; +$pretrain_time = $pretrain_time - ($_signal - $_begin) / ($max_speed / 3.6 * 0.75) - 30 - rand(15); -//NEXT: ../map_parts/grassland_s_any.txt +//FOLLOWS: ../map_parts/grassland_s_any.txt diff --git a/Scenarios/magicant/randommap/stations/stations_21h_0.csv b/Scenarios/magicant/randommap/stations/stations_21h_0.csv old mode 100644 new mode 100755 index 893aad5..263c588 --- a/Scenarios/magicant/randommap/stations/stations_21h_0.csv +++ b/Scenarios/magicant/randommap/stations/stations_21h_0.csv @@ -1,8 +1,8 @@ BveTs Station List 2.00,,,,,,,,,,,, #,駅名,到着時刻,出発時刻,停車時間,開始時刻,出発信号,乗降時間,乗車率,到着音声,発車前音声,再開扉確率,駆け込み乗車遅延時間 -station_0,遠山,20:59:50,21:00:20,15,20:59:50,0,15,1,,,0.05,3 +station_0,遠山,,,15,,0,15,1,,,0.05,3 station_1,千香,,,15,,0,10,1,,,0.05,3 station_2,葉渡,,,15,,0,10,1.05,,,0.05,3 station_3,春本,,,15,,0,12,1.08,,,0.06,4 station_4,味森,,,15,,0,10,1.1,,,0.05,3 -station_5,浅水,,,15,,0,10,1.08,,,0.05,3 +station_5,浅水,21:00:20,,15,,0,10,1.08,,,0.05,3 diff --git a/Scenarios/magicant/randommap/stations/stations_9h_0.csv b/Scenarios/magicant/randommap/stations/stations_9h_0.csv old mode 100644 new mode 100755 index 8ad31a0..6fc279c --- a/Scenarios/magicant/randommap/stations/stations_9h_0.csv +++ b/Scenarios/magicant/randommap/stations/stations_9h_0.csv @@ -1,8 +1,8 @@ BveTs Station List 2.00,,,,,,,,,,,, #,駅名,到着時刻,出発時刻,停車時間,開始時刻,出発信号,乗降時間,乗車率,到着音声,発車前音声,再開扉確率,駆け込み乗車遅延時間 -station_0,西森,9:52:50,9:53:20,15,9:52:50,0,15,1,,,0.05,3 +station_0,西森,,,15,,0,15,1,,,0.05,3 station_1,葉山,,,15,,0,10,1,,,0.05,3 station_2,川北,,,15,,0,10,0.97,,,0.05,3 station_3,長橋,,,15,,0,10,0.95,,,0.05,2 station_4,取州,,,15,,0,10,0.93,,,0.05,3 -station_5,別入,,,15,,0,15,0.91,,,0.05,3 +station_5,別入,9:53:20,,15,,0,15,0.91,,,0.05,3