Binds: Difference between revisions

Tela (talk | contribs)
mNo edit summary
Tela (talk | contribs)
m Rainbow Tee: - added a note about the delay for color changes
 
(68 intermediate revisions by 11 users not shown)
Line 1: Line 1:
DDNet client has a multitude of commands and settings that can be bound to nearly any key or mouse button.  You can enter commands into the console, which by default is accessed by pressing F1.
{{MigrateTranslation}}
<languages/>
<translate>
<!--T:1-->
DDNet client has a multitude of [https://ddnet.org/settingscommands/#client-settings commands and settings] that can be '''''bound''''' to nearly any key or mouse button.  You can enter commands into the console, which by default is accessed by pressing '''F1.'''


==Syntax==
==Syntax== <!--T:2-->


===Single binds===
===Single binds=== <!--T:3-->
  bind <span style="color:green">[key]</span> <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
 
  <!--T:4-->
bind <span style="color:green">[key]</span> <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>


<!--T:5-->
This is the basic syntax for simple binds.   
This is the basic syntax for simple binds.   


<!--T:6-->
*'''[key]''' is the key on your keyboard/mouse you want to bind a command to.
*'''[key]''' is the key on your keyboard/mouse you want to bind a command to.
*'''[command/setting]''' A full list of all commands and settings can be found [https://ddnet.tw/settingscommands/ here].
*'''[command/setting]''' A full list of all commands and settings can be found [https://ddnet.org/settingscommands/#client-settings here].
*'''[value]''' is the variable you want to set your setting to or an argument for a command.  Not all commands require arguments
*'''[value]''' is the variable you want to set your setting to or an argument for a command.  Not all commands require arguments
You can find keycodes [https://github.com/ddnet/ddnet/blob/master/src/engine/client/keynames.h here], or just type the key temporarily into one of the controls in the Settings > Controls page in DDNet client and it will show the key name.  You can also use modifier keys with binds.
You can find keycodes [https://github.com/ddnet/ddnet/blob/master/src/engine/client/keynames.h here], or just type the key temporarily into one of the controls in the Settings > Controls page in DDNet client and it will show the key name.  You can also use modifier keys with binds.
  bind <span style="color:magenta">ctrl+</span><span style="color:green">[key]</span> <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
  bind <span style="color:magenta">ctrl+</span><span style="color:green">[key]</span> <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
you can use '''ctrl''', '''alt''', and '''shift'''.
you can use '''ctrl''', '''alt''', '''shift''', and '''gui'''.  '''Gui''' is used to refer to the windows key on windows, the command key on macOS/osx, and super/meta on linux.
 
===Multiple binds=== <!--T:7-->


===Multiple binds===
<!--T:8-->
You can also chain commands/settings together by separating them using a semicolon and wrapping them in quotes. You can add as many commands to this chain as you want.
You can also chain commands/settings together by separating them using a semicolon and wrapping them in quotes. You can add as many commands to this chain as you want.
  bind <span style="color:green">[key]</span> <span style="color:blue"><span style="color:red">"</span>[command/setting] <span style="color:purple">[value]</span><span style="color:red">;</span> [command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">"</span>
  bind <span style="color:green">[key]</span> <span style="color:blue"><span style="color:red">"</span>[command/setting] <span style="color:purple">[value]</span><span style="color:red">;</span> [command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">"</span>
It's important to know that when chaining things together like this, all commands/settings get executed by the game at the exact same time, meaning they will not execute in the order you write them.  There is no sleep or delay type command to space things out the way you want them.  The best way to make things happen in an ordered sequence is to either bind a different key for each step of the sequence, or to use [https://wiki.ddnet.tw/wiki/Binds#Using_Config_Files config files] to press one key multiple times to read multiple files.
It's important to know that when chaining things together like this, all commands/settings get executed by the game at the exact same time, meaning they will not execute sequentially in the order you write them.  There is no sleep or delay type command to space things out the way you want them.  The best way to make things happen in an ordered sequence is to either bind a different key for each step of the sequence, or to use [https://wiki.ddnet.org/wiki/Binds#Using_Config_Files config files] to press one key multiple times to read multiple files sequentially.
 
=== Nested binds=== <!--T:9-->


=== Nested binds===
<!--T:10-->
You can nest multiple quoted strings in a single line by escaping each new set of quotes with backslashes.
You can nest multiple quoted strings in a single line by escaping each new set of quotes with backslashes.
  bind <span style="color:green">[key]</span> <span style="color:red">"</span>bind <span style="color:green">[key]</span> <span style="color:orange">\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:orange">\</span><span style="color:red">""</span>
  bind <span style="color:green">[key]</span> <span style="color:red">"</span>bind <span style="color:green">[key]</span> <span style="color:orange">\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:orange">\</span><span style="color:red">""</span>
As the quoted strings go deeper, you also need to escape the backslash.  Since each new layer will again un-escape them, you need to double the amount of backslashes per layer.  The third layer will require 3 backslashes, the 4th will require 7, etcIf this is confusing to look at, try making a new line for each escaped quote to get a more clear visual idea of what's happening.
As the quoted strings go deeper, you also need to escape the backslash.  Since each new layer will again un-escape them, you need to double the amount of backslashes per layer.  The maximum amount of layers you can use is '''5''' before the console gives you an errorThis is because the console has a maximum character limit of '''255'''.  The amount of backslashes for 6 layers is '''240''' (1*2 + 3*2 + 7*2 + 15*2 + 31*2 + 63*2), leaving you with only '''15''' characters.


  bind <span style="color:green">[key]</span> <span style="color:red">
  <!--T:11-->
   "</span>bind <span style="color:green">[key]</span> <span style="color:orange">
1 = 1   <span style="color:orange">\</span>
  \</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span><span style="color:orange">
2 = <span style="color:orange">\\\</span>
    \\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span> <span style="color:orange">
3 = <span style="color:orange">\\\\\\\</span>
    \\\\\\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:orange">
4 = 15  <span style="color:orange">\\\\\\\\\\\\\\\</span>
    \\\\\\\</span><span style="color:red">"</span><span style="color:orange">
5 = 31  <span style="color:orange">\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\</span>
    \\\</span><span style="color:red">"</span><span style="color:orange">
If this is confusing to look at, try making a new line and indent for each escaped quote to get a more clear visual idea of what's happening.
  \</span><span style="color:red">"
  "</span>


===Useful Commands===
<!--T:12-->
bind <span style="color:green">[key]</span>
  <span style="color:red">"</span>bind <span style="color:green">[key]</span>
  <span style="color:orange">\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span>
    <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span>
    <span style="color:orange">\\\\\\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
    <span style="color:orange">\\\\\\\</span><span style="color:red">"</span>
    <span style="color:orange">\\\</span><span style="color:red">"</span>
  <span style="color:orange">\</span><span style="color:red">"</span>
  <span style="color:red">"</span>
'''Note:''' You cannot run a config file formatted as the example above is, it will not work.  This example is just to get a clear visual idea of how a nested bind is constructed.


====Toggles====
===Useful Commands & Settings=== <!--T:13-->
Toggles are a way to use a single key to alternate between 2 values for a setting.  There are two types of toggles.


====Toggles==== <!--T:14-->
<!--T:15-->
Toggles are a way to use a single key to alternate between 2 values for a setting.  There are two types of toggles.
<!--T:16-->
*'''toggle''' is used so that each time you press a key, it will change between one of the two values for the setting
*'''toggle''' is used so that each time you press a key, it will change between one of the two values for the setting
*'''+toggle''' is used so that your first value is set only while the key is being pressed, and the second value is set while the key is not being pressed.
*'''+toggle''' is used so that your first value is set only while the key is being pressed, and the second value is set when the key is released.


  bind <span style="color:green">[key]</span> <span style="color:red">"</span><span style="color:magenta">toggle</span> <span style="color:blue">[setting]</span> <span style="color:purple">[value1] [value2]<span style="color:red">"</span></span>
  <!--T:17-->
bind <span style="color:green">[key]</span> <span style="color:magenta">toggle</span> <span style="color:blue">[setting]</span> <span style="color:purple">[value1] [value2]</span>


  bind <span style="color:green">[key]</span> <span style="color:red">"</span><span style="color:magenta">+toggle</span> <span style="color:blue">[setting]</span> <span style="color:purple">[value1] [value2]<span style="color:red">"</span></span>
  <!--T:18-->
bind <span style="color:green">[key]</span> <span style="color:magenta">+toggle</span> <span style="color:blue">[setting]</span> <span style="color:purple">[value1] [value2]</span>
Toggles only work for client settings.  They cannot be used for client or chat commands.
Toggles only work for client settings.  They cannot be used for client or chat commands.


====Say====
====Say ==== <!--T:19-->
 
<!--T:20-->
Say is an important client command for binding.  It allows you to incorporate chat commands into a bind as well as just send text to the chat.
Say is an important client command for binding.  It allows you to incorporate chat commands into a bind as well as just send text to the chat.
  bind <span style="color:green">[key]</span> <span style="color:magenta">say</span> <span style="color:blue">/[chat command]</span>
  bind <span style="color:green">[key]</span> <span style="color:magenta">say</span> <span style="color:blue">/[chat command]</span>


  bind <span style="color:green">[key]</span> <span style="color:magenta">say</span> <span style="color:blue">[chat message]</span>
  <!--T:21-->
bind <span style="color:green">[key]</span> <span style="color:magenta">say</span> <span style="color:blue">[chat message]</span>


==== Colors ====
====Colors==== <!--T:22-->
 
<!--T:23-->
Some client commands allow you to set colors.
Some client commands allow you to set colors.


<!--T:24-->
*'''player_color_body'''
*'''player_color_body'''
*'''player_color_feet'''
*'''player_color_feet'''
*'''cl_message_client_color'''
*'''cl_message_client_color'''


<!--T:25-->
are a few examples.
are a few examples.


To get the correct color values, go to Settings > Tee, and use the sliders to find the color you want.  Go into the console and type the command for the color you're trying to set, by itself with no value.  The number that comes after "'''Value:'''" is the relevant number.
<!--T:26-->
To get the correct color values, go to '''Settings > Tee''', and use the sliders to find the color you want.  Go into the console and type the command for the color you're trying to set, by itself with no value.  The number that comes after "'''Value:'''" is the relevant number.


[[File:Colors.png]]
<!--T:27-->
[[File:Colors.png|File:Colors.png]]


  <span style="color:blue">player_color_body</span> <span style="color:purple">5635840</span>
  <!--T:28-->
It will also accept a few color values by name. '''red''', '''yellow''', '''green''', '''blue''', '''cyan''', and '''magenta''', all work.
<span style="color:blue">player_color_body</span> <span style="color:purple">5635840</span>
or, if you prefer to use the hexadecimal value:
<span style="color:blue">player_color_body</span> <span style="color:purple">$00FF00</span>
It will also accept a few color values by name. '''red''', '''yellow''', '''green''', '''cyan''', '''blue''', '''magenta''', '''white, gray, black''' all work.


==== Other ====
====Emotes==== <!--T:29-->
  dump_binds <span style="color:blue">[key]</span>
 
<!--T:30-->
The '''emote''' command can be used to display emotes without using the emote wheel.  Each emote is represented by a different number.
[[File:Emotes.png|right|frameless]]
{| class="wikitable"
|+
| emote 0
|oop
|-
|emote 1
|exclamation
|-
|emote 2
|hearts
|-
|emote 3
|drop
|-
|emote 4
|dotdot
|-
|emote 5
|music
|-
|emote 6
| sorry
|-
|emote 7
| ghost
|-
|emote 8
| sushi
|-
|emote 9
| splattee
|-
|emote 10
|deviltee
|-
|emote 11
|zomg
|-
|emote 12
|zzz
|-
|emote 13
| wtf
|-
|emote 14
| eyes
|-
|emote 15
|question
|}
 
<!--T:31-->
For example:
bind <span style="color:green">h</span> <span style="color:blue">emote</span> <span style="color:purple">14</span>
 
====Other==== <!--T:32-->
 
  <!--T:33-->
binds <span style="color:blue">[key]</span>
You can use this command to print what's bound to a single key.  Use it without a key at the end to get a full list of all your current binds.
You can use this command to print what's bound to a single key.  Use it without a key at the end to get a full list of all your current binds.
  unbind <span style="color:blue">[key]</span>
  unbind <span style="color:blue">[key]</span>
Will unbind whatever key you specify.
Will unbind whatever key you specify.


==Using Config Files==
==Using Config Files== <!--T:34-->


=== Syntax===
===Syntax=== <!--T:35-->
 
<!--T:36-->
For more complicated binds, you can make text files containing settings/commands that get executed via a key press.
For more complicated binds, you can make text files containing settings/commands that get executed via a key press.


<!--T:37-->
'''settings.cfg'''
'''settings.cfg'''
  <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
  <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
Line 91: Line 195:
Settings/commands can be chained together via a  semicolon or by just using a new line.  You can put as many commands/settings/binds as you want in these files.
Settings/commands can be chained together via a  semicolon or by just using a new line.  You can put as many commands/settings/binds as you want in these files.


<!--T:38-->
'''Note:''' You don't need to use '''.cfg''' as the extension.  You can actually use any file extension you want.  .'''cfg''' just seems to be the standard.
'''Note:''' You don't need to use '''.cfg''' as the extension.  You can actually use any file extension you want.  .'''cfg''' just seems to be the standard.


===Path/Exec===
===Path/Exec=== <!--T:39-->
In order to execute these files, you need to put them in correct directory and execute them with the '''exec''' command.  The correct path depends on your operating system.


======Windows ======
<!--T:40-->
%APPDATA%\Teeworlds\
In order to execute these files, you need to put them in correct directory and execute them with the '''exec''' command.  The correct path depends on your operating system.  To find the right path for your operating system, see [[Special:MyLanguage/FAQ#Where_is_the_DDNet_config,_config_directory_or_save_directory?|Where is the DDNet config, config directory or save directory?]]
An easier way to find this folder is to press '''win+r''' to open the Run dialog, and paste the path above.


======MacOS======
<!--T:47-->
~/Library/Application\ Support/Teeworlds
Once the files are in the correct path, you can execute them in the game console with the '''exec''' command.
The library folder might be hidden by default.  In Finder, click the '''Go''' menu in the menu bar.  If you hold the '''alt''' key, the Library folder will appear.
<span style="color:magenta">exec</span> <span style="color:blue">[file.cfg]</span>
 
or
======Linux======
~./Teeworlds
Once the files are in the correct path, you can execute them in the game console with the 'exec' command.
  bind <span style="color:green">[key]</span> <span style="color:magenta">exec</span> <span style="color:blue">[file.cfg]</span>
  bind <span style="color:green">[key]</span> <span style="color:magenta">exec</span> <span style="color:blue">[file.cfg]</span>
You can use sub-directories within the 'Teeworlds' directory to organize files.  Just include the path when you execute the file.
You can use sub-directories within the 'DDNet' or 'Teeworlds' directory to organize files.  Just include the path when you execute the file.
  bind <span style="color:green">[key]</span> <span style="color:magenta">exec</span> <span style="color:blue">[path/to/file.cfg]</span>
  bind <span style="color:green">[key]</span> <span style="color:magenta">exec</span> <span style="color:blue">[path/to/file.cfg]</span>


===Improved toggle with config files ===
===Improved toggle with config files=== <!--T:48-->
 
<!--T:49-->
The most common reason to use config files is to create a single-key toggle to alternate between two files.
The most common reason to use config files is to create a single-key toggle to alternate between two files.


<!--T:50-->
'''file1.cfg'''
'''file1.cfg'''
  <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
  <span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span>
Line 130: Line 233:
You can use this method to cycle between any amount of files.
You can use this method to cycle between any amount of files.


===Customization===
===Customization=== <!--T:51-->
 
====Echo==== <!--T:52-->


====Echo====
<!--T:53-->
As a more clear way to show which file you're activating when you press a bind, you can use the '''echo''' command command to display which one is active.
As a more clear way to show which file you're activating when you press a bind, you can use the '''echo''' command to display which one is active.
  [command/setting] [value]
  [command/setting] [value]
  [command/setting] [value]
  [command/setting] [value]
Line 148: Line 253:
   
   
  bind [key] exec file1.cfg
  bind [key] exec file1.cfg
Having different colors for "on" and "off" binds makes it a bit easier to notice which setting you've activated.
Having different colors for "on" and "off" binds makes it a bit easier to notice which setting you've activated. If you want to get more creative with colors, see [https://wiki.ddnet.org/wiki/Binds#Colors colors].
 
====Comments==== <!--T:54-->


====Comments====
<!--T:55-->
You can put comments in your bind files too.
You can put comments in your bind files too.


  <span style="color:purple"># These lines change some settings</span>
  <!--T:56-->
<span style="color:purple"># These lines change some settings</span>
  [command/setting] [value]
  [command/setting] [value]
  [command/setting] [value]
  [command/setting] [value]
Line 160: Line 268:
  bind [key] exec file1.cfg
  bind [key] exec file1.cfg


==Examples==
==Examples== <!--T:57-->
=== Hook line always on===
 
===Hook line always on=== <!--T:58-->
 
<!--T:59-->
The command '''cl_show_hook_coll_own''', sets whether you will see your own hook collision line or not when you hold your '''+showhookcoll''' bind (defaulted to '''S''').  When set to '''2''', your hook collision line will always show only to you.  Others players won't see it.
The command '''cl_show_hook_coll_own''', sets whether you will see your own hook collision line or not when you hold your '''+showhookcoll''' bind (defaulted to '''S''').  When set to '''2''', your hook collision line will always show only to you.  Others players won't see it.


<!--T:60-->
'''hook_line_on.cfg'''
'''hook_line_on.cfg'''
  <span style="color:blue">cl_show_hook_coll_own</span> <span style="color:purple">2</span>
  <span style="color:blue">cl_show_hook_coll_own</span> <span style="color:purple">2</span>
   
   
  <span style="color:purple"><span style="color:blue">cl_message_client_color</span> <span style="color:purple">green</span>
  <span style="color:blue">cl_message_client_color</span> <span style="color:purple">green</span>
  <span style="color:blue">echo</span> <span style="color:purple">Hook Line ON</span>
  <span style="color:blue">echo</span> <span style="color:purple">Hook Line ON</span>
   
   
Line 174: Line 286:
  <span style="color:blue">cl_show_hook_coll_own</span> <span style="color:purple">1</span>
  <span style="color:blue">cl_show_hook_coll_own</span> <span style="color:purple">1</span>
   
   
  <span style="color:purple"><span style="color:blue">cl_message_client_color</span> <span style="color:purple">red</span>
  <span style="color:blue">cl_message_client_color</span> <span style="color:purple">red</span>
  <span style="color:blue">echo</span> <span style="color:purple">Hook Line OFF</span>
  <span style="color:blue">echo</span> <span style="color:purple">Hook Line OFF</span>
   
   
Line 180: Line 292:
Put both of these in the correct path, and in console:
Put both of these in the correct path, and in console:
  bind <span style="color:green">x</span> <span style="color:magenta">exec</span> <span style="color:blue">hook_line_on.cfg</span>
  bind <span style="color:green">x</span> <span style="color:magenta">exec</span> <span style="color:blue">hook_line_on.cfg</span>
===Deep Fly===
 
===Everyone's hooklines=== <!--T:61-->
 
<!--T:62-->
The command '''cl_show_hook_coll_other''' allows you to see other tee's hooklines, which can be useful when they are out of your view.
You can add this to the basic hookline bind to "upgrade" it:
 
<!--T:63-->
'''cl_show_hook_coll_other'''
bind <span style="color:green">x</span> <span style="color:red">"</span><span style="color:blue">+showhookcoll</span><span style="color:red">;</span> <span style="color:magenta">+toggle</span> <span style="color:blue">cl_show_hook_coll_other</span> <span style="color:purple">2 1</span><span style="color:red">"</span>
 
===Deep Fly=== <!--T:64-->
 
<!--T:65-->
The deep fly bind is a way to make your dummy hammer/fire toward you whenever you fire with your main tee.  If your dummy is deep frozen, they can hammer back at you when you hammer them with this bind on. You can use this to fly with your dummy, but it takes practice.  If your dummy is not deep frozen, you can just use this as a alternative version of the regular Dummy Hammerfly bind included in the games settings, where you can fire your pistol each time you want to be hammered.  It offers better control since you can control the timing of your dummy's hammers.
The deep fly bind is a way to make your dummy hammer/fire toward you whenever you fire with your main tee.  If your dummy is deep frozen, they can hammer back at you when you hammer them with this bind on. You can use this to fly with your dummy, but it takes practice.  If your dummy is not deep frozen, you can just use this as a alternative version of the regular Dummy Hammerfly bind included in the games settings, where you can fire your pistol each time you want to be hammered.  It offers better control since you can control the timing of your dummy's hammers.


<!--T:66-->
'''Note:''' If the mapper has set <code><span style="color:blue">sv_deepfly</span> <span style="color:purple">0</span></code> on their map, you will not be able to deep fly with a deep frozen tee, since it can sometimes enable players to do parts in ways that the mapper did not intend.  The deep fly bind will still work normally with frozen or unfrozen tees.  As a player, this is not a setting you can adjust.
<!--T:89-->
[[File:Deepfly webm.webm|351x198px|gif]]
[[File:Deepfly webm.webm|351x198px|gif]]


The command '''cl_dummy_hammer 1''' is what is used for the regular Dummy Hammerfly bind in the games control options.  By using a [https://wiki.ddnet.tw/wiki/Binds#Toggles toggle], you can make your dummy hammer you only when you fire, and can make an on/off switch with config files.
<!--T:67-->
The command '''cl_dummy_hammer 1''' is what is used for the regular Dummy Hammerfly bind in the games control options.  By using a [https://wiki.ddnet.org/wiki/Binds#Toggles toggle], you can make your dummy hammer you only when you fire, and can make an on/off switch with config files.


====Using 2 Config Files==== <!--T:68-->
<!--T:69-->
'''deepfly_on.cfg'''
'''deepfly_on.cfg'''
  bind <span style="color:green">mouse1</span> <span style="color:red">"</span><span style="color:blue">+fire</span><span style="color:red">;</span> <span style="color:magenta">+toggle</span> <span style="color:blue">cl_dummy_hammer</span> <span style="color:purple">1 0<span style="color:red">"</span>
  bind <span style="color:green">mouse1</span> <span style="color:red">"</span><span style="color:blue">+fire</span><span style="color:red">;</span> <span style="color:magenta">+toggle</span> <span style="color:blue">cl_dummy_hammer</span> 1 0<span style="color:red">"</span>
   
   
  <span style="color:blue">cl_message_client_color</span> <span style="color:purple">green</span>
  <span style="color:blue">cl_message_client_color</span> <span style="color:purple">green</span>
Line 196: Line 330:
'''deepfly_off.cfg'''
'''deepfly_off.cfg'''
  bind <span style="color:green">mouse1</span> <span style="color:blue">+fire</span>
  bind <span style="color:green">mouse1</span> <span style="color:blue">+fire</span>
<span style="color:blue">cl_dummy_hammer</span> <span style="color:purple">0</span>
   
   
  <span style="color:blue">cl_message_client_color</span> <span style="color:purple">red</span>
  <span style="color:blue">cl_message_client_color</span> <span style="color:purple">red</span>
Line 203: Line 338:
Put both of these in the correct path, and in console:
Put both of these in the correct path, and in console:
  bind <span style="color:green">x</span> <span style="color:magenta">exec</span> <span style="color:blue">deepfly_on.cfg</span>
  bind <span style="color:green">x</span> <span style="color:magenta">exec</span> <span style="color:blue">deepfly_on.cfg</span>
'''Note:''' This assumes mouse1 is your '''+fire''' bind


===45° Aiming===
====Using 1 Config File==== <!--T:70-->
 
<!--T:71-->
You can accomplish the same thing as above using only 1 config file.
 
<!--T:72-->
bind <span style="color:green">x</span> <span style="color:red">"</span>bind <span style="color:green">mouse1</span> <span style="color:orange">\</span><span style="color:red">"</span><span style="color:blue">+fire</span><span style="color:red">;</span> <span style="color:blue"><span style="color:magenta">+toggle</span> cl_dummy_hammer</span> <span style="color:purple">1 0</span><span style="color:orange">\</span><span style="color:red">";</span><span style="color:blue">cl_message_client_color <span style="color:purple">green</span></span><span style="color:red">;</span> <span style="color:blue">echo</span> <span style="color:purple">Deep Fly ON</span><span style="color:red">;</span> bind <span style="color:green">x</span> <span style="color:orange">\</span><span style="color:red">"</span>bind <span style="color:green">mouse1</span> <span style="color:blue">+fire</span><span style="color:red">;</span> <span style="color:blue">cl_dummy_hammer</span> <span style="color:purple">0</span><span style="color:red">;</span> <span style="color:blue">cl_message_client_color</span> <span style="color:purple">red</span><span style="color:red">;</span> <span style="color:blue">echo</span> <span style="color:purple">Deep Fly OFF</span><span style="color:red">;</span> <span style="color:magenta">exec</span> <span style="color:blue">deepfly.cfg</span><span style="color:orange">\</span><span style="color:red">""</span>
Put this file in the correct path, and in console:
bind <span style="color:green">x</span> <span style="color:magenta">exec</span> <span style="color:blue">deepfly.cfg</span>
 
<!--T:73-->
'''Note 1:''' This assumes mouse1 is your '''+fire''' bind. 
 
<!--T:74-->
'''Note 2:''' If you turn deep fly off while you're holding your '''+fire''' bind, your dummy will get stuck in a hammering rhythm since '''cl_dummy_hammer''' is set to '''1''' still.  The  '''cl_dummy_hammer 0''' line in '''deepfly_off.cfg''' fixes this.
 
====Weapon Swapping==== <!--T:75-->
 
<!--T:76-->
If your dummy isn't holding hammer when you turn the bind on, they will switch back and forth between pistol and hammer.  If you want to fix this:
<span style="color:blue">cl_dummy_restore_weapon</span> <span style="color:purple">0</span>
Now if they're holding pistol when you start using the bind, they will switch to hammer and stay there after 1 pistol shot.  There are however some benefits of having this setting set to '''1'''.
<span style="color:blue">cl_dummy_restore_weapon</span> <span style="color:purple">1</span>
This will allow you to laser yourself with your dummy with perfect aim.  It can also be useful with shotgun.
 
<!--T:77-->
[[File:Deepfly laser example.webm|351x198px|gif]]
 
<!--T:78-->
To manage dealing with both of these settings, you can either create a [https://wiki.ddnet.org/wiki/Binds#Toggles toggle], use [https://wiki.ddnet.org/wiki/Binds#Using_Config_Files config files], or have this setting attached to your weapon binds.
bind <span style="color:green">[key]</span> <span style="color:blue"><span style="color:red">"</span>+weapon1<span style="color:red">;</span></span> <span style="color:blue">cl_dummy_restore_weapon</span> <span style="color:red">0"</span>
 
<!--T:79-->
bind <span style="color:green">[key]</span> <span style="color:blue"><span style="color:red">"</span>+weapon5<span style="color:red">;</span></span> <span style="color:blue">cl_dummy_restore_weapon</span> <span style="color:red">1"</span>
This of course only works if you have dedicated weapon binds as opposed to '''+nextweapon''' and '''+prevweapon''' which is by default bound to '''mousewheelup''' and '''mousewheeldown'''.
 
===45° Aiming=== <!--T:80-->
 
<!--T:81-->
This bind allows you to only aim in 45° angles when holding down the key.  This is useful for shooting rockets straight up for double rockets and a few other scenarios.
This bind allows you to only aim in 45° angles when holding down the key.  This is useful for shooting rockets straight up for double rockets and a few other scenarios.
  bind <span style="color:green">x</span> <span style="color:red">"</span><span style="color:magenta">+toggle</span> <span style="color:blue">cl_mouse_max_distance</span> <span style="color:purple">2 400<span style="color:red">;</span> <span style="color:blue">inp_mousesens</span> <span style="color:purple">1 200</span><span style="color:red">;</span> <span style="color:blue">cl_show_hook_coll_own</span> <span style="color:purple">2 1<span style="color:red">"</span>
  bind <span style="color:green">x</span> <span style="color:red">"</span><span style="color:magenta">+toggle</span> <span style="color:blue">cl_mouse_max_distance</span> <span style="color:purple">2 400<span style="color:red">;</span> <span style="color:magenta">+toggle</span> <span style="color:blue">inp_mousesens</span> <span style="color:purple">1 200</span><span style="color:red">;</span> <span style="color:blue">+showhookcoll</span><span style="color:purple"><span style="color:red">"</span>
Keep in mind that if you have changed '''cl_mouse_max_distance''' or '''inp_mousesens''' from the default, using the example above will reset those settings to default.  Before you just enter the binds, check your settings for both first by typing '''cl_mouse_max_distance''' and '''inp_mousesens''' into the console.
Keep in mind that if you have changed '''cl_mouse_max_distance''' or '''inp_mousesens''' from the default, using the example above will reset those settings to default.  Before you just enter the binds, check your settings for both first by typing '''cl_mouse_max_distance''' and '''inp_mousesens''' into the console.
  bind <span style="color:green">x</span> <span style="color:red">"</span><span style="color:magenta">+toggle</span> <span style="color:blue">cl_mouse_max_distance</span> <span style="color:purple">2 [Your Value]<span style="color:red">;</span> <span style="color:blue">inp_mousesens</span> <span style="color:purple">1 [Your Value]</span><span style="color:red">;</span> <span style="color:blue">cl_show_hook_coll_own</span> <span style="color:purple">2 1<span style="color:red">"</span>
  bind <span style="color:green">x</span> <span style="color:red">"</span><span style="color:magenta">+toggle</span> <span style="color:blue">cl_mouse_max_distance</span> <span style="color:purple">2 [Your Value]<span style="color:red">;</span> <span style="color:magenta">+toggle</span> <span style="color:blue">inp_mousesens</span> <span style="color:purple">1 [Your Value]</span><span style="color:red">;</span> <span style="color:blue">+showhookcoll</span><span style="color:purple"><span style="color:red">"</span>
'''Note:''' the '''cl_show_hook_coll_own''' line is optional, it's just helpful to see which way you're aiming since your tee's eyes don't follow the 45° constraints.
'''Note:''' the '''+showhookcoll''' line is optional.  It's just helpful to see which way you're aiming since your tee's eyes don't follow the 45° constraints, and by nature of how this bind works, your crosshair won't show direction either.


=== Rainbow Tee ===
===Rainbow Tee=== <!--T:82-->
 
<!--T:83-->
You will sometimes see players rapidly changing color as they play.  To do this you just have to bind a '''player_color_body''' change to each of your regular movement inputs.
You will sometimes see players rapidly changing color as they play.  To do this you just have to bind a '''player_color_body''' change to each of your regular movement inputs.
  bind <span style="color:green">a</span> <span style="color:blue"><span style="color:red">"</span>+left<span style="color:red">;</span> player_color_body</span> <span style="color:red">red"</span>
  bind <span style="color:green">a</span> <span style="color:blue"><span style="color:red">"</span>+left<span style="color:red">;</span> player_color_body</span> <span style="color:red">red"</span>
You can do this for several common inputs and get a variety of colors to cycle through.
You can do this for several common inputs and get a variety of to cycle through.


<!--T:84-->
'''rainbow_tee.cfg'''
'''rainbow_tee.cfg'''
  bind <span style="color:green">a</span> <span style="color:blue"><span style="color:red">"</span>+left<span style="color:red">;</span> player_color_body</span> <span style="color:red">red"</span>
  bind <span style="color:green">a</span> <span style="color:blue"><span style="color:red">"</span>+left<span style="color:red">;</span> player_color_body</span> <span style="color:red">red"</span>
Line 227: Line 402:
Or if you want a key to toggle it on and off:
Or if you want a key to toggle it on and off:


<!--T:85-->
'''rainbow_tee_on.cfg'''
'''rainbow_tee_on.cfg'''
  bind <span style="color:green">a</span> <span style="color:blue"><span style="color:red">"</span>+left<span style="color:red">;</span> player_color_body</span> <span style="color:red">red"</span>
  bind <span style="color:green">a</span> <span style="color:blue"><span style="color:red">"</span>+left<span style="color:red">;</span> player_color_body</span> <span style="color:red">red"</span>
Line 245: Line 421:
Put both of these in the correct path, and in console:
Put both of these in the correct path, and in console:
  bind <span style="color:green">x</span> <span style="color:magenta">exec</span> <span style="color:blue">rainbow_tee_on.cfg</span>
  bind <span style="color:green">x</span> <span style="color:magenta">exec</span> <span style="color:blue">rainbow_tee_on.cfg</span>
You can of course get more creative with colors and use '''player_color_feet''' too.  To learn more about how colors work, see [https://wiki.ddnet.tw/wiki/Binds#Colors colors]
You can of course get more creative with colors and use '''player_color_feet''' too.  To learn more about how colors work, see [https://wiki.ddnet.org/wiki/Binds#Colors colors]
 
<!--T:86-->
'''Note:''' This assumes you have default binds for left, right, jump, fire, and hook.  There is also a delay between color changes, so changes don't happen the instant you press a key.


==See also==
==See also== <!--T:87-->


*[https://forum.ddnet.tw/viewtopic.php?t=2537 Just bind it] - Useful binds available for copying
<!--T:88-->
*[https://forum.ddnet.tw/viewtopic.php?t=5819 Take Binding to the next level, with Scripting!] - Another forum post about more advanced binds
*[https://forum.ddnet.org/viewtopic.php?t=2537 Just bind it] - Useful binds available for copying
*[https://forum.ddnet.org/viewtopic.php?t=5819 Take Binding to the next level, with Scripting!] - Another forum post about more advanced binds
*[https://www.youtube.com/watch?v=sELsw2I2jj8& Teeworlds New Binding Tutorial by Klex] - A video tutorial about binds by KlexMikrowelle
*[https://www.youtube.com/watch?v=sELsw2I2jj8& Teeworlds New Binding Tutorial by Klex] - A video tutorial about binds by KlexMikrowelle
</translate>