Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
TCP Quick Start Guide
By programmer137 and 3 collaborators
A guide to explain TCP and how to set it up. This guide assumes a basic knowledge of how to make a train and the ability to edit microcontrollers and use composite nodes.
2
   
Award
Favorite
Favorited
Unfavorite
What Is TCP?
TCP stands for Train Communication Protocol. It is a system to control all functions of a train, from the engine to the lights to the couplers. It has a built in Multiple Unit system so all vehicles work together, and a built in brake system. This guide will cover the basics of installing TCP on locomotives and rolling stock, and will not cover anything to do with the physical regulations for rail vehicles, however pretty much all rail vehicles with TCP installed will use the SRC regulations, which you can find on the SRC Discord[discord.gg]
How TCP Works
Overview
TCP is split up into a modular system, with a main controller that communicates with other rail vehicles; modules that split off of the main controller to control things like brakes; interfaces that connect to the modules to interface with the actual rail vehicle; an optional UI that connects to the interfaces to interface with the train operator; and extenders, which connect to interfaces to control large scale systems, such as passenger doors and lights. There are also read only versions of most controllers, for rolling stock and vehicles without a cab.
Main Controller
The main controller communicates over the couplers to the other main controllers in the train consist. To control the train, the lead cab must be the "master" of the train, which is done by pressing the Request Master button in the controlling cab. You can press the Release Master button to release your master status, and the Lock Master toggle button/switch (if equipped) to prevent other vehicles in the train from claiming master status. There can only ever be one master in a train.
Modules
Modules communicate with the main controller to get and send data about their specific functions, such as the drivetrain.
Interfaces
Interfaces connect to modules to control the module's subsystem, and have subsystem specific logic, such as brake antislip or lighting logic.
UI
A UI controller is the interface between the train operator and the other TCP controllers. There are multiple included with the TCP 1.3 release for a screen based UI, but you can easily make your own, or even use instrument panels.
Extenders
Extenders control subsystems that require a large number of nodes, such as lights or passenger doors. You can, are encouraged to, and in some cases have to make your own extenders.
Descriptions Of TCP Controller Groups
What Is A Group?
A group is a module and its corresponding interface(s) that control a specific set of features for the rail vehicle, such as exterior lighting.
System Group
Description
The main microcontrollers for all vehicles.
Controllers
Drivetrain Group
Description
Allows the master cab to control propulsion and brakes of all connected vehicles.
Controllers
Decouple Group
Description
Allows the master cab to remotely decouple the any part of train at any point.
Controllers
Lighting Group
Description
Allows the master cab to control exterior lights along the entire train.
Controllers
Passenger Group
Description
Allows the master cab to control passenger functions such as doors, lighting, and HVAC.
Controllers
Installing TCP For Rolling Stock And Cabless Vehicles
Overview
Controller List
  • System Group
    • Slave Only Main Controller
  • Drivetrain Group
    • RO Drivetrain Module
    • RO Drivetrain Interface (Use this if your vehicle is not powered)
    • Drivetrain Interface (Use this if your vehicle is powered)
  • Decouple Group
    • RO Decouple Module
    • RO Decouple Interface
  • Lighting Group (Optional for freight cars)
    • RO Lighting Module
    • RO Lighting Interface
    • Lightbox Extender
  • Passenger Group (Use this if your vehicle is for passengers)
    • RO Passenger Module
    • RO Passenger Doors Interface
    • RO Passenger Lighting Interface
    • Passenger Door Opener
    All Rolling Stock And Cabless Vehicles
    Connect the Front Coupler nodes and the Rear Coupler nodes to the main electric connectors, and connect the Electric and Video nodes on the main electric connectors to each other. It's required to connect electricity between the front and rear secondary couplers (if equipped), and recommended to connect composite and video as well for compatibility with proprietary systems (see §SRC Standards). Connect the Main Both node from the Main Controller to all Modules, and connect the Module -> Interface node from all Modules to their respective Interface(s). Connect the Decouple Front and Decouple Rear nodes from the Decouple Interface to the front main coupler and rear main coupler. If you want a manual decouple button on the car, you can add an Or Gate in between the decouple node and the coupler, with the other input connected to your manual decouple button.
    Lit Vehicles Only
    On the RO Lighting Interface, connect Lightbox Extender & Instrument Panel to Interface on the Lightbox Extender. You can hook up any of the nodes to the corresponding light, however note that if you use RGB lights you need to set the colors in the RO Lighting Interface properties. You should also set the Reversing Mode in the RO Lighting Interface properties, "None" means that the lights will stay the same when the master is in reverse, "Invert Lights" means that the taillights and headlights will switch, and "Head And Tail Lights" means that both the headlights and taillights will be on on both sides (RGB lights will switch).
    Unpowered Vehicles Only
    Connect the Slip node from the RO Drivetrain Interface to one of your wheel assemblies Wheel Slip output and the Brake node from the RO Drivetrain Interface to all of your wheel assemblies Brake input. Optionally you can hook up the Disable Parking Brake node from the RO Drivetrain Interface to a toggle button or key on the car,
    Powered Vehicles Only
    Connect the Slip and Wheel RPS nodes from the Drivetrain Interface to one of your wheel assemblies Wheel Slip node and the RPS node on a Torque Meter connected to one of your wheel assemblies and connect the Brake node from the Drivetrain Interface to all of your wheel assemblies Brake input. Connect the Wheel Speed node from a Linear Speed Sensor facing forwards with it's mode set to directional in the properties menu. The settings are important, the system will not work with incorrect settings. If your vehicle is driven by electric motors, hook up the Throttle node to the motors. If your vehicle is driven by anything else, you will need to do a bit of logic to get it to work. The Throttle node outputs a number from -1 to 1 depending on the direction and calculated acceleration for the vehicle, so a direct drive engine setup might have it go through an Absolute Value logic block connected to the engine clutch, with a custom function to set the engine target RPS. If your vehicle is over or undershooting you can change the Acceleration Multiplier property. Make sure to change the Wheel Size property depending on your wheel size. If you have some sort of engine on your vehicle, you can hook up the Activate Engine node to allow for remote engine starting. Optionally, you can send a pulse on channels 3/4 into the UI node to set and reset the emergency brake respectively.
Installing TCP For Single Cab Vehicles
Overview
Controller List
  • System Group
    • Main Controller
    • Hub (With more than 3 modules, 2x Hubs are required)
    • Display Controller (Optional, if you don't use this you will need to make your own UI controller. This guide does not cover custom UIs)
  • Drivetrain Group (Note: This guide does not cover unpowered cabbed vehicles, however unpowered cabbed vehicles are supported by TCP)
    • Drivetrain Module
    • Drivetrain Interface
  • Decouple Group
    • Decouple Module
    • Decouple Interface
  • Lighting Group
    • Lighting Module
    • Lighting Interface
    • Lightbox Extender
  • Passenger Group (Recommended for all cabbed vehicles, required for cabbed passenger vehicles)
    • Passenger Module
    • Passenger Doors Interface (Passenger Vehicles Only)
    • Passenger Lighting Interface (Passenger Vehicles Only)
    • Passenger Door Opener (Passenger Vehicles Only)
All Single Cab Vehicles
System Setup
Connect the Front Coupler nodes to the and the Rear Coupler nodes to the main electric connectors, and connect the Electric and Video nodes on the main electric connectors to each other. It's required to connect electricity between the front and rear secondary couplers (if equipped), and recommended to connect composite and video as well for compatibility with proprietary systems (see §SRC Standards). Connect the Main Both node from the Main Controller to all Modules, the Main Front and Main Rear nodes to all modules with a Main Front and/or Main Rear input, and connect the Module -> Interface and Interface -> Module nodes from all Modules to their respective Interface(s) and vice versa. Connect one Hub's Main Input node to the Main Input node on the Main Controller, and if you have a second Hub connect it's Main Input node to the Slot 3 node on the Hub already connected to the Main. Connect all of the Hub Slot/Main Input nodes on all of the Modules to an empty slot on one of the Hub(s).
Decouple Setup
Connect the Decouple Front and Decouple Rear nodes from the Decouple Interface to the front main coupler and rear main coupler. If you want a manual decouple button on the car, you can add an Or Gate in between the decouple node and the coupler, with the other input connected to your manual decouple button.
Lighting Setup
On the Lighting Interface, connect Lightbox Extender & Instrument Panel to Interface on the Lightbox Extender. You can hook up any of the nodes to the corresponding light, however note that if you use RGB lights you need to set the colors in the Lighting Interface properties. Connect the Reverse node on the Lighting Interface so that when the rear of the locomotive is driving forwards, the node is active. You should also set the Reversing Mode in the Lighting Interface properties, "None" means that the lights will stay the same when the master is in reverse, "Invert Lights" means that the taillights and headlights will switch, and "Head And Tail Lights" means that both the headlights and taillights will be on on both sides (RGB lights will switch).
Drivetrain Setup
Connect the Slip and Wheel RPS nodes from the Drivetrain Interface to one of your wheel assemblies Wheel Slip node and the RPS node on a Torque Meter connected to one of your wheel assemblies and connect the Brake node from the Drivetrain Interface to all of your wheel assemblies Brake input. Connect the Speed node from a Linear Speed Sensor facing forwards with it's mode set to directional in the properties menu. The settings are important, the system will not work with incorrect settings. If your vehicle is driven by electric motors, hook up the Throttle node to the motors. If your vehicle is driven by anything else, you will need to do a bit of logic to get it to work. The Throttle node outputs a number from -1 to 1 depending on the direction and calculated acceleration for the vehicle, so a direct drive engine setup might have it go through an Absolute Value logic block connected to the engine clutch, with a custom function to set the engine target RPS. If your vehicle is over or undershooting you can change the Acceleration Multiplier property. Make sure to change the Wheel Size property depending on your wheel size. If you have some sort of engine on your vehicle, you can hook up the Activate Engine node to allow for remote engine starting. Optionally, you can send a pulse on channels 3/4 into the UI node to set and reset the emergency brake respectively.
Cab Setup
You need to have at least one Instrument Panel in your cab connected to the Cab input and Main Both output nodes on the Main Controller to control the master status of the train. Two push buttons on channels 1 and 2 are required to request and release master respectively, and a indicator on channel 1 to display if the vehicle is master. Optionally a flip switch (or toggle button) is recommended on channel 3 to lock master and/or an indicator on channel 2 to indicate that the train has a master. You also need controls for brakes and set speed (in meters per second) going into the UI node on the Drivetrain Interface.
Display Controller Setup
If you are using the preset Display Controller, simply hook up the respective UI node (Exterior Lighting UI, Decouple UI, etc) on the Display Controller to the UI node on the respective module. Then, hook up the Video Out node from each module to the matching video node on the Display Controller (Exterior Lighting Video, Decouple Video, etc). You can then connect the To Screen and Touch Input nodes on the Display Controller to a 2x2 monitor in the cab. Optionally, you can also connect the Dark Mode node to make the display have a darker theme. Make sure to go into the Display Controller properties and turn off all the Modules that aren't installed.
Installing TCP For Dual Cab Vehicles
Overview
Controller List
  • System Group
    • Main Controller
    • Hub (With more than 3 modules, 2x Hubs are required)
    • Display Controller (Optional, if you don't use this you will need to make your own UI controller. This guide does not cover custom UIs)
    • Dual Cab Controller
    • Dual Cab Switchbox
  • Drivetrain Group (Note: This guide does not cover unpowered cabbed vehicles, however unpowered cabbed vehicles are supported by TCP)
    • Drivetrain Module
    • Drivetrain Interface
  • Decouple Group
    • Decouple Module
    • Decouple Interface
  • Lighting Group
    • Lighting Module
    • Lighting Interface
    • Lightbox Extender
  • Passenger Group (Recommended for all cabbed vehicles, required for cabbed passenger vehicles)
    • Passenger Module
    • Passenger Doors Interface (Passenger Vehicles Only)
    • Passenger Lighting Interface (Passenger Vehicles Only)
    • Passenger Door Opener (Passenger Vehicles Only)
All Dual Cab Vehicles
System Setup
Connect the Front Coupler nodes to the and the Rear Coupler nodes to the main electric connectors, and connect the Electric and Video nodes on the main electric connectors to each other. It's required to connect electricity between the front and rear secondary couplers (if equipped), and recommended to connect composite and video as well for compatibility with proprietary systems (see §SRC Standards). Connect the Main Both node from the Main Controller to all Modules, the Main Front and Main Rear nodes to all modules with a Main Front and/or Main Rear input, and connect the Module -> Interface and Interface -> Module nodes from all Modules to their respective Interface(s) and vice versa. Connect one Hub's Main Input node to the Main Input node on the Main Controller, and if you have a second Hub connect it's Main Input node to the Slot 3 node on the Hub already connected to the Main. Connect all of the Hub Slot/Main Input nodes on all of the Modules to an empty slot on one of the Hub(s).
Dual Cab Setup
Connect the To Main And Switchbox node from the Dual Cab Controller to the Cab node on the Main Controller and Dual Cab Switchbox. Connect the Main Both node from the Main Controller to the Dual Cab Controller.
Decouple Setup
Connect the Decouple Front and Decouple Rear nodes from the Decouple Interface to the front main coupler and rear main coupler. If you want a manual decouple button on the car, you can add an Or Gate in between the decouple node and the coupler, with the other input connected to your manual decouple button.
Lighting Setup
On the Lighting Interface, connect Lightbox Extender & Instrument Panel to Interface on the Lightbox Extender. You can hook up any of the nodes to the corresponding light, however note that if you use RGB lights you need to set the colors in the Lighting Interface properties. Connect the Reverse node on the Lighting Interface so that when the rear of the locomotive is driving forwards, the node is active. You should also set the Reversing Mode in the Lighting Interface properties, "None" means that the lights will stay the same when the master is in reverse, "Invert Lights" means that the taillights and headlights will switch, and "Head And Tail Lights" means that both the headlights and taillights will be on on both sides (RGB lights will switch).
Drivetrain Setup
Connect the Slip and Wheel RPS nodes from the Drivetrain Interface to one of your wheel assemblies Wheel Slip node and the RPS node on a Torque Meter connected to one of your wheel assemblies and connect the Brake node from the Drivetrain Interface to all of your wheel assemblies Brake input. Connect the Speed node from a Linear Speed Sensor facing forwards with it's mode set to directional in the properties menu. The settings are important, the system will not work with incorrect settings. If your vehicle is driven by electric motors, hook up the Throttle node to the motors. If your vehicle is driven by anything else, you will need to do a bit of logic to get it to work. The Throttle node outputs a number from -1 to 1 depending on the direction and calculated acceleration for the vehicle, so a direct drive engine setup might have it go through an Absolute Value logic block connected to the engine clutch, with a custom function to set the engine target RPS. If your vehicle is over or undershooting you can change the Acceleration Multiplier property. Make sure to change the Wheel Size property depending on your wheel size. If you have some sort of engine on your vehicle, you can hook up the Activate Engine node to allow for remote engine starting. Optionally, you can send a pulse on channels 3/4 into the UI node to set and reset the emergency brake respectively.
Cab Setup
You need to have at least one Instrument Panel in your cab connected to the Cab input and Main Both output nodes on the relevant Cab output on the Dual Cab Controller and the Main Both output on the Main to control the master status of the train. Two push buttons on channels 1 and 2 are required to request and release master respectively, and a indicator on channel 1 to display if the vehicle is master. Optionally a flip switch (or toggle button) is recommended on channel 3 to lock master and/or an indicator on channel 2 to indicate that the train has a master. You also need controls for brakes and set speed (in meters per second) going into the respective Cab node on the Dual Cab Switchbox, with the output node going to the UI node on the Drivetrain Interface.
Display Controller Setup
If you are using the preset Display Controller, simply hook up the respective UI node (Exterior Lighting UI, Decouple UI, etc) on the Display Controller to the respective Cab node on the Dual Cab Switchbox, and then connect the output node to the UI node on the respective interface. Then, hook up the Video Out node from each module to the matching video node on the Display Controller (Exterior Lighting Video, Decouple Video, etc). You can then connect the To Screen and Touch Input nodes on the Display Controller to a 2x2 monitor in the cab. Optionally, you can also connect the Dark Mode node to make the display have a darker theme. Make sure to go into the Display Controller properties and turn off all the Modules that aren't installed.
Installing TCP For Passenger Vehicles
Overview
Install TCP from one of the other Installing TCP sections first (depending on the type of vehicle you're making), then read this section for installing the passenger specific part
Passenger Lighting
If your vehicle has RGB lights, connect the RGB Lights node to all RGB lights. Make sure all RGB lights are set to RGB mode and channels 1, 2, and 3 for red, green, and blue (this is the way they are when placed). For regular lights, the Lights boolean node is provided that will be on when the lights are on. If your vehicle has heaters, the Heaters node is provided so the master can turn on and off the HVAC from the cab.
Passenger Doors
Connect the From Door Opener node on the Passenger Door Opener to the Door Opener node on the Passenger Doors Interface. The Door Button node should be hooked up to the button on the door. The microcontroller will need to be edited with the actual door control logic, there is a tooltip on the right of the logic chunk that is on when the door is open. There is also a tooltip on the left top that is on when the door is unlocked, which can be used for an indicator light (for example). Don't forget to change which side the door is on (from the point of view of the front connector of the car) in the properties menu. You will need a Passenger Door Opener for every door that can open independently on the vehicle.
Credits
This guide was written by programmer137, with writing help from AdamFMX. Technical help and proofreading was provided by Olli_DXD, Hakuna Rakana, Smaen, and the SRC staff and tester teams.
10 Comments
Smaen  [author] 4 May @ 12:51pm 
If TCP still seems too confusing, and all you want is to set up a basic railcar, you can also use the TCP Combo Controller that I made. Needs to be paired with a Main Controller, but it's a full* TCP setup for an unpowered railcar with just two microcontrollers:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3428292009&
programmer137  [author] 2 May @ 3:46pm 
It'll probably come with the next update, which may not be this year. If you would like, you can check out our example vehicles, Terr-Rawr-Saur's video, and join our discord for more help
programmer137  [author] 2 May @ 3:45pm 
We're working on a PDF version with more visuals, but the whole team is quite busy atm because of finals
Something 2 May @ 2:09am 
I need i visual version of this guide because i am literally too fucking stupid to understand it from text alone
Smaen  [author] 11 Mar @ 12:17pm 
For those that need an example vehicle, you can check out this setup uploaded by Sharp:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3430125800
zeckmon3 9 Feb @ 12:14am 
This is some massive essay. Amazing work but its like reading a scientific/engineering paper like wow:lunar2019coolpig:
Cam 18 Jan @ 2:59pm 
yeah an example would be nice as it's way too complicated for a beginner to be able to integrate just by reading text walls
crae cochran 13 Jan @ 1:35pm 
same here as well or at least make an example upload
Bermy (Urmipie-ka) 13 Jan @ 1:05pm 
Tbh i think this kinda overengineered solution, but there isnt really any other choices that might get popular enough

Anyway, this text right now too hard to understand, please, add some pictures, or many of players just wont read that
Also some bare-bones example with everything connected will be better than wall of text, pls, add this too
programmer137  [author] 11 Jan @ 12:36pm 
Look ma I'm on TV!