Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[cfg] Advanced Variable FOV/Zoom control
02-10-2008, 04:53 PM (This post was last modified: 02-10-2008 05:33 PM by AceOfThumbs.)
Post: #1
[cfg] Advanced Variable FOV/Zoom control
Warning: this doesn't work with the 2.3 version of Nexuiz. You need the newer SVN engine. You can learn how to get the newer engine here:
[url]http://www.nexuizninjaz.com/forum/showthread.php?tid=53[/url]

HOW IT WORKS
Hold z (or whichever key you prefer) and scroll the mouse wheel to zoom your field of view from 0 to 180 in increments of 10. The mouse sensitivity adjusts to match, so you have a steady hand even at high zooms and can make quick turns when you are at a wide angle for close fighting. You can also press shift (or other key) for a quick temporary 2 times zoom. Release it to return to your normal view. As you make adjustments, the fov and sensitivity are shown at the top of the screen.

WHY A VARIABLE ZOOM
Some maps are very large and open and it is useful to zoom in to see an enemy in the distance. For small enclosed maps a wide angle view helps you see enemies to the side of you. For defending in your base it is nice to see a wider angle. For sniping long zoom is great. With a variable zoom, you can easily find what works best for you in different situations.

CUSTOMIZE IT
Change the key binds to whatever works best for you. You can also change the fov increment, which is how far it zooms for each scroll of the wheel. Adjust the sensitivity factor if the mouse sensitivity doesn't seem to change enough or changes too much when you zoom.

THE SCRIPT
Code:
// variable zoom script ----------------------------------------------------------------
// -------------------------------------------------------------------------------------
// note that you need the 2.4 engine to use this script
// if you use the wheel menu, put this code after the wheel menu code so it overrides the old zoom

// starting fov and sens - adjust these to whatever you normally use
set aot_cur_fov 130
set aot_cur_sens 12
set aot_fov_increment 10
set aot_sens_factor 10

// this actually does the zooming
alias "aot_zoom_now" "fov $aot_cur_fov ; sensitivity $aot_cur_sens; echo fov=$aot_cur_fov, sens=$aot_cur_sens"

// these calculate a new fov and sensitivity
alias aot_zoom_in "menu_cmd rpn /aot_cur_fov aot_cur_fov aot_fov_increment sub def /aot_cur_sens aot_cur_fov 10 div def; aot_zoom_now"
alias aot_zoom_out "menu_cmd rpn /aot_cur_fov aot_cur_fov aot_fov_increment add def /aot_cur_sens aot_cur_fov 10 div def; aot_zoom_now"

// these temporarily zoom to half the current fov when a key is held
alias +aot_zoom_temp "menu_cmd rpn /fov aot_cur_fov 2 div def /sens aot_cur_fov aot_sens_factor div def"
alias -aot_zoom_temp "aot_zoom_now"

// activate default zoom settings
aot_zoom_now

// hold down this key for quick zoom
bind shift +aot_zoom_temp

// this is the key that you hold down to adjust the fov level
bind z +aot_zoomadjust

// use the mouse wheel for fov adjustment

alias "+aot_zoomadjust" "alias aotm_menu aotm_init; in_bind 2 mwheelup aot_zoom_in; in_bind 2 mwheeldown aot_zoom_out; in_bindmap 2 0; echo; echo; echo; echo ^4>^7> ^2adjust field of view ^7<^4<"
alias "-aot_zoomadjust" "in_bindmap 0 2; echo; echo; echo; echo ^3!! ^1Weapon Menu Restored ^3!!"
So much to do, so little time to do it
Find all posts by this user
Quote this message in a reply
05-28-2008, 04:53 PM
Post: #2
RE: [cfg] Advanced Variable FOV/Zoom control
OK, this is brilliant programming.

But there's a flaw.

In the game while recording a demo, I used zooming then when I watched the demo, the zooming didn't show at all. It just stayed in the original view while shooting far (which at that point when I was playing, I was using zoom.)

How to fix this?
The Labour Party decided to change its logo from a rose to a condom, believing it accurately reflects their policies. This is because a condom allows for inflation, halts productions, destroys the next generation, protects a bunch of pricks, and gives you a sense of security whilst you're being fucked.
Find all posts by this user
Quote this message in a reply
05-28-2008, 06:48 PM
Post: #3
RE: [cfg] Advanced Variable FOV/Zoom control
You're right. FOV adjustments don't show in demo mode. Also, spectators won't see your FOV zoom. You can use the zoom controls when playing back a demo or spectating though.

There might be a way to set the normal zoom level, like the kind that happens with the right mouse when you have the nex. When I get some time I might look into this.
So much to do, so little time to do it
Find all posts by this user
Quote this message in a reply
05-28-2008, 07:12 PM
Post: #4
RE: [cfg] Advanced Variable FOV/Zoom control
Thank you for your efforts as it would be nice for the demos to show the zooms for some cool shots :)
The Labour Party decided to change its logo from a rose to a condom, believing it accurately reflects their policies. This is because a condom allows for inflation, halts productions, destroys the next generation, protects a bunch of pricks, and gives you a sense of security whilst you're being fucked.
Find all posts by this user
Quote this message in a reply
05-31-2008, 11:50 AM
Post: #5
RE: [cfg] Advanced Variable FOV/Zoom control
I'm guessing this is difficult to figure out?

