Kawaski PA4 Automation - EternalBlueFlame/Traincraft-5 GitHub Wiki
As an attempt to bring full automation to Traincraft before the rewrite, the Kawaski PA4 has been made automated with W-MTC, with added functions.
I was originally going to add the Peach Driverless Metro but that will take too much time and is kind of complicated, so I've decided that these trains can be driven with W-MTC and be able to turn around and go the other way.
Soon, automated trains will be able to have a timetable stored on the trains, and other nifty features that makes it more cool. Not now, we must wait for the rewrite..
Requirements
ComputerCraft. You can get the latest 1.7.10 version here.
Basic Lua Skills: You can learn how to do it here.
A way to parse JSON in ComputerCraft: For transmitting from the train to the computer, it uses JSON. There isn't any native support for it, however with APIs it is possible. Here is a good parser: JSON API v2.0.1 for ComputerCraft
You knowing actually how to use W-MTC: There is a whole page for that here.
Switchover
Switchover simply switches to the other Kawaski PA4 on the end of the consist, makes that one attempt a connection, then disables the one that initiated the switchover.
Make sure your consists look like this to prevent problems.
Send:
{funct = "switchover"}
json
To the locomotive that you want to do a switchover. Make sure to encode it in to JSON.
Need further help?
If you are confused, try asking in the Traincraft Discord server. Someone or most likely me will be happy to answer. Happy coding 😄