TrainCrewInput Class

void TrainCrewInput.Init();
Call at startup.


void TrainCrewInput.RequestData(DataRequest req);
Call this when you want to obtain additional information such as the status of traffic lights or switches.
It is recommended to call it when the GameScreen changes.
DataRequest req: Type of data you want to obtain (bit flag)



void TrainCrewInput.SetNotch(int notch);
Enter the notch. You can call it only when it changes.
Enter a positive value for the force side and a negative value for the braking side.
int notch:Value corresponding to the notch
EB:-8
B6:-7
B1:-2
Holding braking:-1
N:0
P1:1
P5:5


void TrainCrewInput.SetNotch(int power, int brake);
Input the notches for power and brake. It is fine to call only when there is a change.
Input positive values for both power and brake. ※For two-handled cars like the 4000 series, input a negative value for power for holding braking.



void TrainCrewInput.SetPowerNotch(int power);
Input the notch for power. It is fine to call only when there is a change.
Input a positive value for power. ※For two-handled cars like the 4000 series, input a negative value for power for holding braking.


void TrainCrewInput.SetBrakeNotch(int brake);
Input the brake. It is fine to call only when there is a change.
Input a positive value.



void TrainCrewInput.SetReverser(int dir);

Enter the reverser. You can call it only when it changes.
int dir:Value corresponding to the reverser
1:Forward
0:Neutral
-1:Backward


void TrainCrewInput.SetButton(InputAction action, bool on);
Enter the status of a button or switch.



TrainState TrainCrewInput.GetTrainState();
Get the status of the operating train.



void TrainCrewInput.SetWiper(int state);
Set the wiper setting. It's okay to call only when changed.
int state: Value corresponding to the wiper setting
0: OFF
1: Intermittent
2: Low speed
3: High speed



void TrainCrewInput.SetATO_Notch(int notch);
Enter the notch for ATO. There is no problem if you call it only when there is a change.
Enter a positive value for the powering side and a negative value for the braking side
・ATO power running notch (when notch>0)
→ATO power running notch is applied only when the manual master controller is in N position.
For example, when ATO=P5 and manual=P1, it becomes manual P1
・ATO brake notch (when notch<0)
→The larger of manual notch and ATO notch is applied
int notch: value corresponding to the notch
EB:-8
B6:-7
B1:-2
抑速:-1
N:0
P1:1
P5:5


void TrainCrewInput.RequestStaData();
Requests transmission of station information list.
*The station information list may be updated several frames later.




void TrainCrewInput.Dispose();
Call when finished.



GameState TrainCrewInput.gameState
Get the game state.


List<SignalInfo> TrainCrewInput.signals
You can get the status of the traffic light ahead.
It can be obtained after passing the signal call position marker.


TrainSwitch TrainCrewInput.trainSwitch
You can obtain the status of operations such as the horn.


TrainState class

public float Speed; //Operating speed(km/h)
public bool AllClose; //Door closed
public float MR_Press; //Main air reservoir
public List<CarState> CarStates; //Information on each car

public Dictionary<PanelLamp, bool> Lamps; //Driver's cab indicator light status
public string ATS_Class; //Class indication of ATS indicator
public string ATS_Speed; //Speed indication of ATS indicator
public string ATS_State; //State indication of ATS indicator

//About diagram
public TimeSpan NowTime; //Current time
public string diaName; //Train number
public string Class; //Class
public string BoundFor; //destination
public List<Station> stationList; // Information for each station
public int nowStaIndex; // Index for the next station (used for stationList)

//About running
public float nextUIDistance; //Remaining distance displayed on the game UI
public float nextStaDistance; //Remaining distance to the next station
public string nextStaName; //Name of the next station
public string nextStopType; //Whether the next station is a stop or pass-through
public float speedLimit; //Current speed limit
public float nextSpeedLimit; //Next speed limit (will be "-1" if not displayed on the game UI)
public float nextSpeedLimitDistance; //Distance to the next speed limit (will be "-1" if not displayed on the game UI)
public float gradient; //Gradient (in ‰)
public int Pnotch; // Current throttle value
public int Bnotch; // Current brake value
public int Reverser; // Current reverser value


CarState class

public bool DoorClose; //Door closed
public float BC_Press; //Brake cylinder pressure
public float Ampare; //Electric current
public string CarModel; //Vehicle type (car model)
public bool HasPantograph;
public bool HasDriverCab;
public bool HasConductorCab;
public bool HasMotor;


Station Class

public string Name; // Station name
public string StopPosName; // Stop position name (station, platform, up/down)
public TimeSpan ArvTime; // Arrival time
public TimeSpan DepTime; // Departure time
public DoorDir doorDir; // Door opening direction
public StopType stopType; // Stopping or passing
public float TotalLength; // Distance from the starting position


enum InputAction

NotchUp, //Power
NotchDw, //Brake
NotchN, //Neutral(Instant)
NotchToN, //Neutral(Slow)
NotchEB, //Emergency brake
NotchB1, //Minimum Brake
GradientStart, //Gradient start switch
Buzzer, //Contact buzzer
HornAir, //Horn (air whistle)
HornEle, //Horn (electric whistle)
ViewChange, //Viewpoint switching
PauseMenu, //Pause menu
ViewDiagram, //Diagram display ON / OFF
ViewUserInterface, //User Interface ON/OFF
ViewHome, //Viewpoint reset
EBReset, //Reset EB device timer and alarm
DriverViewR, //View from the right side
DriverViewL, //View from the left side
DriverViewC //View from the driver's seat
LightLow, //High beam / Low beam (Headlamp)
DoorOpn, //Door switch "Open"
DoorCls, //Door switch "Close"
ReOpenSW, //Reopening door switch
JoukouSokusin, //Broadcast before closing the door
DoorKey, //Inserting or taking out the door switch key
Housou, //Play in-train broadcasts
ConductorViewB, //View from the back


GameState class

public GameScreen gameScreen; //Current game screen
public CrewType crewType; //driver or conductor
public DriveMode driveMode; //Current game mode


enum GameScreen

MainGame,
MainGame_Pause,
MainGame_Loading,
Menu,
Result,
Title,
Other,
NotRunningGame,


enum CrewType

Driver,
Conductor,


enum DriveMode

Normal,
Free,
RTA,


enum DataRequest

None,
Signal,
Switch,