Page 1 of 1

Autoexec.cfg : some tricks & codes

Posted: Mon Jun 26, 2006 2:16
by Jive
These codes must be copied in your autoexec.cfg file (you can assign a path for this file in you config.cfg, or not, if you put it in the same directory than GZDoom).

With the following code, you'll take screenshots with just the map itself (no crosshair, no hud, no sprite for the player):

Code: Select all

alias crosshair_off "crosshair 0"
alias crosshair_on "crosshair -2"
alias bestshots "set_bestshots; wait 1; screenblocks 12; crosshair_off; r_drawplayersprites 0; screenshot; wait 1; crosshair_on; r_drawplayersprites 1; screenblocks 11; wait 1"
alias set_bestshots "bind o bestshots"

bind o bestshots //// screenshot without informations using the key "o"

bind s screenshot //// Choose your key (here: "s")
With this one, you will be able to zoom in & out:

Code: Select all

alias zoom_in "set_zoom_out; fov 80; wait 1; fov 71; wait 1; fov 62; wait 1; fov 54; wait 1; fov 46; wait 1; fov 39; wait 1; fov 32; wait 1; fov 26; wait 1; fov 20; wait 1; fov 15; wait 1; fov 10"
alias set_zoom_out "bind z zoom_out"
alias zoom_out "set_zoom_in; fov 15; wait 1; fov 20; wait 1; fov 26; wait 1; fov 32; wait 1; fov 39; wait 1; fov 46; wait 1; fov 54; wait 1; fov 62;  wait 1; fov 71;  wait 1; fov 80; wait 1; fov 90" 
alias set_zoom_in "bind z zoom_in"

bind z zoom_in
And with this one, I was able to assign 2 different actions to one control:

Code: Select all

alias +usestraf "+use; +strafe"
alias -usestraf "-use; -strafe"
bind mouse2 +usestraf

Posted: Mon Jun 26, 2006 23:02
by Jive
Efficiency of the zoom code
On these screenshots, you can notice how powerfull are the new drivers made by Ati for the Radeon: no more pixelized lines, nowhere!!!

Posted: Tue Jun 27, 2006 2:14
by BlazingPhoenix
o_o, that is pretty cool.

Posted: Wed Jun 28, 2006 0:54
by DoomRater
I used the old zooming trick for a while, then settled on building my own, using the mouse wheel (and polysyllabic alias commands.) EDIT: I failed to notice you used polysyllabic bindings, but that's an old trick too. Let's see if I can dig the required aliases out of my zdoom.ini... (keep in mind the zoom commands assume you normally keep mouse_sensitivity at 2.5!)

[spoiler]

Code: Select all

Name=zoomin
Command=zoom2
Name=zoomout
Command=zoom1
Name=zoom1
Command=fov 90;mouse_sensitivity 2.5;joy_speedmultiplier 2.5;alias zoomin zoom2;alias zoomout zoom1
Name=zoom2
Command=fov 60;mouse_sensitivity 1.66;joy_speedmultiplier 1.66;alias zoomin zoom3;alias zoomout zoom1
Name=zoom3
Command=fov 45;mouse_sensitivity 1.25;joy_speedmultiplier 1.25;alias zoomin zoom4;alias zoomout zoom2
Name=zoom4
Command=fov 36;mouse_sensitivity 1;joy_speedmultiplier 1;alias zoomin zoom5;alias zoomout zoom3
Name=zoom5
Command=fov 30;mouse_sensitivity .833;joy_speedmultiplier .833;alias zoomin zoom6;alias zoomout zoom4
Name=zoom6
Command=fov 25.7;mouse_sensitivity .714;joy_speedmultiplier .714;alias zoomin zoom7;alias zoomout zoom5
Name=zoom7
Command=fov 22.5;mouse_sensitivity .625;joy_speedmultiplier .625;alias zoomin zoom8;alias zoomout zoom6
Name=zoom8
Command=fov 20;mouse_sensitivity .555;joy_speedmultiplier .555;alias zoomin zoom9;alias zoomout zoom7
Name=zoom9
Command=fov 18;mouse_sensitivity .5;joy_speedmultiplier .5;alias zoomin zoom9;alias zoomout zoom8
[/spoiler]

Then bind zoomin and zoomout to your mousewheel and call zoom1. (I like to make mouse3 call zoom1 as well, as a rescue button)

Posted: Wed Jun 28, 2006 1:55
by Jive
That's pretty cool, effectively.
Thanks for this trick.
But, as far as I have selected the click 3 to jump, I guess that I'll have problem of unwanted zooming if I use this code.

Posted: Wed Jun 28, 2006 2:09
by DoomRater
Not really, since you can bind zoom1 to whatever key you like. I just happen to like it on mouse3 and my jump key elsewhere. (just as you can bind zoom9 to whatever key you want- that's why I made it change aliases and not keybindings!)

Posted: Wed Jun 28, 2006 15:47
by Cutmanmike
The zoom thing is kinda old. Btw can we access fov in DECORATE yet?!

Posted: Tue Jul 04, 2006 18:26
by Janizdreg
IIRC I first ported the Action Quake zooming config script, sounds and graphics to ZDoom back in 2000 (and I'm not even sure whether I was the first to create such a script). The script, plus a bunch of other more or less useful ones (including a "clean" screenshot script similiar to Jive's) I made back in 2000-2004 are still available here. Oh, and here's a shot of the zooming script & graphics in action:
Image