Menu

Controls and configuration

Edit page on GitHub

Intro

Rigs of Rods is a simulator which strives for maximum reallism, and hence you need an appropriate controller, such as a wheel for land vehicles and joystick for aerial or marine vehicles.

Input is configured using configuration file ‘input.map’. It’s also possible to configure them via our ‘configurator’ utility, RoRConfig. In-game configuration of controls is not implemented yet.

Keyboard layout

General keys

MiscKey
Enter or exit truckENTER
Quit Game ESC
Toggle Statistics T
Screenshot PRINTSCR
chat (Multiplayer) Y
Character controlKey
Jump SPACE
Turn Right RIGHT
Turn Left LEFT
Walk FordwardsUP
Walk BackwardsDOWN
Run SHIFT+UP
Camera / Caelum Key
Change C
control camera1, 2, 3, 4, 5, 6, 8, 9
Increase time+
Decrease time-

Land vehicle keys

Drive controlsKey
Steer Left LEFT
Steer Right RIGHT
Accelerate/Brake UP / DOWN
Tire Pressure +/-
(not for all trucks)
[ ]
Autoshift Up PAGE-UP
Autoshift Down PAGE-DOWN
Switch Shift ModesQ
Manual Clutch SHIFT
Shift Up A
Shift Down Z
MiscKey
Truck Horn H
Parking Brake P
Blinker Left COMMA
blinker Right DOT
Blink Warn PERIOD
Toggle Contact X
Starter S
Lock Load L
Secure Load O
Reset Truck I
Show Skeleton K
Toggle Lights N
Toggle beacons M
Rescue Truck R
Toggle HUD U
Enter / Exit truckENTER
particle Cannon G
Function keysCombo
COMMANDS 01F1
......
COMMANDS 12F12
COMMANDS 13CTRL + F1
......
COMMANDS 24CTRL + F12
COMMANDS 25ALT + F1
......
COMMANDS 36ALT + F12
COMMANDS 37CTRL + ALT + F1
......
COMMANDS 48CTRL + ALT + F12

Aerial and marine keys

Airplane controlKey
Steer Left LEFT
Steer Right RIGHT
Elevator Up UP
Elevator DownDOWN
Rudder Right X
Rudder Left Z
Brake B
Parking BrakeP
Reverse R
Less Flaps 1
More Flaps 2
Throttle DownPAGE-DOWN
Throttle Up PAGE-UP
Start EnginesCLICK BUTTONS "ON"
Boat controlKey
Throttle Down 6
Throttle Up 7
Steer Left LEFT
Steer Right RIGHT
Center Rudder DOWN
Center ThrottleUP
MiscKey
Parking Brake P
Lock Load L
Secure Load O
Reset Vehicle I
Show Skeleton K
Toggle Lights N
Toggle beacons M
Toggle HUD U
Enter / Exit vehicleENTER

It is recommended to use: - CTRL + Home - to start all engine of a plane - CTRL + 7 - to full throttle all engines

because some planes could have more than 4 engines and you couldn’t control them with your mouse.

Config file ‘input.map’

This file defines all key alias for RoR. It has the following format:

EVENT_NAME    EVENT_TYPE    MAPPING

For example:

BOAT_CENTER_RUDDER     Keyboard    DOWN

This binds the BOAT_CENTER_RUDDER event to the Down arrow on your keyboard.

Keyboard

For the keyboard there are several special things:

Modifiers:

  • CTRL
  • SHIFT
  • ALT

Combine them with a + sign. Example:

CAMERA_FREE_MODE    Keyboard    EXPL+SHIFT+C

The EXPL tag

A special keyword used in defining commands.

In this example, only COMMANDS_01 is triggered when pressing F1, and COMMANDS_13 is triggered when pressing CTRL+F1 (but not COMMANDS_01)

COMMANDS_01                    Keyboard             EXPL+F1 
COMMANDS_13                    Keyboard             EXPL+CTRL+F1 

In this example, COMMANDS_01 would be triggered if you press CTRL+F1, as F1 is part of the COMMANDs_13 combination.

COMMANDS_01                    Keyboard             F1 
COMMANDS_13                    Keyboard             CTRL+F1 

List of usable keys

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, ABNT_C1, ABNT_C2, ADD, APOSTROPHE, APPS, AT, AX, B, BACK, BACKSLASH, C, CALCULATOR, CAPITAL, COLON, COMMA, CONVERT, D, DECIMAL, DELETE, DIVIDE, DOWN, E, END, EQUALS, ESCAPE, F, F1, F10, F11, F12, F13, F14, F15, F2, F3, F4, F5, F6, F7, F8, F9, G, GRAVE, H, HOME, I, INSERT, J, K, KANA, KANJI, L, LBRACKET, LCONTROL, LEFT, LMENU, LSHIFT, LWIN, M, MAIL, MEDIASELECT, MEDIASTOP, MINUS, MULTIPLY, MUTE, MYCOMPUTER, N, NEXTTRACK, NOCONVERT, NUMLOCK, NUMPAD0, NUMPAD1, NUMPAD2, NUMPAD3, NUMPAD4, NUMPAD5, NUMPAD6, NUMPAD7, NUMPAD8, NUMPAD9, NUMPADCOMMA, NUMPADENTER, NUMPADEQUALS, O, OEM_102, P, PAUSE, PERIOD, PGDOWN, PGUP, PLAYPAUSE, POWER, PREVTRACK, Q, R, RBRACKET, RCONTROL, RETURN, RIGHT, RMENU, RSHIFT, RWIN, S, SCROLL, SEMICOLON, SLASH, SLEEP, SPACE, STOP, SUBTRACT, SYSRQ, T, TAB, U, UNDERLINE, UNLABELED, UP, V, VOLUMEDOWN, VOLUMEUP, W, WAKE, WEBBACK, WEBFAVORITES, WEBFORWARD, WEBHOME, WEBREFRESH, WEBSEARCH, WEBSTOP, X, Y, YEN, Z.

Joystick, Wheel or gamepad

This category covers all analogue input devices detected by the operating system, so all gamepads, joysticks, wheels, pedals, etc.

JoystickButton

Arguments:

  • Joystick Number (unused in modern mappings), set to 0
  • Button number
AIRPLANE_THROTTLE_DOWN    JoystickButton    0    2

JoystickAxis

Arguments:

  • Joystick Number (unused in modern mappings), set to 0
  • Axis number
  • Options:
    • HALF
    • REVERSE
    • UPPER
    • LOWER
    • RELATIVE
    • DIGITAL
    • DEADZONE : add deadzone in percent with equal sign: “DEADZONE=0.15”.
    • LINEARITY: add linearity in percent with equal sign: “LINEARITY=0.15”.
AIRPLANE_STEER_RIGHT    JoystickAxis    0    1    UPPER+DEADZONE = 0.15

JoystickPov

Arguments:

  • Joystick Number (unused in modern mappings), set to 0
  • POV number
  • Direction: North, South, East, West, NorthEast, SouthEast, NorthWest, SouthWest.
CHARACTER_FORWARD    JoystickPov    0    0    North

JoystickSlider, JoystickSliderX, JoystickSliderY

Arguments:

  • Joystick Number (unused in modern mappings), set to 0
  • Slider number
  • Options:
    • REVERSE
TRUCK_MANUAL_CLUTCH    JoystickSliderY    0    Y    0    REVERSE+DEADZONE = -30

Mouse

Here is a simple tutorial/example, how to implement mouse control for Rigs of Rods.

You will need 2 applications:

  • vJoy joystick emulator:

http://vjoystick.sourceforge.net/site/index.php/download-a-install/72-download

  • FreePIE input emulator:

http://andersmalmgren.github.io/FreePIE/index.html

After installing these you have to edit your input map and define there joystick axises/buttons for the things you want to control with mouse. Input map is located in: Documents/Rigs of Rods 0.xx/config and open a file called Input.map. I use mouse to control steering and throttle but I suppose you could use it to control anything you want. Add these lines in the input.map to get steering and throttle control:

TRUCK_ACCELERATE    JoystickAxis    0    1    LOWER
TRUCK_BRAKE         JoystickAxis    0    1    UPPER
TRUCK_STEER_LEFT    JoystickAxis    0    0    LOWER + DEADZONE = 0.00
TRUCK_STEER_RIGHT   JoystickAxis    0    0    UPPER + DEADZONE = 0.00

Then you will need a python script for the FreePIE:

from System import Int16

if (starting):
    mousex = 0
    mousey = 0
    xlimit = 15600
    ylimit = 15600

mousex = mousex + (mouse.deltaX \* 40) mousey = mousey + (mouse.deltaY \* 80)

if (mouse.middleButton):
    mousex = 0
    mousey = 0

if (mousex >  xlimit): mousex =  xlimit
if (mousex < -xlimit): mousex = -xlimit
if (mousey >  ylimit): mousey =  ylimit
if (mousey < -ylimit): mousey = -ylimit

vJoy[0].x = mousex
vJoy[0].y = mousey

diagnostics.watch(vJoy[0].x)
diagnostics.watch(vJoy[0].y)

Open FreePIE, paste the script above in the code area and save the script.

For the mouse input to function, you have to run the script in FreePIE. Click Script -> Run script. Leave it running, open RoR and start playing.

You can modify both the script and the input map to make them better suit for your use. For example the numbers 40 and 80 in the script are the sensitivity of the controls.

Mouse middle button in the script above, will reset the axises in game, in this case the steering and throttle.

%%%%%%%%%%%%%%%%%% old keypress events ######################################

Keypress event identification in RoR 0.37.70+ These can be used as event option for prop animations.( add_animation ), not all make sense though for animated props. AIRPLANE_STEER_RIGHT AIRPLANE_BRAKE AIRPLANE_ELEVATOR_DOWN AIRPLANE_ELEVATOR_UP AIRPLANE_FLAPS_FULL AIRPLANE_FLAPS_LESS AIRPLANE_FLAPS_MORE AIRPLANE_FLAPS_NONE AIRPLANE_PARKING_BRAKE AIRPLANE_REVERSE AIRPLANE_RUDDER_LEFT AIRPLANE_RUDDER_RIGHT AIRPLANE_STEER_LEFT AIRPLANE_STEER_RIGHT AIRPLANE_THROTTLE_AXIS AIRPLANE_THROTTLE_DOWN AIRPLANE_THROTTLE_FULL AIRPLANE_THROTTLE_NO AIRPLANE_THROTTLE_UP AIRPLANE_TOGGLE_ENGINES BOAT_CENTER_RUDDER BOAT_REVERSE BOAT_STEER_LEFT BOAT_STEER_LEFT_AXIS BOAT_STEER_RIGHT BOAT_STEER_RIGHT_AXIS BOAT_THROTTLE_AXIS BOAT_THROTTLE_DOWN BOAT_THROTTLE_UP CAELUM_DECREASE_TIME CAELUM_DECREASE_TIME_FAST CAELUM_INCREASE_TIME CAELUM_INCREASE_TIME_FAST CAMERA_CHANGE CAMERA_LOOKBACK CAMERA_RESET CAMERA_ROTATE_DOWN CAMERA_ROTATE_LEFT CAMERA_ROTATE_RIGHT CAMERA_ROTATE_UP CAMERA_ZOOM_IN CAMERA_ZOOM_IN_FAST CAMERA_ZOOM_OUT CAMERA_ZOOM_OUT_FAST CHARACTER_BACKWARDS CHARACTER_FORWARD CHARACTER_JUMP CHARACTER_LEFT CHARACTER_RIGHT CHARACTER_RUN CHARACTER_SIDESTEP_LEFT CHARACTER_SIDESTEP_RIGHT COMMANDS_01 COMMANDS_02 COMMANDS_03 COMMANDS_04 COMMANDS_05 COMMANDS_06 COMMANDS_07 COMMANDS_08 COMMANDS_09 COMMANDS_10 COMMANDS_11 COMMANDS_12 COMMANDS_13 COMMANDS_14 COMMANDS_15 COMMANDS_16 COMMANDS_17 COMMANDS_18 COMMANDS_19 COMMANDS_20 COMMANDS_21 COMMANDS_22 COMMANDS_23 COMMANDS_24 COMMANDS_25 COMMANDS_26 COMMANDS_27 COMMANDS_28 COMMANDS_29 COMMANDS_30 COMMANDS_31 COMMANDS_32 COMMANDS_33 COMMANDS_34 COMMANDS_35 COMMANDS_36 COMMANDS_37 COMMANDS_38 COMMANDS_39 COMMANDS_40 COMMANDS_41 COMMANDS_42 COMMANDS_43 COMMANDS_44 COMMANDS_45 COMMANDS_46 COMMANDS_47 COMMANDS_48 COMMON_CONSOLEDISPLAY COMMON_CONSOLEMODE COMMON_ENTER_CHATMODE COMMON_SEND_CHAT COMMON_ENTER_OR_EXIT_TRUCK COMMON_HIDE_GUI COMMON_LOCK COMMON_ROPELOCK COMMON_MAP_ALPHA COMMON_OUTPUT_POSITION COMMON_PRESSURE_LESS COMMON_PRESSURE_MORE COMMON_QUIT_GAME COMMON_SHOW_MENU COMMON_REPAIR_TRUCK COMMON_RESCUE_TRUCK COMMON_RESET_TRUCK COMMON_SCREENSHOT COMMON_SCREENSHOT_BIG COMMON_SAVE_TERRAIN COMMON_SECURE_LOAD COMMON_SHOW_SKELETON COMMON_START_TRUCK_EDITOR COMMON_TOGGLE_CUSTOM_PARTICLES COMMON_TOGGLE_MAT_DEBUG COMMON_TOGGLE_RENDER_MODE COMMON_TOGGLE_REPLAY_MODE COMMON_TOGGLE_STATS COMMON_TOGGLE_TRUCK_BEACONS COMMON_TOGGLE_TRUCK_LIGHTS COMMON_TRUCK_INFO COMMON_VIEW_MAP COMMON_FOV_LESS COMMON_FOV_MORE GRASS_LESS GRASS_MORE GRASS_MOST GRASS_NONE GRASS_SAVE MAP_IN MAP_INTERACTIVE_TOGGLE MAP_OUT MENU_DOWN MENU_LEFT MENU_RIGHT MENU_SELECT MENU_UP TERRAINEDITOR_BUILT TERRAINEDITOR_PITCHBACKWARD TERRAINEDITOR_PITCHFOREWARD TERRAINEDITOR_ROTATELEFT TERRAINEDITOR_ROTATERIGHT TERRAINEDITOR_SELECTROAD TERRAINEDITOR_TOGGLEOBJECT TERRAINEDITOR_TOGGLEROADTYPE TRUCK_ACCELERATE TRUCK_AUTOSHIFT_DOWN TRUCK_AUTOSHIFT_UP TRUCK_BLINK_LEFT TRUCK_BLINK_RIGHT TRUCK_BLINK_WARN TRUCK_BRAKE TRUCK_HORN TRUCK_LIGHTTOGGLE1 TRUCK_LIGHTTOGGLE2 TRUCK_LIGHTTOGGLE3 TRUCK_LIGHTTOGGLE4 TRUCK_LIGHTTOGGLE5 TRUCK_LIGHTTOGGLE6 TRUCK_LIGHTTOGGLE7 TRUCK_LIGHTTOGGLE8 TRUCK_LIGHTTOGGLE9 TRUCK_LIGHTTOGGLE10 TRUCK_MANUAL_CLUTCH TRUCK_PARKING_BRAKE TRUCK_SHIFT_DOWN TRUCK_SHIFT_NEUTRAL TRUCK_SHIFT_UP TRUCK_SHIFT_GEAR_REVERSE TRUCK_SHIFT_GEAR1 TRUCK_SHIFT_GEAR2 TRUCK_SHIFT_GEAR3 TRUCK_SHIFT_GEAR4 TRUCK_SHIFT_GEAR5 TRUCK_SHIFT_GEAR6 TRUCK_SHIFT_GEAR7 TRUCK_SHIFT_GEAR8 TRUCK_SHIFT_GEAR9 TRUCK_SHIFT_GEAR10 TRUCK_SHIFT_GEAR11 TRUCK_SHIFT_GEAR12 TRUCK_SHIFT_GEAR13 TRUCK_SHIFT_GEAR14 TRUCK_SHIFT_GEAR15 TRUCK_SHIFT_GEAR16 TRUCK_SHIFT_GEAR17 TRUCK_SHIFT_GEAR18 TRUCK_SHIFT_LOWRANGE TRUCK_SHIFT_MIDRANGE TRUCK_SHIFT_HIGHRANGE TRUCK_STARTER TRUCK_STEER_LEFT TRUCK_STEER_RIGHT TRUCK_SWITCH_SHIFT_MODES TRUCK_SWITCH_SHIFT_MODE TRUCK_TOGGLE_AXLE_LOC TRUCK_TOGGLE_CONTAC COMMON_SHOWTRUCKTOOL COMMON_RELOAD_ROADS COMMON_FULLSCREEN_TOGGLE CAMERA_FREE_MODE_FIX CAMERA_FREE_MODE TRUCK_LEFT_MIRROR_LEFT TRUCK_LEFT_MIRROR_RIGHT TRUCK_RIGHT_MIRROR_LEFT TRUCK_RIGHT_MIRROR_RIGHT COMMON_REPLAY_FORWARD COMMON_REPLAY_BACKWARD COMMON_REPLAY_FAST_FORWARD COMMON_REPLAY_FAST_BACKWARD AIRPLANE_AIRBRAKES_NONE AIRPLANE_AIRBRAKES_FULL AIRPLANE_AIRBRAKES_LESS AIRPLANE_AIRBRAKES_MORE AIRPLANE_THROTTLE COMMON_TRUCK_REMOVE COMMON_NETCHATDISPLAY COMMON_NETCHATMODE CHARACTER_ROT_UP CHARACTER_ROT_DOWN CHARACTER_UP CHARACTER_DOWN TRUCK_SAVE_POS1 TRUCK_SAVE_POS2 TRUCK_SAVE_POS3 TRUCK_SAVE_POS4 TRUCK_SAVE_POS5 TRUCK_SAVE_POS6 TRUCK_SAVE_POS7 TRUCK_SAVE_POS8 TRUCK_SAVE_POS9 TRUCK_SAVE_POS10 TRUCK_LOAD_POS1 TRUCK_LOAD_POS2 TRUCK_LOAD_POS3 TRUCK_LOAD_POS4 TRUCK_LOAD_POS5 TRUCK_LOAD_POS6 TRUCK_LOAD_POS7 TRUCK_LOAD_POS8 TRUCK_LOAD_POS9 TRUCK_LOAD_POS10 DOF_TOGGLE DOF_DEBUG DOF_DEBUG_TOGGLE_FOCUS_MODE DOF_DEBUG_ZOOM_IN DOF_DEBUG_ZOOM_OUT DOF_DEBUG_APERTURE_MORE DOF_DEBUG_APERTURE_LESS DOF_DEBUG_FOCUS_IN DOF_DEBUG_FOCUS_OUT

