User panel stuff on forum
  15 posts on 1 page  1
Advanced Configuration
2006-12-27, 05:03
Member
12 posts

Registered:
Dec 2006
I decided to write this script to give as many options in a relatively simple looking configuration as possible. It acts almost identically to an "impulse #" and "+attack" setup. The first extra option I've added is for toggleable shotgun/axe scripts. Second option is to have separate settings for when you are firing lg vs when you aren't. My sample here changes crosshair color to blue when firing lg and green for everything else.

The biggest addition to this config over anything else I've seen is that it will automatically use shotgun script when you are in 2on2/4on4, but in duels it doesn't. The reasoning behind this is simple - in duels when you die, 99% of the time your opponent has a weapon already. When you die, you are the one who needs weapons, so it's best to drop what you have out instead.

If you want to change it to an axe script instead of shotgun, just change the "alias sgscript" line so it does impulse 1 instead of 2.

You will probably want to change all of the bind lines to whatever you use.

alias "lgsettings" "crosshaircolor 0 0 255;cl_rollangle 3"
alias "normalsettings" "crosshaircolor 0 255 0;cl_rollangle 0"

// uncomment the following two lines if you want same settings when for normal use and firing lg.
//alias "lgsettings" ""
//alias "normalsettings" ""

alias sgscript "if $matchtype != duel impulse 2"

bind "1" "axe"
alias "axe" "bind mouse1 +axe;impulse 1;sgscript"
alias "+axe" "impulse 1; +attack;normalsettings"
alias "-axe" "-attack; sgscript;normalsettings"

bind "3" "bs"
alias "bs" "bind mouse1 +bs;impulse 2;sgscript"
alias "+bs" "impulse 2; +attack;normalsettings"
alias "-bs" "-attack; sgscript;normalsettings"

bind "q" "ssg"
alias "ssg" "bind mouse1 +ssg;impulse 3 2;sgscript"
alias "+ssg" "impulse 3 2; +attack;normalsettings"
alias "-ssg" "-attack; sgscript;normalsettings"

// bind "4" "ng"
alias "ng" "bind mouse1 +ng;impulse 4;sgscript"
alias "+ng" "impulse 4; +attack;normalsettings"
alias "-ng" "-attack; sgscript;normalsettings"

bind "e" "sng"
alias "sng" "bind mouse1 +sng;impulse 5 4;sgscript"
alias "+sng" "impulse 5 4; +attack;normalsettings"
alias "-sng" "-attack; sgscript;normalsettings"

bind "r" "gl"
alias "gl" "bind mouse1 +gl;impulse 6;sgscript"
alias "+gl" "impulse 6; +attack;normalsettings"
alias "-gl" "-attack; sgscript;normalsettings"

bind "space" "rl"
alias "rl" "bind mouse1 +rl;impulse 7;sgscript"
alias "+rl" "impulse 7; +attack;normalsettings"
alias "-rl" "-attack; sgscript;normalsettings"

bind "f" "lg"
alias "lg" "bind mouse1 +lg;impulse 8;sgscript"
alias "+lg" "impulse 8; +attack;lgsettings"
alias "-lg" "-attack; sgscript;normalsettings"

Enjoy!
2006-12-27, 21:05
Member
151 posts

Registered:
Feb 2006
well i use f_weaponchange to determine my weapon settings and use the new ezquake features for sg/axe scripts. It's easy enough to add a small script to auto-select/manually select boomstick scripts on or off but i stick with on.

alias f_weaponchange "if $qt_$weapon$qt = $qt_$tp_name_lg$qt then fire_lg else if $qt_$weapon$qt = $qt_$tp_name_sng$qtthen fire_ng else if $qt_$weapon$qt = $qt_$tp_name_ng$qt then fire_ng else if $qt_$weapon$qt = $qt_$tp_name_sg$qt then fire_sg else if $qt_$weapon$qt = $qt_$tp_name_sg$qt then fire_sg else if $qt_$weapon$qt = $qt_$tp_name_ssg$qt then fire_ssg else if $qt_$weapon$qt = $qt_$tp_name_rl$qt then fire_rl else if $qt_$weapon$qt = $qt_$tp_name_gl$qt then fire_gl else fire_sg"

