WegZoom v1.1
by WegBert
Introduction
WegZoom provides mousewheel zooming functionality for Tribes 2, as well as a
number of other useful zooming related features. Basically, press the zoom key
and then you can roll the wheel forward and it zooms in; roll it backward and it
zooms out. Simple.
Installation
To install WegZoom, just extract WegZoom.cs to your
Tribes2\GameData\base\scripts directory. There are also a couple of options in the file
that you might want to change, which are described below. You do NOT need to
change any binds.
NOTE: If you used my original script (the one posted in the TribalWar forums), you had to bind a key to WegToggleZoom. That is NO LONGER NECESSARY. In fact, open up your current key configuration file (as listed in the $pref::Input::ActiveConfig in your Tribes2\GameData\base\prefs\ClientPrefs.cs file) and search for WegToggleZoom and replace it with toggleZoom.
Options
Most of these options are set to their "Tribes 2 default configuration
emulation mode".
Note on Floating Point numbers:
In Tribes 2, floating point numbers between -1 and 1 must have a 0 (zero)
before the decimal point. For example, .3 is incorrect, but 0.3 is correct.
- $WegZoom::MinFOV = Floating Point (Default: 8)
- The lowest to set the FOV before stopping (for the wheel) or looping (in the
case of using a single press key). The smaller this number, the closer in you
zoom. However, because of limitations on how much Tribes 2 actually renders,
this probably isn't very useful.
- $WegZoom::ZoomMult = Floating Point (Default: 2)
- Each zoom step is multiplied (or divided if zooming out) by this value to
generate the next step. The lower this value, the smoother the zoom. Don't set
this lower than 1. You'll confuse everybody.
1.1 is relatively smooth setting.
- $WegZoom::ZoomSens = Floating Point (Default: 0)
- The mouse sensitivity to use when zoomed in. If 0, the sensitivity will not be
changed. If greater than 0, this sensitivity will be set only when zoomed in
and reset when zoomed back out.
- $WegZoom::ResetMode = 0 .. 2 (Default: 2)
-
ResetMode has 3 possible settings that specify how/if WegZoom will reset your zoom FOV when you turn zoom on. The values are defined as follows:
- Do not reset FOV
Self explanatory.
- Reset on Zoom
Resets the zoom FOV to the default whenever you zoom in.
- Reset after time
Resets the zoom FOV $WegZoom::ResetDelay milliseconds after you zoom out. (Thanks Taronish for the idea!)
- $WegZoom::ResetDelay = Integer (Default: 1500)
-
ResetDelay is the amount of time in milliseconds from when you zoom out to when the FOV is reset when in ResetMode 2.
- $WegZoom::ToggleMode = 0 .. 3 (Default: 3)
-
Toggle Mode selects the toggle functionality to be used when pressing the zoom
key. The values are defined as follows:
- Tribes 2 Standard Mode
Hold the zoom key to zoom in, release it to zoom out.
- Zoom Toggle
Press the zoom key once to zoom in. Press againto zoom out.
- Zoom Toggle Mode 2
Same as Zoom Toggle (value 1), except you will only be able to use the
wheel to zoom as long as you hold the zoom key. Once the key is released, the
wheel will revert to its default function. If you press and hold the key again,
you may zoom with the wheel, and upon releasing the key, your wheel will revert
to the default function. If you press and release the wheel key, you will zoom out. (Changes thanks to
Dweasel, tbrowne@best.com)
- Tap Toggle
If you press and release the zoom key quickly (i.e. tap it), it will act like the
Zoom Toggle mode. However, if you hold the zoom key for $WegZoom::HoldDelay or
longer, it will revert to the T2 Standard Mode and when you release the zoom key
it will zoom out.
- $WegZoom::HoldDelay = Integer (Default: 300)
-
HoldDelay is the time in milliseconds that after pressing the zoom key you can still release the key without zooming out. After that many seconds, releasing the zoom key will zoom out.
- $WegZoom::SwitchWeaponOnZoom = "Blaster" | "Plasma" | "Chaingun" | "Disc" | "GrenadeLauncher" | "SniperRifle" | "ELFGun" | "Mortar" | "MissileLauncher" | "ShockLance" | "TargetingLaser" | "" (Default: "")
- When zooming in and SwitchWeaponOnZoom is not equal to "", the script will switch to whichever weapon is specified in SwitchWeaponOnZoom. After zooming out, your weapon will be switched to the weapon you were using prior to activating the zoom. I assume the only useful weapon to select is "SniperRifle", but I left it up to you... =)
Version Information
- Version 0
-
- Informal release to Tribal War Forum
- Version 1.0
- Initial (formal) public release.
- Version 1.1
-
- Replaced old "Zoom Toggle" system with a number of "Toggle Modes". (See documentation for more details)
- Added new Toggle Mode: Tap Toggle.
In tap toggle mode, if you tap the zoom key, your zoom will toggle. Otherwise, your zoom will act like the default hold mode.
- Added new Toggle Mode: Zoom Toggle w/ Wheel Restore. (Changes thanks to Dweasel, tbrowne@best.com).
This mode acts for the most part like Zoom Toggle mode, except that you may only use the wheel to scroll when you are holding the zoom button down. Upon releasing the zoom button, the wheel returns to its default function. If you press and hold the zoom key again, you can scroll with the wheel until you release it. If you press and release the zoom key without scrolling, you will zoom out. *pant* It's simpler than it sounds.
- Added option to switch weapons upon zooming in. Your weapon will be switched back to the original after zooming out.
- Added a callback when the FOV changes ('zoomFovChanged' for you scripters). This breaks compatability with WegZoomHud, so if you use WegZoomHud, you should upgrade that to the latest version (1.1).
- Replaced old "ResetOnToggle" system with a number of "Reset Modes". (See documentation for more details)
- Added new Reset Mode: Reset after time (Thanks to Taronish for the idea)
Resets the zoom FOV after a certain amount of time after releasing the zoom key.
Wishlist/Todo
- May use a "zoom table" instead of current way. That way I could have functions generate zoom steps by either adding OR multiplying, or you could create your own custom zoom table. Sensitivity levels could be associated with zoom levels
Acknowledgements
- Dweasel (tbrowne@best.com) for providing the Zoom Toggle w/ Wheel Restore mode.
- Taronish for the "Reset after time" idea (ResetMode 2).
Contact Information
- E-Mail: wegbert@garbagedump.com
- IRC: WegBert in #t2scripters on Dynamix IRC (irc.dynamix.com, NOT Tribes 2 IRC)
- ICQ: 522886 (but I'm not usually on...)