ViewpointTurrets
Ever been reved in a landy?
Military Tool Kit camera aiming and 3D tracers for Project Viewpoint. Supports standard MTK weapons and HRSys Functional Turrets for the Ferret Mk2 and LAV-300 FSV.
Current version: 0.2.0. Targets Project Zomboid B42.21, Viewpoint 0.1.6.1, Military Tool Kit 2.0.0, and ZombieBuddy 2.3.0 or later. The 42.20 folder is the version-folder baseline selected by B42.21; it does not claim compatibility with the B42.20 game executable.
Mod layout
The repository root is the mod root, ready to be linked directly into Zomboid/mods:
ViewpointTurrets/
common/mod.info
42.20/media/lua/client/
42.20/media/java/client/MTKViewpointTurrets-0.2.0.jar
42.20/media/java/client/MTKViewpointTurrets-0.2.0.jar.zbs
source/
tools/SignZBS.java
Build.ps1
Sign.ps1
ZombieBuddy-public-key.txt
Use a directory symlink or junction from Zomboid/mods/MTKViewpointTurrets to the repository root, rather than to either version subfolder. The mod ID remains MTKViewpointTurrets, regardless of the checkout folder's name. An existing mod folder must be relocated before creating a link at the same path.
Enable Military Tool Kit - Viewpoint Turret Aiming together with MTK, Viewpoint and the relevant vehicle/turret mods. Its metadata orders it after those dependencies. Existing saves have their own mod selection.
Controls and rendering
From the gunner seat, hold right mouse and move the camera to traverse the turret. Hold right mouse + left mouse to fire. Releasing right mouse stops commanding a turn. Original ammunition, reloads, damage, traverse speed and angle limits remain supplied by MTK and the vehicle adapters.
The centred cross is amber while traversing and green within two degrees of camera bearing. It indicates horizontal alignment only; camera pitch does not add barrel elevation or guarantee a hit at the crosshair.
Viewpoint uses depth-tested 3D tracers taken from MTK's live projectile positions. The original isometric tracer drawing is suppressed only in Viewpoint and restored in iso mode. Frame snapshots keep mutable Lua tables off the render thread. No second ballistic simulation or damage processing is added. Viewpoint terrain relief and storey height are included in the coordinate conversion.
The native Viewpoint rendering path is supported, including the installed TrueWeathers shader pack. The alternate Minecraft/Iris pipeline is not supported. Multiplayer, controllers and split-screen have not been validated.
Build and sign
Requires a Java 25 JDK. Run from the repository root:
.\Build.ps1
.\Build.ps1 -Sign
The default game and Viewpoint JAR locations match this workstation. Override them with -Game and -Viewpoint. Build intermediates go under the ignored work/ directory. Output goes directly into 42.20/media/java/client/.
The distributed JAR is signed for Riggs0, SteamID64 76561198079674652. Distribute the .jar.zbs sidecar with the unchanged JAR. ZombieBuddy-public-key.txt contains the public key used for author verification through the Steam profile or ZombieBuddy's known-author list.
The private signing identity stays outside the repository, by default in %USERPROFILE%\.zombie_buddy\signing\Riggs0. Reuse that identity; do not generate a replacement when signing another build. Sign.ps1 -KeyDirectory <path> supports a different local key location. Never commit the private key.
Any rebuilt JAR needs a fresh signature. Build.ps1 -Sign handles both steps. Signing an existing JAR without rebuilding uses Sign.ps1. Updated Java code and signatures take effect on the next normal game restart; no launcher or automatic game restart is included.
Validation
Automated checks exercised the installed MTK code and the game's Kahlua VM for camera traversal, ammunition use, projectile tracking/removal, iso fallback and input gating. A standalone hidden OpenGL test checked tracer visibility, depth occlusion, near-plane clipping and restoration of render state. The two rendering hooks passed ZombieBuddy annotation conversion and offline bytecode weaving against the installed Viewpoint classes. ZombieBuddy's verifier accepted the signature with the supplied public key and rejected a mismatched JAR hash.
Third-person aiming was confirmed in game by the user. The new tracer appearance still needs an in-game check. No game client or save was started for automated verification.