V-Man Smooth Zoom
#1
I just got the V-Man smooth zoom from akimbo yesterday and I am having trouble getting it to work properly. I can get it to zoom in and out with the key i selected, but I cannot get it to do so smoothly. I enter 0.5 and 0.25 after the smoothzoom mumbo jumbo that is in there by default (so as it takes a half second to zoom in and a quarter second to zoom out), but it still performs instantly. Also the settings don't save after I quit assault cube. does anybody know what is going on?

EDIT: it also decides to switch my mouse sensitivity to 0.001
Thanks given by:
#2
Always this bug.
Unknow command scope sens...
Thanks given by:
#3
Oh! Haha...
I should probably update that to 1104... XD
Thanks given by:
#4
(28 Nov 10, 12:07AM)DES|V-Man Wrote: Oh! Haha...
I should probably update that to 1104... XD

Yeah that would help lol. post in on the forums once it is updated.
Thanks given by:
#5
No lol i had this bug on 1.0.2
Thanks given by:
#6
Uh...
I couldn't find it on my computer, so I just redid it. XD
// Smooth-zoom script, 1.1.0.4 redux by DES|V-Man; previous work by kirin and Gibstick.
// Bind "smoothzoom" to the key you wish to use for this purpose.

if (checkalias dfov) [] [alias dfov $fov]
if (checkalias zoominrate) [] [alias zoominrate 250]
if (checkalias zoomoutrate) [] [alias zoomoutrate 125]
if (checkalias zoomfov) [] [alias zoomfov 75]

alias zoomingin 0
alias zoomingout 0

alias smoothzoom [
alias zoominstarttime (millis)
alias zoomingin 1
zoominloop
onrelease [
alias zoomoutstarttime (millis)
alias zoomingout 1
zoomoutloop]]

alias zoominloop [
if $zoomingin [
  alias newfov (-f $fov (*f (-f $dfov $zoomfov) (divf (-f (millis) $zoominstarttime) $zoominrate)))
  if (>=f $newfov $zoomfov) [fov $newfov] [fov $zoomfov; alias zoomingin 0]
  sleep 0 [zoominloop]] []]

alias zoomoutloop [
if $zoomingout [
  alias newfov (+f $fov (*f (-f $dfov $zoomfov) (divf (-f (millis) $zoomoutstarttime) $zoomoutrate)))
  if (<=f $newfov $dfov) [fov $newfov] [fov $dfov; alias zoomingout 0]
sleep 0 [zoomoutloop]] []]

newmenu "Smooth-Zoom"
menuitemtextinput [Default FOV (where FOV rests): ] [result $dfov] [alias dfov $arg1] 3
menuitemtextinput [Zoomed FOV (extent to which FOV zooms): ] [result $zoomfov] [alias zoomfov $arg1] 3
menuitemtextinput [Zoom-in rate (higher is slower): ] [result $zoominrate] [alias zoominrate $arg1] 6
menuitemtextinput [Zoom-out rate (higher is slower): ] [result $zoomoutrate] [alias zoomoutrate $arg1] 6
menuitem [                Apply Now!                ] [closemenu]

alias smoothmenu [showmenu "Smooth-Zoom"]
Thanks given by:
#7
im kinda a noob at cubescript, how do i get the menu showing?
Thanks given by:
#8
Type /smoothmenu
Thanks given by:
#9
nvm fixed.
Thanks given by:
#10
lol, okay, let's see...
Copy the code for smoothzoom
Paste it into a text file
Name the text file "smoothzoom.cfg"
Put smoothzoom.cfg into your favorite scripts directory (mine is \scripts\, others usually choose \config\ or \mods\config\)
Open autoexec.cfg and add an exec command at the bottom. For example, if my smoothzoom.cfg file was in \scripts\ I'd put this:
exec scripts\smoothzoom.cfg
Or you could put this instead:
execdir scripts
and all the scripts in the folder \scripts\ would be executed automatically each time you run the game.
Thanks given by:
#11
1. Saving normal fov occurs using the alias "dfov"
2. sensitivity is not scaled because I was lazy.
3. Hiding the weapon while zooming is not my preference, I assumed nobody would really want that... XD
Thanks given by:
#12
Here is a version of the smoothzoom that has sensitivity scaling, doesn't fork the sniper scope if keybound to the RMB, and allows you to change the crosshair size when zoomed. Credits to Gibstick for the edits. Default values can be tweaked, right now it's setup to my liking ofc. lol :)

http://pastebin.com/raw.php?i=ppzThWP7
Thanks given by:
#13
Now here's a challenge: Scale the sensitivity on a frame-by-frame basis just like the fov!
Thanks given by:
#14
Here's an improved version of what Bukz uses, default settings.
http://pastebin.com/raw.php?i=m9aMvMaE.
Still no sensitivity scaling on frame-by-frame basis u_u.
Thanks given by:
#15
If you don't do it, I will! I'll give you until tomorrow morning. :D
Thanks given by:
#16
what's the use in those clumsy sens scalings? use /autoscopesens 1, it accurately scales sensitivity to fit with the zoom fov using trigonometrics (which is the only right way)


linearly correlating fov and sensitivity alters the ratio between the quantity of image seen and sensitivity, so please avoid doing this: newsensitivity=sensitivity/fov*zfov
it's horribly wrong!!

