Binds, Commands, Cvars & Scripts

Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

busetibi wrote: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
The only thing I could think of is that you arent putting thecommand in the proper cfg. Do you have an autoexec.cfg? If so put it there. If not put it in your quake4cfg.cfg

bind "g" "quit" //end game
[color=Green]I Root 4 Chaos ![/color]
DRuM
Posts: 6841
Joined: Mon Oct 28, 2002 8:00 am

Post by DRuM »

§ìgñå wrote: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_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "echo ** RECORDING ON **;recordDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopRecording;echo ** RECORDING OFF **;set ua_record vstr ua_rec"

I created a server and tried the server recording script but it didn't work for me. I'm doing something wrong. What is a listen server anyway? I made a file called serverrecord.cfg, put it in q4base, and pasted the above listen server script into it. I bound F4 to this line : bind "F4" "vstr ua_record"

I loaded the game, created my server, and then typed/executed the serverrecord.cfg in the console. Said unknown command. I pressed F4 and nothing seemed to happen. Am I meant to use the network recording script? Does a demo get saved in my demo folder? Why do I need to execute from the console if F4 is the key to record and stop? :confused:
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

Use the following in your autoexec.cfg:

//Demo record
bind "F5" "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"
[color=Green]I Root 4 Chaos ![/color]
DRuM
Posts: 6841
Joined: Mon Oct 28, 2002 8:00 am

Post by DRuM »

Thanks bueller and signa. That works now. Bueller, it said recording ON and recording OFF on screen so that's fine. But I cannot find the demo anywhere in my q4 or q4base folder. And it's not in my demos folder. Where would it be? Am I meant to do something else after pressing stop record?

edit: well I was successful in doing it by going onto an empty server, typing recordnetdemo drum1.netdemo in the console, then, stopnetdemo and the file came out only 480kb for running around for about a minute. But I still can't figure out why no demo was found when I recorded on my own server.
Bueller
Posts: 124
Joined: Tue Feb 22, 2005 3:10 pm

Post by Bueller »

I believe I saw a 2nd demo script for a listen server from signa, which may mean there are 2 types of ways to record. I believe the 1 I posted (FROM SIGNA) will work on internet servers only and if you want to do 1 locally you would need to use the other. Maybe PM signa.

**EDIT**
Heres signa's script for local recording, difference being the word "net":

// Listen Server Recording script
// author: signa
// notes: singleplayer generates seperate demo files, listen server doesnt.
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "echo ** RECORDING ON **;recordDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopRecording;echo ** RECORDING OFF **;set ua_record vstr ua_rec"
[color=Green]I Root 4 Chaos ![/color]
DRuM
Posts: 6841
Joined: Mon Oct 28, 2002 8:00 am

Post by DRuM »

The listen server script was the one I originally tried but didn't work. I think it'll work now though if I put it into my autoexec.cfg like you said. When I tried it last time, I made a separate config and executed it from the console like signa said but that didn't work.
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:26 pm, edited 1 time in total.
DRuM
Posts: 6841
Joined: Mon Oct 28, 2002 8:00 am

Post by DRuM »

Bueller, yep, that works, but not without it's problems. For a start as dzjepp said, the files are big. One minute of recording was about 27 mb. I put the listen server script in my autoexec bound to F10, and the net recording script in a file I called netrecord.cfg bound to F11. But unless I type exec netrecord.cfg everytime I want to record client side, the listen server script kicks in and records and stops a demo (not netdemo)with either F10 and F11. But if I remove the listen server cfg then the net record.cfg works regardless. The listen server script works on my own server and also on other peoples. But of course it's crap because the files are too big. When I exec the netrecord.cfg, then F10 and F11 both record and stop netdemos. Confusing. :p

I have another way. I've left the listen server script on F10, and for netdemos I've done this:

bind "F6" "recordnetdemo"
bind "F7" "stopnetdemo"

That all works with no confusion. F6, F7, and F10.


dzjepp wrote: It's a bit of a pain in the arse but you can launch a dedicated one and open a new instance of q4, and join your server so you have the light net demos.
I tried this. I did alt + enter once connected to my server and clicked on Quake4.exe on my desktop, but it didn't open another instance of Q4, it said I'm already connected. I then made my server dedicated as you mentioned but all that happened was a script box came up with a load of info and then stopped. Are you talking about opening another instance on a second pc? Looks like the only way I can record on my own server is to use the listen server script and record immensely huge files.
xchaser
Posts: 280
Joined: Sat Dec 04, 1999 8:00 am

Post by xchaser »

my F10 is to quit : bind F10 Quit

with no " " and it works perfect.
|-----|
§ìgñå
Posts: 210
Joined: Sat Jan 01, 2000 8:00 am

Post by §ìgñå »

