1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

Individual mapping auto gearbox

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Fradias, Jul 19, 2015.

  1. Fradias

    Fradias
    Expand Collapse

    Joined:
    Jul 22, 2013
    Messages:
    29
    Dear BeamNG Drive team and comunity members,

    I appologise if I'm posting this in the wrong section and if so, feel free to move this thread or warn me so I can re-post it in the correct place.

    I have a built simulator inside a 1999 Opel Vectra which used a G27 wheel which broke. I am now going full DIY and making my own steering, my own pedals and gearbox. I would like to be able to interchange between an H shifter and a PRND gear selector, but BeamNG does not allow individual auto gearbox mappings. Is there any way to mess with some things to allow it to be done? If not, will it be possible in the future?

    I would like to know this before I started the auto gear selector, since beamng would probably be the only game where I could use it and it's not something done in an hour :)

    Thanks,
    Fradias
     
  2. vladmir poopin

    vladmir poopin
    Expand Collapse
    Banned

    Joined:
    Mar 17, 2013
    Messages:
    844
    wait... so you have a car in your house?
     
  3. AMG V12

    AMG V12
    Expand Collapse

    Joined:
    Aug 16, 2013
    Messages:
    209
    This may be more of an intermediary step but, if you are building the mechanism yourself, could you not use the movement of the auto stick as the input rather than where it ends up - ie moving it to towards you is one input say x and moving it away is z? Would that work? It could still lock in place at each step but that wouldn't be the input.

    I could possibly clarify if necessary :p
     
  4. Fradias

    Fradias
    Expand Collapse

    Joined:
    Jul 22, 2013
    Messages:
    29
    Yes, I have an opel vectra B with the front and rear end trimmed off inside my house :)

    So you're suggesting I set an axis so it sends coordinates as to where the position of the lever is for each place? As in, the P is coordinate 8 in the x axis and the R coordinate 6 and so on? That's quite feasible and easily possible, I could even use the joystick off of a regular gamepad for that and then just simply program it so that each position matches an input. But that's pretty slow responding and not as accurate as I'd like, so I'll just use contacts :)
     
  5. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    What are you using to read your custom gearstick into the PC anyway?

    I ask for 2 reasons, a) depending on method I may have a solution and b) I find it damn interesting anyway
     
  6. vladmir poopin

    vladmir poopin
    Expand Collapse
    Banned

    Joined:
    Mar 17, 2013
    Messages:
    844
     
  7. Fradias

    Fradias
    Expand Collapse

    Joined:
    Jul 22, 2013
    Messages:
    29
    The contacts will be connected to a normal game pad so that each position is recognized as a button :)
     
  8. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    My idea likely would not work then. Was going to suggest having 2 sets of buttons, positive connections all wired in parallel but an spdt switch on the ground. Flicking the switch would effectively engage or disengage 1 set of buttons, pretty much turns them into a mode switch.

    If an arduino or something was being used to emulate a gamepad (doable) then I would have just suggested having a mode button in software.
     
  9. Fradias

    Fradias
    Expand Collapse

    Joined:
    Jul 22, 2013
    Messages:
    29
    Sorry for the late reply, but I'm not really following up your idea, could you please explain it better? :) And yes I do know what an Arduino is and I've seen multiple projects done with them before :)
     
  10. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    1,876
    Nice project there :) Got any photos of it?

    If I understand you correctly, you have separate physical levers for Automatic shifting, and for H-Shifter. If that is correct, then you can do several things:

    The Easy Way:
    Wire the lever positions as buttons (use electric switches instead of potentiometers). Do that for both for the auto lever, and the h-lever. Note that you do NOT need to wire any button to the Neutral position (all H-shifter devices for PC that I know, don't have a dedicated button for that, but it won't hurt if you do. Your choice).
    BeamNG.Drive uses the H-shifter positions for auto gearboxes too. This means you should wire these interruptors, so that both levers act on the same set of logic buttons. E.g. H-shiting into 2nd gear, and auto-shifting into '2' gear, will both turn ON the same logic button.

    The Medium Way:
    Do the same as the above, but instead of crossing the auto and hshifter wires to end in the same logic button, keep them separate, completely independet buttons.
    Then add new LUA actions specific for auto gearbox (so that they show in the Bindings menu), and the necessary changes in LUA backend code in drivetrain.lua to decouple both sets of buttons.

    The Hard Way:
    You can use one joystick for each of the two levers. But then you will need to modify the LUA code yourself, that will allow to find out the joystick position (merging the information from horizontal+vertical axis of each joystick), then map that to the gear number itself.

    As a side note: thanks to the recent mouse input improvements in 0.4.1 versions, if you went The Hard Way, then that very same LUA code you write, would allow to use the mouse as a shifter, as-is, for anyone that installed your modified files :)
     
  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