Autoexec.cfg : some tricks & codes

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Jive
Posts: 340
Joined: Sat Mar 11, 2006 23:44
Location: Manaus (Amazonia)
Contact:

Autoexec.cfg : some tricks & codes

Post 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
User avatar
Jive
Posts: 340
Joined: Sat Mar 11, 2006 23:44
Location: Manaus (Amazonia)
Contact:

Post 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!!!
Attachments
Zoom.jpg
Zoom.jpg (14.48 KiB) Viewed 2129 times
User avatar
BlazingPhoenix
Posts: 488
Joined: Sun Aug 28, 2005 5:11
Contact:

Post by BlazingPhoenix »

o_o, that is pretty cool.
User avatar
DoomRater
Posts: 397
Joined: Tue Jul 19, 2005 4:14
Location: Programmer's Room, talking to Will Harvey
Contact:

Post 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)
User avatar
Jive
Posts: 340
Joined: Sat Mar 11, 2006 23:44
Location: Manaus (Amazonia)
Contact:

Post 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.
User avatar
DoomRater
Posts: 397
Joined: Tue Jul 19, 2005 4:14
Location: Programmer's Room, talking to Will Harvey
Contact:

Post 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!)
User avatar
Cutmanmike
Posts: 482
Joined: Sat Sep 03, 2005 23:34

Post by Cutmanmike »

The zoom thing is kinda old. Btw can we access fov in DECORATE yet?!
User avatar
Janizdreg
Posts: 8
Joined: Fri Oct 07, 2005 18:41
Location: Finland
Contact:

Post 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
Locked

Return to “GZDoom”