Skip to content

Instantly share code, notes, and snippets.

@Kein
Created October 8, 2024 23:54
Show Gist options
  • Save Kein/36be6878394a9a7f4f4400c11456258f to your computer and use it in GitHub Desktop.
Save Kein/36be6878394a9a7f4f4400c11456258f to your computer and use it in GitHub Desktop.
-----------------------------------------------------------------------
[REBINDING CONTROLS]
-----------------------------------------------------------------------
This is for advanced users. READ CAREFULLY, this is your only source on
how to do so, there is no live support.
List of valid UE keynames:
https://nerivec.github.io/old-ue4-wiki/pages/list-of-keygamepad-input-names.html
- BASIC ACTIONS:
This mod allows you to rebind default controls to either keyboard or
XPad. This is done via the same config above. Keybind format is split
into 2 categories for basic input: ActionMapping and AxisMapping.
In order to add/replace default, you simply add relevant line to either
"ActionMappings" or "AxisMappings" property in the config, for example:
[/Game/Mods/VTSpectator/ABPML_Mod_VTSpectator.ABPML_Mod_VTSpectator_C]
; some other options here
ActionMappings=(ActionName="VTToggleSpectator",bShift=True,Key=F1)
ActionMappings=(ActionName="VTSpeedUp",Key=RightShift)
AxisMappings=(AxisName="VTMoveForward",Scale=1.000000,Key=O)
This will change the bindings to toggle flycam from CTRL+BACKSPACE
to SHIFT+F1, changes SpeedUp key to RightShift instead and, finally,
changes MoveForward input to "O", instead of "W". Do note that unlike
plain options, the input ones have to be repeated, because they are
additive, i.e. two subsequent "ActionMappings" definitions do NOT
override each other, they complement.
Here is all default values:
;-
ActionMappings=(ActionName="VTToggleSpectator",bCtrl=True,bShift=False,bAlt=False,Key=Backspace)
ActionMappings=(ActionName="VTSpeedUp",Key=LeftShift)
ActionMappings=(ActionName="VTSlowDown",Key=LeftAlt)
ActionMappings=(ActionName="VTRestore",bShift=True,Key=Escape)
;-
AxisMappings=(AxisName="VTMoveForward",Scale=1.000000,Key=W)
AxisMappings=(AxisName="VTMoveForward",Scale=1.000000,Key=Gamepad_LeftStick_Up)
AxisMappings=(AxisName="VTMoveBackwards",Scale=-1.000000,Key=S)
AxisMappings=(AxisName="VTMoveBackwards",Scale=-1.000000,Key=Gamepad_LeftStick_Down)
AxisMappings=(AxisName="VTMoveRight",Scale=1.000000,Key=D)
AxisMappings=(AxisName="VTMoveRight",Scale=1.000000,Key=Gamepad_LeftStick_Right)
AxisMappings=(AxisName="VTMoveLeft",Scale=-1.000000,Key=A)
AxisMappings=(AxisName="VTMoveLeft",Scale=-1.000000,Key=Gamepad_LeftStick_Left)
AxisMappings=(AxisName="VTCamLeftRight",Scale=1.000000,Key=Gamepad_RightX)
AxisMappings=(AxisName="VTCamLeftRight",Scale=1.000000,Key=MouseX)
AxisMappings=(AxisName="VTCamUpDown",Scale=1.000000,Key=Gamepad_RightY)
AxisMappings=(AxisName="VTCamUpDown",Scale=1.000000,Key=MouseY)
So, to put it simply, you can just replace the key name string in the binding
and add it to config. Just make sure to avoid changing "ActioName"!! You can
change axis "Scale", if you desire, for example, to invert mouse-look.
And just like with other
- MODULE COMMANDS
Module rebinding slightly differs from basic actions. First, you need to
define "CommandsKey" in the general config above. By default it is "LeftCtrl",
and this key only accepts keyboard modifier keys: CTRL, ALT, SHIFT
Then, you can change the chord key used for module commands, such as Teleport
or Hide UI. Chord means it has to be used in pair to be triggered, for example,
default binding for "Teleport" is CTRL+F1, which means you have to first press
"LeftCtrl" and then, while keeping it down, press F1.
Here is full config for AH Module (do note that category path is separate for module!):
[/Game/Mods/VTSpectator/Core/Generic/AC_VTModule.AC_VTModule_C]
Commands=((Equals, "TimeDilationUp"),(Hyphen, "TimeDilationDown"),(Zero, "TimeDilationReset"),(F1, "Teleport"),(F2, "HideUI"),(F3, "TogglePause"))
As you can see, this one can be defined in a single line and only accepts
the final chord key, the first key - modifier - you specify in the base
config for the mod.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment