Binding

From Tremulous Wiki
Jump to: navigation, search
bind
Syntax /bind [KEY] [COMMAND]
Cheat Protected No

Binding is a way of executing commands by simply pressing a key. These commands are often called "binds" and they are useful to save typing when a command must be executed repeatedly.


Contents

How To Make Binds

Binds can be set either through the in-game console or by creating configuration files that contain the binds. Automatically, when the game starts, it looks for a file named "autoexec.cfg" in the "Tremulous/base" directory. Based on that, other configuration files can be called by key commands, allowing someone to have separate binds for the Alien and Human teams as well as for different servers with modified game play.


Syntax

Binds are made using the "bind" command at the game console:

To bind only one command::
 /bind <key> <command>
To bind multiple commands you have to use double quotes and semicolons:
 /bind <key> "<command1>;<command2>;...;<commandN>"
When modifying the configuration file, simply add lines like this::
 bind <key> "<command>"
To add a comment (something Tremulous won't read and so won't apply to your config), just add a double slash before the thing you want to comment. It can be usefull to make you remember what's the usefulness/uselessness of something:
 //<Your stuff blablabla>

Key Names

Most of the keys that represent printable characters (like a-z and 0-9) are named with the respective character, but others such as "Escape" or "Ctrl" have symbolic names.

Key Key name
Tab TAB
Enter ENTER
Escape ESCAPE
Space SPACE
Backspace BACKSPACE
Up Arrow UPARROW
Down Arrow DOWNARROW
Left Arrow LEFTARROW
Right Arrow RIGHTARROW
Alt ALT
Control CTRL
Shift SHIFT
Capslock CAPSLOCK
F1 F1
F2 F2
F3 F3
F4 F4
F5 F5
F6 F6
F7 F7
F8 F8
F9 F9
F10 F10
F11 F11
F12 F12
Insert INS
Delete DEL
Page Down PGDN
Page Up PGUP
End END
Home HOME
Left Mouse Button MOUSE1
Right Mouse Button MOUSE2
Middle Mouse Button MOUSE3
Mouse Button 4 MOUSE4
Mouse Button 5 MOUSE5
Mouse Wheel Forward MWHEELUP
Mouse Wheel Backward MWHEELDOWN
Joystick Buttons JOY1 to JOY32
Additional Buttons AUX1 to AUX16
Numpad 1 KP_END
Numpad 2 KP_DOWNARROW
Numpad 3 KP_PGDN
Numpad 4 KP_LEFTARROW
Numpad 5 KP_5
Numpad 6 KP_RIGHTARROW
Numpad 7 KP_HOME
Numpad 8 KP_UPARROW
Numpad 9 KP_PGUP
Numpad Enter KP_ENTER
Numpad Insert KP_INS
Numpad Delete KP_DEL
Numpad / KP_SLASH
Numpad - KP_MINUS
Numpad + KP_PLUS
Numlock KP_NUMLOCK
Numpad * KP_STAR
Numpad = KP_EQUALS
Pause PAUSE
 ;(semicolon) SEMICOLON

Useful commands

  • destroy - deconstruct - As a builder class, destroy or deconstruct the structure in front of the player.
  • itemact <item> - If held, activate the specified item. For weapons this selects them.
  • itemdeact <item> - If held, deactivate the specificed item.
  • itemtoggle <item> - If held, toggle the state of the specified item.
  • sell <item> - If held and within range of an Armoury, sell the specified item.
  • sell weapons - If within range of an armoury, sell all upgrades.
  • sell upgrades - If within range of an Armoury, sell all upgrades.
  • buy <item> - If within range of an Armoury and sufficiently wealthy, buy the specified item.
  • class <class> - Given sufficient kills, evolve to the specified class.
  • build <structure> - As a builder class, build the specified structure (It makes the ghost of the structure appear.
  • say <say> - Talk to the other players.
  • say_team <say> - Talk to your team.
  • echo <echo> - Display a message only visible by you. Warning! echo is not cp. cp is a server-side command that will display a big message in the center of the screen of all the players.
  • disconnect - Disconnect you from the server.
  • quit - Quit Tremulous and get back to the desktop.
  • wait <delay> - Make you wait (you can't do anything) a <delay> moment in milliseconds. Could someone do a better explanation?

Examples

itemact/itemdeact/itemtoggle

 /itemact gren //Throw a grenade.
 /itemdeact jetpack //Stop the jetpack.
 /itemtoggle blaster //Switch between the blaster and your main weapon.

buy/sell/build/class

 /buy lgun //Buy a Las Gun.
 /sell upgrades //Sell your armour, pack and gren.
 /build eggpod //Build an egg.
 /class level2 //Evolve into a marauder.

say/say_team/echo

 /say Hello World. //You will say 'Hello World' in the chat.
 /say_team They are strategic players. //You will say this in the team chat.
 /echo :) //:) will be displayed.

Item, class and structure names

Items

Weapons or Upgrades Name
Blaster blaster
Rifle rifle
Painsaw psaw
Shotgun shotgun
Las Gun lgun
Mass Driver mdriver
Chaingun chaingun
Pulse Rifle prifle
Flame Thrower flamer
Lucifer Cannon lcannon
Construction Kit ckit
Advanced Construction Kit ackit
Ammunition ammo
Medkit medkit
Grenade gren
Jet Pack jetpack
Battery Pack battpack
Light Armour larmour
Helmet helmet
Battle Suit bsuit

Classes

Class Name
Granger builder
Adv. Granger builderupg
Dretch level0
Basilisk level1
Adv. Basilisk level1upg
Marauder level2
Adv. Marauder level2upg
Dragoon level3
Adv. Dragoon level3upg
Tyrant level4

Structures

Structure Name
Egg eggpod
Barricade barricade
Booster booster
Acid Tube acid_tube
Hive hive
Trapper trapper
Overmind overmind
Hovel hovel
Reactor reactor
Telenode telenode
Machine Gun Turret mgturret
Medistation medistat
Armoury arm
Defence Control Computer dcc
Tesla Generator tesla
Repeater repeater

Examples

One single command:
 /bind 1 say_team Base is under attack!
Multiple commmands:
 /bind TAB "sell weapons; sell upgrades; buy rifle"
Example Human Config
 //Human Buy Binds//
 bind 1 "sell weapons; sell upgrades; buy larmour; buy helm; buy rifle; itemact rifle; echo ^5Rifle"
 bind 2 "sell weapons; sell upgrades; buy larmour; buy helm; buy shotgun; buy rifle; itemact shotgun; echo ^5Shotgun"
 bind 3 "sell weapons; sell upgrades; buy larmour; buy helm; buy lgun; buy battpack; buy rifle; itemact lgun; echo ^5Laser Gun"
 bind 4 "sell weapons; sell upgrades; buy larmour; buy helm; buy mdriver; buy battpack; buy rifle; itemact mdriver; echo ^5Mass Driver"
 bind 5 "sell weapons; sell upgrades; buy bsuit; buy larmour; buy helm; buy chaingun; buy jetpack; buy rifle; itemact chaingun; echo ^5Chaingun"
 bind 6 "sell weapons; sell upgrades; buy larmour; buy helm; buy prifle; buy battpack; buy rifle; itemact prifle; echo ^5Pulse Rifle"
 bind 7 "sell weapons; sell upgrades; buy larmour; buy helm; buy flamer; buy rifle; itemact flamer; echo ^5Flame Thrower"
 bind 8 "sell weapons; sell upgrades; buy larmour; buy helm; buy lcannon; buy battpack; buy rifle; itemact lcannon; echo ^5Lucifer Cannon"
 bind 9 "sell weapons; sell upgrades; buy larmour; buy helm; buy psaw; buy jetpack; buy gren; buy rifle; itemact blaster; echo ^1PAINSAW ASSAULT UNIT"
 bind 0 "sell weapons; buy ackit; buy ckit; echo ^5Builder"
 
 //Human Say Binds//
 bind g say_area "^5Look out, grenade!"
 bind k say_team "Yes/Okay"
 bind l say_team "No/Wrong"
 bind i say_team "Help us, the base is under attack!"
 bind o say_team "Thanks/Sorry!"
 bind m say_team "The Overmind is down!"
 bind , say_team "Follow me!"
Example Alien Config
 //Alien Evolve Binds//
 bind 1 "class level0; echo ^1Dretch"
 bind 2 "class level 1; echo ^1Basilisk"
 bind 3 "class level1upg; echo ^1Advanced Basilisk"
 bind 4 "class level2; echo ^1Friend Marauder"
 bind 5 "class level2upg; echo ^1Advanced Marauder"
 bind 6 "class level3; echo ^1Dragoon"
 bind 7 "class level3upg; echo ^1Advanced Dragoon"
 bind 8 "class level4; echo ^1Tyrant"
 bind 9 "class builderupg; class builder; echo ^1G^3r^2a^5n^4g^6e^1r"
 
 //Alien Chat Binds//
 bind g say_area "^1Look out, grenade!"
 bind k say_team "^1Yes/Okay"
 bind l say_team "^1No/Wrong"
 bind i say_team "^1Help us, the base is under attack!"
 bind o say_team "^1Thanks/Sorry!"
 bind m say_team "^1The Reactor is down!"
 bind , say_team "^1Follow me!"


Other Related Console Commands

  • /bind [KEY] - writes the command bound to the [KEY]
  • /bind [KEY] '[COMMAND 1]; [COMMAND 2]; [COMMAND 3]; ...' - binds multiple commands to a single [KEY]
  • /bindlist - lists all the currently active binds
  • /unbind [KEY] - unbinds the [KEY]
  • /unbindall - unbinds all the keys (use with caution!)
Tremulous
Personal tools