// Here I set each weapons own settings. First is colour of crosshair (RGB), then my own alias weapon_settings which can set up multiple settings with a string of numbers (described below). As you can see I change alot of settings for the lightning gun (lg) alone.

alias fire_gl "crosshaircolor 0 0 255; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_lg "crosshaircolor 0 255 0; weapon_settings 3 0.5 $l_sensitivity 4 100 1 1 0 0; crosshairimage 15; crosshairsize 4"
alias fire_ng "crosshaircolor 0 255 255; weapon_settings 1 1 $n_sensitivity -6 110 1 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_rl "crosshaircolor 255 255 0; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_sg "crosshaircolor 255 255 0; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_sg2 "crosshaircolor 0 255 0; weapon_settings 1 1 3.2 -6 110 1 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_ssg "crosshaircolor 255 0 255; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"

alias weapon_settings "cl_rollangle %1; crosshairalpha %2; sensitivity %3; v_viewheight %4; fov %5; gl_particle_blood %6; gl_part_blood %7; hud_group6_show %8; hud_group7_show %9"

set n_sensitivity 1
set l_sensitivity 0.95

alias weapon_settings "cl_rollangle %1; crosshairalpha %2; sensitivity %3; v_viewheight %4; fov %5; gl_particle_blood %6; gl_part_blood %7"

// Grenade Launcher
alias +gl "impulse 6 3 5 4 2; +attack"
alias -gl "-attack"

// Lightning Gun
alias +lg "impulse 8 3 5 4 2; +attack"
alias -lg "-attack"

// Rocket Launcher
alias +rl "impulse 7 3 5 4 2; +attack"
alias -rl "-attack"

// Railgun (When DMM8)
alias +rail "impulse 9; +attack"
alias -rail "-attack; impulse 2"

// Super Shotgun
alias +ssg "impulse 3 2; +attack"
alias -ssg "-attack"
alias +sg "impulse 2; +attack"
alias -sg "-attack"

// Nailguns
alias +ngs "impulse 5 4; +attack"
alias -ngs "-attack"

// Axe
alias +axe "impulse 1; +attack"
alias -axe "-attack"

// Shaft toggle
alias +shaft "bind mouse1 +lg"
alias -shaft "bind mouse1 +rl"

cl_weaponhide "2"
cl_weaponpreselect "0"

One thing i would like to see is the ability to use strings in aliases like my 'weapon_settings'. That explains why my crosshair image and sizes have to be manually inputted instead of the way the rest of the settings are.

But seeing as kovaak posted his script i thought id show another way of auto-changing settings and the full script it can be used with.
bd
2006-12-28, 09:30
Administrator
1265 posts

Registered:
Jan 2006
chiuaua, what does the "%1" you have on some variables values?

i mean, i wanted to have somthing like this:

var a;
a = 4;
sensitivity = a;
or
sensitivity = a - 0.5;

is this possible?
never argue with an idiot. they'll bring you back to their level and then beat you with experience.
2006-12-28, 09:42
News Writer
493 posts

Registered:
Jan 2006
set a 4
sensitivity = $a
or
sensitivity = "inc $a #" where number is negative if you want to subtract, positive if you want to add
2006-12-28, 09:52
Administrator
1265 posts

Registered:
Jan 2006
:-O no shit! i wanted this for years! damn i suck!
thx!


4 kovaak:
theres no need for sg scripts anymore; read this
http://ezquake.sourceforge.net/docs/?vars-input#cl_weaponhide
never argue with an idiot. they'll bring you back to their level and then beat you with experience.
2006-12-28, 14:36
Member
151 posts

Registered:
Feb 2006
and if u see my script, all the new ezquake features are there.

and mushi, the % stuff is useful cos u can apply multiple settings to an alias. Just write the alias like:

alias multisettings "

then choose the settings it will use

alias multisettings "r_drawviewmodel %1; viewheight %2; fov %3"

then use the alias to change settings. The following example will set drawviewmodel 1, viewheight 0 and a fov of 110:

multisettings 1 0 110

crap explanation and u probably have figured it out already, but just in case it helps someone else too



