The big CONFIG SCRIPTS thread

Discuss Nexuiz gameplay here.

Moderators: Nexuiz Moderators, Moderators

Mon May 11, 2009 8:22 pm

  • Thread to post helpful config aliases/scripts, so others don't have to re-invent the wheel.

    My teamsays (pretty much simple, but does the job):

    Code: Select all
    //Chit-chatting
    bind - "messagemode"
    bind . "messagemode2"
    bind KP_5 "say_team ^2I'M FC ^3@%l ^1HP:%h ^2A:%a ^4W:%w ; g_waypointsprite_team_helpme"
    bind KP_RIGHTARROW "say_team  ^1ATTACKING ^3@%l ^1HP:%h ^2A:%a ^4W:%w ; g_waypointsprite_team_here"
    bind KP_LEFTARROW "say_team  ^2DEFENDING ^3@%l ^1HP:%h ^2A:%a ^4W:%w ; g_waypointsprite_team_here"
    bind KP_END "say_team ^3@%l ^1HP:%h ^2A:%a ^4W:%w ; g_waypointsprite_team_here"
    bind KP_DOWNARROW "say_team ^1NEED HELP ^3@%l ^1HP:%h ^2A:%a ^4W:%w ; g_waypointsprite_team_helpme"
    bind KP_PGDN "say_team ^1BASE OVERRUN ^3@%l ^1HP:%h ^2A:%a ^4W:%w ; g_waypointsprite_team_helpme"
    bind KP_PGUP "say_team ^2Base secure ^3@%l ^1HP:%h ^2A:%a ^4W:%w ; g_waypointsprite_team_here"
    bind KP_HOME "say_team ^2ITEM: %x^7 ^3@%l ; g_waypointsprite_team_here_p"
    bind KP_UPARROW "say_team ^1ENEMY SEEN ^3@%l ; g_waypointsprite_team_danger_p"
    bind KP_PLUS "say_team ^6QUAD IN ME ; g_waypointsprite_team_here"
    bind KP_MINUS "say_team ^1ENEMY QUAD ; g_waypointsprite_team_danger_p"
    bind / "say_team ENEMY FLAG CARRIER (l:%y^7); g_waypointsprite_team_here_p"


    One button to hide/show almost everything from your screen. Nice to make screenshots/movies (though you might need to change r_drawviewmodel to 1)

    Code: Select all
    //Screenshot oh fancy
    //First, we'll define rebinds
    alias rebind_hud_erease "bind n hud_erease"
    alias rebind_hud_show "bind n hud_show"

    //Now the actual aliases:
    alias hud_erease "crosshair 0 ; cl_hidewaypoints 1 ; cl_teamradar 0 ; r_drawviewmodel 0 ; viewsize 120 ; showdate 0 ; showfps 0 ; showspeed 0 ; showtime 0 ; shownetgraph 0 ; v_brightness 0.000000 ; rebind_hud_show"
    alias hud_show "crosshair 99 ; cl_hidewaypoints 0 ; cl_teamradar 1 ; r_drawviewmodel 1 ; viewsize 110 ; showdate 1 ; showfps 1 ; showspeed 1 ; showtime 1 ; shownetgraph 1 ; v_brightness 0.080000 ; rebind_hud_erease"

    //Finally, we bind it to n
    bind "n" "hud_erease"


    Server admining v1.:
    Code: Select all
    //Aliases
    //RCON aliases
    //First, we'll define rebinds
    alias rebind_rcon_rbi_key "bind F6 rcon_rbi_key"
    alias rebind_rcon_rbi_ctf "bind F6 rcon_rbi_ctf"
    alias rebind_rcon_rbi_race "bind F6 rcon_rbi_race"

    //Now the rcon manager aliases,on we're refering in the previous ones
    //CTF -> KEYHUNT
    alias rcon_rbi_ctf "echo Connected to ^1RBI CTF server^7 . Pressing ^2F6 ^7next time, you'll manage the ^1KEYHUNT server^7; rcon_password wtfomglolbbq ; rcon_address 141.2.16.23:26000 ; rebind_rcon_rbi_key"
    //KEYHUNT -> RACE
    alias rcon_rbi_key "echo Connected to ^1RBI KEYHUNT server ^7. Pressing ^2F6 ^7next time, you'll manage the ^1RACE server^7; rcon_password wtfomglolbbq ; rcon_address 141.2.16.23:26001 ; rebind_rcon_rbi_race"
    //RACE -> CTF
    alias rcon_rbi_race "echo Connected to ^1RBI RACE server ^7. Pressing ^2F6 ^7next time, you'll manage the ^1CTF server^7; rcon_password wtfomglolbbq ; rcon_address 141.2.16.23:26002 ; rebind_rcon_rbi_ctf"

    //Finally, we bind it to F6
    bind "F6" "rcon_rbi_ctf"
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Sun May 31, 2009 7:10 am

Wed Aug 12, 2009 12:54 pm

  • What is that KP button?
    User avatar
    Vordreller
    Advanced member
     
    Posts: 80
    Joined: Sat May 16, 2009 9:58 pm
    Location: Belgium

Wed Aug 12, 2009 8:30 pm

Thu Aug 13, 2009 2:21 am

  • [-z-] wrote:Numeric KeyPad
    Awsome for me and my laptop :p
    User avatar
    Vordreller
    Advanced member
     
    Posts: 80
    Joined: Sat May 16, 2009 9:58 pm
    Location: Belgium

Thu Aug 13, 2009 4:20 am

  • Vordreller wrote:
    [-z-] wrote:Numeric KeyPad
    Awsome for me and my laptop :p


    i had that problem..just found an app for my ipod touch that turns it into a number pad...yay me!
    User avatar
    MC SE7EN
    Alien trapper
     
    Posts: 294
    Joined: Fri Apr 10, 2009 8:56 pm

Sun Sep 06, 2009 1:04 am

  • I would post mine, but I have a ton of stuff that shouldn't be said publicly :P (Wallhack, rainbow, etc etc)
    Do it yourself, or stop complaining.
    (Developer Tracker) | (Nexuiz Roadmap)
    User avatar
    Samual
    Keyboard killer
     
    Posts: 508
    Joined: Mon May 25, 2009 7:22 pm
    Location: Pittsburgh, PA

Wed Sep 09, 2009 10:55 am

  • A little "away from keyboard" script.:
    You just type:
    Code: Select all
    //afk script
    //2009 by Bommel (aka Spohst/FrogonCoffee...godamnit I need a database for my names.) - You can use it as you want ;) (version 0.9)
    //usage: afk       [minutes_you're_probalby_afk]
    //       afkr     [minutes_you're_probalby_afk] [reason]
    //    afkstop: Stops the script.
    //
    //    afkadd [minutes]:  [minutes] + remaining time.
    //    afksub [minutes]:  [minutes] - remaining time.
    //       afkmul [minutes]:  [minutes] * remaining time.
    //    afkdiv [minutes]:  [minutes] / remaining time.
    //    afkmod [minutes]:  [minutes] % remaining time. (xD)
    //   
    //    afkset [minutes]:  Sets the remaning time to [minutes]



    //Configure the script with these vars:
    seta afk_message "^0brb^3 "
    seta afk_time_unit " ^0min."
    seta afk_backmsg "^xD60<-^0back."


    //Other vars. Better don't change them.
    seta afk_interval 60
    seta afk_counter 0       
    alias afk_newline "echo; echo ------------------------"
    seta afk_cmd_message "^4Youre name will be changed back in "



    //commands to change the remaining time:
    alias afkadd "menu_cmd rpn /afk_counter afk_counter $1 +    def; afk_upname;  echo $afk_counter Minute(s) left."
    alias afksub "menu_cmd rpn /afk_counter afk_counter $1 -    def; afk_upname;  echo $afk_counter Minute(s) left."
    alias afkmul "menu_cmd rpn /afk_counter afk_counter $1 *    def; afk_upname;  echo $afk_counter Minute(s) left."
    alias afkdiv "menu_cmd rpn /afk_counter afk_counter $1 /    def; afk_upname;  echo $afk_counter Minute(s) left."
    alias afkmod "menu_cmd rpn /afk_counter afk_counter $1 mod  def; afk_upname;  echo $afk_counter Minute(s) left."
    alias afkset "seta afk_counter $1; afk_upname"



    //'afk' and 'brb' are just a 'pointers' to afkr with missing second argument.
    alias brb "afkr $1 \"\""
    alias afk "afkr $1 \"\""

    //Setting everything up...
    alias afkr "afk_newline;seta old_name \"$_cl_name\";seta secfoo $1;seta rea \" $2\";seta afk_counter $1; echo ^4... $1 minutes afk...^7; menu_cmd rpn /secfoo secfoo $afk_interval * def; afk_correct"
    alias afk_p "echo $afk_cmd_message ^1 $secfoo seconds; afk_newline; echo; say $afk_message$afk_counter$afk_time_unit; update_loop"
    alias afk_fin "defer $afk_interval nafk;echo"
    alias nafk  "echo ^3Stopping Script!; afkstop"


    //If switches - checking if the given number is valid.
    alias afk_correct "afkco"
    alias afkco  "menu_cmd rpn /result  $afk_counter 0 eq def; afkco2"
    alias afkco2 "switch_$result"
    alias afkco3  "menu_cmd rpn /result  $afk_counter 1 mod def; afkco4"
    alias afkco4 "witch_$result"

    alias switch_1 "echo ^1afk 0. Hahaha. Verrry funny."
    alias switch_0 "afkco3"
    alias witch_0 "afk_p"
    alias witch_1 "echo ^1.x (float) Numbers are not allowed."



    //'decrement' = afk_counter--; in common languages... (and that's afk_counter = afk_counter - 1)
    alias afk_decrement  "menu_cmd rpn /afk_counter afk_counter 1 - def"
    alias afk_upname  "name $old_name$afk_message$afk_counter$afk_time_unit$rea"

    //The Main Loop that updates the name & checks if the afk_counter = 1, if so it executes "afk_fin"
    alias update_loop "afk_upname; afk_compare $afk_counter"
    alias afk_lp_defer    "afk_decrement; defer $afk_interval update_loop"

    //This 'if' checks if the script needs to be terminated:
    alias afk_compare "menu_cmd rpn /result 1 $1 eq def; afk_compare2"
    alias afk_compare2 "afk_answer_$result"
    alias afk_answer_1 "afk_fin"
    alias afk_answer_0 "afk_lp_defer"


    //Stops loop and loads it after a while again.
    alias afkstop "unalias update_loop; defer 70 alias update_loop \"afk_upname; afk_compare $afk_counter\"; name $old_name; say $afk_backmsg"

    Simply put it somewhere in the autoexec.cfg..



    Little Command-reference:
    • afk [minutes] - Prints a little message that you're brb/afk - whatever - and sets your name back after [minutes].
    • afkr [minutes] [reason] - Same as "afk" but you can also give a reason.
    • afkadd [minutes] - adds "afktime"
    • afkstop - Stops the script and sets the name back.

    Written in a pretty short time (you'll get a cookie if you understand it at the first view) and in the hope it will be useful ;)
    Last edited by Bommel on Wed Feb 10, 2010 5:10 pm, edited 2 times in total.
    User avatar
    Bommel
    Member
     
    Posts: 32
    Joined: Sun Aug 16, 2009 4:04 pm
    Location: Germany

Wed Sep 09, 2009 1:41 pm

  • im so tired of forgetting this...

    where is the autoexec file again?

    my bad, said the wrong filename
    Last edited by MC SE7EN on Wed Sep 09, 2009 4:49 pm, edited 1 time in total.
    User avatar
    MC SE7EN
    Alien trapper
     
    Posts: 294
    Joined: Fri Apr 10, 2009 8:56 pm

Wed Sep 09, 2009 1:59 pm

  • On a linux system (and probably also in Mac OS X) in ~/.nexuiz/data/
    If there isn't yet such a file: Create it.
    On Windows...err...where your config.cfg is :P
    User avatar
    Bommel
    Member
     
    Posts: 32
    Joined: Sun Aug 16, 2009 4:04 pm
    Location: Germany

Wed Sep 09, 2009 4:48 pm

  • Bommel wrote:On a linux system (and probably also in Mac OS X) in ~/.nexuiz/data/
    If there isn't yet such a file: Create it.
    On Windows...err...where your config.cfg is :P


    Ah ok. I didn't see it there, probably because it doesn't exist. Thanks!


    ok, i did it, and it works fine in the console, but it doesnt change my name (says it doesnt know the command afkco)
    User avatar
    MC SE7EN
    Alien trapper
     
    Posts: 294
    Joined: Fri Apr 10, 2009 8:56 pm

Wed Sep 09, 2009 6:22 pm

  • Ehm..

    The alias 'afkco' is defenetely there.
    The only thing I can imagine is that you accidently didn't Copy&Paste the whole thing.. :?:

    Works flawless here:
    Image
    Simply started with 'afkr 1 Pizza!' .
    User avatar
    Bommel
    Member
     
    Posts: 32
    Joined: Sun Aug 16, 2009 4:04 pm
    Location: Germany

Wed Sep 09, 2009 6:39 pm

  • *feels very fail*

    *tries again*

    works. nice. i like this..thanks very much
    User avatar
    MC SE7EN
    Alien trapper
     
    Posts: 294
    Joined: Fri Apr 10, 2009 8:56 pm

Sat Sep 12, 2009 2:11 pm

  • Very nice, and very uselful script! Thanks for sharing!
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Mon Oct 12, 2009 1:28 am

  • Simple one-click zoom in / zoom out script:

    Code: Select all
    //First, we'll define rebinds
    alias rebind_zin "bind mouse3 zin"
    alias rebind_zout "bind mouse3 zout"

    //Now the zoom aliases, we're refering in the previous ones
    alias zin "fov 40 ;  rebind_zout"
    alias zout "fov 90 ; rebind_zin"

    bind "mouse3" zin
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Fri Oct 30, 2009 5:15 am

Fri Oct 30, 2009 6:12 am

  • A more serious script: Some binds are declared as say commands. Holding F7 and pressing the key makes them say_team commands.
    Code: Select all
    //Some simpler binds
    alias nn_gg         "say ^1Good ^x01CGame!"
    alias nn_goodbye   "say ^1Good^x01Cbye!"
    alias nn_hello      "say ^1Hello!"

    set nn_ns         "^1Nice ^x01CShot!"
    set nn_sorry      "^1Sorry!"
    set nn_thanks      "^1Thanks!"
    set nn_gj         "^1Good ^x01Cjob!"
    set nn_no         "^1Negative"
    set nn_yes         "^2Affirmative"

    //A switching mechanism for the above simple binds
    //Regular
    alias nn_nsc         "say $nn_ns";
    alias nn_sorryc       "say $nn_sorry";
    alias nn_thanksc      "say $nn_thanks";
    alias nn_gjc         "say $nn_gj";
    alias nn_noc         "say $nn_no";
    alias nn_yesc         "say $nn_yes";

    //Team (like the above, except on one line and escapes the slashes with quotes, and uses say_team)
    alias simpbind_team "alias nn_nsc \"say_team $nn_ns\";  alias nn_sorryc \"say_team $nn_sorry\";  alias nn_thanksc \"say_team $nn_thanks\";  alias nn_gjc \"say_team $nn_gj\";  alias nn_noc \"say_team $nn_no\";  alias nn_yesc \"say_team $nn_yes\""

    //Public (like the above, except on one line and escapes the slashes with quotes, and uses say_team)
    alias simpbind_public "alias nn_nsc \"say $nn_ns\";  alias nn_sorryc \"say $nn_sorry\";  alias nn_thanksc \"say $nn_thanks\";  alias nn_gjc \"say $nn_gj\";  alias nn_noc \"say $nn_no\";  alias nn_yesc \"say $nn_yes\""

    //Pressing F7 makes them teamsays, releasing makes them public
    seta userbind22_description "Ninja Pack: Switch certain say binds from public to team"
    seta userbind22_press "simpbind_team; echo press reg"
    seta userbind22_release "simpbind_public; echo release reg"
    bind F7 "+userbind 22"
    Roanoke
    Advanced member
     
    Posts: 96
    Joined: Fri Dec 26, 2008 2:32 am
    Location: Camping mortar spawn

Fri Oct 30, 2009 12:47 pm

  • You could greatly simplify that script by doing something like

    Code: Select all
    set nn_say say

    // Regular
    alias nn_nsc         "$nn_say $nn_ns"
    // etc.

    alias simpbind_team "set nn_say say_team"
    alias simpbind_public "set nn_say say"
    User avatar
    parasti
    Alien
     
    Posts: 110
    Joined: Sun May 11, 2008 11:32 pm
    Location: On the walls and the ceiling

Fri Oct 30, 2009 5:09 pm

  • parasti wrote:You could greatly simplify that script by doing something like


    Doh... No idea how I missed that. Thanks, parasti :)
    Roanoke
    Advanced member
     
    Posts: 96
    Joined: Fri Dec 26, 2008 2:32 am
    Location: Camping mortar spawn

Sat Jan 23, 2010 4:32 am

  • modified gameplay type. this is for newer members who think that nexuiz is "too fast". i also changed a few things around to make you move around with more intelligence. this isn't finished yet, so i will accept any suggestions for improvement.

    also a slight improvement of c.brutal's zoom toggle script.

    Code: Select all
    // load engine's idea of vid_con*
    seta menu_vid_conwidth $vid_conwidth
    seta menu_vid_conheight $vid_conheight

    // fix cvar settings of the engine that Nexuiz is not compatible with
    alias _update_generic_r_dynamic_0 "r_dynamic 1; r_shadow_realtime_dlight 1"
    alias _update_generic_r_dynamic_1 ""
    alias _update_generic "_update_generic_r_dynamic_$r_dynamic"

    // updates for ... to 2.4 (also run on first startup, so be careful with what you put in here)
    alias _update_configversion_0 ""

    // Updates for 2.4.1 to 2.4.2
    alias _update_configversion_1 ""

    // Updates for 2.5 to ...
    alias _update_configversion_2 ""

    _update_configversion_$g_configversion
    _update_generic

    set g_configversion 2





    //physics
    sv_maxspeed 235
    sv_maxairspeed 270
    sv_airaccelerate 4

    sv_gravity 850




    //scope
    //First, we'll define rebinds
    alias rebind_zin "bind mouse3 zin"
    alias rebind_zout "bind mouse3 zout"

    //Now the zoom aliases, we're refering in the previous ones
    alias zin "+zoom ;  rebind_zout"
    alias zout "-zoom ; rebind_zin"

    bind "mouse3" zin

    set g_respawn_delay 5 "number of seconds you have to wait before you can respawn again"

    cl_rollangle 1 // amount of view tilt when strafing, default is 2.0


    set g_footsteps 1   


    set g_ghost_items 0

    set g_allow_oldnexbeam 1

    set g_balance_nex_primary_headshotaddeddamage 200

    set g_balance_weaponswitchdelay 0.35

    //fall damage
    set g_balance_falldamage_deadminspeed 120
    set g_balance_falldamage_minspeed 450
    set g_balance_falldamage_factor 0.4
    set g_balance_falldamage_maxdamage 190




    EDIT: changed a few things

    EDIT2
    Why has a developer ever needed any reason other than "it looks bloody awesome?"

    -Archon
    User avatar
    Yoda almighty
    Alien
     
    Posts: 151
    Joined: Thu Aug 20, 2009 2:19 am
    Location: somewhere in the void



Return to Nexuiz - Gameplay




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