For Commanders... Sc Binds... Sorta

othellothell 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.
«1

Comments

  • SonnyG007SonnyG007 Join Date: 2002-08-07 Member: 1092Members
  • othellothell Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
    good question. i actually forgot that was in there. i've never used it in game, but I got it from the configuration menu. But what it does I am unsure of actually.... :-/
  • WarfareWarfare Join Date: 2002-10-29 Member: 1697Members
    edited November 2002
    I think the nuke is the siege cannon.

    By the way, is the Enterkey default on the switch.cfg ?
  • UGLJonUGLJon Join Date: 2002-11-04 Member: 6940Members
    Good idea man! I like your idea between switching configs! Good deal.

    I perosnally use the numpad for my commander binds. 1-ammo 2-health 3-etc...
  • othellothell Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
    ok guys... the Nuke is the Grenade Launcher. Dont ask me why it's called the Nuke (especially after the proposed changes <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo--> ), but last night I discovered what it actually was.


    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.
  • UGLJonUGLJon Join Date: 2002-11-04 Member: 6940Members
    I figured that out yesterday after going into commander and seing a guy with help and pressing my 1 button over and over going "GOD#$%#$! WHY THE $%^%$ AREN'T MY BINDS WORKING!! GOD$#%#it WORK!"

    Now I'm better. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    Great work. I wish HL allowed the binding to work properly, but it assumes you can only have one key do one thing. I would love to make these commands the default, but it just doesn't peacefully co-exist with the key control menu.
  • SAUnknownSoldierSAUnknownSoldier Join Date: 2002-11-01 Member: 2482Members
    Flayra,

    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,
  • RuriRuri Join Date: 2002-11-02 Member: 4709Members
    Umm actually Nuke is the jetpack. Just something old that needs to be updated I guess.
  • Astro-BoyAstro-Boy Join Date: 2002-11-01 Member: 2178Members
    edited November 2002
    Would it not be possible (sorry I haven't looked at the current binds yet) to combine two commands so pressing one key switches to the correct menu, then selects the item?

    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...
  • TacoSupremeTacoSupreme Join Date: 2002-11-01 Member: 2562Members
    You could have it your way flayara if you added a hotkey for each thing on the commander menu (only a few buildings in there now) and if it executed commander.cfg when you enetered the chair, marine.cfg whenever you spawned as a marine or exited the chair, and alien.cfg when you spawned as an alien. (Or even better skulk.cfg, gorge.cfg, etc)

    That way you could have the same key do 2 different things at different times.
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    Yeah, I know I could exec configs, the problem is the Half-life launcher. You know, when you're setting up your keys in the config screen. It won't let you assign the same key to multiple actions.
  • MerciorMercior Join Date: 2002-11-02 Member: 4019Members, Reinforced - Shadow
    Lol actually you're all wrong - the nuke was a marine weapon which was tested out before NS was released but was scrapped for the final release. So <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo-->
  • Astro-BoyAstro-Boy Join Date: 2002-11-01 Member: 2178Members
    I've seen custom scripts which modify the command menu. They create custom <b>kb_act.lst</b> files which sit in the <b>moddir\gfx\shell\</b> directory. They look something like this:

    <!--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
  • othellothell Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
    i'm about to totally revamp the system... just wait... ;-)

    now that I got a complete list of the commands it'll be more thorough also.
  • Astro-BoyAstro-Boy Join Date: 2002-11-01 Member: 2178Members
    edited November 2002
    On a slightly un-related note; would there be any chance of getting a "Select all marines" hotkey? Or being able to shift+click to select multiple marines? That'd be handy <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->

    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-->
  • TacoSupremeTacoSupreme Join Date: 2002-11-01 Member: 2562Members
    edited November 2002
    Even if you dont plan on adding the exec scripts (at least for those of us who are interested in scripting), then could you just add hotkey commands for every building instead of just infantry portal and resource tower? Then I can just set up a switch style thing like he mentioned at the top of this thread.

    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-->
  • othellothell Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
    Get Commander's Switch Script here: <a href='http://www.othell.com/data/switch.zip' target='_blank'>www.othell.com/data/switch.zip</a>

    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>
  • Jon_VincibleJon_Vincible Join Date: 2002-11-03 Member: 5804Members
    That's awesome dude! I customized your script so my numpad looks exactley like the command console on each menu, i find that nifty for me.
  • FlatlineUTDFlatlineUTD Join Date: 2002-11-08 Member: 7695Members
    OOOooh... setting up a number pad is a *great* idea. I'm left handed, so all the better. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo-->

    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-->
  • baby_seal_clubberbaby_seal_clubber Join Date: 2002-11-05 Member: 7141Members
    Why do I get "hotkey## unknown command" when I try to run this as commander?
  • othellothell Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
    <!--QuoteBegin--baby seal clubber+Nov 9 2002, 03:22 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (baby seal clubber @ Nov 9 2002, 03:22 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Why do I get "hotkey## unknown command" when I try to run this as commander?<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    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. ;-)
  • OttoDestructOttoDestruct Join Date: 2002-11-08 Member: 7790Members
    Turn numlock on or off, should fix it.
  • baby_seal_clubberbaby_seal_clubber Join Date: 2002-11-05 Member: 7141Members
    It was just any button. The ## was the hotkey number. Everytime I pressed a key, it said hotkey69 or whatever was unknown. I'll try the numlock thing.
  • mr_mofomr_mofo Join Date: 2002-11-01 Member: 2949Members
    How to I bind that alias switch? What is the command I type in the console?
  • baby_seal_clubberbaby_seal_clubber Join Date: 2002-11-05 Member: 7141Members
    bind <key> <command>

    like, bind enter switch, that's what mine is
  • othellothell Join Date: 2002-11-02 Member: 4183Members, NS1 Playtester, Contributor
    i'm curious if anyone is having probs with my scripts?

    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. :-/
  • AcheronAcheron Join Date: 2002-11-13 Member: 8489Members
    Nice script! Here are a few little suggestions:

    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.
  • NecroNecro &lt;insert non-birthday-related title here&gt; Join Date: 2002-08-09 Member: 1118Members
    no what flay means is you can't have b for lets say readyroom and build menu
  • ElricElric Join Date: 2002-11-13 Member: 8448Members
    Acheron, it's set up like that because it's been impossible to set a hotkey command then change the binds all in the same keystroke. Now if you had a seperate button for every single build option, you wouldn't need it but since I overwrote the build options all the time using q-v, I had to keep it the way he built it. Everything I tried to get around it ended up with the hotkey command not being executed.
Sign In or Register to comment.