Dismiss Notice

In the upcoming weeks mod approvals could be slower than normal.
Thank you for your patience.

Experimental Locomotive Autopilot 0.2

Supports WLD FS30-2, DMM-512, and TEM2

  1. HighBeam9000
    screenshot_2023-12-12_21-40-47.png

    What is it?
    It's a combination auto-throttle and autobrake for the following locomotives:
    • WLD FS30-2
    • DMM-512
    • TEM2
    This autopilot is very much like cruise control, except that it also controls the brakes when active.

    Awesome! How do I use it?
    1. Download any of the following locomotives:
      1. WLD FS30-2
      2. DMM-512
      3. TEM2
    2. Download the Locomotive Autopilot (this mod).
    3. Spawn the locomotive on some tracks.
    4. Install the autopilot in one of the following slots in the parts selector:
      1. WLD FS30-2: Install in the "Antenna" slot on the "Cab" part
      2. DMM-512: Install in the "Back Handles" slot on the "Back" part
      3. TEM2: Install in the "Window Wipers" slot on the "Cab" part
    5. Assign a control/key to toggle the autopilot in Options-->Controls-->Vehicle Specific.
    6. In the Tuning menu, set the desired cruise speed. You should set this to the maximum speed that the locomotive can reliably negotiate the tightest corner on the selected track without derailing.
    7. Toggle the autopilot on. The locomotive will achieve then maintain its cruise speed +/- 1 mph on flat land, uphill, and downhill.
    Stuff to keep in mind:
    • When the autopilot is deactivated, it will immediately stop manipulating the controls. It will not bring the locomotive to a stop.
    • The autobrake is not a safety feature. It is solely for maintaining cruise speed downhill. If presented with an obstacle, the autopilot will plow through it. The autopilot will even throttle up in response to the additional drag provided by any struck obstacles that the locomotive is now pushing.
    • If you do decide to tinker with the PID control coefficients (an interesting learning experience), you can load the "Generic Graph (Simple)" UI app to show the error in the control system over time. It's handy when tuning the coefficients. The default coefficients were obtained when tuning with just the locomotive. It's entirely possible that slightly adjusted coefficients might work better when actually towing cargo. PID tuning guides can be found by searching for "PID tuning" in your favorite search engine. If not, then try a different search engine. The functions below are used to tune the PID controller be sure the locomotive vehicle lua is selected when entering the functions in the debug console window command line:
      • controller.getController("HighBeam9000_TrainAutopilot").getPIDs()
      • controller.getController("HighBeam9000_TrainAutopilot").setThrottleP()
      • controller.getController("HighBeam9000_TrainAutopilot").setThrottleI()
      • controller.getController("HighBeam9000_TrainAutopilot").setThrottleD()
      • controller.getController("HighBeam9000_TrainAutopilot").setBrakeP()
      • controller.getController("HighBeam9000_TrainAutopilot").setBrakeI()
      • controller.getController("HighBeam9000_TrainAutopilot").setBrakeD()

Recent Updates

  1. Supports more locomotives

Recent Reviews

  1. 4NT4R3S
    4NT4R3S
    5/5,
    Version: 0.2
    I forgot I reviewed this almost a year ago lmao. Still amazing. Idk if it's too much to ask but it would be kinda cool of you could have an option where it blow its horn at random intervals - or maybe if a car is in front?
    1. HighBeam9000
      Author's Response
      Making a locomotive honk at random intervals shouldn't be difficult. I think I can put that in the next update. Making the locomotive honk at a car on the track would be more difficult. Maybe I can get that done.
  2. Thrasherjoshua
    Thrasherjoshua
    5/5,
    Version: 0.1
    wow good mod but it would be nice if the trains could consist yk where thye all travel at same throttle better for pulling more cargo and again, good mod :)
    1. HighBeam9000
      Author's Response
      Thank you for the positive review! :)

      I was just thinking about locomotive throttle sync just the other day. That's next level automation. Maybe someday I'll get that done.
  3. 4NT4R3S
    4NT4R3S
    5/5,
    Version: 0.1
    Thank you so much, now I can have an AI train without it derailing at Mach 2
    1. HighBeam9000
      Author's Response
      This is *exactly* what it's for. I'm glad you like it. :)
  4. KlimekCS
    KlimekCS
    5/5,
    Version: 0.1
    AMAZING MOD! Can you do the same thing for TEM-2 and DMM512?
    1. HighBeam9000
      Author's Response
      I think I can. I'm not as familiar with those locomotives.

      Autopilots for TEM2 and DMM512 are now on my (very long) mod list. I'll need some time to get to those.
  5. Canadian96
    Canadian96
    5/5,
    Version: 0.1
    noooo i dont want ptc in beam :(((

    on another note, holy crap, ptc in beam, thats pretty rad
    1. HighBeam9000
      Author's Response
      The autopilot is designed to keep the train moving, but not too fast so that it derails. However, the train operator must set the cruise speed correctly. If the speed is set too high, the autopilot will try to go that fast and subsequently derail.

      Also, the autobrake serves no other safety function. If you put a vehicle in front of a locomotive on autopilot, the autopilot will try to drive the train through the obstructive vehicle and keep pushing it. In fact, a very fun experiment is to see how many cars the locomotive can pile up in front of its nose and keep moving. :)
  6. rodmunch99
    rodmunch99
    5/5,
    Version: 0.1
    Great Idea!
    1. HighBeam9000
      Author's Response
      Thank you! I discovered I needed this, and figured I’m probably not the only person that would find this handy.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice