2 or more files.

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

Wed May 09, 2007 10:28 am

  • I would like to know if you could have more cfg files and link the so you have heaps of binds and aliases?

    what i tryed to do was this

    i made a commands.cfg, autoexec.cfg, shh.cfg ( chat file cause every one tells me to shut up =). ) and a team.cfg file of course i have config.cfg
    what i wanted to do was to bind exec autoexec.cfg and the rest to a key then have a large amount of aliases and binds.
    User avatar
    shaggy
    Alien trapper
     
    Posts: 419
    Joined: Tue Apr 03, 2007 6:12 am

Wed May 09, 2007 1:43 pm

  • I'm not totally sure what you want to do.. I guess you want to read those config files JUST if you press a certain key?
    bind X "exec configfile1.cfg;exec configfile2.cfg;exec configfile3.cfg"
    or make it:
    bind X "exec configfile1.cfg"
    and inside configfile1.cfg have: exec configfile2.cfg;exec configfile3.cfg

    exec autoexec.cfg IS NOT NEEDED as that file is read at EACH START automatically (hence the name :) )
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Wed May 09, 2007 1:51 pm

  • If you mean on Nexuiz start, before autoexec.cfg is executed there is a previous file that tells it to run autoexec.cfg. In Quake this was called quake.rc, I can't remember what it is in Nexuiz. Add the .cfg fiel you want to that .rc file.
    Ed
    Forum addon
     
    Posts: 1172
    Joined: Wed Mar 01, 2006 12:32 am
    Location: UK

Wed May 09, 2007 2:02 pm

  • Ed wrote:In Quake this was called quake.rc, I can't remember what it is in Nexuiz. Add the .cfg fiel you want to that .rc file.

    Guess what: it's still called quake.rc :)
    But i wouldn't advise changing the quake.rc, it's easier to add "exec foo.cfg" to your autoexec.cfg
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Wed May 09, 2007 2:07 pm

  • see, aside from my global config and autoexec config files, I have two cfgs, one for competing and one for pubing. competing has things like music turned off, more brightness, some visuals turned off, chat binds for CTF, etc. My pub config has most visuals turned on, chat binds that are considered spam, etc. All you need to do to get this is (I'm assuming you're in windows, I'm not so I'm not completely sure how) make another start menu item and call it "nexuiz pro" and run /path/to/nexuiz.exe +exec pro.cfg and then your existing menu item add +exec pub.cfg onto the end. I don't have the cfgs because I'm at school right now but I'll post them up later if you want...
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Wed May 09, 2007 3:03 pm

  • [TSA] Psychiccyberfreak wrote:... and one for pubing.

    Anyone else see the humour in that?

    Pubbing?
    Ed
    Forum addon
     
    Posts: 1172
    Joined: Wed Mar 01, 2006 12:32 am
    Location: UK

Wed May 09, 2007 4:18 pm

  • Ed wrote:
    [TSA] Psychiccyberfreak wrote:... and one for pubing.

    Anyone else see the humour in that?

    Pubbing?

    I see the humour in everything.
    :)
    Keyboard killer
     
    Posts: 590
    Joined: Tue Feb 28, 2006 9:09 pm

Wed May 09, 2007 7:34 pm

  • damn those school keyboards, the b key must have been used during a flame war on some other forum... :lol:

    anyways back on track...
    what i wanted to do was to bind exec autoexec.cfg and the rest to a key then have a large amount of aliases and binds.


    Ok so basically I think what you want is to bind a key that will execute a whole bunch of configs at once. Autoexec.cfg is automatically executed on startup so you don't need that. try this:
    Code: Select all
    bind <key> "exec commands.cfg; exec shh.cfg; exec team.cfg;"
    Last edited by Psychcf on Wed May 09, 2007 11:12 pm, edited 2 times in total.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Wed May 09, 2007 11:02 pm

  • I was chuckling to myself about pubing. :P
    Longhorn
    Member
     
    Posts: 39
    Joined: Sun Feb 04, 2007 5:59 am
    Location: Indiana, USA

Thu May 10, 2007 9:34 am

Fri May 11, 2007 8:22 am

  • I just thought i'd let you know what i mean is can i make like 2 files and use it a almost a nav page?

    I have tryed but i cant seem to get it to work!
    User avatar
    shaggy
    Alien trapper
     
    Posts: 419
    Joined: Tue Apr 03, 2007 6:12 am

Fri May 11, 2007 8:35 am

  • I'll copy some text I wrote for my site I might upload somewhere some time if I get more stuff for it...
    This should explain some ways of having `heaps of binds and aliases'

    I'd just add a link, but it's on my local machine so it'd only work when I'm online

    If you find any mistakes, tell, if you find any HTML tags left in the text... then ignore them...

    Advanced 力exuiz Configurations

    There are enough texts about basic configuration files for 力 out there anyway, so I'll only cover the more advanced parts.

    Multiple configurations
    Multiple files
    The most basic method of having multiple configurations, multiple binds on one key, is to use multiple files, and to make one or more keys execute the different configurations.
    -- autoexec.cfg
    Code: Select all
          bind F11 "exec bindmap1.cfg"
          bind F12 "exec bindmap2.cfg"

    -- bindmap1.cfg
    Code: Select all
          bind A "say This is map 1, key A"
          bind B "say This is map 1, key B"

    -- bindmap2.cfg
    Code: Select all
          bind A "say This is map TWO, key A"
          bind B "say This is map TWO, key B"


    Bindmaps
    Bindmaps are something serverownsers like to screw around with a lot... so forget them :D I don't use them and don't know how they work, and I don't care.
    Variable-rotation / Multi-content-file
    There are ways to have different configurations stored in one file and changing them on the fly.
    The reload-myself configuration
    This is the most beautiful way in my opinion, since it improves readability of the configuration file a lot. You have multiple bind commands in one file, all prefixed with their `map name'.
    (eg.: [$tm_ctf bind a b] or [$tm_kh bind a b])
    -- messages.cfg - contains the aliases for all team messages
    Code: Select all
        alias nocmd // do not execute whatever command
        alias docmd "$*" // execute the command - [b]unfortunately[/b] you [b]cannot[/b] provide arguments to `inner' commands
        set tmm_gen docmd // general binds (standard)
        set tmm_ctf nocmd
        set tmm_kh nocmd

        // Command to set no-mode, and to echo out the mode `menu'
        alias mode_none "set tmm_gen nocmd; set tmm_ctf nocmd; set tmm_kh nocmd; set mm_gen O; set mm_ctf O; set mm_kh O"
        alias mode_echo "echo ^1---------------------------; echo $mm_gen General binds; echo $mm_ctf CTF binds; echo $mm_kh KeyHunt binds"
       
        // The MODES cycle
        alias mode_gen "mode_none; set tmm_gen docmd; set mm_gen >; mode_echo; alias mode_next mode_ctf; alias mode_prev mode_kh"
        alias mode_ctf "mode_none; set tmm_ctf docmd; set mm_ctf >; mode_echo; alias mode_next mode_kh;  alias mode_prev mode_gen"
        alias mode_kh  "mode_none; set tmm_kh  docmd; set mm_kh >;  mode_echo; alias mode_next mode_gen; alias mode_prev mode_ctf"
       
        // initial mode_next and modee_prev
        alias mode_next mode_ctf
        alias mode_prev mode_kh

        set msg_loc "^6(@^7%l^6)"
        set msg_team_info "^1%h^7:^2%a^7:^4&lt;^7%w^4&gt;"
       
        alias msg_hello "say Hello ^5/ ^7Good Luck and Have Fun!"
        alias msg_cya   "say Cya ^5 / ^7Balance the teams please!"
       
        alias gen_help "say_team help me!^8\n$msg_loc"
        alias ctf_attacking "say_team ^7[^1ATK^7] ^5Attacking^8\n$msg_team_info^8\n$msg_loc"
        alias ctf_defending "say_team ^7[^2DEF^7] ^5Defending^8\n$msg_team_info^8\n$msg_loc"
        alias kh_attacking "say_team ^5Attacking Key Carrier^8s\n$msg_team_info^8\n$msg_loc"
        alias kh_defending "say_team ^5Defending Key Carrier^8s\n$msg_team_info^8\n$msg_loc"

    -- msgkb.cfg - contains the keyboard-mapping
    Code: Select all
        // NEXT / PREV mode KEYS
        bind UPARROW "mode_prev; exec teamkb.cfg" // EXEC TEAMKB.CFG IS IMPORTANT HERE (could be in the aliases though)
        bind DOWNARROW "mode_next; exec teamkb.cfg"
       
        // General binds, note: you cannot use [$tmm_gen bind KP_1 say_team something!], the reason is given on top of the kb file
        $tmm_gen bind KP_1 msg_hello
        $tmm_gen bind KP_2 msg_cya
       
        // CTF binds
        $tmm_ctf bind KP_1 ctf_attacking
        $tmm_ctf bind KP_2 ctf_defending
       
        // KeyHunt binds
        $tmm_kh bind KP_1 kh_attacking
        $tmm_kh bind KP_2 kh_defending

    See some screenshots of this system: (only work when I'm online:)
    Shot 1
    Shot 2
    Shot 3

    The variable-aliases way
    With this way you make aliases for each message/action and use the same suffix for each alias which belongs to the same map. <b>This is a per-key system!</b>

    -- messages.cfg - A PER-KEY map!
    Code: Select all
        set msg_loc "^6(@^7%l^6)"
        set msg_team_info "^1%h^7:^2%a^7:^4&lt;^7%w^4&gt;"
       
        alias KP_1_msg "say Hello ^5/ ^7Good Luck and Have Fun!"
        alias KP_2_msg   "say Cya ^5 / ^7Balance the teams please!"
       
        alias KP_1_ctf "say_team ^7[^1ATK^7] ^5Attacking^8\n$msg_team_info^8\n$msg_loc"
        alias KP_2_ctf "say_team ^7[^2DEF^7] ^5Defending^8\n$msg_team_info^8\n$msg_loc"
        alias KP_3_ctf "say_team ^7SOMETHING YOU SAY IN CTF BUT DON'T WANT A KEY FOR IN KEYHUNT"
        alias KP_1_kh "say_team ^5Attacking Key Carrier^8s\n$msg_team_info^8\n$msg_loc"
        alias KP_2_kh "say_team ^5Defending Key Carrier^8s\n$msg_team_info^8\n$msg_loc"
        alias KP_3_kh // an empty key to avoid error messages when pressing it
        alias KP_4_ctf "echo EMPTY KEY! CURRENT MODE: $$bind_mode"
        alias KP_4_kh  "say_team KEYS ARE FUN"
       
       
        set bind_mode msg // use the msg-suffixed binds
       
        // The MODES cycle
        alias mode_msg "set bind_mode msg; echo GENERAL binds; alias mode_next mode_ctf; alias mode_prev mode_kh"
        alias mode_ctf "set bind_mode ctf; echo CTF binds;     alias mode_next mode_kh;  alias mode_prev mode_gen"
        alias mode_kh  "set bind_mode kh;  echo KeyHunt binds; alias mode_next mode_gen; alias mode_prev mode_ctf"
       
        // initial mode_next and modee_prev
        alias mode_next mode_ctf
        alias mode_prev mode_kh
        // NEXT / PREV mode KEYS
        bind UPARROW "mode_prev" // NOT reloading the config this time!
        bind DOWNARROW "mode_next"
       
        // Binds, use $$ to avoid variable-resolution
        bind KP_1 KP_1_$$bind_mode
        bind KP_2 KP_2_$$bind_mode
    User avatar
    Blµb
    Alien trapper
     
    Posts: 277
    Joined: Thu Mar 29, 2007 1:49 pm

Fri May 11, 2007 8:46 am

  • @Blµb: you might wanna try in_bind and in_bindmap.
    That way you can keep all your binds in one config file and don't need to unbind keys that you don't need in a specific configuration...
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Fri May 11, 2007 8:52 am

  • KadaverJack wrote:@Blµb: you might wanna try in_bind and in_bindmap.
    That way you can keep all your binds in one config file and don't need to unbind keys that you don't need in a specific configuration...

    those bind maps are screwed around with on the RBI server :P
    btw. i mentioned bindmaps up there anyway
    User avatar
    Blµb
    Alien trapper
     
    Posts: 277
    Joined: Thu Mar 29, 2007 1:49 pm



Return to Nexuiz - General Discussion




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest