Customizing/Binding: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (the end of this article is an unfinished mess)
(total review, rewrite and update)
Line 1: Line 1:
{{update}}
<div class="toclimit-2">__TOC__</div>
==How to bind (from [http://oni.bungie.org/information/binding.html OniCentral])==
==How to bind keys==
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".
When you want to add your own controls to '''key_config.txt''', make sure you do it underneath the heading "unbindall". To reset your bindings to default, delete key_config.txt and launch Oni to get a clean binding config generated.
 
You can delete binds from "# default controls", but make sure the bind is in the "unbindall" area. Edit the controls in "# misc" freely.


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 would want to bind "kick" to '/' you would type:
  bind slash to kick
  bind slash to kick


N.B. Bindings that can't be changed are :
Bindings that can't be changed are :
*'''F8''' and '''Shift+F8''' (bound to cycling through available characters when '''shapeshifter''' is enabled)
*'''F8''' and '''Shift+F8''' (cycles through available characters when '''shapeshifter''' or [[Dev Mode]] is enabled)
*'''Esc''' (exits to Main Menu and resumes).
*'''Esc''' (toggles Main Menu while playing).


==Bindable keys==
==Bindable keys==
{|border="1" cellpadding="5" cellspacing="0" style="margin-left:auto; margin-right:auto;"
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> on the console and watch the keypress event bitset in the display at the upper-right; it should be changing as you press and hold keys.
|+Bindable keys
 
{|class="wikitable" style="margin-left:auto; margin-right:auto;"
!Key description
!Key description
!Syntax
!Syntax
Line 28: Line 27:
|-
|-
|0 ... 9, A ... Z
|0 ... 9, A ... Z
|0 ... 9, a ... z (lowercase)
|0 ... 9*, a ... z (lowercase)
|-
|-
|F1 ... F12 ... F15
|F1 ... F12 ... F15
Line 40: Line 39:
|-
|-
|Num Pad 0 ... Num Pad 9
|Num Pad 0 ... Num Pad 9
|numpad0 ... numpad9
|(PC only) numpad0 ... numpad9*
|-
|-
|Num Pad '''* / + - .'''
|Num Pad '''* / + - .'''
Line 79: Line 78:
|}
|}


==Bindable events==
<nowiki>*</nowiki>On Macs, bindings using "0-9" will be bound to both the keyboard and numpad 0-9 (in lieu of separate numpad bindings on Mac).
{|border="1" cellpadding="5" cellspacing="0" style="margin-left:auto; margin-right:auto;"
 
|+Bindable events
==Regular bindable events==
{|class="wikitable" style="margin-left:auto; margin-right:auto;"
!Event description
!Event description
!Syntax
!Syntax
!<tt>lock_keys</tt> group
!<tt>[[#lock_keys|lock_keys]]</tt> group
|-
|-
|Horizontal/Vertical Aiming
|Horizontal/Vertical Aiming
Line 99: Line 99:
|-
|-
|Jump, Crouch, Walk
|Jump, Crouch, Walk
|jump, crouch, walk
|jump, crouch, [[#walk|walk]]
|<tt>keys_jump, keys_crouch, keys_walk</tt>
|<tt>keys_jump, keys_crouch, keys_walk</tt>
|-
|-
Line 115: Line 115:
|-
|-
|Punch, Kick, Fire1 ... Fire3
|Punch, Kick, Fire1 ... Fire3
|punch, kick, fire1 ... fire3 '''(1)'''
|punch, kick, [[#fire1, fire2, fire3|fire1 ... fire3]]
|<tt>keys_attack</tt>
|<tt>keys_attack</tt>
|-
|-
Line 135: Line 135:
|-
|-
|Look Mode
|Look Mode
|lookmode
|[[#lookmode|lookmode]]
|<tt>keys_all</tt>
|<tt>keys_all</tt>
|-
|-
|Screenshot
|Screenshot
|screenshot
|[[#screenshot|screenshot]]
|NOT AFFECTED
|NOT AFFECTED
|-
|-
|Start/Stop/Play Record
|Start/Stop/Play Record
|start_record, stop_record, play_record
|[[#start_record, stop_record, play_record|start_record, stop_record, play_record]]
|<tt>keys_all</tt>
|<tt>keys_all</tt>
|-
|-
|Custom Animations 1 and 2
|Custom Animations 1 and 2
|cutscene1, cutscene2
|[[#cutscene1, cutscene2|cutscene1, cutscene2]]
|<tt>keys_all</tt>
|<tt>keys_all</tt>
|}
|}
===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 in "lock 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, fire2, fire3===
*'''fire1''' fires your gun's primary ammunition when available (if your gun isn't empty), and doubles as '''punch''' otherwise
*'''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
*'''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 ternary ammunition when available (never) and doubles as '''crouch''' otherwise
*'''fire3''' fires your gun's tertiary ammunition when available (never) and doubles as '''crouch''' otherwise.
 
===walk===
===walk===
While you hold this key, your character walks (or sashays in the case of Konoko :D ) instead of running.
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===
===lookmode===
*While you hold this key, the body facing can't be changed with the horizontal aiming input (such as '''mousexaxis''').
*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)
*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).
*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" relaxes, so that you're facing straight ahead again. Unless, that is, you've <tt>chr_focus</tt>ed to an AI.
*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===
===screenshot===
*This stores a screenshot in uncompressed BMP format in Oni's folder, with the generic name '''screen_shot#####.bmp'''
*This stores a screenshot in uncompressed BMP format in Oni's folder, with the generic name '''screen_shot#####.bmp'''.
*The resolution is normally the one specified in '''Options''', but you can set the runtime variable <tt>gs_screen_shot_reduce</tt> to downsample the bitmap by a factor of 2 to that power.<br>Thus, if you play Oni in 640x480, the bitmaps you'll get will be :
*The size of the screenshot is normally the resolution specified in '''Options''', but you can set the runtime variable <tt>gs_screen_shot_reduce</tt> to downsample the bitmap by a factor of 2 to that power.<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)
**640x480 if <tt>gs_screen_shot_reduce= 0</tt> (default)
**320x240 if <tt>gs_screen_shot_reduce= 1</tt>
**320x240 if <tt>gs_screen_shot_reduce= 1</tt>
**160x120 if <tt>gs_screen_shot_reduce= 2</tt>...
**160x120 if <tt>gs_screen_shot_reduce= 2</tt>....
 
===start_record, stop_record, play_record===
===start_record, stop_record, play_record===
====What it's meant for====
====What it's meant for====
This is a development feature Bungie used to author cutscene character animations.
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,<br>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>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,<br>then the event buffer is read from, and the events are applied to your character as if you were providing the recorded input.<br>You actual input is ignored until the "movie" is done "playing".
*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). Overflow thereof makes Oni crash.
*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.<br>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>.
*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====
====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".
*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 extrapolated the above "teleporting" technique to perform so-called "film-jumping".
*Expert gamers have used the above "teleporting" technique to perform so-called "film-jumping".
 
====What you should be careful about====
*BEWARE OF BUFFER OVERFLOW! If you don't want Oni to crash, be sure to stop recording before the movie buffer is full, read : press the <tt>stop_record</tt> key as soon as the custom animations are no longer needed, or when you've got time to breathe.
*intensive use of <tt>start_record</tt> and <tt>stop_record</tt> generates a lot of '''saved_film###.dat''' files in your Oni folder. You can clean them now and then, e.g. with an automatic cleanup every time you start Oni.


===cutscene1, cutscene2===
===cutscene1, cutscene2===
====What it's meant for====
====What it's meant for====
This is another feature of the cutscene authoring process detailed above
This is another feature of the cutscene authoring process detailed above
*The 2 runtime variables '''sc_bind_f2''' and '''sc_bind_f3''' can be set to hold the names of 2 arbitrary animations, say :
*The 2 runtime variables '''sc_bind_f2''' and '''sc_bind_f3''' can be set to hold the names of 2 arbitrary animations, say:
  sc_bind_f2= "KONCOMsuper_kick";
  sc_bind_f2= "KONCOMsuper_kick";
  sc_bind_f3= "KONOKOendpowerup";
  sc_bind_f3= "KONOKOendpowerup";
*Those two animations can then be applied to the authored character at any time during the authoring, by the pressing the '''cutscene1''' or '''cutscene2''' key.
*Those two animations can then be applied to the authored character at any time during the authoring, by the pressing the '''cutscene1''' or '''cutscene2''' key.
*The custom animation's name is stored in the event buffer, so the ''authored'' animations will appear during playback even if '''sc_bind_f2''' and '''sc_bind_f3''' are reset in the meantime.
*The custom animation's name is stored in the event buffer, so the ''authored'' animations will appear during playback even if '''sc_bind_f2''' and '''sc_bind_f3''' are changed while recording or before playback.
 
====What you can use it for====
====What you can use it for====
*You can use it for playing custom animations (like normally unavailable combat moves) ingame, any time you want
*You can use it for playing custom animations (like normally unavailable combat moves) in-game, any time you want.
*Just press the <tt>start_record</tt> key, and the two custom animations (Konoko's Super Kick and Outro Daodan Blast in the example above) will be available ''via'' the keys you bound to <tt>cutscene1</tt> and <tt>cutscene2</tt>.
*Just press the <tt>start_record</tt> key, and the two custom animations (Konoko's Super Kick and Outro Daodan Blast in the example above) will be available ''via'' the keys you bound to <tt>cutscene1</tt> and <tt>cutscene2</tt>.


=="Secret" events==
==Developer Mode-bindable events==
Those were just as poorly documented as the other ones, the only difference is that we either can't seem to get them to work or couldn't at first.
These events only work when [[Developer Mode]] is active.
===[[Developer Mode]]===
Console toggling
*console


===Detached camera controls===
These controls are automatically bound to the numeric keypad in Windows, but Oni for the Mac lacks those bindings.  To control the free-flying camera on the Mac, add bindings to key_config.txt for the following events:
*man_cam_move_up/down/left/right/forward/backward
*man_cam_pan_up/down/left/right


Detached camera controls
==Unbindable events==
To our knowledge, these events cannot be bound to custom keys, even in Developer Mode. However, their default keys are noted when available (Dev Mode must be on).


These controls are bound to the numpad in Windows, but Oni for the Mac lacks those bindings.  To control the free camera on the Mac, add bindings to key_config.txt for the following events:
{|class="wikitable" style="margin-left:auto; margin-right:auto;"
*man_cam_move_up, man_cam_move_down, man_cam_move_left, man_cam_move_right, man_cam_move_forward, man_cam_move_backward
!Event name
*man_cam_pan_up, man_cam_pan_down, man_cam_pan_left, man_cam_pan_right
!Description
 
!Dev Mode binding
===Either unknown or not checked===
|-
Moves the player forwards (no-clipping) Ctrl+Shift/Alt+U?
|unstick
*unstick
|Moves the player forwards (no-clipping)
Runtime profiling (obsolete) with Ctrl+Shift/Alt+?
|Ctrl+Shift/Alt+U
*profile toggle
|-
Dumps a screenshot for every frame (Ctrl+Shift/Alt+L?
|profile_toggle
*record_screen
|Runtime profiling (obsolete?)
Manages flags near player's position
|Ctrl+Shift/Alt+\
*deleteflag (works)
|-
*addflag (works???)
|record_screen
Functions bound to F# by default in Dev Mode?
|Dumps a screenshot for every frame into Oni folder
*f4, f5, f6, f7, f8, f12
|Ctrl+Shift/Alt+L
Not working but sound nice
|-
*camera_record, camera_stop, camera_play
|delete_flag, add_flag (obsolete?)
*place_quad, place_quad_mode
|Manages flags near player's position
No idea whatsoever
|
*secretx, secrety, secretz
|-
*block (melee blocking?)
|f4, f5, f6, f7, f8, f12
 
|Yes, those are events, not key names (obsolete?)
==Related issues==
|
*the <tt>lock_keys</tt> scripting command.
|-
*the "keypress event bitset" of a character, listed in the box displayed with <tt>chr_debug_characters= 1</tt>.
|camera_record, camera_stop, camera_play
|Not working
|
|-
|place_quad, place_quad_mode
|Not working
|
|-
|secretx, secrety, secretz
|Not working
|
|}


[[Category:Oni Support]]
[[Category:Oni Support]]

Revision as of 15:49, 4 May 2013

How to bind keys

When you want to add your own controls to key_config.txt, make sure you do it underneath the heading "unbindall". To reset your bindings to default, delete key_config.txt and launch Oni to get a clean binding config generated.

The bind command is structured the following way:

bind *key* to *action*

So if you would want to bind "kick" to '/' you would type:

bind slash to kick

Bindings that can't be changed are :

  • F8 and Shift+F8 (cycles through available characters when shapeshifter or Dev Mode is enabled)
  • Esc (toggles Main Menu while playing).

Bindable keys

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 on the console and watch the keypress event bitset in the display at the upper-right; it should be changing as you press and hold keys.

Key description Syntax
Mouse/joystick/gamepad horizontal/vertical/other axis mousexaxis, mouseyaxis, mousezaxis
Mouse/joystick/gamepad button 1 ... 4 mousebutton1 ... mousebutton4
0 ... 9, A ... Z 0 ... 9*, a ... z (lowercase)
F1 ... F12 ... F15 fkey1 ... fkey12 ... fkey15
Up/Down/Left/Right Arrow uparrow, downarrow, leftarrow, rightarrow
Space, Backspace, Tab, Enter space, backspace, tab, enter
Num Pad 0 ... Num Pad 9 (PC only) numpad0 ... numpad9*
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
Caps Lock, Num Lock, Scroll Lock capslock, numlock, scrolllock
, . ; ' comma, period, semicolon, apostrophe
[ ] / \ rightbracket, leftbracket, slash, backslash
Left/Right Shift leftshift/rightshift
Left/Right Control leftcontrol/rightcontrol
Left/Right Alt leftalt/rightalt
(Mac only) Left/Right Option leftoption/rightoption
(PC only) Left/Right Windows leftwindows/rightwindows

*On Macs, bindings using "0-9" will be bound to both the keyboard and numpad 0-9 (in lieu of separate numpad bindings on Mac).

Regular bindable events

Event description Syntax lock_keys group
Horizontal/Vertical Aiming aim_lr/aim_LR, aim_ud/aim_UD NOT AFFECTED
Forward, Backward, Strafe Left/Right forward, backward, stepleft, stepright keys_movement
Turn Left/Right (DOOM-style) 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
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 NOT AFFECTED
Pause Screen pausescreen keys_pause
Look Mode lookmode keys_all
Screenshot screenshot NOT AFFECTED
Start/Stop/Play Record start_record, stop_record, play_record keys_all
Custom Animations 1 and 2 cutscene1, cutscene2 keys_all

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 in "lock 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 uncompressed BMP format in Oni's folder, with the generic name screen_shot#####.bmp.
  • The size of the screenshot is normally the resolution specified in Options, but you can set the runtime variable gs_screen_shot_reduce to downsample the bitmap by a factor of 2 to that power.
    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....

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 feature of the cutscene authoring process detailed above

  • The 2 runtime variables sc_bind_f2 and sc_bind_f3 can be set to hold the names of 2 arbitrary animations, say:
sc_bind_f2= "KONCOMsuper_kick";
sc_bind_f3= "KONOKOendpowerup";
  • Those two animations can then be applied to the authored character at any time during the authoring, by the pressing the cutscene1 or cutscene2 key.
  • The custom animation's name is stored in the event buffer, so the authored animations will appear during playback even if sc_bind_f2 and sc_bind_f3 are changed while recording or before playback.

What you can use it for

  • You can use it for playing custom animations (like normally unavailable combat moves) in-game, any time you want.
  • Just press the start_record key, and the two custom animations (Konoko's Super Kick and Outro Daodan Blast in the example above) will be available via the keys you bound to cutscene1 and cutscene2.

Developer Mode-bindable events

These events only work when Developer Mode is active.

Detached camera controls

These controls are automatically bound to the numeric keypad in Windows, but Oni for the Mac lacks those bindings. To control the free-flying camera on the Mac, add bindings to key_config.txt for the following events:

  • man_cam_move_up/down/left/right/forward/backward
  • man_cam_pan_up/down/left/right

Unbindable events

To our knowledge, these events cannot be bound to custom keys, even in Developer Mode. However, their default keys are noted when available (Dev Mode must be on).

Event name Description Dev Mode binding
unstick Moves the player forwards (no-clipping) Ctrl+Shift/Alt+U
profile_toggle Runtime profiling (obsolete?) Ctrl+Shift/Alt+\
record_screen Dumps a screenshot for every frame into Oni folder Ctrl+Shift/Alt+L
delete_flag, add_flag (obsolete?) Manages flags near player's position
f4, f5, f6, f7, f8, f12 Yes, those are events, not key names (obsolete?)
camera_record, camera_stop, camera_play Not working
place_quad, place_quad_mode Not working
secretx, secrety, secretz Not working