Customizing/Binding: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (linked to key_config.txt for reference)
 
(43 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==How to bind (from [http://oni.bungie.org/information/binding.html OniCentral])==
In the absence of a control settings screen within Oni, most players set their key bindings manually by editing '''[[key_config.txt]]''', though there are GUI solutions like [[Oni Key Editor]] and [[KeyConfig]].
When you want to add your own controls, make sure you do it underneath the heading "unbindall" and above "# default controls" in "key_config.txt".
{{UpdatedForOniX|1.0.0}}
 
{{TOClimit}}
You can delete binds from "# default controls", but make sure the bind is in the "unbindall" area. Edit the controls in "# misc" freely.
==How to bind keys==
When changing/adding bindings, make sure you do it underneath the "unbindall" command. To reset your bindings to default, delete key_config.txt and launch Oni to generate a clean version of the file.


The bind command is structured the following way:
The bind command is structured the following way:
  bind *key* to *action*
  bind *key* to *action*


So if you would want to bind "kick" to / you would type:
So if you wanted to kick with the '/' key, you would type:
  bind slash to kick
  bind slash to kick


N.B. Bindings that can't be changed are '''F8''' (bound to shapeshifter) and '''Esc''' (exits to Main Menu and resumes).
To disable a binding without removing it from the file, comment it out with the '#' symbol:
#bind slash to kick


==Bindable key names==
Below are the names of the keys you can bind actions to. Keys attached to developer functions have default key bindings that don't show up in key_config.txt; the keys which are likely to trigger a function when Developer Mode is on are listed in the table below. See [[Developer Mode]] for all the bindings. Note that these default bindings cannot be unbound, even though new actions can be bound to the same keys. Let's say that you added <code>bind fkey8 to swap</code> to key_config.txt. When Developer Mode is off, F8 will draw your weapon, and when Dev Mode is on it will cycle through playable characters.


==Bindable keys==
To see if the key or button you're trying to bind to is being received by Oni, you can enter <tt>chr_debug_characters=1</tt> into the developer console and watch the keypress event bitset in the display at the upper-right; it should be changing as you press and hold keys. Note that '''Esc''' is hardcoded to toggle the Main Menu and cannot be bound to anything else.
{|border="1" cellpadding="5" cellspacing="0" align="center"
 
|+Bindable keys
{|class="wikitable" style="margin-left:auto; margin-right:auto;"
!Key description
!Key description
!Syntax
!Name
!Reserved in Dev Mode
|-
|-
|Mouse/joystick/gamepad horizontal/vertical/other axis
|Mouse/joystick/gamepad horizontal/vertical/other axis
|mousexaxis, mouseyaxis, mousezaxis
|mousexaxis, mouseyaxis, mousezaxis
| -
|-
|Mouse/joystick/gamepad button 1 ... 4
|mousebutton1 ... mousebutton4
| -
|-
|-
|0 ... 9, A ... Z
|0 ... 9, A ... Z
|0 ... 9, a ... z (lowercase)
|0 ... 9<ref name="numpad" />, a ... z (lowercase)
| -
|-
|-
|F1 ... F12 ... F15
|F1 ... F12 ... F15
|fkey1 ... fkey12 ... fkey15
|fkey1 ... fkey12 ... fkey15
|F2, F3, F6, F7, F8, F9, F10, F11
|-
|-
|Up/Down/Left/Right Arrow
|Up/down/left/right arrow
|uparrow, downarrow, leftarrow, rightarrow
|uparrow, downarrow, leftarrow, rightarrow
|All arrow keys
|-
|-
|Space, Backspace, Tab, Enter
|Space, Backspace, Tab, Enter
|space, backspace, tab, enter
|space, backspace, tab, enter
|Enter
|-
|-
|Num Pad 0 ... Num Pad 9
|Num Pad 0 ... Num Pad 9
|numpad0 ... numpad9
|numpad0 ... numpad9<ref name="numpad">On Macs, bindings using <tt>0 ... 9</tt> will be bound to both the keyboard's and numeric pad's 0-9 keys in lieu of support for num pad-specific bindings on Mac.</ref>
| -
|-
|-
|Num Pad '''* / + - .'''
|Num Pad * / + - .
|multiply, divide, add, substract, decimal
|multiply, divide, add, subtract, decimal
| -
|-
|-
|Num Pad Enter, Num Pad =
|Num Pad Enter, Num Pad =
|numpadenter, numpadequals
|numpadenter, numpadequals
| -
|-
|-
|Print Screen, Pause, Insert, Delete
|Print Screen, Pause, Insert, Delete
|printscreen, pause, insert, delete
|printscreen, pause, insert, delete
| -
|-
|-
|Page Up/Down, Home, End
|Page Up/Down, Home, End
|pageup, pagedown, home, end
|pageup, pagedown, home, end
|Page Up/Down, End
|-
|-
|Caps Lock, Num Lock, Scroll Lock
|Caps Lock, Num Lock, Scroll Lock
|capslock, numlock, scrolllock
|capslock, numlock, scrolllock
| -
|-
|-
|<tt>, . ; '</tt>
|<tt>, . ; '</tt>
|comma, period, semicolon, apostrophe
|comma, period, semicolon, apostrophe
|. (period)
|-
|-
|[ ] / \
|[ ] / \
|rightbracket, leftbracket, slash, backslash
|rightbracket, leftbracket, slash, backslash
|[, ] and /
|-
|-
|Left/Right Shift
|Left/Right Shift
|leftshift/rightshift
|leftshift/rightshift
| -
|-
|-
|Left/Right Control
|Left/Right Control
|leftcontrol/rightcontrol
|leftcontrol/rightcontrol
| -
|-
|-
|Left/Right Alt
|(Windows only) Left/Right Alt
|leftalt/rightalt
|leftalt/rightalt
| -
|-
|-
|(Mac only) Left/Right Option
|(Mac only) Left/Right Option
|leftoption/rightoption
|leftoption/rightoption
| -
|-
|-
|(PC only) Left/Right Windows
|(Windows only) Left/Right Windows
|leftwindows/rightwindows
|leftwindows/rightwindows
| -
|}
|}


<references />


==Bindable events==
==Bindable action names==
{|border="1" cellpadding="5" cellspacing="0" align="center"
{|class="wikitable" style="margin-left:auto; margin-right:auto;"
|+Bindable events
!Action
!Event description
!Name
!Syntax
!Restrictions
!<tt>[[#lock_keys|lock_keys]]</tt> group
|-
|-
|Forward
|Horizontal/Vertical Aiming
|forward
|aim_lr/aim_LR, aim_ud/aim_UD
| -
|'''cannot be locked'''
|-
|-
|Left
|Forward, Backward, Strafe Left/Right
|stepleft
|forward, backward, stepleft, stepright
| -
|<tt>keys_movement</tt>
|-
|-
|Backward
|Turn Left/Right
|backward
|turnleft/turnright
| -
|<tt>keys_all</tt>
|-
|-
|Right
|Jump, Crouch, Walk
|right
|jump, crouch, [[#walk|walk]]
| -
|<tt>keys_jump, keys_crouch, keys_walk</tt>
|-
|-
|weapon/holster/pick up)
|Draw/Holster Weapon, Pick Up
|swap
|swap
| -
|<tt>keys_inventory</tt>
|-
|-
|Drop weapon
|Drop Weapon
|drop
|drop
| -
|<tt>keys_inventory</tt>
|-
|-
|Jump
|Reload Weapon
|jump
|reload
| -
|<tt>keys_reload</tt>
|-
|-
|Punch
|Weapon Safety
|punch
|weapon_safety
|Intel Mac build only
|<tt>keys_all</tt>
|-
|-
|Kick
|Punch, Kick, Fire1 ... Fire3
|kick
|punch, kick, [[#fire1, fire2, fire3|fire1 ... fire3]]
| -
|<tt>keys_attack</tt>
|-
|-
|Crouch
|Use Hypo
|crouch
|hypo
| -
|<tt>keys_hypo</tt>
|-
|-
|Walk
|Use Console/Door, Talk, Taunt
|walk
|action
| -
|<tt>keys_action</tt>
|-
|-
|Hypo
|Escape/Resume
|hypo
|escape
| -
|'''cannot be locked'''
|-
|Pause Screen
|pausescreen
| -
|<tt>keys_pause</tt>
|-
|Look Mode
|[[#lookmode|lookmode]]
| -
|<tt>keys_all</tt>
|-
|Screenshot
|[[#screenshot|screenshot]]
| -
|'''cannot be locked'''
|-
|''Use Cheat''
|''cheatcode'', e.g. fatloot
| Requires Daodan DLL or Intel Mac build
|<tt>keys_all</tt>
|-
|Open Developer Console
|console
| Developer Mode must be active
|'''cannot be locked'''
|-
|-
|Reload
|Start/Stop/Play Recording
|reload
|[[#start_record, stop_record, play_record|start_record, stop_record, play_record]]
| -
|'''cannot be locked'''
|-
|-
|Custom Key 1
|Custom Animation Binding 1 and 2
|cutscene_1
|[[#cutscene1, cutscene2|cutscene1, cutscene2]]
| Must be recording a film
|'''cannot be locked'''
|-
|-
|Custom Key 2
|[[#Detached camera controls|Detached camera controls]]
|cutscene_2
|man_cam_move_up, man_cam_move_down,<br>man_cam_move_left, man_cam_move_right,<br>man_cam_move_forward, man_cam_move_backward,<br>man_cam_pan_up, man_cam_pan_down, <br>man_cam_pan_left, man_cam_pan_right
| Developer Mode must be active
|'''cannot be locked'''
|}
|}
This is ''very'' incomplete. Filling in slowly...


===lock_keys===
<tt>lock_keys</tt> is a [[BSL]] command used by Oni in the Training level to prevent the player from doing certain actions until he is prompted to. The keys were arranged for this purpose into "lock_keys groups", the names for which are given above. Passing one of those names to <tt>lock_keys</tt> prevents that kind of input.
===fire1, fire2, fire3===
*'''fire1''' fires your gun's primary ammunition when available (if your gun isn't empty), and doubles as '''punch''' otherwise.
*'''fire2''' fires your gun's secondary ammunition when available (only for the Wave Motion Cannon) and doubles as '''kick''' otherwise.
*'''fire3''' fires your gun's tertiary ammunition when available (never) and doubles as '''crouch''' otherwise.
===walk===
While you hold this key, your character walks (or sashays in the case of Konoko :D ) instead of running. Like crouch-running (holding crouch while moving), walking does not make any noise that alerts enemies. You can also hold the crouch and walk keys together for the slowest form of movement, crouch-walking.
===lookmode===
*While you hold this key, the body facing can't be changed with the horizontal aiming input (such as '''mousexaxis''').
*The facing direction is then "locked" (you can still turn with the '''turnleft''' and '''turnright''' keys).
*Your horizontal aiming input then lets you look a full 90 degrees right and left (45 degrees when aiming with some weapons).
*When you release the '''lookmode''' key, your "lookspring" snaps your facing back to 0 degrees (straight ahead). Unless, that is, you've <tt>chr_focus</tt>ed to an AI.
===screenshot===
*This stores a screenshot in BMP format (an uncompressed bitmap) in Oni's folder with the name '''screen_shot#####.bmp'''.
*The size of the screenshot is normally the resolution of the game, as specified in '''Options''', but you can set the runtime variable <tt>gs_screen_shot_reduce</tt> using the Developer Mode console to downsample the bitmap by a power of 2.<br>Thus, if you play Oni in 640x480, the bitmaps you'll get will be:
**640x480 if <tt>gs_screen_shot_reduce=0</tt> (default)
**320x240 if <tt>gs_screen_shot_reduce=1</tt>
**160x120 if <tt>gs_screen_shot_reduce=2</tt>....
*See the [[:Category:Screenshots]] page for tips on taking screenshots efficiently and without the HUD in the way.
===start_record, stop_record, play_record===
====What it's meant for====
This is a development feature Bungie used to author cutscene character animations.
*When you press the <tt>start_record</tt> key, Oni stores the authored character's position, body facing and aiming direction, then keeps recording all input events (keyboard and mouse) in a buffer until you press the <tt>stop_record</tt> key.
*When you press the <tt>play_record</tt> key, the initial conditions stored at <tt>start_record</tt>-time are applied to the authored character, then the event buffer is read from, and the events are applied to your character as if you were providing the recorded input. Your actual input is ignored until the "movie" is done "playing".
*The buffer has a limited size (quite big, about half an hour of non-stop action). '''Overflowing it makes Oni crash.'''
*The contents of the event buffer is dumped in generic binary files called '''saved_film###.dat''' in Oni's folder. Those dumped event buffers can ''not'' be read from and applied to custom characters via scripting. However, they are what Bungie developers used for generating the FILM binaries we can call up with <tt>chr_playback</tt>.
====What you can use it for====
*You can use this feature to "teleport" back to a place where you've already been. "Plant" a "teleporter" by pressing <tt>start_record</tt> then <tt>stop_record</tt> right afterwards; at any later time, pressing <tt>play_record</tt> will bring you back to the last "teleporter" you have thus "planted".
*Expert gamers have used the above "teleporting" technique to perform so-called "film-jumping".
===cutscene1, cutscene2===
====What it's meant for====
This is another part of the cutscene authoring process detailed above. First you set up the bindings using the BSL variables sc_bind_f2 and sc_bind_f2, then you start recording a cutscene, then you press <tt>cutscene1</tt> or <tt>cutscene2</tt> to play back the animation.
*Here's how the first step would look:
sc_bind_f2="KONCOMsuper_kick";
sc_bind_f3="KONOKOendpowerup";
*Then press F9 to start recording a film. The cutscene keys do not work otherwise.
*Then press F2 or F3 (or your custom binding) to play the designated animation.
*The custom animations' names are stored in the event buffer, so the right animations will appear during playback even if '''sc_bind_f2''' and '''sc_bind_f3''' are changed afterward.
====What you can use it for====
*You can use it for playing custom animations in-game (like normally unavailable combat moves), any time you want, as long as you press the <tt>start_record</tt> key first.
===Detached camera controls===
See the [[Developer Mode]] page for where and how to use these controls.
====Missing Mac controls====
The camera-panning movements for Mac are automatically bound to the numeric keypad in Oni, but Oni for the Mac lacks the ability to bind keys to the numpad, so these controls will be missing. To fully control the free-flying camera on the Mac, add bindings to key_config.txt for the following four events:
*man_cam_pan_up
*man_cam_pan_down
*man_cam_pan_left
*man_cam_pan_right
The Mac treats the key bindings "0-9" as both "0-9" and "numpad0-numpad9", so if you bind the above movements as follows, you can use the numeric pad just as Bungie West intended the Mac build to work:
bind 8 to man_cam_pan_up
bind 2 to man_cam_pan_down
bind 6 to man_cam_pan_left
bind 4 to man_cam_pan_right


==Related issues==
[[Category:Oni Support]][[Category:OniX-affected articles]]
*the [[lock_keys|<tt>lock_keys</tt>]] scripting command.

Latest revision as of 17:58, 2 March 2024

In the absence of a control settings screen within Oni, most players set their key bindings manually by editing key_config.txt, though there are GUI solutions like Oni Key Editor and KeyConfig.

How to bind keys

When changing/adding bindings, make sure you do it underneath the "unbindall" command. To reset your bindings to default, delete key_config.txt and launch Oni to generate a clean version of the file.

The bind command is structured the following way:

bind *key* to *action*

So if you wanted to kick with the '/' key, you would type:

bind slash to kick

To disable a binding without removing it from the file, comment it out with the '#' symbol:

#bind slash to kick

Bindable key names

Below are the names of the keys you can bind actions to. Keys attached to developer functions have default key bindings that don't show up in key_config.txt; the keys which are likely to trigger a function when Developer Mode is on are listed in the table below. See Developer Mode for all the bindings. Note that these default bindings cannot be unbound, even though new actions can be bound to the same keys. Let's say that you added bind fkey8 to swap to key_config.txt. When Developer Mode is off, F8 will draw your weapon, and when Dev Mode is on it will cycle through playable characters.

To see if the key or button you're trying to bind to is being received by Oni, you can enter chr_debug_characters=1 into the developer console and watch the keypress event bitset in the display at the upper-right; it should be changing as you press and hold keys. Note that Esc is hardcoded to toggle the Main Menu and cannot be bound to anything else.

Key description Name Reserved in Dev Mode
Mouse/joystick/gamepad horizontal/vertical/other axis mousexaxis, mouseyaxis, mousezaxis -
Mouse/joystick/gamepad button 1 ... 4 mousebutton1 ... mousebutton4 -
0 ... 9, A ... Z 0 ... 9[1], a ... z (lowercase) -
F1 ... F12 ... F15 fkey1 ... fkey12 ... fkey15 F2, F3, F6, F7, F8, F9, F10, F11
Up/down/left/right arrow uparrow, downarrow, leftarrow, rightarrow All arrow keys
Space, Backspace, Tab, Enter space, backspace, tab, enter Enter
Num Pad 0 ... Num Pad 9 numpad0 ... numpad9[1] -
Num Pad * / + - . multiply, divide, add, subtract, decimal -
Num Pad Enter, Num Pad = numpadenter, numpadequals -
Print Screen, Pause, Insert, Delete printscreen, pause, insert, delete -
Page Up/Down, Home, End pageup, pagedown, home, end Page Up/Down, End
Caps Lock, Num Lock, Scroll Lock capslock, numlock, scrolllock -
, . ; ' comma, period, semicolon, apostrophe . (period)
[ ] / \ rightbracket, leftbracket, slash, backslash [, ] and /
Left/Right Shift leftshift/rightshift -
Left/Right Control leftcontrol/rightcontrol -
(Windows only) Left/Right Alt leftalt/rightalt -
(Mac only) Left/Right Option leftoption/rightoption -
(Windows only) Left/Right Windows leftwindows/rightwindows -
  1. 1.0 1.1 On Macs, bindings using 0 ... 9 will be bound to both the keyboard's and numeric pad's 0-9 keys in lieu of support for num pad-specific bindings on Mac.

Bindable action names

Action Name Restrictions lock_keys group
Horizontal/Vertical Aiming aim_lr/aim_LR, aim_ud/aim_UD - cannot be locked
Forward, Backward, Strafe Left/Right forward, backward, stepleft, stepright - keys_movement
Turn Left/Right turnleft/turnright - keys_all
Jump, Crouch, Walk jump, crouch, walk - keys_jump, keys_crouch, keys_walk
Draw/Holster Weapon, Pick Up swap - keys_inventory
Drop Weapon drop - keys_inventory
Reload Weapon reload - keys_reload
Weapon Safety weapon_safety Intel Mac build only keys_all
Punch, Kick, Fire1 ... Fire3 punch, kick, fire1 ... fire3 - keys_attack
Use Hypo hypo - keys_hypo
Use Console/Door, Talk, Taunt action - keys_action
Escape/Resume escape - cannot be locked
Pause Screen pausescreen - keys_pause
Look Mode lookmode - keys_all
Screenshot screenshot - cannot be locked
Use Cheat cheatcode, e.g. fatloot Requires Daodan DLL or Intel Mac build keys_all
Open Developer Console console Developer Mode must be active cannot be locked
Start/Stop/Play Recording start_record, stop_record, play_record - cannot be locked
Custom Animation Binding 1 and 2 cutscene1, cutscene2 Must be recording a film cannot be locked
Detached camera controls man_cam_move_up, man_cam_move_down,
man_cam_move_left, man_cam_move_right,
man_cam_move_forward, man_cam_move_backward,
man_cam_pan_up, man_cam_pan_down,
man_cam_pan_left, man_cam_pan_right
Developer Mode must be active cannot be locked

lock_keys

lock_keys is a BSL command used by Oni in the Training level to prevent the player from doing certain actions until he is prompted to. The keys were arranged for this purpose into "lock_keys groups", the names for which are given above. Passing one of those names to lock_keys prevents that kind of input.

fire1, fire2, fire3

  • fire1 fires your gun's primary ammunition when available (if your gun isn't empty), and doubles as punch otherwise.
  • fire2 fires your gun's secondary ammunition when available (only for the Wave Motion Cannon) and doubles as kick otherwise.
  • fire3 fires your gun's tertiary ammunition when available (never) and doubles as crouch otherwise.

walk

While you hold this key, your character walks (or sashays in the case of Konoko :D ) instead of running. Like crouch-running (holding crouch while moving), walking does not make any noise that alerts enemies. You can also hold the crouch and walk keys together for the slowest form of movement, crouch-walking.

lookmode

  • While you hold this key, the body facing can't be changed with the horizontal aiming input (such as mousexaxis).
  • The facing direction is then "locked" (you can still turn with the turnleft and turnright keys).
  • Your horizontal aiming input then lets you look a full 90 degrees right and left (45 degrees when aiming with some weapons).
  • When you release the lookmode key, your "lookspring" snaps your facing back to 0 degrees (straight ahead). Unless, that is, you've chr_focused to an AI.

screenshot

  • This stores a screenshot in BMP format (an uncompressed bitmap) in Oni's folder with the name screen_shot#####.bmp.
  • The size of the screenshot is normally the resolution of the game, as specified in Options, but you can set the runtime variable gs_screen_shot_reduce using the Developer Mode console to downsample the bitmap by a power of 2.
    Thus, if you play Oni in 640x480, the bitmaps you'll get will be:
    • 640x480 if gs_screen_shot_reduce=0 (default)
    • 320x240 if gs_screen_shot_reduce=1
    • 160x120 if gs_screen_shot_reduce=2....
  • See the Category:Screenshots page for tips on taking screenshots efficiently and without the HUD in the way.

start_record, stop_record, play_record

What it's meant for

This is a development feature Bungie used to author cutscene character animations.

  • When you press the start_record key, Oni stores the authored character's position, body facing and aiming direction, then keeps recording all input events (keyboard and mouse) in a buffer until you press the stop_record key.
  • When you press the play_record key, the initial conditions stored at start_record-time are applied to the authored character, then the event buffer is read from, and the events are applied to your character as if you were providing the recorded input. Your actual input is ignored until the "movie" is done "playing".
  • The buffer has a limited size (quite big, about half an hour of non-stop action). Overflowing it makes Oni crash.
  • The contents of the event buffer is dumped in generic binary files called saved_film###.dat in Oni's folder. Those dumped event buffers can not be read from and applied to custom characters via scripting. However, they are what Bungie developers used for generating the FILM binaries we can call up with chr_playback.

What you can use it for

  • You can use this feature to "teleport" back to a place where you've already been. "Plant" a "teleporter" by pressing start_record then stop_record right afterwards; at any later time, pressing play_record will bring you back to the last "teleporter" you have thus "planted".
  • Expert gamers have used the above "teleporting" technique to perform so-called "film-jumping".

cutscene1, cutscene2

What it's meant for

This is another part of the cutscene authoring process detailed above. First you set up the bindings using the BSL variables sc_bind_f2 and sc_bind_f2, then you start recording a cutscene, then you press cutscene1 or cutscene2 to play back the animation.

  • Here's how the first step would look:
sc_bind_f2="KONCOMsuper_kick";
sc_bind_f3="KONOKOendpowerup";
  • Then press F9 to start recording a film. The cutscene keys do not work otherwise.
  • Then press F2 or F3 (or your custom binding) to play the designated animation.
  • The custom animations' names are stored in the event buffer, so the right animations will appear during playback even if sc_bind_f2 and sc_bind_f3 are changed afterward.

What you can use it for

  • You can use it for playing custom animations in-game (like normally unavailable combat moves), any time you want, as long as you press the start_record key first.

Detached camera controls

See the Developer Mode page for where and how to use these controls.

Missing Mac controls

The camera-panning movements for Mac are automatically bound to the numeric keypad in Oni, but Oni for the Mac lacks the ability to bind keys to the numpad, so these controls will be missing. To fully control the free-flying camera on the Mac, add bindings to key_config.txt for the following four events:

  • man_cam_pan_up
  • man_cam_pan_down
  • man_cam_pan_left
  • man_cam_pan_right

The Mac treats the key bindings "0-9" as both "0-9" and "numpad0-numpad9", so if you bind the above movements as follows, you can use the numeric pad just as Bungie West intended the Mac build to work:

bind 8 to man_cam_pan_up
bind 2 to man_cam_pan_down
bind 6 to man_cam_pan_left
bind 4 to man_cam_pan_right