Unsolved Multishafts

Discussion in 'Mod Support' started by TC203, Apr 29, 2021.

  1. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    Does anyone know how multishafts work. I am trying to make a AWD car but I can't find any documentation of their syntax.
     
  2. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,056
    AWD cars don't use multishafts, you don't need to know anything about them. They are mostly just used for compatibility with very old mods.
     
  3. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    How could I make an AWD car with 9 wheels
     
  4. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,056
    With a lot of differentials and driveshafts, I know it's really confusing but it's the proper way of doing this
     
  5. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    How do I set them up?
    --- Post updated ---
    I thought a multishaft would be good because it has an infinite number of outputs.
     
  6. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,056
    It all depends on what kind of vehicle you want to make. If it's based on a real life thing then look up how it's set up for it in real life. If it's completely fictional then you might as well use a multishaft, but then you won't be able to have locking diffs which vehicles with many wheels often have.
     
  7. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    Can you just tell me how they work?!
     
  8. TrackpadUser

    TrackpadUser
    Expand Collapse

    Joined:
    Aug 24, 2019
    Messages:
    468
    The thing is most modders don't know how multishafts work because they've been deprecated for a loooooooooooong time.

    I'd suggest using the powertrain debug UI tool and checking out how vanilla car's drivetrains are made. BeamNG has a very flexible powertrain system that simulates a lot of aspects of real cars.

    And it's flexible enough to make things like this skidsteer 8x8, just by using a ton of differentials:
     
  9. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    multi shaft basically acts like a weird type of differential that can split the output among multiple shafts... so basically, the same math that governs how a normal differential operates is used to split the output speeds and torque across as many shafts as are connected to it.

    The easiest way of implementing them is to implement them, but in a permanently locked state or LSD. The only reason I say this is because it will just transfer all of its power to whichever axle has the least load on it... but you can obviously implement it any way you wish.

    Implementation is exactly the same as a normal differential. Same arguments apply as well. The trick is that when you connect things to it, you have to change the input index to be whatever number of thing you are attaching...

    So for instance, if you have 3 Differentials attached to this multishift (to provide power to 3 axles) you will have the first axle have and input index of 1, the next an input index of 2, and then the next have an input index of 3.
     
  10. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    do I need anything in {} afterwards?
     
  11. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    If your just trying to get it up and running for testing purposes... technically, no.

    But once you want to add features (like have it as an LSD, or LOCKED, or have it lockable, change the ratios, add some friction... whatever you plan to do) that is where you would put the parameters like that. And again, it uses the same parameters as a standard differential... well... to the best of my knowledge.
     
  12. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    It's not working :( My game now says it's corrupted.
     
  13. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Well, your game isn't going to get corrupted from just that. Post the bit of code you have for your powertrain so I can see what it is doing.
     
  14. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    It worked perfectly before (well, it worked anyway). These are the files I changed. In the engine jbeam, I changed the transmission powertrain and in the diffs I changed the driveshaft powertrain.
     

    Attached Files:

  15. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Huh... well from what you posted there, it looks like it should work just fine. The only thing that throws me off a little is that you have your front diff as input 5, but I don't think that should change anything.

    You can try removing the arguments from the multiShaft section... but seeing as you were asking about if it needed them or not, I am going to guess you already tried that.

    Did you try checking the logs and see if they gave you any idea what the failure was?
     
  16. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    There's no info on the wiki at all.
    --- Post updated ---
    removing the arguments doesn't help either
     
  17. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    I didn't say anything about the Wiki... I meant the game log files. Usually if you have a hard crash (especially when making mods and end up messing something up hard enough to crash the game... I have done so a lot) the game will usually create a log file which you can read and potentially find out what the game didn't like about what you were trying to do.
     
  18. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    Oh ok, where is it stored?
     
  19. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Well, if your in far enough to look at your mod, your pretty close. Just go up a few levels until your in your main BeamNG folder. Usually underneath the vehicles folder you should see 3 log files which are created every time you run the game. So if you ran the game again they were probably overwritten. So go run the game again and purposely crash it just like before, then go check out the log files (or upload them here) and we might be able to tell what is going wrong.
     
  20. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,056
    Sorry I'm not good at explaining stuff that has no documentation lol, if you know how a diff works you can figure out a multishaft too
     
  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