Binds, Commands, Cvars & Scripts

R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

kawaii wrote:I've read the above posts, but I still don't know how to bind a crosshair, fov and sensitivity to a weapon. In quake 3 it was very easy.. but in quake 4 it's pretty difficult.
Nobody knows how to yet, that's why rgoer is trying to look into a workaround.
kawaii
Posts: 3
Joined: Fri Oct 21, 2005 12:34 pm

Post by kawaii »

R00k wrote:
kawaii wrote:I've read the above posts, but I still don't know how to bind a crosshair, fov and sensitivity to a weapon. In quake 3 it was very easy.. but in quake 4 it's pretty difficult.
Nobody knows how to yet, that's why rgoer is trying to look into a workaround.
Ok thnx :) .. Im really waiting for the outcome :D
Deji
Posts: 718
Joined: Tue Feb 08, 2005 6:42 pm

Post by Deji »

Can't you write your own variables in Q4?

For instance: seta blah "_impulse 5"

bind x _impulse 10 ; vstr blah

Or would that also not work?
clkou
Posts: 41
Joined: Wed Oct 19, 2005 1:51 pm

Post by clkou »

Deji wrote:Can't you write your own variables in Q4?

For instance: seta blah "_impulse 5"

bind x _impulse 10 ; vstr blah

Or would that also not work?
I haven't tried that specific scenario, but if you simply type _impulse 5 in the console or put _impulse 5 in a configuration file, it won’t work. If that simple statement won’t work, it seems like all bets are off.
- Jason
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

Deji wrote: bind x _impulse 10 ; vstr blah
This line itself wouldn't work, because the underscore commands can't be used in conjunction with any other commands, including a vstr. That's my understanding at least.
clkou
Posts: 41
Joined: Wed Oct 19, 2005 1:51 pm

Post by clkou »

But, it makes me wonder what’s going on programmatically if you can’t even type in _impulse5 at the console? What’s the reasoning behind that? It’s not being used with anything else – it’s just a statement.

It’s bothersome that it looks like they went out of their way to isolate those commands.
- Jason
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

I agree, I have thought the same thing myself.
azx
Posts: 2
Joined: Fri Oct 21, 2005 10:16 pm

Post by azx »

I tried:
Made a mp.cfg with binds like this (I exec it when I play mp)

// WeaponBinds
bind "SPACE" "exec gauntlet.cfg" //gauntlet
bind "MWHEELDOWN" "exec rocket.cfg" //Rocket Launhcer
bind "MWHEELUP" "exec shaft.cfg" //Lightning gun
bind "MOUSE4" "exec plasma.cfg" //Plasmagun
bind "g" "exec grenade.cfg" //Grenade Launcher
bind "e" "exec shotgun.cfg" //Shotgun
bind "w" "exec machinegun.cfg" //Machinegun

and one of my weapon binds would look like

rocket.cfg

bind "MWHEELDOWN" "_impulse6"
seta sensitivity "7"
seta ui_showgun "0" //Rocket Launhcer

It changed the weapon alright. But it didnt set sensitivity.

Any reason for this not to work?

Im pretty upset that they have removed the option to have multiple commands on one line .. I liked the Q3 possibilties
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

Not sure. Try it this way:

bind "x" "exec rl.cfg; exec rlsens.cfg"

rl.cfg:
_impulse6

rlsens.cfg:
seta sensitivity "7"
azx
Posts: 2
Joined: Fri Oct 21, 2005 10:16 pm

Post by azx »

That one worked ..
But a new problem arised :icon33:

When pressing the binded key, and the scripts get executed you stop!

tried with the gauntlet.

running thru the halls with a sense of 15 with the machine gun, the gauntlet script have a sense of 1. (so I would notice it right away :) )
When I pressed my binded gauntlet key, I stopped, so I had to release my forward key, and re-press it to start running again.

Now this is just great iD, now fix it!

Thanks for the reply m8
Nologic
Posts: 121
Joined: Thu Aug 05, 2004 7:00 am

Post by Nologic »

*look, this post documents the exact date and time I first decided to become a nutcase*
Last edited by Nologic on Sat Nov 12, 2005 5:24 pm, edited 1 time in total.
DegreeZ
Posts: 5
Joined: Fri Oct 21, 2005 4:10 pm

Post by DegreeZ »

How would you create a multiple weapon bind?

Normally, you would bind a weapon like this:

bind "c" "_impulse6"

However, I want to bind multiple weapons to a single bind. Something like this:

bind "c" "_impulse6, _impulse7"

So, when "c" is pushed, it switches to weapon "impulse6", if i do not have the "impulse6" weapon, it will go to "impulse7". I have done this in Half-Life/Counter-Strike using the above syntax. I'm pretty sure you are able to do it in Quake, just not quite sure about the syntax.
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post by rgoer »

be warned, using recursive vstr loops to animate your name and/or clan tag is really only for show--I wouldn't recommend enabling it during a game that you actually care about

things like weapon-switching and chatting can get delayed while they wait for the loop to cycle... it sucks to get clowned because you couldn't get the shotty out in time due to your fancy animated name

truthfully, I only came up with that shit to see if it was detrimental to servers (excess flooding of name changes from clients, etc)... it turns out servers can handle it, so I left it in my cfg--but really, it's not something I would recommend for everyday gameplay
Nologic
Posts: 121
Joined: Thu Aug 05, 2004 7:00 am

Post by Nologic »