sincerely, chiuaua
bd
2006-12-28, 16:04
Administrator
1265 posts

Registered:
Jan 2006
im delighted with so much attention
never argue with an idiot. they'll bring you back to their level and then beat you with experience.
2006-12-29, 19:18
Administrator
1265 posts

Registered:
Jan 2006
call me dumb, but i cant get this to work. i want to have a value for sensitivity
a

i want something like this:

set a 2.75
sensitivity $a
alias fire_lg "crosshaircolor 0 255 0;cl_rollangle 2; sensitivity inc $a -.25"
alias fire_ng "crosshaircolor 0 255 255;cl_rollangle 0;sensitivity $a"
alias fire_rl "crosshaircolor 255 255 0;cl_rollangle 0;sensitivity $a"
alias fire_sg "crosshaircolor 0 255 255;cl_rollangle 0; sensitivity $a"
_

if freaks on this line: alias fire_lg "crosshaircolor 0 255 0;cl_rollangle 2; sensitivity inc $a -.25"
ofc

how do i get this to work?
the main advantage is that i can change the a value, keeping sens lower when firing lg

DAMN IM DUMB
never argue with an idiot. they'll bring you back to their level and then beat you with experience.
2006-12-29, 19:50
Member
151 posts

Registered:
Feb 2006
u cant do this:

sensitivity inc $a -.25

instead change it to this:

alias fire_lg "crosshaircolor 0 255 0; cl_rollangle 2; inc $a -.25; sensitivity $a"

With that it increments the value of 'a' and then changes the sensivity to that value.
bd
2007-01-03, 00:42
Administrator
1265 posts

Registered:
Jan 2006
the syntax may be correct, but it wont work, because in all other fire aliases i cant set it to $a because i dont know $a value (could be 3 or 3.25, depending on last weapon shot) so, this will never work the way i want, unless if i put "sens $a" on fire_lg's -attack



thx chiuaua. gotta love it
never argue with an idiot. they'll bring you back to their level and then beat you with experience.
2007-01-03, 17:01
Member
151 posts

Registered:
Feb 2006
mushi just use
inc $a 0.25 ; sensitivity $a

to all the other fire_ aliases.

find me on #mor if you want help scripting it.
bd
2007-01-04, 09:50
Administrator
1265 posts

Registered:
Jan 2006
thanks chiuaua, but what I really want is to set the sensitivity at ONE place in the cfg (so i dont have to change fire_* variables everytime i want to change sens).

I know that what you wrote will work, but thats not what i want. Thus, thats what i have right now.

never argue with an idiot. they'll bring you back to their level and then beat you with experience.
2007-01-04, 18:46
Member
151 posts

Registered:
Feb 2006
ok then refer to my script
alias fire_gl "crosshaircolor 0 0 255; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_lg "crosshaircolor 0 255 0; weapon_settings 3 0.5 $l_sensitivity 4 100 1 1 0 0; crosshairimage 15; crosshairsize 4"
alias fire_ng "crosshaircolor 0 255 255; weapon_settings 1 1 $n_sensitivity -6 110 1 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_rl "crosshaircolor 255 255 0; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_sg "crosshaircolor 255 255 0; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_sg2 "crosshaircolor 0 255 0; weapon_settings 1 1 3.2 -6 110 1 0 1 1; crosshairimage 10; crosshairsize 1.25"
alias fire_ssg "crosshaircolor 255 0 255; weapon_settings 1 1 $n_sensitivity -6 110 0 0 1 1; crosshairimage 10; crosshairsize 1.25"

and then the lines:
set n_sensitivity 1
set l_sensitivity 0.95

this means that i just choose my normal sens (n_sensitivity) and my lg, or lower sens (l_sensitvity) and it automatically works with the script without the need to modify aliases each time.
bd
2007-01-04, 18:48
Member
151 posts

Registered:
Feb 2006
as an adition you can also use an "inc $n_sensitivity +0.25" thing too if u like and it will work with the weapon script too.
bd
2007-01-04, 18:57
Administrator
1265 posts

Registered:
Jan 2006
nice stuff

thx chi
never argue with an idiot. they'll bring you back to their level and then beat you with experience.
  15 posts on 1 page  1