Derail Valley mod for analogue control in locomotives
There is only one joystick configured in the game. Multiple attached controllers will fight each other. 99% Sure this wont work with VR.
This mod puts the value on your controller axis into the in game axis. You should use a controller which holds its current value such as a HOTAS throttle. Don't try and use something like an xbox controller.
For button mappings please use your joystick/controller utility or 3rd party software to map buttons to keys
LocoAnalogueControlMod.dll
and Info.json
into the Derail Valley\Mods\LocoAnalogueControlMod
folderconfig.json
in the mod folderconfig.json
for each input.
AxisName
is the in game joystick axis name which is assigned an axis number. See Understanding Joystick Mapping. Leave any unused inputs as a blank stringScaling
Allows you to apply a scaling to an axis in case it doesnt saturate the full range. Applying a negative scaling will invert the axisFullRange
takes a -1 to 1 range and maps it to 0 to 1Debug
enables printing the value being applied to the mod manager log. Enable this for first time setup.DeadZoneCentral
is the percentage of the axis where an input value will produce a 0 value expressed as a float. 0.1 = 10%DeadZoneEnds
is the percentage of the axis where an input value will produce a -1/1 value expressed as a float. 0.1 = 10% ctrl + F10
) to reload the config and hop into a locomotiveconfig.json
then disable and re-enable the modThe in game axis names need to be provided to the config json to grab the correct axis number from your controller. All controllers use the same axis names so multiple controllers are not supported unless the devs change this behaviour.
A simple way to find the controller axis numbers is through Windows game controllers test utility.
This can be opened with WinKey + R
then typing joy.cpl
. Select the apropriate device (there should only be one connected) and select Properties
followed by Test
. You can then get the game axis name from the table.
Input Axis Number | Game Axis Name | Windows Axis Name | Inverted in game |
---|---|---|---|
0 | Oculus_GearVR_LThumbstickX | X Axis | False |
1 | Oculus_GearVR_LThumbstickY | Y Axis | True |
2 | Oculus_GearVR_RThumbstickX | Z Axis | False |
3 | Oculus_GearVR_RThumbstickY | X Rotation | True |
4 | Oculus_GearVR_DpadX | Y Rotation | False |
5 | Oculus_GearVR_DpadY | Z Rotation | True |
11 | Oculus_GearVR_LIndexTrigger | False | |
12 | Oculus_GearVR_RIndexTrigger | False |