Either I'm blind or this is not documented and I have no idea how to do this. I want to create global inputmaps instead of copy+pasting the same file with the same bindings to every single vehicle in the mod. In the documentation it says that global actions are defined in lua/ge/input_actions.json. But such directory does not exist??? Instead there are multiple files in lua/ge/extensions/core/input/actions folder, and they define the input. Inside these files it says that you can't modify them but you should read the documentation instead, but that points to a non-existent file... The readActions(vehicleName) function points to the correct directory, so the documentation must be wrong. Unless this one directory is checked by some other function. That's only half of the problem. Where are the bindings (inputmaps), not only does the documentation point at the wrong directory but it also doesn't metion global inputmaps at all. It only says where regular and user bindings go (but where are the default settings/inputmaps/*.json files if the settings folder is in the user directory?), and there is a whole (terribly old, from version 0.5) page about vehicle-specific bindings and how to add them (without even explaining properly how to add new bindings to vehicles that already have bindings), but doesn't explain the global ones, only says that it is very important to add them or else the user will be confused, but how do I add them??? The bindings.lua file only refers to /settings/inputmaps folder, so this might not be a thing at all, but then what do I do, do I have to make my mod override the user's settings somehow just to add a few global bindings? Or do I have to use the deprecated input keys and hope the user hasn't mapped anything to them? This is all a mess, please explain...
I'm not much of a programmer, but maybe try to create "lua/ge/input_actions.json" and see if it can read an input map you put in there. Knowing know where to put the file is the problem. Love the car values mod btw. Maybe @AR162B would know more than i as he added bindings to the D-Series.
I tried but without inputmaps files it does nothing, also I don't wanna follow what AR162B did as his method breaks vanilla bindings.
Figured these out in last week when was working on my map. • Adding a new global binding. 1. Move your input_actions_xxx.json to lua/ge/extensions/core/input/actions/ 2. Open it and write these 2 words/variables for each binding: 3. Idk it's needed or not but I renamed the file name and deleted the "input_actions_" text. 4. Now it can be found in the vehicle category without overwriting the default bindings. Oh btw there's a bug, it will not work if you do these on a unpacked mod, when you're done, launch the game and compress this mod, next close the game and launch it again. Then, these bindings will show up in the vehicle category. But there's still a problem, how to make a default key for these bindings? 5. Well, to found the original default bindings, in the beamng.drive folder, you'll see a .zip file called "gameengine.zip". Open it, go to settings/inputmaps and copy the "keyboard.json" file (or extract it, then copy it), then, go to your mod's file. Make these new folders: settings/inputmaps. Next paste the keyboard.json file. Open it and add your custom inputmaps in the last lines: Now they can be found in the vehicle category with default key controls: This way doesn't overwrite the user's custom bindings. As you can see here, the vehicle selector key is "Control E" BUT when I added these new custom bindings, my custom control (V) didn't replace with Control E: But tbh, it's a non-standard way to add custom default key control and ONLY 1 mod can use this technique at a time. But you have no other ways to do it, so it's the best way. Hope this helps!
Thank you so much for this, it solves all the problems I had. The downside is that I'll have to update the file with every game update or else it will break global bindings, I wish it could work by adding custom ones. And turns out the only thing I was really missing here was the folder structure, the rest was in the documentation but I must have misinterpreted it.
Small correction: They work in an unpacked mod when you make the order setting very big for some reason like 1000, again thank you very much for this (At this point I feel like setting the order to a very big value can solve any bug with inputmaps lol, this is not the first time it helped)
Planning to, so far only the jump system is done but I'm planning arcade-like stuff like shield, guns, missles, etc. that would kinda work in a Twisted Metal way but keeping all the softbody physics and realistic damage of BeamNG, so no health points or anything, all physics. It will take literally years to finish though.
Forgive my coding ignorance but could you not "borrow" some stuff off Gmod as they are written in the same language (lua) to speed it up a bit. Maybe you'll need to site and credit the original source though. Just a thought.
Lol how would it work if Gmod doesn't have Jbeam, the most I could borrow is stuff that has nothing to do with physics so things like UI elements, so the least important stuff
I did mention my coding ignorance didnt I... also new to beam.ng and no idea what jbeam is. Maybe I should have stayed out of convo but thought I had a good idea about borrowing weapon skin and attributes etc. Anyway... --- Post updated --- NewI did mention my coding ignorance didnt I... also new to beam.ng and no idea what jbeam is. Maybe I should have stayed out of convo but thought I had a good idea about borrowing weapon skin and attributes etc. Anyway...
--- Post updated --- Try just going on the steam forum for gmod and talk to the coders who make the add ons for that. Maybe they'll only ask for accreditation or something. Their community workshop is free just like Beam.ng appears to be.
As I said it's not worth it just for some code and graphics when 99% of the work has to be done in Jbeam and those games don't have it so I need to do it myself.