The Incomplete and Unofficial Guide to /bind (1.1)


Aarzak

 

Posted

[ QUOTE ]
I've been working on a macro for a quick, witty remark everytime get AS'd by a stalker in PvP for about 3 hours now and having a frustrating time. I'm sure its something simple that i am doing wrong and i would love some feedback.

I started off by making a folder c:\keybinds and within it are as1.txt, as2.txt, and as3.txt (written with Notepad). The 3 separate files read as this:

as1.txt
"local Silly Stalker, Tanks are for Brutes!$$bind_load_file c:\keybinds\as2.txt"

as2.txt
"local OUCH!$$bind_load_file c:\keybinds\as3.txt"

as3.txt
"local Why you gotta be so hateful yo?$$bind_load_file c:\keybinds\as1.txt"

Now ingame i have been using this as my macro (which wont work):

/macro AS, "bind_load_file c:\keybinds\as1.txt"

When i try to use it, the game says "Usage:bind takes 2 args, you gave 1."

I have no idea what that means and i would really appreciate some help with this.

[/ QUOTE ]

Binds need to have a key to bind to. You can't really make a macro out of this. However, you could do the following:

as1.txt
g "local Silly Stalker, Tanks are for Brutes!$$bind_load_file c:\keybinds\as2.txt"

as2.txt
g "local OUCH!$$bind_load_file c:\keybinds\as3.txt"

as3.txt
g "local Why you gotta be so hateful yo?$$bind_load_file c:\keybinds\as1.txt"

Then simply type in game:

/bindloadfile c:\keybinds\as1.txt

This will bind your g key to the first saying. everytime you hit that key it will cycle to the next saying. You can of course decide to use a different key than the G key, just be sure to change it in all the bindfiles.


 

Posted

Thanks! I was just trying to "cheat" out of using the bind since macros are suppose to do everything that binds do. I'll give it a shot.


 

Posted

[ QUOTE ]
I can confirm there is no way to load or save macros.

[/ QUOTE ]

Actually... there is, albeit it's kinda tricky. I use it in my "root" bindfile I load upon creating a new character

bind g "macro flush /unloadgfx"$$bind g nop

Or something like that


What shall claim a Sky Kings' Ransom?

PPD & Resistance Epic Archetypes

 

Posted

Oki got a funky one for you guys. Arena time and it needs to work in the arena not just in a pvp zone. I have heard that there is a way to target a single team mate and be able to attack his target all at the same time. Im not sure if its a macro, which would be preferable or its a bind.

Any help you guys can give would rock.

Thanks


 

Posted

/Assist will allow you to see the target of your friend.


[color=gold][b][size=5]♪ Sometimes you feel like a Tank, Sometimes you don't! ♪[/size][/color][/b]

[url=http://boards.cityofheroes.com/showthread.php?t=114726][color=black][b][size=5]Moon [color=red]Hazard [color=black]Zone![/size][/color][/color][/color][/b][/url]

 

Posted

[ QUOTE ]
Oki got a funky one for you guys. Arena time and it needs to work in the arena not just in a pvp zone. I have heard that there is a way to target a single team mate and be able to attack his target all at the same time. Im not sure if its a macro, which would be preferable or its a bind.

Any help you guys can give would rock.

Thanks

[/ QUOTE ]

Make sure you have the Auto-Assist Reticle under General Options in the "Show when Selected or Mouse over" or at least not Hidden =-P Target your friendly and fire attacks at whatever your friend has targeted at the moment. Also, a side note for healer types. Target the Boss and cast healing powers or buffs on whoever the Boss is wailing on atm!

Just my 2 inf


 

Posted

I have a particular key configuration that I want to load for each new character I create (I'm an altoholic). Unfortunately, for the three of the commands that I change, they already have 2 keys bound to them in the default bind configuration. Thus, when I load my saved keybinds.txt file, I get three messages that such and such command cannot have more than two keys bound to it. Then, I have to go into the Keymapping menu anyway to bind these commands to my preferred keys.

How can I fix this problem? Is there a command that will clear all the bound keys from a command that I could put at the start of keybinds.txt?


 

Posted

What you're trying to do is probably best achieved with "nop" (no operation), the blank command. So, for example:

/bind x "nop"

will clear any binding from the x key. I know this isn't exactly what you were looking for, but it'll get the job done, at least if you're dealing with the same default bindings every time. Instead of trying to clear the command itself, just clear one of the keys that's bound to that command by default.

You might even want to create a separate bindfile (called something like remap_defaults.txt) that just has those remappings, which will presumably be the same for all your toons. Then you could load it with bind_load_file, before loading the keybinds.txt with commands customized for your current toon.


 

Posted

[ QUOTE ]
I have a particular key configuration that I want to load for each new character I create (I'm an altoholic). Unfortunately, for the three of the commands that I change, they already have 2 keys bound to them in the default bind configuration. Thus, when I load my saved keybinds.txt file, I get three messages that such and such command cannot have more than two keys bound to it. Then, I have to go into the Keymapping menu anyway to bind these commands to my preferred keys.

How can I fix this problem? Is there a command that will clear all the bound keys from a command that I could put at the start of keybinds.txt?

[/ QUOTE ]

In your game folder, something along the lines of C:\Program files\City of Heroes there's a file called keybinds. Open that using your Notepad. At first you'll most likely be VERY confused but as you look through the file you'll see all your key binds. Find the keys that you are getting the errors from and simply enter the binds that you want for each key. Once you finish editing the keys be sure to SAVE your file! Start your game, from your Options menu under Keymapping there is a Reset ALL Keybinds button, hit that and then type in the BindLoad command. This will load your "new" keybinds file. Hit the Save and Close button at the bottom left of that window and you're all set! Now when ever you start another alt simply Reset the Binds button and type in the BindLoad command.

Hope this helps and isn't TOO confusing
If you need any more help feel free to post here or PM me with particulars and if I can I will be happy to help you.


 

Posted

[ QUOTE ]
[ QUOTE ]
I have a particular key configuration that I want to load for each new character I create (I'm an altoholic). Unfortunately, for the three of the commands that I change, they already have 2 keys bound to them in the default bind configuration. Thus, when I load my saved keybinds.txt file, I get three messages that such and such command cannot have more than two keys bound to it. Then, I have to go into the Keymapping menu anyway to bind these commands to my preferred keys.

How can I fix this problem? Is there a command that will clear all the bound keys from a command that I could put at the start of keybinds.txt?

[/ QUOTE ]

In your game folder, something along the lines of C:\Program files\City of Heroes there's a file called keybinds. Open that using your Notepad. At first you'll most likely be VERY confused but as you look through the file you'll see all your key binds. Find the keys that you are getting the errors from and simply enter the binds that you want for each key. Once you finish editing the keys be sure to SAVE your file! Start your game, from your Options menu under Keymapping there is a Reset ALL Keybinds button, hit that and then type in the BindLoad command. This will load your "new" keybinds file. Hit the Save and Close button at the bottom left of that window and you're all set! Now when ever you start another alt simply Reset the Binds button and type in the BindLoad command.

Hope this helps and isn't TOO confusing
If you need any more help feel free to post here or PM me with particulars and if I can I will be happy to help you.

[/ QUOTE ]

I did a little variant of what you suggested: I went into my keybinds.txt file and replaced the binds to the problem commands/keys with "nop". I still get two errors, but I'm not exactly sure why.

I'll see if I can tinker a little more tonight and get better results. If I can come up with a specific description of the problem, I'll post it here.


 

Posted

[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
I have a particular key configuration that I want to load for each new character I create (I'm an altoholic). Unfortunately, for the three of the commands that I change, they already have 2 keys bound to them in the default bind configuration. Thus, when I load my saved keybinds.txt file, I get three messages that such and such command cannot have more than two keys bound to it. Then, I have to go into the Keymapping menu anyway to bind these commands to my preferred keys.

How can I fix this problem? Is there a command that will clear all the bound keys from a command that I could put at the start of keybinds.txt?

[/ QUOTE ]

In your game folder, something along the lines of C:\Program files\City of Heroes there's a file called keybinds. Open that using your Notepad. At first you'll most likely be VERY confused but as you look through the file you'll see all your key binds. Find the keys that you are getting the errors from and simply enter the binds that you want for each key. Once you finish editing the keys be sure to SAVE your file! Start your game, from your Options menu under Keymapping there is a Reset ALL Keybinds button, hit that and then type in the BindLoad command. This will load your "new" keybinds file. Hit the Save and Close button at the bottom left of that window and you're all set! Now when ever you start another alt simply Reset the Binds button and type in the BindLoad command.

Hope this helps and isn't TOO confusing
If you need any more help feel free to post here or PM me with particulars and if I can I will be happy to help you.

[/ QUOTE ]

I did a little variant of what you suggested: I went into my keybinds.txt file and replaced the binds to the problem commands/keys with "nop". I still get two errors, but I'm not exactly sure why.

I'll see if I can tinker a little more tonight and get better results. If I can come up with a specific description of the problem, I'll post it here.

[/ QUOTE ]

I seem to remember reading a LONG time ago that certain keys are "locked", that is changing them doesn't actually change their original use. ie numbers across top of keyboard being set to your first row power slots. Perhaps with this "locked" bind and additional binds it generates the "too many binds" error? I know that EVERYtime I change my binds I get at least one such message, I just can't determine which key since the error doesn't say, but I *think* it might be the v key, which I always rebind to down in flight.


 

Posted

I tinkered with the keybinds.txt file a little more, and, as you suspected, the problem doesn't really go away. I've found a rather simple solution though: type /bind_load twice. I feel a bit stupid for not thinking of it before.

Next project: a macro to set the scale of my windows, and open up all three power trays.


 

Posted

I have a few questions for the bind gurus.

First: is there a better thread than this to discuss bind problems and ask questions?

Second: Does anybody know slash commands for the following tasks:

<ul type="square">[*]adding a channel to an existing tab[*]setting chat options like "Enable Profanity" and "Enable Villain Private Chat"[/list]
The second issue is basically me trying to make my altitis easier to bear by setting a bunch of things to be identical on my various characters by hitting a single key which then nops itself once the inital commands are complete. I've got turning speed, mouse Y axis behavior and alt trays all set, but the best I can do with these chat settings is to open the options window automatically.

The first issue is for a project I'm working on that will most likely turn into a guide. I'm about 90% of the way to having a very slick system working, but I lack only an ability to add channels to a tab.

Thanks for your help,

Scrap


 

Posted

[ QUOTE ]

Next project: a macro to set the scale of my windows, and open up all three power trays.


[/ QUOTE ]

If you'd rather work it out on your own, don't read beyond this point.

Easy answer:
/bind ctrl+i "alttraysticky$$tray_sticky_alt2"

Yes, it would make more sense if the commands were named consistently, but this is the nice, simple toggle command, with no arguments to deal with.


Harder answer:
Get ready for some weirdness.

I like the /tray_sticky command because it's less haphazard-seeming than the above commands, which look like they were created independently by two guys who were working on different projects, who had never met and knew nothing about the other project.

But the documentation for /tray_sticky is "Set the sticky-state of the specified tray. Syntax: tray_sticky &lt;SHOWING TRAY NUM&gt; &lt;0 for non sticky, sticky otherwise&gt;". Seems straightforward enough, except that my reference for SHOWING TRAY NUM came from /goto_trays_tray, which takes SHOWING TRAY NUM as the first argument. In that command, the bottom tray is 1, the middle tray is 2, and the top tray is 3.

Not so for /tray_sticky. If you want to make the middle tray appear, you enter "/tray_sticky 1 1". If you want the top one to appear, you enter "/tray_sticky 2 1". If you want the top to disappear, "/tray_sticky 2 0".

Why the apparent disregard for consistency in the command line arguments? I suspect that the sticky property is considered to be a property of the tray below. So to make the third tray appear, you alter the sticky property on tray 2. In the dev's mind, the top of tray 2 had to become sticky for tray 3 to remain in the UI. When this was all exposed to the command line, either nobody realized that SHOWING TRAY NUM seemed to be used inconsistently, or everybody was operating from the "stickiness is a property of the tray below the one you want to appear" groupthink and it didn't occur to them that this was confusing.

At any rate, the harder answer is:

/bind ctrl+i "tray_sticky 1 1$$tray_sticky 2 1"

It looks so much cleaner than the easier answer, though!


Cheers,

Scrap


 

Posted

Is there a way to set up binds so that a and d cause you to strafe when rbutton is pressed and turn your char when rbutton is not pressed?


 

Posted

Not easily - the right button isn't programmed to be used in combination the way the control, shift, and alt buttons are. If you're crazy, you could have the right button load a keybind file from disk when pressed, and reload the original file when released. I don't know if you'd find that to your liking, though. It might be prone to error in the chaos of battle.

Example:
Create the following files:
C:\turn.txt:

rbutton "+$$bindloadfile c:\strafe.txt"
a +left
d +right

C:\strafe.txt:

rbutton "+$$bindloadfile c:\turn.txt"
a +turnleft
d +turnright

Remove any extra keybinds that turn or strafe, because you may get an error that a command is restricted to two keybinds. Then enter the command /bindloadfile c:\turn.txt

For what it's worth, I always bind the right button to nop (no operation) as part of my setup for new characters, after right-clicking a teammate in battle and kicking teammate or whatever once too often. I think it was kicking myself from the Hess taskforce right before the last mission that did it for me.


 

Posted

[ QUOTE ]
I seem to remember reading a LONG time ago that certain keys are "locked", that is changing them doesn't actually change their original use. ie numbers across top of keyboard being set to your first row power slots. Perhaps with this "locked" bind and additional binds it generates the "too many binds" error? I know that EVERYtime I change my binds I get at least one such message, I just can't determine which key since the error doesn't say, but I *think* it might be the v key, which I always rebind to down in flight.

[/ QUOTE ]

None of the keys are "blocked." They simply come w/ default settings out of the box. Some keys, however, are recommended to be stayed away from. Like the number keys and the movement keys. That is not to say that you couldn't use a shift+&lt;key&gt; command.

[ QUOTE ]
I have a particular key configuration that I want to load for each new character I create (I'm an altoholic). Unfortunately, for the three of the commands that I change, they already have 2 keys bound to them in the default bind configuration. Thus, when I load my saved keybinds.txt file, I get three messages that such and such command cannot have more than two keys bound to it. Then, I have to go into the Keymapping menu anyway to bind these commands to my preferred keys.

How can I fix this problem? Is there a command that will clear all the bound keys from a command that I could put at the start of keybinds.txt?


[/ QUOTE ]

A slightly easier way to set this up would be to go into the options menu ingame. There at the bottom of the keymapping tab you will find Load Keybinds and Save Keybinds command that can be set to any key. This will automatically save your current characters bind set as the file "keybinds" in your CoH folder. Hitting the "load keybinds" button will load them from there as well. I have "L" set to load the keybinds and "shift+L" to save them. Just open your "keybinds" file, make any changes, save the changes, then hit whatever button you have set for load keybinds.


 

Posted

To clear all current bindings from a key use the "nop" function.
For example lets say Jump (+up) is bound to space and button5 bydefault:
bind space nop
bind button5 nop
bind space "powexecname Combat Jumping$$powexecname Super Jump"

There isn't a way to unmap a bind to a power.
You have to unmap the key.


 

Posted

great guide


 

Posted

Excellent guide!

Saving this to favoretes....


 

Posted

[ QUOTE ]
To clear all current bindings from a key use the "nop" function.

There isn't a way to unmap a bind to a power.
You have to unmap the key.

[/ QUOTE ]

You can't unmap the key either. You can only bind the key to something else. Using "NOP" binds that to the key, but it doesn't actually leave the key unbound.


 

Posted

[ QUOTE ]
[ QUOTE ]
To clear all current bindings from a key use the "nop" function.

There isn't a way to unmap a bind to a power.
You have to unmap the key.

[/ QUOTE ]

You can't unmap the key either. You can only bind the key to something else. Using "NOP" binds that to the key, but it doesn't actually leave the key unbound.

[/ QUOTE ]
Say what? Yeah, but "nop" is like nothing, it's not like you bind nop to 2 keys and then it tells you you you alread yhave it bound twice when trying to bind it again. You mean when you export it shows all the keys set to nop? I havent't noticed that.


 

Posted

A reminder for those who might want to bind a power to more than 2 seperate keys: This can be done with a bind, as long as you incorporate more than one command into the bind, such as this:
[*] x "powexec_name Powername$$emote atease"

incorporating any other command, even one that doesn't work, will bypass the limitation of only binding a power to 2 different keys at most.


Dear NCsoft, if you go through with this shutdown you've guaranteed you'll not see another dime from me on any project you put out, ever.


http://xx-starhammer-xx.deviantart.com/

 

Posted

[ QUOTE ]
Say what? Yeah, but "nop" is like nothing, it's not like you bind nop to 2 keys and then it tells you you you alread yhave it bound twice when trying to bind it again. You mean when you export it shows all the keys set to nop? I havent't noticed that.

[/ QUOTE ]

Yes, it will show all the keys that have "nop" bound to them.

This won't matter for most people, but there is an upper limit to the number of keybinds you may have on a character. (I think that it's 272 binds.) Anything that has "nop" bound to it will count against that total.


 

Posted

I got this PM from someone. And to be frank my search fu has failed me. and I can't seem to recall how to go about this.

**********

What I would like to do is have a bind that lets me toggle assist. I wanted to tie it to 1-8 on my keyboard so that is any given team mate said "attack my target", i could hit the corresponding key # and load the /assist.

As an example, I use this for speedboost on a different toon.

1 "team_select 1$$powexec_name Transfusion"

I just can't figure out how to get assist in there instead of transfusion. Any help you could provide would be greatly appreciated.


[color=gold][b][size=5]♪ Sometimes you feel like a Tank, Sometimes you don't! ♪[/size][/color][/b]

[url=http://boards.cityofheroes.com/showthread.php?t=114726][color=black][b][size=5]Moon [color=red]Hazard [color=black]Zone![/size][/color][/color][/color][/b][/url]