aboutsummaryrefslogtreecommitdiff
path: root/textures/base/pack/ignore.png
blob: a73d2222da54fb2b4a1bb6ec97f9124f9cbfcb33 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 02 00 00 00 90 91 68 .PNG........IHDR...............h
0020 36 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 00 06 62 4b 47 44 00 8b 00 b9 00 f9 31 9b b5 db 6....sRGB.........bKGD......1...
0040 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 e1 02 ....pHYs.................tIME...
0060 09 0e 37 26 5e 90 76 ae 00 00 00 0c 69 54 58 74 43 6f 6d 6d 65 6e 74 00 00 00 00 00 bc ae b2 99 ..7&^.v.....iTXtComment.........
0080 00 00 00 52 49 44 41 54 28 cf 63 38 cc c0 40 12 02 e1 ff 44 23 6c 1a 6e de 24 51 03 f9 36 00 19 ...RIDAT(.c8..@....D#l.n.$Q..6..
00a0 18 b6 e1 d6 80 46 c2 74 52 d1 06 1c 01 80 db d3 d8 8c a7 24 94 d0 cc 43 f6 06 aa 20 92 06 fc e1 .....F.tR..........$...C........
00c0 03 23 89 d0 80 ec 25 d2 34 a0 fb 01 ab d3 d1 fc 00 b7 81 24 04 00 ae dc 44 12 06 ca 1c 23 00 00 .#....%.4..........$....D....#..
00e0 00 00 49 45 4e 44 ae 42 60 82 ..IEND.B`.
d='n63' href='#n63'>63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
ATC Command Syntax

A train runs the current ATC command once it receives it, including delayed instructions. If the train receives a new command, the current command is discarded.
Spaces can be inserted into commands as needed and are ignored.

# simple commands:

S<[0-9]+ speed or 'M'>
Set target speed of train to <speed>. Accelerates if slower, rolls if faster. 'M' means maximum speed.
Execution of command continues immediately.

B<[0-9]+ speed>
Brake until speed is reached. If faster, apply brakes, if slower, do nothing.
Execution of command continues immediately.

Examples:
SM : accelerate to maximum speed
S0 : roll to stand
B0 : brake to stand
S0B3 or B3S0: brake to 3, then roll to stand.

W
Wait until S and/or B commands reached the desired speed before continuing execution.

D<[0-9]+ time>
Delay: Wait for time seconds before continuing execution.

R
Reverse: change movement direction of train. ONLY WORKS WHEN TRAIN STANDS, else no-op.
Use B0WR to definitely change direction.

Examples:
B0 W R D10 SM
Subway train stopping in dead end station and returning in opposite direction

OL
Open left doors
OR
Open right doors
OC
Close Doors
All door commands are relative to the arrow direction, so if a train drives to opposite arrow direction, L will open its right doors from driver perspective.
Execution continues immediately, there is no way to wait for all doors to be opened/closed.

Example:
B0 W OL D10 OC D1 SM
Subway train: stop in station and open doors, depart after 10 seconds.

K
Kick all passengers out of the trains
This command kicks all passengers (non-driving players) off the train. This command works only
if the train is stopped and its doors are open.

Cpl
Temporarily switch the train to "Autocouple" mode and wait for coupling.
This command makes the train continue at its current speed until it hits another standing wagon or train. Then, it couples to this train and ATC command execution continues.

# conditional statements:

I<condition><code>;
Execute code only if condition applies
I<condition><code1>E<code2>;
Execute code1 only if condition applies, else execute code2

Conditions:
+ / -
Tests the train's movement direction against the arrow on the ATC rail: M+ is true when train drives in direction of arrow.

[</>/<=/>=][speed]
Test if train's speed is greater or smaller than the given value

Examples:
I- B0 W R ; S8
If the train drives in the 'wrong' direction, stop and reverse; independently accelerate to speed 8 afterwards.

I<8 S8 ;
If the train is slower than 8, accelerate to 8.

# Interlocking

With advtrains_interlocking, there's one more available command:

A0
Disable ARS on the train.
A1
Enable ARS on the train.
When disabled, the train will not trigger automatic route setting on signals based on ARS.

# Persistence
ATC controllers that are configured as 'static' or 'mesecon' are persistent over mapblock unloads and will even command the train when the mapblock is unloaded. This is not possible with digilines since these do not work in unloaded mapchunks.

# LUA ATC controller (in development)
The LUA ATC Controller will operate by using LUA code. All operations shown above will have a function equivalent. Additionally all LUA ATC controllers share an environment and setting signal and switch status will be possible to allow for complicated railway systems/fully automated subways a.s.o.
Also planned:
- digicompute add-on to allow computer access to the ATC environment (railway maps... ... ... ... ...)