For Commanders... Sc Binds... Sorta
othell
Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
well... this is just a little something I've put together. there is no readme file though, so I will attempt to explain it the best I can hear.
a few things to note. so far only a certain number of the commands to work with the commander menu interface is known, but everyone of those is used here and available at the touch of a button.
What this zip contains:
autoexec.cfg - since there is not one by default
marine.cfg - just binds to "reset" configs
com.cfg - commander specific binds.
switch.cfg - aliases to switch b/t commander & marine binds.
Ok... What this does...
autoexec.cfg executes the switch.cfg file whenever joining a server.
switch.cfg contains an alias "switch" that once bound to a key (must be done via console) will switch b/t marine and commander configs.
marine.cfg for me only changes the binds that com.cfg changes. you will most likely have to edit this some for your setup.
com.cfg is the key here. here is the list of what it binds by default.
Key -> Action
--------------------------------------
b -> basic build menu
v -> advanced build menu
e -> equip menu
w -> welder
a -> ammo
h -> health
s -> shotgun
g -> heavy machine gun
t -> turret
n -> nuke
m -> mines
z -> heavy armor
r -> resource tower
d -> recycle building
i -> infantry portal
Those are all the commands that I am aware of at this time. It should make commanding a bit easier and the keys should, for the most part, be easy to remember.
My setup is that I have bound the alias "switch" to my "enter" key. Every time I enter the command station I hit my enter key. This in turn executes the com.cfg file. If I ever get tired of this or just suck and feel like going and getting my ### chewed a bit, I'll logout of the command station and hit enter once more. This will execute the marine.cfg file and reset all of the necessary binds that I use as a marine.
Oh well... here is the file.
<a href='http://www.othell.com/data/switch.zip' target='_blank'>Switch.zip</a>
If you got any questions, post em here and I'll attempt to answer them. I can also be found on IRC on Gamesnet in #res or #drunks or #caleague-tfc.
Enjoy.
a few things to note. so far only a certain number of the commands to work with the commander menu interface is known, but everyone of those is used here and available at the touch of a button.
What this zip contains:
autoexec.cfg - since there is not one by default
marine.cfg - just binds to "reset" configs
com.cfg - commander specific binds.
switch.cfg - aliases to switch b/t commander & marine binds.
Ok... What this does...
autoexec.cfg executes the switch.cfg file whenever joining a server.
switch.cfg contains an alias "switch" that once bound to a key (must be done via console) will switch b/t marine and commander configs.
marine.cfg for me only changes the binds that com.cfg changes. you will most likely have to edit this some for your setup.
com.cfg is the key here. here is the list of what it binds by default.
Key -> Action
--------------------------------------
b -> basic build menu
v -> advanced build menu
e -> equip menu
w -> welder
a -> ammo
h -> health
s -> shotgun
g -> heavy machine gun
t -> turret
n -> nuke
m -> mines
z -> heavy armor
r -> resource tower
d -> recycle building
i -> infantry portal
Those are all the commands that I am aware of at this time. It should make commanding a bit easier and the keys should, for the most part, be easy to remember.
My setup is that I have bound the alias "switch" to my "enter" key. Every time I enter the command station I hit my enter key. This in turn executes the com.cfg file. If I ever get tired of this or just suck and feel like going and getting my ### chewed a bit, I'll logout of the command station and hit enter once more. This will execute the marine.cfg file and reset all of the necessary binds that I use as a marine.
Oh well... here is the file.
<a href='http://www.othell.com/data/switch.zip' target='_blank'>Switch.zip</a>
If you got any questions, post em here and I'll attempt to answer them. I can also be found on IRC on Gamesnet in #res or #drunks or #caleague-tfc.
Enjoy.
Comments
By the way, is the Enterkey default on the switch.cfg ?
I perosnally use the numpad for my commander binds. 1-ammo 2-health 3-etc...
One note, which may be obvious, but probably needs to be said anyways. Is that the binds will not work if you do not have the correct menu open. So to drop health, you must be sure that the Equip menu is open first. Just an FYI.
Now I'm better. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
I did something very similar to what othell came up with, but I still don't understand why a different impulse can't be set for each command so that it doesn't matter which screen is up on the commander GUI. Can you explain further? Thanks,
Half-Life, as you probobly know, lets you combine commands using the semi-colon. So could you not do something like:
<b>bind a "[open equip menu];wait;[select ammo]"</b>
You could probobly go as far as:
<b>bind a "[open equip menu];wait;[select ammo];wait;+attack;wait;-attack"</b>
...to select and drop in one key press.
This is just theoretical, I haven't tried it yet. But I don't see why it wouldn't work...
That way you could have the same key do 2 different things at different times.
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->"blank" "Custom Keys"
"blank" ":::::::::::::::::::::::::::::::::::::::::::::::::::::::"
"blank" " Movement"
"blank" ":::::::::::::::::::::::::::::::::::::::::::::::::::::::"
"+forward" "Move forward"
"+back" "Move back"
"+left" "Turn left"
"+right" "Turn right"
"+moveleft" "Strafe Left"
"+moveright" "Strafe Right"
"+speed" "Walk"
"+jumpclr" "Jump"
"+duck" "Duck"
"+moveup" "Swim up"
"+movedown" "Swim down"
"+lookup" "Look up"
"+lookdown" "Look down"
"centerview" "Reset view"
"+strafe" "Strafe modifier"
"blank" ":::::::::::::::::::::::::::::::::::::::::::::::::::::::"
"blank" " Combat"
"blank" ":::::::::::::::::::::::::::::::::::::::::::::::::::::::"
"+attack" "Fire"
"+attack2" "Weapon Special Function"
"+reload" "Reload weapon"
"invprev" "Previous weapon"
"invnext" "Next weapon"
"lastinv" "Last used weapon"
"drop" "Drop Current Weapon"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
You could quite easily add a commander section:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->"blank" ":::::::::::::::::::::::::::::::::::::::::::::::::::::::"
"blank" " Commander Shortcuts"
"blank" ":::::::::::::::::::::::::::::::::::::::::::::::::::::::"
"sel_ammo" "Select Ammo"
"sel_health" "Select Health"
"build_turret" "Build Turret"
etc...<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
And as long as the aliases (on the left) exist, you should have no problem.
The only downside is you have to recreate the menu in its entirety (you need to remake the movement section, etc...). I can't seem to find any "official" documentation on this, but I'll keep looking.
Cheers,
- Mark
now that I got a complete list of the commands it'll be more thorough also.
Edit: Woops, <a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=20&t=8566' target='_blank'>already answered</a>. Yay! Thanks Flayra <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
Edit: This is what im trying to do. Im trying to bind the 1234, qwer, asdf, zxcv keys to the corresponding buttons in the bottom right.
script so far:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->bind 1 buildmenu
bind 2 advbuildmenu
bind 3 equipmenu
alias buildmenu "hotkey86;bind q hotkey41;bind w hotkey40"
alias advbuildmenu "hotkey87"
alias equipmenu "hotkey88;bind q hotkey59;bind w hotkey60;bind e hotkey61;bind r hotkey53;bind a hotkey62;bind s hotkey64;bind d hotkey65;bind f hotkey66;bind z hotkey38;bind x hotkey39"
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
This is my second version of scripts for the commander. My first version can be found at <a href='http://www.othell.com/data/_switch.zip' target='_blank'>www.othell.com/data/_switch.zip</a>
What this zip contains:
autoexec.cfg - since there is not one by default
marine.cfg - just binds to "reset" configs
com.cfg - commander specific binds.
switch.cfg - aliases to switch b/t commander & marine binds.
equip.cfg - binds specific to the equip menu
build.cfg - binds specific to the build menu
advbuild.cfg - binds specific to the advanced build menu
ALL files go in your /ns/ directory.
With the multiple config files, and even with NS's lack of script support (or script suppression depending on which way you look at it), the same key is able to be bound to a different action depending on which menu is currently open.
Ok... What this does...
autoexec.cfg executes the switch.cfg file whenever joining a server.
switch.cfg contains an alias "switch" that once bound to a key (must be done via console) will switch b/t marine and commander configs. It also contains three other aliases (eq, bld, adv) which exec equip.cfg, build.cfg, advbuild.cfg respectively.
marine.cfg for me only changes the binds that com.cfg changes. you will most likely have to edit this some for your setup.
com.cfg is not used as much as it was in my last version. it just has 4 binds.
Key -> Action
----------------------
b -> basic build menu
v -> advanced build menu
e -> equip menu
d -> recycle object
equip.cfg contains binds for the Equip Menu (duh!)
Key -> Action
----------------------
w -> welder
a -> ammo
h -> health
s -> shotgun
g -> heavy machine gun
m -> mines
f -> scanner sweep ( think of "find")
n -> grenade launcher (think of "nuke")
j -> jetpack
build.cfg contains binds for the Build Menu (duh?)
Key -> Action
-----------------------
r -> resource tower
t -> turret
i -> infantry portal
a -> armory
f -> turret factory
s -> siege cannon
c -> command console
advbuild.cfg contains binds for the Advanded Build Menu (wow!)
Key -> Action
-----------------------
o -> observatory
a -> arms lab
p -> prototype lab
g -> phase gate
One note on this setup. There are specific instances when it will require two presses of the menu keys to activate the menu. It's kinda hard at the moment to explain when, but its quiet easy to figure out once you use the scripts. You'll pick it up in no time. ;-)
My setup is that I have bound the alias "switch" to my "enter" key. Every time I enter the command station I hit my enter key. This in turn executes the com.cfg file. If I ever get tired of this or just suck and feel like going and getting my ### chewed a bit, I'll logout of the command station and hit enter once more. This will execute the marine.cfg file and reset all of the necessary binds that I use as a marine.
As far as I know this stuff works. If there are any problems, come find me in <b>#caleague-ns and let me know. Any questions... Come find me in [B]#caleague-ns also.</b>
It may not work as well when unit-selection commands are working in the next patch, but for now, I'm stealing your idea. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo-->
whatcha talking about?? what hotkey is unknown? there's a very good chance that i could've transposed some keys and stuff. so gimme some more info. ;-) like what "hotkeyxx" is it saying is wrong? and what are you trying to do at that time??
i've been using my scripts some... and i think there may still be a bug or two in them, but i'm not sure yet. needs more testing. ;-)
like, bind enter switch, that's what mine is
I've been using them... and sometimes they work for a while... but then probs start to arise during the game. as in... a key doesnt work for any of the options like it did at the beginning.
I'm gonna look at my stuff again... but I wanna know if anyone else is experiencing the same probs. :-/
I think it's a bit clunky to embed scripts (ie: your "bld", "adv", and "eq" commands) in spots where they will be executed "on the fly". It can lead to excessive CPU usage (I know, we're not talking noticeable problems here) or errors. The scripts themselves really aren't that long, so you can probably just throw them into com.cfg.
You might want to take out those embedded binds. This comes up specifically in "build.cfg", for example, where you have the command
<i>bind "b" "hotkey86; bind b bld"</i>
These make it difficult for players new to scripting to customize your script, and it eliminates the possibility of remapping the keys through half-life's "Controls" menu (by altering the kb_act.lst file).
As to your errors, the problem is: when you execute your sub-cfg files (equip.cfg, build.cfg, etc.) you remap certain keys. However, your script doesn't remap them <b>back</b> to their old keys. This is probably why you're experiencing troubles right now.