the correct relationship is this: newsensitivity=sensitivity/tan(fov/2)*tan(zfov/2)
and you can obtain it at no cost by using this parameter: /autoscopesens 1

(this also facilitates learning the sniper, because you have to deal with only one sensitivity if you use autoscopesens)
Thanks given by:
#17
We use those clumsy sens scalings because we're used to them. As well, scope sens doesn't affect regular sensitivity; no way to use the scopesens scaling with regular sensitivity at the moment.

Sure it facilitates learning the sniper but we've already learned the sniper.
Thanks given by:
#18
(30 Nov 10, 10:44PM)Kirin Wrote: what's the use in those clumsy sens scalings? use /autoscopesens 1, it accurately scales sensitivity to fit with the zoom fov using trigonometrics (which is the only right way)

linearly correlating fov and sensitivity alters the ratio between the quantity of image seen and sensitivity, so please avoid doing this: newsensitivity=sensitivity/fov*zfov
it's horribly wrong!!

What is "zfov" in your formula?
Is it "new fov" or "difference beetwen prev_fov and actual_fov"?

I figured out that I need:
scopesensscale 0.5 for scopefov 50
scopesensscale 0.1 for scopefov 5

I'm testing my zoom-scope script now
and I set scope sens. in it in very simple way:

scopesensscale (divf $scopefov 100);

and it works nice, but at max zoom is 0.5, not 0.1,
but it's not a problem.

Kirin Wrote:the correct relationship is this: newsensitivity=sensitivity/tan(fov/2)*tan(zfov/2)
and you can obtain it at no cost by using this parameter: /autoscopesens 1

zfov is "new fov"?
if so:
newsensitivity = 0.5 / tan(50/2) * tan(5/2) = 0.0468 ~ 0.05

It looks like "my fov/100" :)
(maybe due to that for "small" values of x tan(x) ~= x)

autoscopesens sucks - for 2 reasons:
- you have to get used
- sens. vary with scopefov - its too sens. form me when scopefov is near min
Thanks given by:
#19
O_o nice gravedig. And actually that was a compliment this time.
The latest version of Smooth-Zoom uses tools.cfg, so it should appear clearer to you.
Thanks given by:
#20
jakson you are wrong. there is no your "my fov/100", that is only fine with you, with your personal preferences.
when a programmer creates something he makes it to be used by many people not for a specific individual nicknamed jakson that likes to use fov/100 scaling...
"- sens. vary with scopefov - its too sens. form me when scopefov is near min" this doesnt make any sense..
also that's not "my" formula that's just the only exact way of scaling sensitivity when zooming. (in this game)
but then again, i'm gonna suggest you to study more mathematics and programming.

if u dont agree with me then explain me where the hell did u get that /100? what does it mean exactly? it's just a parameter that you are comfortable with. point.

and not an accurate study of how the game creates the screen on a specific fov request.
jakson stop defending the impossible, if u dont like autoscopesens then just dont use it, we dont care!

"but at max zoom is 0.5, not 0.1,but it's not a problem.", that's an insult for a person like me that actully understands the difference between 1/2 and 1/10.

also you didnt even understand the formula that i published, the correct calculation is
assuming that sensitivity = 0.5 and fov = 120 and scopefov = 5:
newsensitivity=sensitivity / tan(fov/2) * tan(zfov/2) = 0.5 / tan(120/2) * tan(5/2) = 0,012603829

so you cant even read a formula... stop making yourself ridiculus and get out of that loop of ignorance
//i apologize if i hurt anybody's sensibility.
Thanks given by:
#21
Rough night last night?
Thanks given by:
#22
V-Man, it wasnt the night it was the day, i'm quite nervous today...
and guess what made me angry today, seeing that one of my classmates with a rich dad gets the same grades as me in IT/Math/Physics even though he makes the 1% of the effort that i put into studying, that idiot is not even capable of solving a system of equations, but it seems that his father wallet can replace knowledge. so that's why i'm so angry with superficial people.
ps. those tools are becoming useful tools :D
Thanks given by:
#23
WTF? Which school do you go to?

ps. Glad to hear it! :D
Thanks given by:
#24
i frequent an IT high school (i'm 17) in south italy (even thought south-italy is beutiful compared to north, it's full of corruption, well italy is full of corruption see berl*sconi...). Fortunately i will go to university somewhere else and do IT Enginering (not sure it's a right word in english).
Thanks given by:
#25
sigh.
Well, IT Engineering is popular here too. But if you move to the US, don't move to Chicago. I'm pretty sure South Italy (and possibly also a moonshine tub) is where they got their ethics from. XD
Thanks given by:
#26
ahahahahhah, i will make sure to avoid chicago xD
Thanks given by:
#27
Smoothzoom keeps reseting my fov to weird seemingly random settings (75, 107, 77). switching from weapons or just using the script has me constantly resetting my fov back to 120.

??? what I do ??? :(
Thanks given by:
#28
That's a symptom of the old version...
Did you get the new version and set it up with your preferred default fov?
Thanks given by:
#29
.... Boomhauer = Guinea Pig
Thanks given by:
#30
(24 Mar 11, 08:07AM)Boomhauer Wrote: .... Boomhauer = Guinea Pig

And I appreciate it! :D
Now, bend over...
Thanks given by: