Creating Custom Vehicle Actions

Discussion in 'Content Creation' started by CommandoAir, Aug 1, 2018.

  1. CommandoAir

    CommandoAir
    Expand Collapse

    Joined:
    Jan 24, 2014
    Messages:
    117
    So I'm trying to make custom actions for pre-existing vehicles. I'm starting with the Grand Marshal.

    So far I have this:

    BeamNG.drive\mods\unpacked\MyMod\Vehicles\fullsize

    In that folder is:

    inputmaps
    input_actions_MyMod.json

    In inputmaps I have keyboard.json, which contains:
    Code:
    {
    "name" : "Keyboard", "version" : 1, "devicetype" : "keyboard", "vidpid" : "6F1D2B61", "bindings" :   [
        {
    "action" : "MyMod_Action", "control" : "u"
    
    }]
    , "guid" : "{6F1D2B61-D5A0-11CF-BFC7-444553540000}"
    
    }
    
    input_actions_MyMod.json contains:
    Code:
    {
        "MyMod_Action" : {"order":  1, "onChange":"Toggle state/do action", "isBasic":"true", "title":"Action Name", "desc":"Short action description" },
    }
    
    And that's as far as I have gotten. Where do I go from here? What do I do if I want to, say, toggle two sets of lights with one key, or toggle a secondary variable rev limiter, or toggle a boost limiter?

    I know the part under "onChange" isn't correct either. What do I put there?

    Sorry if this is all obvious stuff, I'm a bit lost at the moment and don't have much time to experiment anymore.
     
  2. jojos38

    jojos38
    Expand Collapse

    Joined:
    Oct 22, 2013
    Messages:
    1,059
    I can't help you much but I can tell you that the onChange call a lua function, you need to create a lua file, if you don't know how to code lua i think you should learn a little bit before
     
  3. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
  4. CommandoAir

    CommandoAir
    Expand Collapse

    Joined:
    Jan 24, 2014
    Messages:
    117
    I wasn't sure about this, so thanks for clearing that up.

    Thanks. Like I said, I don't have much time since I've got work (I know, not good for this kind of stuff, but hey, what can you do?), but I'll have a read through this when I get the chance.

    Thanks again.
     
  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