Newsflash

Warning: Tyrants may be hazardous to your health.
 

Mercenaries Guild

We Do Stuff!

 

Binds

Rating: 5

A bind is a command that links an action to a key press. For people who are serious about the game, it is the best way to increase your efficiency. This becomes very necessary when you are in high-pressure situations. For example, imagine that you’ve just taken out the Overmind at great risk to yourself, and you don’t want your team wasting time getting there to finish the job. You have to tell them that the Overmind is down and that they need to attack. If you type while still in the alien base, you may get killed. However, a simple key press would probably not get you killed. So, you bind a key so that when you press it, it tells your team, “OM Down! Attack Now!”

Other good reasons to use binds are:

  • To throw a grenade
  • To turn on/off your jet pack
  • To say messages
  • To easily buy weapons/armor or to evolve
  • To build without the menu
  • To evolve from dretch to tyrant while falling onto the reactor (you know you’ve always wanted to...)

Syntax

The basic syntax for a bind is:

bind <key> "<command>"

<key> should be replaced with the key you want to bind to (usually just the letter or number, but some keys have symbolic names instead). <command> is the command to execute when the key is pressed, note that the quotes are almost always required. The easiest way to bind something is from the ingame console (press ~ to bring down the console) and type the bind in, prefixed by /. For example, a bind might look like this:

/bind MOUSE1 "+attack"

It’s also possible to put your binds (and other commands) into configuration files, the only difference in syntax is the lack of a leading “/”.

Combining Multiple Commands

You can combine multiple commands in the same bind by separating putting a semicolon at the end of each command other than the last one. If wanted to throw a grenade and inform your comrades that they shouldn’t stand there, you would type:

bind g "itemact gren;say_team Grenade!"

Useful Commands

FIXME this section is written very poorly

set, seta, setu, sets

usage: set <variable> “<value>”
Sets <variable> to <value>, set can be omitted if <variable> already exists. seta will archive the variable, but most variables are archived anyway. setu will add that variable to your userinfo, allowing servers to see the value of that variable, but most variables a server would respond to are already in your userinfo (permanently), so it’s of limited usefulness as well. sets will add the variable to the serverinfo.

toggle

usage: toggle <variable>
Sets <variable> to 1 if it was 0, 0 if it was non-zero, mostly useful for toggling an on/off setting

itemact, itemtoggle

usage: itemact <item>
Uses or toggles a human item, <item> has to be one of the following: ckit, ackit, rifle, shotgun, lgun, mdriver, chaingun, prifle, flamer, lcannon, gren, jetpack, medkit, blaster. A useful though not completely intuitive bind is “itemtoggle blaster”, to switch between blaster and your primary weapon.

buy, sell

usage: buy <item>
Buys or sells an item. For buy, <item> should be one of: ckit, ackit, rifle, shotgun, lgun, mdriver, chaingun, prifle, flamer, lcannon, gren, jetpack, battpack, larmour, helmet, bsuit. Buy will only works when you would be able to see an item in the armory menu, so you must sell your weapon before buying a new one, etc. Sell can take all the arguments buy can, and accepts weapon, and upgrades as well, to allow you to easily sell your weapon or your upgrades.

class

usage: class <classname>
In addition to being the alien equivalent of the buy command, this also lets you spawn from a bind instead of that annoying menu. <classname> should be one of: rifle, ckit, ackit(these only work while you are a dead human), builder (spawn as granger), builderupg (spawn as adv. granger, or evolve to adv. granger), level0 (spawn as or evolve to dretch), level1 (basilisk), level1upg (adv. basilisk), level2 (marauder), level2upg (adv. marauder), level3 (dragoon), level3upg (adv. dragoon), level4 (tyrant).

build

usage: build <structure>
build is to the construction kit and granger what buy is to the armory. <structure> is one of: eggpod, acid_tube, barricade, overmind, hive, booster,trapper, hovel, telenode, mgturret, reactor, arm, medistat, repeater, tesla, or dcc (defense computer)...

team

usage: team <teamtojoin>
Switches you to <teamtojoin> if balance will allow, <teamtojoin> is humans, aliens, auto, or spectate.

say, say_team

usage: say <message>
Pretty much self explanatory, this will save keystrokes, and possibly your life, in the heat of battle. Just make sure you don’t unnecessarily spam your teammates or the entire server.

echo

usage: echo <message>
This will print a message to your console (and where chat would normally appear), useful for menu systems, or just to make it a bit more obvious which button you just pushed.

wait

usage: wait [numframes]
Waits for [numframes] client frames, or 1 if omitted, usually a small fraction of a second. It is worth noting that wait will prevent any other commands from being executed from the command buffer until the wait is over, so it should be used sparingly.

Configuration Files

By default, Tremulous will execute autogen.cfg and (if it exists) autoexec.cfg whenever it loads a map (autogen.cfg contains whatever cvars and binds you had at the end of the last map). It often makes things easier to add more configuration files, such as one for each of the 2 teams. To execute the contents of a file, use the “exec” command, like this:

exec "aliens.cfg"

You can use exec in binds as well:

bind KP_SLASH "exec aliens.cfg"

or to join aliens at the same time:

bind KP_SLASH "team aliens;exec aliens.cfg"

Complex Commands

One command in particular (vstr) lets you make much more complex binds than you would normally be able to. First an explanation of how it works:

vstr <variable>

will execute the contents of <variable> as if you typed that command. For it to be useful, you will first need to create special variables containing some commands:

set ping "echo ping; bind p vstr pong"
set pong "echo pong;bind p vstr ping"
vstr pong

or

bind p "vstr pingpong"
set ping "echo ping; set pingpong vstr pong"
set pong "echo pong; set pingpong vstr ping"
vstr pong

will alternate printing ping and pong every time you press it.

Appendix 1: List Of Keys

KeySymbolic NameDefault Action on ButtonCommandNotes
TabTABShow scores+scores-
EnterENTERUse selected item+button2-
EscapeESCAPEShow ingame menutogglemenu-
SpaceSPACEJump/Ascend (Jetpack and spectator)+moveup-
BackspaceBACKSPACE---
Up ArrowUPARROWGo Forward+forwardSame as W
Down ArrowDOWNARROWGo Backward+backSame as S
Left ArrowLEFTARROWTurn Left+left-
Right ArrowRIGHTARROWTurn Right+right-
AltALTStrafe (+right,+left become +moveright,+moveleft while held)+strafewhy would you use this?!?
ControlCTRLAttack/Fire+attackSame as MOUSE1
ShiftSHIFTRun / Walk+speed-
CommandCOMMAND--Mac keyboards only?
CapslockCAPSLOCK--Be careful when chatting if you use this key for something
F1F1Vote Yesvote yes-
F2F2Vote Novote no-
F3F3---
F4F4---
F5F5---
F6F6---
F7F7---
F8F8---
F9F9---
F10F10---
F11F11---
F12F12---
InsertINS---
DeleteDELLook Down+lookdown-
Page DownPGDNLook Up+lookup-
Page UpPGUP---
EndENDCenter your viewcenterview-
HomeHOME---
Left Mouse ButtonMOUSE1Attack/Fire+attackSame as CTRL
Right Mouse ButtonMOUSE2Secondary Fire+button5Not available with all weapons
Middle Mouse ButtonMOUSE3Select Item From Inventory+button2-
Mouse Button 4MOUSE4--Mouse button 4 is AUX1, not MOUSE4 on most mice
Mouse Button 5MOUSE5--Mouse button 5 is AUX2, not MOUSE5 on most mice
Mouse Wheel Away From YouMWHEELUPScroll to the next inventory itemweapnextSame as ]
Mouse Wheel Towards YouMWHEELDOWNScroll to the previous inventory itemweapprevSame as [
Joystick ButtonsJOY1--The joystick buttons are JOY1 through JOY32
Additional ButtonsAUX1--On most mice, buttons after the first 3 will be numbered AUX1 through AUX16
Numpad 7KP_HOME---
Numpad 8KP_UPARROW---
Numpad 9KP_PGUP---
Numpad 4KP_LEFTARROW---
Numpad 5KP_5---
Numpad 6KP_RIGHTARROW---
Numpad 1KP_END---
Numpad 2KP_DOWNARROW---
Numpad 3KP_PGDN---
Numpad EnterKP_ENTER---
Numpad InsertKP_INS---
Numpad DeleteKP_DEL---
Numpad /KP_SLASH---
Numpad -KP_MINUS---
Numpad +KP_PLUS---
NumlockKP_NUMLOCK---
Numpad *KP_STAR or *---
Numpad =KP_EQUALS---
PausePAUSE---
;(semicolon)SEMICOLON---

All other keys have no symbolic names (the name is the key)
KeyDefault ActionCommandNotes
-Decrease screen sizesizedownSame as _
_Decrease screen sizesizedownSame as -
=Increase screen sizesizeupSame as +
+Increase screen sizesizeupSame as =
]Scroll to the next inventory itemweapnextSame as MWHEELUP
[Scroll to the previous inventory itemweapprevSame as MWHEELDOWN
xSprintboost-
cCrouch/Wallwalk/Descend (Jetpack or spectator)+movedown
wMove forward+forwardSame as UPARROW
aMove left+moveleft-
sMove back+backSame as DOWNARROW
dMove right+moveright-
tTalk(Global)messagemode-
yTalk(Team)messagemode2-
uTalk(Target)messagemode3Sends message to target under your crosshair
iTalk(Attacker)messagemode4Sends message to last player who damaged you
zZoom in (mass driver only)+zoomIn svn +zoom was removed and +button5 is used instead (rightmouse by default)
rReloadreload-
bBuy ammobuy ammo-
mUse medkititemact medkit-
qEvolve/use building+button7-
eDeconstructdeconstruct-
fTaunt+button3-
hScroll scores upscoresUpbroken in 1.1.0
nScroll scores downscoresDownbroken in 1.1.0
\Mouselook+mlookanother artifact from a time when people didn’t use mice for FPSs
~Toggle the consoletoggleconsoleSame as ` (and shift+ESC in svn). Cannot be changed
`Toggle the consoletoggleconsoleSame as ~ (and shift+ESC in svn). Cannot be changed

Appendix 2: Example

As a reference, here is an example set of binds (kevlarman’s binds at the time he wrote this). These are made difficult to copy and paste for 2 reasons: it makes them easier to explain, and the point of writing this article is to get you to make your own binds, because anything you just download off the internet will never be as good for you as the binds you wrote to fit your playstyle. In the following sections, my explanations will be normal text,

while parts of the actual file will look like this

Without further ado, the real reason I own you so much :-P :

autoexec.cfg

I use this file to make sure several key binds will never get overwritten, they could go into autogen.cfg, but then it’s fairly easy to screw up quite a bit of hard work.

bind KP_SLASH "team aliens;exec aliens.cfg"
bind * "team humans;exec humans.cfg"

2 of the most important lines in these binds, the purpose of them is to reuse the same keys for both humans and aliens (without any of that “OM/Reactor down” stuff). they are pretty self explanatory: join a team, and exec the file with team specific binds.

bind KP_MINUS "vstr listupgrades"

For those of you who are going to disregard my request that you don’t copy and paste, and use this as a basis for your own binds instead, I’ve been kind enough to include a quick reference to which key does what (even though i shouldn’t have, but this is a great example of how to use vstr)

humans.cfg

seta listupgrades "echo (1:larmor) (2:helmet) (3:bsuit);echo (4:shotgun) (5:lasgun) (6:prifle);echo (7:psaw) (8:flamer/chaingun) (9:luci);echo (INS:mdriver) (DEL:ckit) (+:battpack) (ENTER:jetpack)"

the human half of the quick reference, echo is used to print some information about which keys do what.

bind kp_end "sell bsuit;buy larmour"

this will buy light armor (selling bsuit just in case i happen to have one at the time)

bind kp_downarrow "sell bsuit; buy helmet"
bind kp_pgdn "sell larmour; sell helmet; sell battpack;sell jetpack;buy bsuit"
bind kp_enter "sell bsuit;sell battpack; buy jetpack"
bind kp_plus "sell bsuit;sell jetpack;buy battpack"

more of the same, any conflicting items are sold first just to make sure everything works.

bind kp_leftarrow	"sell weapons; buy shotgun;buy rifle"
bind kp_5 "sell weapons; buy lgun;buy rifle"
bind kp_rightarrow "sell weapons; buy prifle;buy rifle"
bind kp_home "sell weapons;buy psaw;buy rifle"
bind kp_pgup "sell weapons;buy lcannon;buy rifle"

similar to the binds i used for upgrades, the “buy rifle” at the end is in case i’m short on credits, to make sure i don’t end up without a weapon (if you already have a weapon, buy will fail).

seta chainflame1 "sell weapons;buy flamer;buy rifle;bind kp_uparrow vstr chainflame2"
seta chainflame2 "sell weapons;buy chaingun;buy rifle;bind kp_uparrow vstr chainflame1"
vstr chainflame1

you may have noticed that there isn’t enough space on the number pad for all the human upgrades, so chaingun and flamer (the 2 weapons i used the least when i made my binds) share a key, press once to get chaingun, again to get flamer.

bind kp_del "class ackit;class ckit;sell weapons;buy ackit;buy ckit"

Numpad insert and delete are used for spawning as well as buying weapons. This bind first tries to spawn with an advanced ckit, then a regular one, if you are already spawned or in the spawn queue, then these end up failing (and printing an error message), then if you are near an armory, it sells your weapon, buys an advanced ckit if possible, regular ckit if not, and no matter what the situation, produces quite a bit of spam.

bind kp_ins "class rifle;sell weapons;buy mdriver;buy rifle

this spawns with a rifle or tries to buy a mass driver, not much to explain compared to the last one.

bind AUX1 "sell gren;itemact gren;buy gren"

This is a pretty neat grenade bind: first it tries to sell the grenade (so you can’t use it near the armory), then it tries to use it (if you weren’t near the armory), then it buys a new one. Throwing and buying grenade are safely on the same key, just make sure you never use this bind when the armory is unpowered.

bind AUX2 "itemact medkit"

not very interesting, but aliens use mouse5 for something else, so it has to get changed back to this in the human binds.

aliens.cfg

seta listupgrades	"echo (INS:dretch) (DEL:granger);echo (1:lisk) (2:mara) (3:goon); echo (4:lisk+) (5:mara+) (6:goon+);echo (8:tyrant)"

the alien half of the quick reference. alien class names aren’t quite as intuitive as human upgrade names, so I’ve commented what the class is at the end of each line (comments are everything after the "//")

bind kp_ins "class level0" //dretch

spawn as a dretch or evolve to dretch from (adv.) granger, because this is used to spawn more often than evolve, and because there is no advantage to evolving to dretch in mid-air, this bind is simpler than most of the others.

bind kp_del "class builderupg;class builderupg;class builder" //granger

this will spawn as a granger during stage 1, and adv. granger during stages 2 and 3, ‘class builderupg’ is doubled up because the second command can be skipped under certain circumstances if the first one fails (stage 1 happens to be “certain circumstances”).

seta evolve ""
bind kp_end "set evolve class level1;echo ^2[lisk selected]" //lisk
bind kp_leftarrow "set evolve class level1upg;echo ^2[lisk+ selected]" //adv lisk
bind kp_downarrow "set evolve class level2;echo ^2[mara selected]" //mara
bind kp_5 "set evolve class level2upg;echo ^2[mara+ selected]" //adv mara
bind kp_pgdn "set evolve class level3;echo ^2[goon selected]" //goon
bind kp_rightarrow "set evolve class level3upg;echo ^2[goon+ selected]" //adv goon
bind kp_uparrow "set evolve class level4;echo ^2[tyrant selected]" //tyrant
bind AUX2 "vstr evolve"

instead of evolving immediately, this will select the class you will evolve to, but not evolve until you press mouse5. This has several advantages: 1) you often evolve to the same class after dying, and this way you don’t need to take your hand off the mouse after you spawn, 2) it lets you evolve easily in midair for a reactor drop on certain maps (karith, uncreation), and 3) it lets you evolve very close to humans (sometimes saving your life) once you get a feel for when you will be too close to evolve and when you won’t be.

bind 1 "build eggpod"
seta builds1 "vstr builds1_1"
seta builds1_1 "build acid_tube;set builds1 vstr builds1_2"
seta builds1_2 "build barricade;set builds1 vstr builds1_1"
bind 2 "vstr builds1"
bind 3 "build overmind"

seta builds2 "vstr builds2_1"
seta builds2_1 "build booster;set builds2 vstr builds2_2"
seta builds2_2 "build trapper;set builds2 vstr builds2_1"
bind 4 "vstr builds2"

seta builds3 "vstr builds3_1"
seta builds3_1 "build hovel;set builds3 vstr builds3_2"
seta builds3_2 "build hive;set builds3 vstr builds3_1"
bind 5 "vstr builds3"

the idea behind the alien build binds is the same as the human ones, so i’m not going to explain it again, these are included here for completeness. Thanks for reading!

 
binds.txt (2147483648 views) · Last modified: 2008/07/27 17:49 by 99.229.32.251
 
Recent changes RSS feed Creative Commons License Donate Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Powered by Joom Prosolution