rgoer...would it be possible for me to ask a favor...basically wondering if and when a point release get made if it would be possible to have con_notifyTime & con_speed unlocked for multiplayer, and maybe a var added to control how many lines of chat can be displayed. :)

looking to basically print script options to the screen with addChatLine...and would like to print more than like 5 optons at a time...plus be able to clear them from the screen quickly once done.

con_speed mostly to echo out a help text to the console and then drop it down for view in as little time as possible.

You can see an old SoF II example of this here
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

Nologic wrote:Well here is some thing for you guys to look over...early beta but its some thing. :)

autoexec.cfg 0.20 Beta

Oh if you guys go pubbing...be sure to use a different nick and tags. :)

PS code samples taken from nitro's & rgoer's config files.
Nice script, something to build off of, thanks for sharing. :icon14:

PS, you might want to change your kill bind to "kill -1" instead of zero. "kill 0" kills the person in player spot 0, not always yourself. ;)
Nologic
Posts: 121
Joined: Thu Aug 05, 2004 7:00 am

Post by Nologic »

*gone*
Last edited by Nologic on Sat Nov 12, 2005 5:25 pm, edited 1 time in total.
User avatar
hemostick
Posts: 203
Joined: Wed Feb 14, 2001 8:00 am

Post by hemostick »

rgoer wrote:I thought maybe this would work:

Code: Select all

seta "ua_bindRail" "bind 'x' '_impulse7; set ua_toggleRebind vstr ua_bindRocket'"

seta "ua_bindRocket" "bind 'x' '_impulse6; set ua_toggleRebind vstr ua_bindRail'"

seta "ua_toggleRebind" "vstr ua_bindRail"

bind "x" "_impulse7; vstr ua_toggleRebind"
but it doesn't

Yours won't work either, R00k. These stupid _impulse commands only work when they are the only thing in a key-binding. Yarr. I'll get it sorted though...
If you have this fixed, try to have the coders keep the movement impulses locked (no rocketjump script, better yet, no forward rocket jump script!)
Btw, anyone know where to submit bug reports to raven ?
Nologic
Posts: 121
Joined: Thu Aug 05, 2004 7:00 am

Post by Nologic »

*gone*
Last edited by Nologic on Sat Nov 12, 2005 5:25 pm, edited 1 time in total.
PieceMaker
Posts: 899
Joined: Tue Jan 25, 2005 4:43 pm

Post by PieceMaker »

Found a site that has a cfg generator.

I haven't tried it yet due to stuff here at home.

But thought I'd share this and try it when I
get time. ;)

http://www.slashquit.net/q4config.sq
Nologic
Posts: 121
Joined: Thu Aug 05, 2004 7:00 am

Post by Nologic »

*gone*
Last edited by Nologic on Sat Nov 12, 2005 5:25 pm, edited 1 time in total.
§ìgñå
Posts: 210
Joined: Sat Jan 01, 2000 8:00 am

Post by §ìgñå »

Here's my demos script I posted yesterday, should of posted it in here I guess: :dork:

The scripts start and stop recording with a single key.

the network script is used when your a client (playing online, etc). the server script is for singleplayer and listen servers. the scripts will save each demo with a consecutive name (demo001, demo002), except for a listen server which always saves as demo000. the server one will only display recording in the console, while the network one will diplay on your screen. unfortunately Q4 doesnt tell you your recording on your hud like q3 did. to use just change the keybind and put in your autoexec.cfg, or save each in its own .cfg file and executute them from the console (exec myscript.cfg).

enjoy.


// Q4 Network Recording script
// author: signa
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "addchatline recording_ON;recordNetDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopNetDemo;addchatline recording_OFF;set ua_record vstr ua_rec"

// Listen Server Recording script
// author: signa
// notes: singleplayer generates seperate demo files, listen server doesnt.
bind "x" "vstr ua_demrecord"
set "ua_demrecord" "vstr ua_demrec"
set "ua_demrec" "echo ** RECORDING ON **;recordDemo;set ua_demrecord vstr ua_demstop"
set "ua_demstop" "stopRecording;echo ** RECORDING OFF **;set ua_demrecord vstr ua_demrec"
Last edited by §ìgñå on Thu Oct 27, 2005 5:32 pm, edited 1 time in total.
nightwing
Posts: 59
Joined: Wed Oct 19, 2005 12:58 pm

Post by nightwing »

Is there a way to put a different sensitivity for each weapon?
mik0rs
Posts: 2650
Joined: Wed May 03, 2000 7:00 am

Post by mik0rs »

I'm looking for something to change the FOV on the zoom but I can't see anything from the full CVAR list...
[img]http://www.zen85869.zen.co.uk/img/mik0rsSig.jpg[/img]
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

I've gathered as much accurate info as possible and organised my autoexec a little. Thx to signa and everyone else that has contributed in 1 way or another with various scripts and commands. The demo and volume control works nicely Any input is welcome, if I have something incorrect please tell me. This cfg is dumbed down fairly, but not too much, and I have commented what I could:

Client:
http://www.ovquake.com/phpbb/viewtopic.php?t=64

Also dedicated server cfg with basic map rotation, not script mapcfg:
http://www.ovquake.com/phpbb/viewtopic.php?t=72
[color=Green]I Root 4 Chaos ![/color]
busetibi
Posts: 3178
Joined: Sun Apr 02, 2000 8:00 am

Post by busetibi »

im trying to bind a key to quit.
ive tried....
bind "m" "quit"
as per riddlas bind "q" "quit" sticky post,but cant get it to work,
any ideas?
ty
Locked