Configuring controls with RoRConfig

  1. Plug in your device, open the Configurator and go to the “Controls” tab.

  1. Click the “Add” button.

  1. In the box, choose an event from the top combo box, a description will appear below it, then choose an input type from the bottom combo box. (Keyboard, Joystick axis, Joystick button)

  2. Click on “Add” and then press/move the button/axis you want to control the event.

  1. Do step 4 for all the controls you want to map.

  2. (Optional) Click the “Test” button, then press/move a mapped control to test the control, The top bar is the raw input from the button/axis, the lower bar is what the game “sees” after deadzone and linearity options have been applied.

  3. Go test your control in the game! It may be a good idea to click on “Export keymap” to export your current keymap for later use.

How to contribute input maps

  1. Attach your wheel/joystick/gamepad that you want to map.

  2. Download Inputtool.zip. When you execute ‘inputtool.exe’ it will create a textfile named ‘inputinfo.txt’ in the same directory. This text file contains the relevant ‘VendorMapFilename’.

  3. Create a mapping file named like the value of ‘VendorMapFilename’ you just found out in the Rigs of Rods/config/ folder.

  4. Improve and test the mapping by using RoR and a text editor. (see also Input.map)

  • Hint: You might find it easier to copy an existing input map and edit commands to match your controller.
  1. When you are finished with your configuration, copy and paste relevant infos from inputinfo.txt into your map file. Also make a comment (“;” marks the rest of the line as a comment) after every command which button is used so others can easily see what button they have to use. See template:
;This is the input map for the Rigs of Rods game for the following device:
;
;"Xbox 360 Wireless Controller for Windows" by Microsoft
;
; created by Foobar in September 2012. 
;
;Joystick 1
;   Vendor: Controller (Xbox 360 Wireless Receiver for Windows)
;   VendorMapFilename: Controller__Xbox_360_Wireless_Receiver_for_Windows_.map
;   ID: 0
;   Type: [3] OISJoyStick
;   Axes: 5
;   Sliders: 0
;   POV/HATs: 1
;   Buttons: 10
;   Vector3: 0
;   Vector3Sensitivity: 2.28
;
;Control Overview:
;* Axis 1 (the up/down): accelerate/brake
;* Button 1 : (big red thing in the middle) : Horn
;...

; AIRPLANE
AIRPLANE_PARKING_BRAKE          JoystickButton       0 6 ;back
AIRPLANE_THROTTLE_DOWN          JoystickButton       0 2 ;X
AIRPLANE_THROTTLE_UP            JoystickButton       0 1 ;B
...
  1. Submit .map as a new post [here](http://www.rigsofrods.com/threads/96556-Joystick-specific-Input-maps)

Thank you!

Category:File Format