Loco Setup A (very) Brief Overview Of Simugraph

Discussion in 'PC Editor Discussion' started by pwilson79, Apr 1, 2026.

  1. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    416
    Likes Received:
    564
    So since I'm starting to get a little comfortable working with my subway car's Simugraph, I thought I'd share a bit of what I've learned.

    Preface: This will all be based on my 3-rd rail powered rail vehicle. Not every aspect of what I demonstrate is going to apply to your situation. I wouldn't know where to begin with steam, for instance. Also, I've only just started on my braking system, so I won't discuss any specifics there.

    Credit where credit is due; Simugraph seems to be a pretty comprehensive system for simulating the specific components of the electrical, mechanical and pneumatic systems on a rail vehicle, and the connections between them.

    You will have to have a pretty good idea what the system you are trying to simulate looks like. For help with that, I can recommend a website I recently came across:
    http://www.railway-technical.com/trains/rolling-stock-index-l/train-equipment/


    And for examples of some of the nodes and setups you may need in the Simugraph, we do have a few examples to refer to:

    https://forums.dovetailgames.com/threads/example-simugraph-setup-for-ac-traction.79898/

    https://train-sim-world.fandom.com/wiki/Simugraph

    In short, by communicating with our Simugraph from our RVM we can do many useful things, like flipping switches! We can also get feedback on how individual components are behaving. I'll try to show you how.

    Powering motors:


    First, let's Go into the SA (Simulation Asset) and have a motor connected to an axle, with a switch in the circuit:
    ScreenHunter_337 Mar. 31 19.42.jpg
    Please note that this is a simplified version, as You'll want to have a more appropriate number of axles set up, and maybe a bogie or two :)

    You will probably want to have a VHID component in your Driver Environment for the player to manipulate, and to provide events that we can use to make a change to a Simugraph Node's Parameter. (That's what we're doing when we communicate with the Simugraph, if you want to be technical about it.)

    I suggest something like a PushButtonComponent, at least to begin with. Here is the vhid (in the RVV) that I'm using:
    ScreenHunter_336 Mar. 31 19.34.jpg
    Note that the Interaction Model Component should be set to the PushButtonComponent in the RVM, for this example.

    This provides the event I use: (I can't include another image because of forum rules, but it's "On output value changed," found at the bottom of the details panel for the PushButtonComponent in the RVM)

    We'll be using it to connect and disconnect our motor to a current source (like from a power shoe or pantograph component in our RVM, or otherwise Simugraph has a handy node for a permanent current source we can use for demonstration purposes.)



    now for the "special sauce!" This is how we access and set a Simugraph node's parameter from the RVM: I present the "Set Simulation Node Parameter As Int by Ref" and "Make SimulationComponentParameterReference" Nodes:

    ScreenHunter_335 Mar. 31 19.21.jpg

    (In the SA this is taken from, I renamed my "1P2TSwitch" node in the Simulation Asset to "LineBreaker.") When you get this simple setup working, you should see your Rail Vehicle move!

    You may find yourself becoming emotional about your success. When I first saw my subway car leap (backwards) under its' own power, this is how I reacted:
    200.gif

    (Ahem.) Now then, getting the value of a parameter out of the Simugraph is also easy! Here you can see a part of my RVV where I read the speed-at-rail of an axle, in Miles Per Hour:
    ScreenHunter_334 Mar. 31 19.14.jpg

    Well, that should hopefully be enough to get you started in Simugraph! Best of luck!
     
    Last edited: Apr 1, 2026
    • Like Like x 4
    • Helpful Helpful x 3
  2. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    416
    Likes Received:
    564
    Daunfr59 left this helpful comment on my other thread, which I don't think they'd mind me using as an addendum:

     
  3. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    • Helpful Helpful x 1
  4. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    Hello

    Before I can test my locomotive I need to climb on the locomotive. That is the first problem I have. :(
    I have added a cameratransitioncomponent (ladder_left). In the RVV event graph I added the code. In this setup the "string" is not printed on the screen. So I think the code is not activated.
    The only thing that kinda works is I get [E] on my mouse cursor when I am in the hitbox.
    The goal is that I can teleport 1 meter higher or climb on the ladder so I can walk on de locomotive floor to get to the door.

    Can anybody help?

    [​IMG]
    [​IMG]
    [​IMG]
     
  5. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    Hello
    With my loco I didn't do any coding in the RVV and the Climb Up camera transition seems to work OK.
    Currently my Editor is crashing at 75% loaded.
    If I can get it working again I will check the RVV and print the details of the Climb Up component "set up" for you but can't access at the moment.
     
  6. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    Having updated the Editor I have managed to access the RVV and the image shows the setup that I used.
    The collision is set to VHID and I can climb into the cab without any coding to detect the Player overlap.

    ClimbAboard_SetUp.png

    Are you testing in a scenario in Play In Editor mode ? I usually do that as in game functions seem to work better when running a scenario.

    Hope this helps. I will be away from the forum over the rest of the Easter weekend due to family commitments.
     
  7. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    Thank you that will be nice. I am going to test without code. Maybe the code is blocking the movement for the player.
    After the climb issue the next challenge will be opening the door and going to seat in the driver seat. In a other topic I have seen some info for the door animation so I try that.

    ***EDIT***
    The climbing works now Thank you. Up to the next challenge. :)
    And I test using a timetable.
     
    Last edited: Apr 3, 2026
  8. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    Hello

    After a lot of testing I become a step further. I can now step on to the loco, open the door and get into the driverseat. And when I get into the driverseat the loco starts direct with moving faster and faster. The switch does nothing.

    Also important is that you have to set the currentsource because the start value is 0. I have put it now on 1500.

    I dit also some test to get a lever to work but no succes.

    The door animation is also strange because in the anim montage the animation is wrong and in playmode it is good.

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
  9. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    In your RVM you have the switch set up as Push Button which is linked to the Input Identifier "Engine Stop Start."
    You also have a Throttle _irregular lever and a Throttle simple lever but I can't see what Inputs these are linked to (or what the difference is between the two.)

    In the RVV you have a Throttle VHID which is linked to the push button so presumably when you interact with the VHID it works the switch.(i.e changes the input from 0 to 1.)

    The Simugraph then sets the switch state to 0 (every time) as you don't have a connection between the Value change node and the Set Parameter node

    I think you need to connect the green New Value "pin" on the Output value Change node to the green Value "pin" on the Set Parameter node . (Note the lighter green "pin" is a float value and the darker green "pin" is an Integer so you may need to replace the "Set Parameter" as Integer node to a "Set Parameter as Float" node if Simugraph won't let you connect the two pins together)

    Then, when you interact with the VHID on the desk Simugraph will set the parameter to the New Value of the input (either 0 or 1) and your switch and motors should respond to the change.

    Hope this helps.
     
  10. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    Sorry I may have got a bit confused with my explanation.
    The nodes are in your RVM Event Graph so they should connect up OK as shown in this example.
    use a truncate node to convert float to integer if necessary.
    RVM_Simu.png

    Hopefully this will help you
     
  11. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    Hello
    Thank you for your help.

    The levers are from testing with different setups. :)

    I did a test and I see a little change. When I activate the switch my player camera angles a bit. Like when you sit in a car and the driver hits the gas and you move backwards in your seat. It is just a little bit off movement.
    I added also a "print" command and I see a 1 and a 0 printed on the screen so the pushbutton is working.

    The strange thing is still that the loco starts moving even when I do not push the button. So I did a second test with a double switch but the loco still moves even when I do not push the button.
    I checked the rails and there is no gradient.

    In the screens below I have changed the name from the push-button to Throttle.

    My expectation is that when I sit in the driverseat that the loco is standing still until I press the button.

    [​IMG]
    [​IMG]
     
  12. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    Thanks for your reply.
    I can't see anything wrong with your RVM coding or the Simugraph, although having made steam locos I'm not very familiar with switching traction motors.

    All I can suggest is that you try using the Simulation Debugger in Simugraph to look at what's going in in the Simulation while the game is running and see if you can find the error that way

    To do this you need to set up your test timetable /scenario and set it as the Play In Editor Scenario.

    Then open your Simugraph SAxxxx and go to the Window menu at the top of the page and choose Parameter (window).

    With a node (e.g Switch) selected you will see a list of parameters available for that node and you should tick the Watch box for any values you wish to monitor.(e.g switch state, input voltage or whatever.)
    Then select the other nodes (Traction motors, Axles etc.) and do the same to watch values such as the torque output of the motors or the axle rotation/ speed.
    When you've marked all the parameters you want to monitor close the Parameter window.

    Then go to the Window menu again , choose TSW tools then Simulation Debugger.
    The debugger window will open and at the top there is a "Play Button". When you press this your scenario will load and run.
    Climb into the cab, set your control or whatever you need to do and then use right mouse button to release the mouse.
    Then open the (minimised) debugger window from the task bar at the bottom of the screen .

    You will now see your Simugraph "in action" with the values you chose to watch displayed in real time above each node.
    Hopefully this will show you what is happening when the Simulation is running and where it is going wrong.

    On a separate subject I think your problem with the loco moving when you sit in the driver's seat is due to the setup of the Driver's Environment / Seat VHID and Seat Manager.
    pwilson79 posted a thread about setting up vehicle seating which might help you with this.

    Regards and good luck with your project.
     
  13. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    Hello
    Thank you that is a very helpfull function.
    I have seen now that the switch is flipt. So in the simugraph it looked like the switch was open but in game it was closed. So in the simugraph I flipt the switch and now when I going to the driverseat the loco is standing still until I activated the switch.

    I also was confused about the cursor tooltip. So "throttle ON" means the switch is now OFF but if you press it is going in the ON state.

    Do you maybe also know why in the anim montage the animation is wrong and in game it is good?
    Do you maybe also know why around the wheels it is blurry when I drive?

    Sorry I have al lot of questions. :)
    Next challenge is making the engine more realistic with real throttle control and brakes.

    [​IMG]
     
  14. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    416
    Likes Received:
    564
    Hi olaf99NL , hi Daunfr59 ! Sorry I haven't been helping out on this thread more. The animation looking wrong may possibly be because the individual animations have to be set to "additive," I'm at work or I'd elaborate on that. The wheel blur I think is produced by the game engine itself, and no way to turn it off, that I'm aware of.
     
  15. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    As regards animations (of the throttle button I assume you mean) I set up a cab animation blueprint and used direct bone manipulation for this simple movement. All my cab controls move in this way without needing animation sequences or montages.

    The tooltip is controlled in the RVM in the details panel of the Push Button component. You can add named values such as when output is 1 show switch on and when output is zero show switch off. With more complex controls you can show a percentage or "Brakes Applied" and things like that.

    Real life calls me away now but I will try to provide more details tomorrow if you need them.
     
  16. ffabio89

    ffabio89 Well-Known Member

    Joined:
    Aug 15, 2020
    Messages:
    325
    Likes Received:
    302
    Forgive me if this isn't related to this topic but, What's that "bone animation" You're talking about?
    I'm interested to it for my animation, you have found some tutorials?
     
  17. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    Hello

    Thank you all.
    Daunfr59 I was pointing to my door animation. But if you can share a tutorial for a 0% to 100% lever and a lever with steps that will be helpfull. All information what I can get is helpfull.

    I did some more testing and I can move now in 2 directions and that is nice.

    I have now problems with my brakes. Here you see my setup for my brakes. For some reason if I apply the brake there is no force on the brakepad. Another strange thing is when I change the throttle I see a lot off different values on the brakepad. And I see no change in the brakecylinder.

    Also I tested with a current collector (I have seen it used in some examples) but no succes. I get no output. So I use no a voltage source.
    [​IMG]
     
  18. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    I'm no expert on Unreal Animations but this method worked for me with simple control levers for the cab.
    All of my controls were rotating levers which I will describe here but the same method can be used for slide control.

    In your Cab Skeleton check which bone axis the "lever" rotates around (or moves along) and check the maximum rotation in degrees that you want the lever to move (from Off to Full.) The Interaction controls in your RVM give an output between 0 and 1 so we will use the maximum rotation as a multiplier to convert the output to rotation. then if you increase the output to 20% (0.2) the lever will move 20% of its full travel.

    In your Cab animation blueprint create a float variable called LeverXRotation (RegRotation in my example) or whatever is suitable.
    I also created a similar but different (Regulator Rotation) Variable in the RVV to hold the "multiplied" value.

    In your RVV add an "ON Output Change" event to your Event graph.
    From this cast to your animation Blueprint and then drag from the "As ABPxxxxx" pin to Set your variable (LeverXRotation).
    Drag from the "green" New Value pin - multiply by your maximum rotation (in my case -50 degrees) and Set your RVV variable.
    Connect that value to the green Pin in the Set Variable node for your blueprint.

    RVV_Animation..png

    Now every time you interact with the control you are sending the new position (rotation) of the lever to your Animation Blueprint.

    In the animation Blueprint (for your cab) add a Transform (Modify) Bone node.
    In the details panel set the Name of the bone you want to move (Regulator in my case).
    In my case I set the details for Translation and Scale to ignore and for Rotation to Replace.(So the new lever rotation replaces the old one.)

    Now GET your variable "LeverXRotation" and plug it into the appropriate axis for Rotation.

    ABP_transform Bone.png

    Connect the node to the Output Pose and it should work smoothly.
    If you have 10 or 15 control levers in your cab you simply join all the Transform Bone nodes together in a chain one after the other and then connect the last one to the out put node .(You can see the blue line coming from another node in the photo.

    I'm sorry if this is a bit rushed but hopefully it will help you set up something similar.
    I found this method to be much easier than trying to create animation sequences for each control lever in the cab of my steam locomotive.

    Also in all the DTG (steam) locos I looked at there are no animation sequences for simple levers so I guess they use a similar method.

    Hope this helps and good luck.
     
    • Helpful Helpful x 1
  19. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    I have been thinking about a step by step tutorial on how to set up a custom vehicle for some time but you will appreciate it is very time consuming and family and health issues limit the time I can spend on the computer.

    On the brake cylinder issue I think this is due to the fact that the torque from the Drive Motors and the (braking force from the brakes ) are connected to the same pin in the axle nodes so they are opposing each other. I had similar problems with the two steam cylinders on my locomotive

    There is no way to connect them to different pins but it might help if you put in a reroute node, connect all your drive motor torque to that and then connect to the Axles. Do the same with the brakes.

    This is a poor example form my own Simugraph to give you the idea but looking at it again even I can't understand all the connections !!

    Simugraph_1.png


    I hope this helps you but this is an example of the whole TSW "one step forward, two steps back" which we all struggle with and as pwilson said all we can do is keep trying different ideas until we find the answer and then go onto the next problem.

    Good luck with your project.

    I may not be on the forum for the next few days.
     
  20. olaf99NL

    olaf99NL Active Member

    Joined:
    Jul 13, 2025
    Messages:
    48
    Likes Received:
    119
    Hello
    Thank you. Take your time.
    In the meanwhile I building my route so I work also on that.
     
  21. ffabio89

    ffabio89 Well-Known Member

    Joined:
    Aug 15, 2020
    Messages:
    325
    Likes Received:
    302
    How's you get the interaction? I'm currently use the "cast to player" options like in the UE tutorial built for a normal 3 person character but it didn't work, am I missing something?
     
  22. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    240
    Likes Received:
    564
    You cast from your RVV to the Animation Blueprint for the Cab (or to the exterior in some cases.)
    To do this you need a reference to the Animation Blueprint or casting is difficult.

    You should already have a Skeletal Mesh component for the Cab and for the Exterior in your RVV.

    Set an "Event Begin Play" in the RVV and drag in the "SK_Cab" from the components on the left hand side.
    Connect it to a Get Anim Instance node (which will find the ABP for the cab) and use the result to set a variable.
    I called mine Cab Animation.
    Do the same for the Exterior Animation Blueprint as shown here.

    Reference to ABP.png


    With these variables stored at the start of play you can "get" them (drag them in) and connect to the Cast node Object pin whenever you need to Cast to the Animation.

    Here is a section of my earlier illustration showing the Cab Animation variable targeting the cast to the correct animation Blueprint.

    Animation cast.png

    I hope this helps you.

    I find setting up Unreal Animations quite difficult and Casting causes problems for lots of people.
    However this method worked for me (In Editor and In Game) as you will know if you have seen any of the You Tube videos of my GWR Pannier tank engine.
     
    • Like Like x 1
    • Helpful Helpful x 1

Share This Page