Beamng Drive Key Code

It can be very useful to use a working example as reference, such as the official cannon vehicle.

Get yourself some free Steam Codes for a limited time only! Visit our website to use our Steam money generator and get some free Steam Wallet Codes from us in 2020. This product is a brand new and unused BeamNG.drive CD Key for Steam. This product is a unique and unused CD Key which can be activated on Steam. After your payment, you will be instantly sent a unique activation code by our automatic delivery system, called 'Autokey'.

Contents

  • Vehicle-Specific Bindings
    • Defining vehicle-specific actions
    • Making the vehicle actually do stuff, aka onUp/onDown/onChange source code
      • Advanced case

Note: you may want to first read the Input Introduction.

Starting on version 0.5, BeamNG.drive supports vehicle-specific bindings. These are special bindings that only apply to certain vehicle. For example, a binding to lift the arm of a crane; or a binding to shoot the ball in a cannon.

Vehicle specific bindings can be customized by end users in the Controls > Bindings menu, just like any other binding (without editing any file at all).

In order words, the file name can be input_actions.json, but can also have a suffix, such as: input_actions_my_custom_suffix.json

The specified action names (“action_name_a”, etc) must be unique within the current vehicle. If a different vehicle uses the exact same action name, they won’t interfere with each other, since they belong to different vehicles.

These are the possible action arguments:

NameTypeOptionalDefault ValueDescription
titlen/aVery short name of the action, will be displayed in various game menues
descn/aFull description, may be displayed as tool-tip, should be about one sentence long.
ordern/aCan influence in which order actions are displayed on UI menues, with 1 coming first, and larger values (2, 3…) coming later.
isBasictrueWhether it is shown by default in the Controls > Binding menu (true) or user needs to check “List advanced bindings too” (false)
isCenteredfalseIf false, the action will produce values in the range 0 to 1 (for example, it can be used for a brake pedal or handbrake). If true, generated values will be in the range of -1 to +1 (for example, it can be used for the steering, or for changing the camera height up and down).
onChangeSource code that will be executed when the input value changes (when a key is pressed, lifted, or each time an axis is slightly moved).
onDownSource code that will be executed when a button or a key have been pressed down [2].
onUpSource code that will be executed when a button or a key have been lifted up [2].
ctx“vlua”

Where the code defined above will be run: “ui” for javascript code

“ts” for torquescript

“tlua” for game engine lua

“vlua” for vehicle lua.

Footnotes

[1](1, 2, 3)onUp and onDown code cannot be triggered by axes, only by buttons and keyboard keys. Using onChange is recommended, if possible.
[2](1, 2) At least one of these must be defined. More on this later, don’t worry about what to use just now.

To add a new action, insert a new line, like this:

If you are modifying an existing vehicle that already contains vehicle-specific actions, then starting at version 0.7.0.0 you can add extra actions (rather than simply replacing vehicles/my_vehicle/input_actions.json).

Beamng Drive Key Code

To do that, create new files named input_actions*.json in that same directory. For example: input_actions_my_mod.json.

All json files matching that filaname pattern will be read, allowing you to add any new actions you may need, spanning as many files as you want.

Now that we have the vehicle-specific input_actions.json file, you can create new bindings through the usual Controls > Bindings menu. This will generate inputmap files in the Documents/beamng.drive/settings/inputmaps/your_vehicle_name/ directory.

When you are happy with your set of default bindings, you can rename the files from *.diff to *.json, and move them inside vehicle/your_vehicle_name/inputmaps/.

Vehicle-specific bindings will automatically appear on the top-right of the window after you load a level. This way, users can easily know how to use your vehicle specific bindings.

Note: after the initial release of your mod, for example in your second version of the mod, you can add more actions if you wish, and also add more default bindings. BeamNG.drive will make sure these new default bindings are available to all users, even if they have customized the bindings in the past.

