Waggon Und Maschinenbau Railbus

Discussion in 'Content Developer's Area' started by dolanbaker, Aug 17, 2023.

  1. dolanbaker

    dolanbaker Active Member

    Joined:
    Dec 29, 2022
    Messages:
    193
    Likes Received:
    200
    I have recently started work on the Waggon und Maschinenbau railbus.
    Still very rough at the moment, but as I couldn't find one for the East Anglian route I'm working on, I decided to make one. 20230817235722_1.jpg
     
    • Like Like x 3
  2. dolanbaker

    dolanbaker Active Member

    Joined:
    Dec 29, 2022
    Messages:
    193
    Likes Received:
    200
    I am working on the engine blueprint and trying to work out how to get the RPM to match the gear ratio instead of the throttle setting. I see that it is configured that way on the class 105 but I cannot see how it was done.
    Any pointers would be much appreciated.
     
  3. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    59
    Decompile class 105 simulation blueprint (the one where all simulations are - diesel unit, gearbox, etc) via serz.exe and then just open decompiled .xml in any text editor, for example Notepad++. You´ll see then how it is done, although I think the scripting will be involved a little.
     
  4. dolanbaker

    dolanbaker Active Member

    Joined:
    Dec 29, 2022
    Messages:
    193
    Likes Received:
    200
    I have already cribbed the engine simulations blueprint and have successfully created the basic model with gears, but the part That I am missing is the lua script that does the speed,gear &RPM translations. The default operation seems to use throttle positioning to calculate RPM, it should be a combination of speed, gear ratio and throttle. This is where I am currently stuck.
     
  5. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    59
    Of course, that´s what I was talking about - scripting is involved... If original class 105 does have a script in .out format, you´re out of the game unless you write it on your own.
     
  6. dolanbaker

    dolanbaker Active Member

    Joined:
    Dec 29, 2022
    Messages:
    193
    Likes Received:
    200
    Yes the original script is compiled as .out, and I have not found a way to reverse engineer it, so it looks like I'll have to try and write my own.
    Well at least try....
     
  7. BackdatedTrainsim

    BackdatedTrainsim Member

    Joined:
    Jan 16, 2018
    Messages:
    20
    Likes Received:
    47
    Got to check my files first as I can't remember whether the gearing setup is in the script or the sim blueprint, but I put a class 101/111 style gear system into my model of Ffestiniog diesel Vale of Ffestiniog.

    If you are really really stuck you can try messaging me here or on my site and I might be able to offer some advice.
     
    • Helpful Helpful x 1
  8. dolanbaker

    dolanbaker Active Member

    Joined:
    Dec 29, 2022
    Messages:
    193
    Likes Received:
    200
    Great, thanks I'll take a look over the next few days.
     
  9. wellington

    wellington Guest

    Hello dolanbaker!

    See if this is the part you need, I took it from BR Class 105.

    In function Initialise()
    PHP:
      gTime = 0
      gEngTime 
    = 0
      gEngVel 
    = 0
    PHP:
      ACCELRATE = 0.25
      MAXTE 
    = 0.5
    In function Update(inteval)
    PHP:
      gTime = Call("*:GetSimulationTime", 0)

      
    RPM = Call("GetControlValue", "RPM", 0)
      
    gEngAdd = RPM / 1500

      
    if gEngAdd < 0 then
        gEngAdd 
    = 0
      end

      
    if gTime > gEngTime then
        Call
    ("AddTime", "engine", gEngAdd)
        
    gEngVel = gEngVel + gEngAdd

        
    if gEngVel > 1 then
          Call
    ("AddTime", "engine", -1)
          
    gEngVel = 0
        end
        gEngTime 
    = gTime + 0.02
      end
    PHP:
        TractiveEffort = Call("GetTractiveEffort")
        
    TractiveEffort = math.abs(TractiveEffort)

        
    Accel = Call("GetAcceleration")
        
    Speed = Call("GetSpeed")

        if 
    Speed < 0 then
          Accel 
    = Accel * -1
        end

        
    if Accel > ACCELRATE then
          TractiveEffort 
    = MAXTE
        
    else
          if 
    math.abs(Speed) > 1 then
            
    if Accel > -0.1 then
              TractiveEffort 
    = MAXTE / 2
            end
          
    else
            
    TractiveEffort = MAXTE / 11
          end
        end
    Beyond that, I don't see anything else associated that you need.
     
    • Helpful Helpful x 1
  10. dolanbaker

    dolanbaker Active Member

    Joined:
    Dec 29, 2022
    Messages:
    193
    Likes Received:
    200
    Thanks, I will give this a try.
     

Share This Page