What I wanted to do is to use the mouse wheel for zooming. With the FOV/ZOOM scripts above, I was able to configure it slightly to enable zooming using the mousewheels so I could use the free buttons for fast binds in team messages.

However, the demos problem where one cannot see the zoomings, I use "+zoom" as temporary until this is fixed by AoT.

Problem is, the mouse wheels would not work.

I tried this :

bind MWHEELUP "+zoom"

bind MWHEELDOWN "-zoom"

It doesn't work at all. Any suggestions?
The Labour Party decided to change its logo from a rose to a condom, believing it accurately reflects their policies. This is because a condom allows for inflation, halts productions, destroys the next generation, protects a bunch of pricks, and gives you a sense of security whilst you're being fucked.
Find all posts by this user
Quote this message in a reply
05-31-2008, 06:26 PM
Post: #6
RE: [cfg] Advanced Variable FOV/Zoom control
There is a built-in zoom when you hold the right mouse button when you use a nex. When using this type of zoom, it will show in demos and for spectators.

It was pretty easy to adapt my code to use the built-in zoom instead of an FOV zoom, but it isn't working right for me. Perhaps some others can try it and let me know if it works for them. I'll give a few more details about the problem in case anyone has a solution.

I found that adjusting the zoom factor variable (cl_zoomfactor) doesn't actually change the amount of zoom in the game. It is the same effect that you get if you go into the Nexuiz player setup menu and adjust the zoom, but don't click the Apply Now button. So I guess I need to figure out a way to get Nexuiz to apply the change in the zoom factor.

Anyway, here is the script. The quick zoom works, but the scroll wheel adjustments aren't working for me. I have to set the zoom factor in the Nexuiz player setup menu. For now, I recommend using the original script above. But please test this and let me know if you have the same results.

Code:
set aot_zoom_increment 1

// this actually does the zooming
alias "aot_zoom_now" "-zoom; +zoom; echo zoom=$cl_zoomfactor"

// these calculate a new fov and sensitivity
alias aot_zoom_in "menu_cmd rpn /cl_zoomfactor cl_zoomfactor aot_zoom_increment add def; aot_zoom_now"
alias aot_zoom_out "menu_cmd rpn /cl_zoomfactor cl_zoomfactor aot_zoom_increment sub def; aot_zoom_now"

// activate default zoom settings
aot_zoom_now

// hold down this key for quick zoom
bind shift +zoom

// this is the key that you hold down to adjust the fov level
bind z +aot_zoomadjust

// use the mouse wheel for fov adjustment

alias "+aot_zoomadjust" "alias aotm_menu aotm_init; in_bind 2 mwheelup aot_zoom_in; in_bind 2 mwheeldown aot_zoom_out; in_bindmap 2 0; echo; echo; echo; echo ^4>^7> ^2adjust field of view ^7<^4<"
alias "-aot_zoomadjust" "in_bindmap 0 2; echo; echo; echo; echo ^3!! ^1Weapon Menu Restored ^3!!"
So much to do, so little time to do it
Find all posts by this user
Quote this message in a reply
05-31-2008, 08:19 PM
Post: #7
RE: [cfg] Advanced Variable FOV/Zoom control
What I did for using your previous scripts on my wheels was this :

bind MWHEELUP "+aot_zoom_temp ; +aot_zoomadjust"

It worked for me.. Haven't tried your new script yet but I will soon.
The Labour Party decided to change its logo from a rose to a condom, believing it accurately reflects their policies. This is because a condom allows for inflation, halts productions, destroys the next generation, protects a bunch of pricks, and gives you a sense of security whilst you're being fucked.
Find all posts by this user
Quote this message in a reply
06-19-2008, 10:05 AM
Post: #8
RE: [cfg] Advanced Variable FOV/Zoom control
I have to say that your recent new aliases doesn't work very well for me.

When I starts playing, it zoomed up already so I had to press +zoom to get back to normal FOV so that I can play.

Also mousewheels for adjusting the zooms doesn't work...
The Labour Party decided to change its logo from a rose to a condom, believing it accurately reflects their policies. This is because a condom allows for inflation, halts productions, destroys the next generation, protects a bunch of pricks, and gives you a sense of security whilst you're being fucked.
Find all posts by this user
Quote this message in a reply
06-19-2008, 04:17 PM
Post: #9
RE: [cfg] Advanced Variable FOV/Zoom control
Thanks for testing that Deaf OAT. That is the same problem I had with my Mac. What operating system are you using?

To be clear, the script in the first post of this thread works. The script in post #6 is an experiment that doesn't work right.
So much to do, so little time to do it
Find all posts by this user
Quote this message in a reply
06-19-2008, 04:26 PM
Post: #10
RE: [cfg] Advanced Variable FOV/Zoom control
I'm using Linux - Ubuntu 7.10

Yes I understand the script on your 1st post works perfectly well but it's the demo viewing that's the problem. Need the demos or spectators to see the zoom functionality...
The Labour Party decided to change its logo from a rose to a condom, believing it accurately reflects their policies. This is because a condom allows for inflation, halts productions, destroys the next generation, protects a bunch of pricks, and gives you a sense of security whilst you're being fucked.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


Contact Us | Nexuiz Ninjaz Home | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication