Controls: Difference between revisions
Created page with "== Introduction == OpenBOR’s native control scheme is designed to be intuitive as possible and conform to established standards for side scrolling action games. Through various native options and scripting techniques (see below), creators can map these controls to perform any desired action. You can even rename or remove commands entirely to create a unique control scheme specific to your game. In turn, players may map available commands to desired keys or buttons via..." |
No edit summary |
||
| Line 106: | Line 106: | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
com {sequence} {freespecial#} | com {sequence} {freespecial#} | ||
</syntaxhighlight>Enables mapping single button or command sequences to trigger a desired Freespecial animation. Place com into a model’s text header. You may add multiple commands and cancels, up to the limit defined by the global Maximum Freespecials setting. | </syntaxhighlight>Enables mapping single button or command sequences to trigger a desired Freespecial animation. Place <code>com</code> into a model’s text header. You may add multiple commands and cancels, up to the limit defined by the global Maximum Freespecials setting. | ||
* '''Sequence''' is the input or sequence of inputs to trigger the command. You may use up to sixty-four inputs in one sequence from the following list. Default in game leeway for command sequences is 0.5 seconds allowed between each new input: | * '''Sequence''' is the input or sequence of inputs to trigger the command. You may use up to sixty-four inputs in one sequence from the following list. Default in game leeway for command sequences is 0.5 seconds allowed between each new input: | ||
| Line 124: | Line 124: | ||
** <code>sr</code> - Screenshot. | ** <code>sr</code> - Screenshot. | ||
** <code>+</code> - Chord input. Ex. <code>a + s</code> means press Attack and Special together. | ** <code>+</code> - Chord input. Ex. <code>a + s</code> means press Attack and Special together. | ||
*** <code>+[int time]</code> - Optional grace period | *** <code>+[int grace time (default 0)]</code> - Optional grace period to press all buttons in a chord. Ex. <code>a + s +[100]</code> allows up to 100 ticks to press <code>a</code> and <code>s</code>. Longer grace periods make commands easier, but may also result in overly delayed activation if players are slow with their fingers and give the game an unresponsive, laggy feeling. Adjust to suit your game needs. | ||
** <code>~</code> - Release key. Ex. <code>~a</code> means release Attack. | ** <code>~</code> - Release key. Ex. <code>~a</code> means release Attack. | ||
** <code>[ | ** <code>[min time (default 0)][max time (default 0)</code> - Time constraints for holding key. Must be used in conjunction with another command. Max time is optional. | ||
*** <code>a[50]</code> - Hold <code>a</code> for at least 50 ticks of [[Time#Elapsed Time 2|elapsed time]]. | |||
*** <code>a[50][200]</code> - Hold <code>a</code> for at least 50 ticks, but no more than 200 ticks. | |||
*** <code>a[0][200]</code> - Hold <code>a</code> with no minimum hold time, but no more than 200 ticks. | |||
*** <code>a[0]</code> - Hold <code>a</code> without any time constraints. | |||
** <code>*[int time]</code> - Auto trigger if held for time ticks. Ex. <code>a*[50]</code> means action triggers automatically after holding a for 50 time ticks. | ** <code>*[int time]</code> - Auto trigger if held for time ticks. Ex. <code>a*[50]</code> means action triggers automatically after holding a for 50 time ticks. | ||
** <code>-></code> - Delimiter. Optional, and does not count as an input. | ** <code>-></code> - Delimiter. Optional, and does not count as an input. | ||
| Line 150: | Line 154: | ||
</syntaxhighlight>Cancel is similar to Command, in that it maps command sequences to activate a Freespeical. However, cancels are unique to a single animation and can interrupt the animation on a successful input. This allows “canceling” from one animation to another for customized chains and combos. | </syntaxhighlight>Cancel is similar to Command, in that it maps command sequences to activate a Freespeical. However, cancels are unique to a single animation and can interrupt the animation on a successful input. This allows “canceling” from one animation to another for customized chains and combos. | ||
Place cancels into the animation header of any Jump, Attack, Freespecial, or Follow animation. You may add as many cancels as you like to an animation to give it multiple cancel options. The animation you cancel into may | Place cancels into the animation header of any Jump, Attack, Freespecial, or Follow animation. You may add as many cancels as you like up to maximum allowed specials (see below) to an animation to give it multiple cancel options. The animation you cancel into may also have its own cancels to create an entire series of combo branch points. | ||
* '''Start Frame -''' The first frame in animation cancel is available - Remember that frames are 0 indexed. | * '''Start Frame -''' The first frame in animation cancel is available - Remember that frames are 0 indexed. | ||
| Line 159: | Line 163: | ||
Cancel is otherwise identical to Command and follows the same rules (input sequence, energy cost, etc.). | Cancel is otherwise identical to Command and follows the same rules (input sequence, energy cost, etc.). | ||
== Maximum Freespecials == | |||
<syntaxhighlight lang="text"> | |||
maxfreespecials {int} | |||
#default | |||
maxfreespecials 8 | |||
</syntaxhighlight>Models.txt command that sets amount of allocated special commands (Command and Cancel) per model (not freespecial# animations). If the total number of Cancels and Commands for a given model exceeds the number allotted, you will likely get a nonsensical error or crash. | |||
'''Tip:''' Don’t allocate some silly number like 100 when you only need a few more command slots. This wastes memory. Figure out what you actually need and allocate accordingly. | |||
[[Category:Openbor]] | [[Category:Openbor]] | ||
Revision as of 10:35, 18 July 2026
Introduction
OpenBOR’s native control scheme is designed to be intuitive as possible and conform to established standards for side scrolling action games. Through various native options and scripting techniques (see below), creators can map these controls to perform any desired action. You can even rename or remove commands entirely to create a unique control scheme specific to your game. In turn, players may map available commands to desired keys or buttons via Control Options in the main menu.
Default Keys
OpenBOR allots each player the following inputs and default mappings.
Left
- Move player left on screen.
- Cycle to previous column or option on current row in menus.
- Cycle to previous character during player select.
Right
- Move player right on screen.
- Cycle to next column or option on current row in menus.
- Cycle to next character during player select.
Up
- Moves player up on screen (along Z axis) in pseudo 3D stages.
- Cycle upward through rows in menus.
- Cycle to previous color palette during player select.
Down
- Moves player down on screen (along Z axis) in pseudo 3D stages.
- Crouch/Duck in 2D stages.
- Cycle downward through rows in menus.
- Cycle to next color palette during player select.
Special
- Player Special.
- Blocking if enabled (see ajspecial below).
Jump
- Player Jumping.
Attack 1
- Basic attack.
- Confirm a selection.
- Pick up items.
Attack 2 - Unused.
Attack 3 - Unused.
Attack 4 - Unused.
Start
- Begin or continue a game.
- Join multiplayer game in progress (if not an active player).
- Pause/resume game in progress (if an active player).
Screenshot
- Send a screen capture to Screenshots folder.
- Access main menu during game pause.
In addition, there is a universal Escape key:
- Cycle to previous page in menu.
- Exit player select and return to main menu.
- Shut down engine when not in game or in a menu.
- Resume a paused game.
Renaming Keys
You can rename keys by adding a file to the data folder named menu.txt. Use the following commands in the menu.txt file to customize or remove keys.
renamekey {target command} {new name}disablekey {target command}
Accepted keys for rename or removal:
moveupmovedownmoverightmoveleftattackattack2attack3attack4jumpspecialstartscreenshot
In this example, menu.txt renames Special to Defend and Attack 2 to Magic, while removing unused commands Attack 3 and Attack 4. This presents the player with a more polished set of controls that match actual in game functionality.
renamekey attack Attack
renamekey attack2 Magic
renamekey special Defend
disablekey attack3
disablekey attack4

Alternate Command Functions
You can add to or change the existing functionality of commands entirely. Common examples include adding additional attacks mapped to the normally unused Attack 2+ commands, remapping the player special, or special move sequences.
Command
com {sequence} {freespecial#}
Enables mapping single button or command sequences to trigger a desired Freespecial animation. Place com into a model’s text header. You may add multiple commands and cancels, up to the limit defined by the global Maximum Freespecials setting.
- Sequence is the input or sequence of inputs to trigger the command. You may use up to sixty-four inputs in one sequence from the following list. Default in game leeway for command sequences is 0.5 seconds allowed between each new input:
f- Left/right (same direction character is facing).b- Left/Right (opposite direction character is facing).l- Left.r- Right.u- Up.d- Down.a- Attack 1.a2- Attack 2.a3- Attack 3.a4- Attack 4.j- Jump.s- Special.st- Start.sr- Screenshot.+- Chord input. Ex.a + smeans press Attack and Special together.+[int grace time (default 0)]- Optional grace period to press all buttons in a chord. Ex.a + s +[100]allows up to 100 ticks to pressaands. Longer grace periods make commands easier, but may also result in overly delayed activation if players are slow with their fingers and give the game an unresponsive, laggy feeling. Adjust to suit your game needs.
~- Release key. Ex.~ameans release Attack.[min time (default 0)][max time (default 0)- Time constraints for holding key. Must be used in conjunction with another command. Max time is optional.a[50]- Holdafor at least 50 ticks of elapsed time.a[50][200]- Holdafor at least 50 ticks, but no more than 200 ticks.a[0][200]- Holdawith no minimum hold time, but no more than 200 ticks.a[0]- Holdawithout any time constraints.
*[int time]- Auto trigger if held for time ticks. Ex.a*[50]means action triggers automatically after holding a for 50 time ticks.->- Delimiter. Optional, and does not count as an input.
- Freespecial# is the animation that plays in response to the command, assuming other conditions are met (i.e. having enough energy if the animation has an energy cost).
Example Sequences
com a + a2 freespecial2– Pres Attack and Special together to activate Freespecial 1 animation.com u + f -> a freespecial3– Diagonally up and forward, then press Attack to activate Freespecial 3 animation.com f -> d -> b -> u -> f -> s freespecial5– 360′ rotate from forward to forward, then press Special to activate Freespecial 5.com f[0] + a- Hold forward and press attack to activate Freespecial 6.
Tips
Don’t let the name “freespecial” confuse you. Freesepcials are not inherently “special”. You can use them to create any sort of animation you like, from a simple punch or kick, evasive movement, taunt, or whatever else.
Overly exact commands in a side scrolling environment are not necessary and may make your game more spastic to control instead of more precise. For example, to create the classic Hadouken input you should use d -> f -> a rather than d -> d + f -> f -> a.
If two or more sequences overlap, the more complex input from the player “wins”. This is the same command scheme seen in most fighting games. Again using the Haouken example, you could create a command for the normal Hadouken d -> f -> a, and another for Shinku Hadouken as d -> f -> d -> f -> a. OpenBOR will recognize if a player uses the Shinku Hadouken input even though the last portion of it is identical to the Hadouken input.
Cancel
cancel {int start frame} {int end frame} {int hits} {sequence} {freespecial#}
Cancel is similar to Command, in that it maps command sequences to activate a Freespeical. However, cancels are unique to a single animation and can interrupt the animation on a successful input. This allows “canceling” from one animation to another for customized chains and combos.
Place cancels into the animation header of any Jump, Attack, Freespecial, or Follow animation. You may add as many cancels as you like up to maximum allowed specials (see below) to an animation to give it multiple cancel options. The animation you cancel into may also have its own cancels to create an entire series of combo branch points.
- Start Frame - The first frame in animation cancel is available - Remember that frames are 0 indexed.
- End Frame - The last frame in animation cancel is available.
- Hits - Required number of combo his, if any, before cancel is available.
- Sequence - Identical to command sequence parameter.
- Freespeciall# - Identical to command Freespecial# parameter.
Cancel is otherwise identical to Command and follows the same rules (input sequence, energy cost, etc.).
Maximum Freespecials
maxfreespecials {int}
#default
maxfreespecials 8
Models.txt command that sets amount of allocated special commands (Command and Cancel) per model (not freespecial# animations). If the total number of Cancels and Commands for a given model exceeds the number allotted, you will likely get a nonsensical error or crash.
Tip: Don’t allocate some silly number like 100 when you only need a few more command slots. This wastes memory. Figure out what you actually need and allocate accordingly.