Question About Brake Logic

Discussion in 'Technical Reports' started by kiski, Jul 8, 2022.

  1. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    86
    Likes Received:
    56
    Hi all,

    I would have a question about hardcoded brake logic in TSC. My english is not so good as it´s not my native language, but I will try my best to explain what I mean.

    In reality, there´s only one brake pipe passing through the whole train, starting on locomotive itself and going through all wagons. If there´s any inactive loco in consist, it acts like a normal wagon and reacts to brake pipe changes properly. That´s ok.

    But let´s say I have two or more locos in TSC in one consist. I jump into first one, make it start completely, and brake up train brake to some values, so the train brakes won´t be released. E.g. BrakePipePressure, LocoBrakeCylinderPressure and TrainBrakeCylinderPressure will have some values. Then, if you jump into the next loco and make the very same thing, that loco will have different values in those controllers. Jump back to the first one, and it will have their own values you set before. Means every loco in consist in time when it become marked as IsEngineWithKey, act totally independently

    And that´s the problem. It should behave the way it behaves in reality - adapted to the situation I described above - if you brake train brake in the first loco, value of BrakePipePressure should pass to the next loco, which should react on it with cylinder values on its own according to setings in its own simulation blueprint. Not to behave independently.

    Conclusion - loco marked as IsEngineWithKey should act like the master to all other locos in consist that are marked just as IsPlayer. And if you jump to another one, which become IsEngineWithKey in that moment, it should continue from values set by previous IsEngineWithKey loco.

    This post is intended mostly for loco developers and game developers, not for normal players. Is it even possible to make something with it, devs??
     
  2. torfmeister

    torfmeister Guest

    That is basically because of TS' core's age, it uses a simplified multiple unit model.

    The cab you jump to will be the master unless you are moving to it while the consist is moving - that will "lock" the Lead loco.

    Every loco has a defined default train brake control position - while you would normally put the handle in the slaves to "HandleOff" position, TS just lets them act as normal wagons (using their brake specs in the Simulation.bin though) and ignores their controls state - except for the controls that get passed on by the master that have the "ApplyToConsist" flag set in their engine blueprints - This is used for example on some DMU/EMUs - applying the handbrakes on the master will apply them to the whole consist.

    So the handle won't move in the slave loco only because the master moves it (which is correct btw) - and jumping in its cab will use this loco's setting as master - so don't do it while stationary. If you want to setup MU locos, set up the slaves first and finally the Lead (if they support it, I think Reppo's GP20 for example does - while not simulating the MU valves to be set for Trail/Lead/CutOut.

    It is possible though via good scripting, but I haven't seen it working as realistically as in Run8 or TSW (took some patches to be working there...), I remember the great ProfessorOleander's first TSW test YT videos when he tried to set up a MU consist and was dissappointed coming from Run8 to the "Future of Train Simulation")

    You often see small bugs when having multiple locos like the Main Reservoir gauge displaying wrong pressure (needle at 200), sometimes it seems they add up - which is not noticeable when driving, it would only be if it was empty.

    So it's a limitation of TS (which can be overcome by well made engine blueprints and scripts), but it works - it's just automated. Engines will start automatically on connected locos and brakes will be controlled by the driver's loco (= the active cab). Advanced UK locos use master keys (if available) so you're not activating a cab by just changing to it.

    There is not really many things hard coded in TS - all controls and their output can be manipulated - sending the values to the core engine then which in combination with the blueprints and defined specs and the PhysX engine is moving the train.

    One of the finest things I didn't think would be possible is TSG's brilliant BR 425. You can even seamlessly adjust your seat height in the cab using a key combo! The best available german EMU for TS.
     
    Last edited by a moderator: Jul 9, 2022

Share This Page