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:
  1. Do not reset FOV
    Self explanatory.
  2. Reset on Zoom
    Resets the zoom FOV to the default whenever you zoom in.
  3. 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:
  1. Tribes 2 Standard Mode
    Hold the zoom key to zoom in, release it to zoom out.
  2. Zoom Toggle
    Press the zoom key once to zoom in. Press againto zoom out.
  3. 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)
  4. 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

Wishlist/Todo

Acknowledgements

Contact Information