Important: if you do not provide some default binding files, the user won’t be able to use your vehicle-specific functionality until he manually puts the effort to create the necessary bindings. Please, always provide default bindings, users will be thankful. Well, or at least they won’t be so confused about how to use your mod.

So far, we have defined some default bindings, and added some lines to the vehicle input_actions.json file, but all of the onChange/onUp/onDown arguments are empty, so we will fix that now.

The simplest case is using a thruster or a hydro. These elements can easily react to values travelling through the electric bus of the vehicle, so we will just write some LUA code that writes to this electrics bus.

Let’s learn by example: If you have this inside input_actions.json:

Then you can make a hydro or a thruster react to it, like this:

  • Inside the Hydros section of a .jbeam file:
  • Or inside the Thrusters section of a .jbeam file:

Check the cannon vehicle for a working example of a thruster.

You can have complete control over what happens, if you are willing to write custom LUA code.

You can write values to the electrics bus, but you can also do more advanced stuff if you want.

All of the onChange/onUp/onDown lua code can include some special symbols, that will be automatically replaced by the bindings system. You can write them in any order, any number of times. They are:

  • VALUE: will replaced with 1 in onDown, 0 in onUp, float values from 0 to 1 in onChange when isCentered argument is false, and float values from -1 to 1 in onChange when isCentered argument is true.
  • FILTERTYPE: corresponds to the “Filter” option in the binding editor menu, and will be replaced by 0 for Key filter, 1 for Pad filter, and 2 for Direct filter.
  • PLAYER: if you are using an action argument ctx different than the default 'vlua' (such as 'ts'), this may be useful to direct actions at the vehicle of certain player when playing in multiseat mode. If the binding was triggered by the first player, it will be replaced by 0, second player with 1, third with 2, etc.

Basic example:

Advanced fictional example, which makes no sense at all (it’s only intended to show you the theoretical possibilities):

If your needs are complex enough, you may want to bundle some custom .lua file in your vehicle mod.

These files can include some functions that will be called back by the game engine:

They can also export any functions you want to be used by your custom input_actions.json code. For example a file named vehicles/my_vehicle/lua/custom_lua_file.lua:

The action’s code can then call those exported functions, for example

Including a working example would involve attaching various files, that may end up out of date. It is better to take the existing cannon vehicle, which is bundled with BeamNG.drive, tested on each relase and is pretty simple, so serves as a very good starting point.

You will find this vehicle in SteamAppscommonBeamNG.drivecontentvehiclescannon.zip, unzip to a temporary directory and take a look at the various files and directories mentioned throughout this guide.

If you have any comments or questions, please make sure to let me know in the feedback thread, here: http://www.beamng.com/threads/guide-to-vehicle-specific-bindings-feedback-thread.26335

added to our site on 2016-01-29
version0.3.7.6
publisher
BeamNG
publisher's site
voted as working by 235 visitors
voted as not working by10 visitors

Drive

To see serial numbers, please prove you are not a robot.

Content protected by qrlock.me service.

How it works.

Beamng Drive Cheap Steam Key

  1. Use your mobile phone (smartphone) to scan the QR code that you see here.
  2. In the opened window (on the smartphone), select the pin code that you see (----).
  3. Press (on the smartphone) button with this pin code
  4. Wait a few seconds, everything else will happen automatically.
  5. If this does not happen, refresh the page and try again. Otherwise - contact the technical support of the site.
More details ...

Beamng Drive Key Code Free


Beamng Drive Free Full Game

You need to scan the QR code shown on the site using your mobile phone (or tablet) and perform the required actions on your device.
In order to be able to scan the code, use the camera of your phone. For Apple phones, no additional software is required (just point the camera at the QR code and follow the instructions). Most Android-based phones also do not require third-party programs.
For those who have problems, we recommend a program for reading QR codes Privacy Friendly QR Scanner (we are not affiliated with this software, but tested this application and it performs the necessary functions).
You can download it from google play.

Beamng Drive Key Code Pics