DRuM wrote:...I put the listen server script in my autoexec bound to F10, and the net recording script in a file I called netrecord.cfg bound to F11. But unless I type exec netrecord.cfg everytime I want to record client side, the listen server script kicks in and records and stops a demo (not netdemo)with either F10 and F11. But if I remove the listen server cfg then the net record.cfg works regardless. The listen server script works on my own server and also on other peoples. But of course it's crap because the files are too big. When I exec the netrecord.cfg, then F10 and F11 both record and stop netdemos. Confusing. :p

I have another way. I've left the listen server script on F10, and for netdemos I've done this:

bind "F6" "recordnetdemo"
bind "F7" "stopnetdemo"

That all works with no confusion. F6, F7, and F10.
hm thats probably because both scripts use the same alias names. I guess I never thought ppl would be using both at the same time heh.
I rewrote the listen server script so it shouldnt interfere with the netscript.:

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"

Im not sure why you couldnt find that other demo, just remember whenever you record a demo with the listen script, unless your in playing singleplayer, it always saves the demo as "demo000".
horsky
Posts: 1
Joined: Thu Oct 27, 2005 6:21 pm

Slow?

Post by horsky »

How come when you use the listen server demo script, playback is lagging crazy? :confused:
DRuM
Posts: 6841
Joined: Mon Oct 28, 2002 8:00 am

Post by DRuM »

Signa, nice one! That works perfectly. Listen server script is working for both client and server, the netdemo one just for client, and my F10 and F11 keys are working as bound and not interfering with each other. I can get rid of my F6 and F7 binds now. I didn't realise you personally scripted these. So thanks :)


horsky, they lag for me too, plays in slo mo for most of it and sounds are missing.
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:26 pm, edited 1 time in total.
DRuM
Posts: 6841
Joined: Mon Oct 28, 2002 8:00 am

Post by DRuM »

Don't know if it's been mentioned anywhere but I'm posting about how to bind colours for say binds.

In Q3 all you had to do in the console if you wanted it in blue for example was:

bind x say ^4lol



In Q4, you have to do this : bind x " say ' ^4lol ' "

You need those inverted commas. Otherwise I found that pressing the bind without them shows the ^ before the word or phrase.
NitrousFlare
Posts: 81
Joined: Sun Oct 30, 2005 6:32 am

Post by NitrousFlare »

hey nologic, didyou make all of your names by hand, or do you have a program to fade all the colors?
Unisaw
Posts: 690
Joined: Tue Aug 16, 2005 3:50 pm

Post by Unisaw »

DRuM wrote:In Q4, you have to do this : bind x " say ' ^4lol ' "

You need those inverted commas. Otherwise I found that pressing the bind without them shows the ^ before the word or phrase.
I use the same binds as Q3 with no prob's or apostrophies (aka inverted comas). You do not need the "^" either.
DRuM
Posts: 6841
Joined: Mon Oct 28, 2002 8:00 am

Post by DRuM »

I don't follow you. How can you not need the ^ ? You need that to make the colour. Without using it you can't say you're making the bind the same way as Q3 anyway. When doing it from the console it doesn't work any other way ( or I haven't found another way) apart from how I described it. Please type the exact thing you would type in the console to make a colour bound word or phrase.
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:26 pm, edited 1 time in total.
Unisaw
Posts: 690
Joined: Tue Aug 16, 2005 3:50 pm

Post by Unisaw »

DRuM wrote:I don't follow you. How can you not need the ^ ? You need that to make the colour. Without using it you can't say you're making the bind the same way as Q3 anyway. When doing it from the console it doesn't work any other way ( or I haven't found another way) apart from how I described it. Please type the exact thing you would type in the console to make a colour bound word or phrase.
My mistake - I missed the "color" part of your post. Sry.
Victrix
Posts: 33
Joined: Tue Nov 01, 2005 11:51 pm

Post by Victrix »

Does anyone know a commandline param to make the console drop on startup? Not enabled, I mean down and in view immediately on startup
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:27 pm, edited 1 time in total.
Requ!em
Posts: 62
Joined: Wed Mar 08, 2000 8:00 am

Post by Requ!em »

Nice work NoLogic, if you can give me a link that is always valid / never changes I'll add it to the upcoming 'binds and configs' section in the UpsetChaps Quake4 guide.
PuPPeT
Posts: 18
Joined: Fri Oct 28, 2005 10:05 am

Post by PuPPeT »

nologic nice job man grats :)
also.. i have download your latest config and i saw this:


// Note:
// Really Wish We Had RGB Coloring For Echo ;)


Actually u CAN add
..for example mine works fine:
echo "^5======================="
echo "^5|^3***^2PuPPeT's ^2Script^3***^5|"
echo "^5======================="

p.s nice job with your echo haha ;)


i have also one question..
i can find the sounds on .pk4 files.. but i can't find the vocals!
someone help me plz. thanks :)


p.s2 very nice community u have here :) great job.keep it up :)
Quakers Don't Die.. They Respawn..
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:27 pm, edited 1 time in total.
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:27 pm, edited 1 time in total.
Locked