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.32 Bug Reporting thread
    Solutions and more information may already be available.

Custom Control Mapping

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Saetheer, Aug 5, 2013.

  1. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
    Custom G25 Control Mapping

    Hi.

    Love the game. But how can I custom map my controls? I wish to fully use my G25 in this game.
     
    #1 Saetheer, Aug 5, 2013
    Last edited: Aug 6, 2013
  2. AbesMapper

    AbesMapper
    Expand Collapse

    Joined:
    Jul 1, 2013
    Messages:
    64
    Read this: http://wiki.beamng.com/Playing
    To edit mappings go to: \scripts\client\inputmap and find file with G25 inputmap. Then edit it how you want. You can also see functions to call in beamng.cs and keyboard.inputmap
     
  3. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
    For movement I use this

    Code:
    moveMap.bind(%device, xaxis, joy_steer);
    moveMap.bind(%device, yaxis, "RI", brake);
    moveMap.bind(%device, yaxis, "I", accelerate);
    moveMap.bind(%device, slider, clutch);
    
    Only accelerate works and steering works.
    Got any suggestions?
     
  4. AbesMapper

    AbesMapper
    Expand Collapse

    Joined:
    Jul 1, 2013
    Messages:
    64
    G25 have mapping in scripts\client\inputmaps
    Find C299046D000000000000504944564944.inputmap.cs
    There you can modify the mapping, I mean rest of buttons
     
  5. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
    Apparantly I've edited this beyond resotration. Could you paste yours please?
     
  6. AbesMapper

    AbesMapper
    Expand Collapse

    Joined:
    Jul 1, 2013
    Messages:
    64
    This is default G25 mapping from BeamNG
    You must only delete comment ("//") before moveMap.bindCmd and add your own if you need to. But I don't know if it's good mapping because I have G27.
     

    Attached Files:

    #6 AbesMapper, Aug 6, 2013
    Last edited: Aug 6, 2013
  7. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
    Thanks.
    I was looking through the consol and apparently the G25 has inputmap in C294046D.....inputmap.cs
    However, non of the companation for the break seems to work.

    Code:
    moveMap.bind(%device, xaxis, joy_steer); // Works fine
    moveMap.bind(%device, yaxis, "R", brake); // 
    moveMap.bind(%device, yaxis, "I", accelerate); //works fine
    moveMap.bind(%device, slider, clutch);
    
    I scrolled through debug menu with 'L' ingame.
    Page 10, i could see how the analoge value for accelerate went from 0 and up. When pressing the break pedal the same column went from 0 and downward in the negative specter.
    Anyway, the column next to it showed correctly when I pressed the down arrow on keyboard.

    Do you know how this is so?
     
    #7 Saetheer, Aug 6, 2013
    Last edited: Aug 6, 2013
  8. AbesMapper

    AbesMapper
    Expand Collapse

    Joined:
    Jul 1, 2013
    Messages:
    64
    Try this, from G27 inputmap.
    Code:
    moveMap.bind(%device, xaxis, joy_steer);    
    moveMap.bind(%device, rzaxis,"I", brake);
    moveMap.bind(%device, yaxis, "I", accelerate);
    moveMap.bind(%device, slider, "I", clutch);
     
  9. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
    it gives me only throttle

    Debug menu 10,
    On throttle goes is 100% correct. goes from 0 to 1.
    However break pedal goes from 0 to -1 in the same column.
    Considering above, Throttle and break are on the same axis. Same axis, different pedal. Are you still able to help me out. I greatly appreciate your help.

    Perhaps there anyway to add a formula that say something like this
    Code:
    IF 
    yaxis >0 
    Then
    Break
     
  10. Kamil_

    Kamil_
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    691
    try:
    Code:
    function two_axis(%val)
    {
        if (%val > 0)
        {
             accelerate(%val);
        }
        else
        {
             brake(-%val);
        }
    }
    moveMap.bind(%device, yaxis, two_axis)
     
  11. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
    Thanks for trying. but It seems that I only get a new controller called joystick0. and it still has the same problem.

    i read on wiki that a value goes from -1 to 1.
    If I used the code
    Code:
    moveMap.bind(%device, yaxis, "R" accelerate);
    moveMap.bind(%device, yaxis, "RI", brake);
    accelerate gets ranged down to 0 to 1 and brake is ranged and inverted giving it 0 to -1
    This should work in my eyes but does not. Am I stupid or should this theoretically work?

    I'll try adding a function in beamng.cs but nothing seems to work. Prehaps someone have some inputs on how to create this function.
     
  12. Kamil_

    Kamil_
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    691
    What The Ranged "R" mode does is if an input axis is from -1 to 1, it will convert it to 0 to 1, which Torque3D uses.
    Having a 2 axis wheel gives you either: "-1 = full brake, 0 = nothing, 1 = full throttle" or "0 = full brake, 0.5 = nothing, 1 = full throttle"
    (What you are doing is Throttle = range(Input), which gives you 0.5 if its -1-1 or 0.75 if its 0-1, both are wrong. And Brake = -range(Input), which is the opposite of the throttle, which is wrong too)

    Go in game with the wheel, and press k twice (so that it's on the input debug screen), move the throttle and brake; they should be on the same axis, check what the input/axis is called and whether it starts at 0 or 0.5


    EDIT: You have a G25, it should have separate axis for each pedal and the wheel.
    Go to control panel->devices and printers->right click wheel->game controller settings->advanced->should have a new window if it's the same as my wheel->look for an option for 4/5 axis mode? or uncheck "combined" if there's that.
     
    #12 Kamil_, Aug 6, 2013
    Last edited: Aug 6, 2013
  13. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
  14. Kamil_

    Kamil_
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    691
    What about the control panel settings? I'm sure a G25 has separate axes
     
  15. Fat-Alfie

    Fat-Alfie
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    65
    That works! Thank you very much :)

    I added it to my beamng.cs after both the accelerate and brake definitions, and then used that new input in my inputmap and it works perfectly!

    Fat and happy now :cool:

    (Logitech Dual Action gamepad map attached)
     

    Attached Files:

  16. Mazda74

    Mazda74
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    28
    I found that my G27 was already setup up when i went to play
     
  17. Saetheer

    Saetheer
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    8
    Thanks to everyone who tried t help me.
    But the game is still worth playing with keyboard and I dont want to quarrel with mapping anymore. Sick an tierd of it.

    Again, Thanks
     
  18. spud693

    spud693
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    2
    Hi everyone - I am also having issues with using a single axis (on a wireless xbox360 racing wheel w/ wireless dongle). I understand that the racing wheel treats it's pedals much the same way as the 360 controller treats it's triggers. Any guidance on what I would have to do to make this work ( I think I understand what I would need to do to beamng.cs, but how that would then translate to my inputmap, I do not know). Thanks! (and sorry for the block of text, for some reason this text input field is ignoring the enter key...)
     
  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