142 lines
8.0 KiB
Markdown
142 lines
8.0 KiB
Markdown
# FOV Changer verification
|
||
|
||
## World modules and HUD style
|
||
|
||
See [WORLD_MODULES.md](WORLD_MODULES.md) for the new modules, verified interfaces,
|
||
controls, tests, current rendering limits and in-game checks.
|
||
|
||
## Profiles and autosaving
|
||
|
||
See [PROFILES.md](PROFILES.md) for profile controls, file storage, migration and
|
||
failure handling. The integration executable also tests profile serialization,
|
||
switching, cancellation, autosaving, rename/delete and recovery behavior.
|
||
|
||
## New quality-of-life modules
|
||
|
||
All new modules start disabled. Right-click their rows to expand settings, and use
|
||
the normal **bind** control to assign a module toggle key.
|
||
|
||
- **VISUAL / viewmodel:** separate **main** and **offhand** position X/Y/Z and
|
||
pitch/yaw/roll sliders. Zero is neutral. **Separate offhand** is on by default;
|
||
turn it off to make both hands inherit the main settings. Offhand controls cover
|
||
shields and other held offhand items, and substitute the offhand pose before the
|
||
game's item-specific transforms so animations remain relative to that pose.
|
||
Position offsets use each pose's local basis; rotation keeps its translation
|
||
pivot. Check shield raised/lowered, offhand items, empty hands, tools, blocks,
|
||
view bobbing both on/off, and third person in-game.
|
||
- **UTILITY / toggle sprint:** enable once to hold your sprint key while moving
|
||
forward. Defaults are W and Left Ctrl; both are rebindable in its settings.
|
||
Shift (sneak), S (backwards), visible menus/cursor, focus loss, and disabling
|
||
release the module's injected key. Its optional status HUD is draggable. This
|
||
uses normal keyboard input and preserves Minecraft's normal sprint restrictions.
|
||
- **HUD / cps counter:** separate left/right click totals over the previous second.
|
||
Clicks in the client menu are excluded; opening it or leaving the game clears
|
||
the rolling count. Mouse messages capture clicks between rendered frames.
|
||
- **HUD / clock:** local computer time, optional seconds and 12/24-hour format.
|
||
|
||
The expanded integration suite also checks actual viewmodel hook/trampoline calls,
|
||
independent main/offhand translation and all rotation axes, preservation of an
|
||
item-animation transform, linked mode, matrix restoration, and repeated toggles; plus Sprint's
|
||
key ownership, repeated updates, rebinding, failed-release retry, physical-input
|
||
handoff, injected-event filtering, and focus cleanup. Both x64 DLL builds pass.
|
||
The tests use controlled executable fixtures and do not establish visual behavior
|
||
inside Minecraft; the in-game checks above remain useful.
|
||
|
||
Cursor-hook installation now enables only those cursor hooks, so initializing
|
||
the menu does not enable unrelated game hooks. Module panels scroll when expanded
|
||
settings exceed the available screen height.
|
||
|
||
The viewmodel renderer, shared item renderer, and offhand call-site signatures
|
||
each matched exactly once in the captured 26.52 executable, at RVAs `0x47ca240`,
|
||
`0x47b5ba0`, and `0x47ceed3`. The call-site target is checked against the hooked
|
||
function. The offhand hook also requires that return address and the active
|
||
first-person render context, so other item-renderer calls are forwarded unchanged.
|
||
Temporary world matrices are restored after each draw scope. The isolated
|
||
executable fixtures use these exact prologues/call-site instructions and controlled
|
||
callbacks; shield rendering itself still needs the in-game check above.
|
||
|
||
### Viewmodel regression coverage
|
||
|
||
The working `hand_bob` hook is again the primary main-hand transform. The optional
|
||
hand-draw hook also passes an adjusted **copy** of its R8 source matrix: the real
|
||
26.52 renderer copies that matrix to its own storage at `+0x388`, so changing only
|
||
the shared matrix is insufficient. First-person checks accept the flags bit rather
|
||
than requiring an exact `0x21` value. Previous-frame bob snapshots expire at frame
|
||
end, avoiding duplicate main-hand offsets and stale offhand corrections.
|
||
|
||
Tests cover the direct hand hook and simulate the renderer copying a distinct input
|
||
matrix, including `0x23` flags and preservation of the caller's input. Earlier
|
||
fixtures consumed only the shared matrix and missed this rendering behavior.
|
||
|
||
### Custom crosshair
|
||
|
||
The existing crosshair module is now **custom crosshair** (F8). It includes length,
|
||
width, gap, dynamic gap/length toggles, independent speed and easing controls, base
|
||
color, gradient toggle/color, spin toggle/speed/easing, and the optional center dot.
|
||
Each dynamic channel has its own **pulse** or **movement / clicks** mode and amount.
|
||
Reactive mode responds to WASD/Space and left/right clicks; client-menu input is
|
||
excluded. Pulse speed is cycles per second; reactive speed sets transition rate;
|
||
spin speed is degrees per second. Easing options are linear, smooth, ease in,
|
||
ease out, and ease in/out. Gradient runs from the base color at the inner ends to
|
||
the second color at the outer ends. Spin and gradients work together.
|
||
|
||
Tests exercise animation timing at 60/144 Hz, easing bounds, reactive return to
|
||
rest, toggle reset, and actual ImGui draw vertices/indices, gradient colors, and
|
||
rotated geometry. Client Debug/Release builds pass. In-game rendering should be
|
||
checked after reloading the new DLL.
|
||
|
||
### Outline and native crosshair replacement
|
||
|
||
**Black outline** adds a black border behind each arm and the center dot; **outline
|
||
width** controls its thickness. The border uses the same animated gap, length, and
|
||
angle as the colored arms, and draws before the fill so gradient/spin combinations
|
||
remain intact.
|
||
|
||
Enabling Custom Crosshair suppresses the native CursorRenderer draw; disabling
|
||
restores it. The 26.52 CursorRenderer was identified through the `cursor_renderer`
|
||
factory/vtable and its `ui_crosshair` material. Its four-pointer render entry at
|
||
RVA `0x8db97b0` matches the signature exactly once in the captured executable.
|
||
The hook affects this renderer only. A missing/ambiguous signature leaves native
|
||
hiding unavailable and the module tooltip reports that limitation.
|
||
|
||
Integration tests use the verified native prologue and a controlled draw callback,
|
||
checking suppression, argument forwarding, restoration, and repeated toggles.
|
||
ImGui tests check black outline vertices with rotating arms and a center dot.
|
||
Visual behavior inside Minecraft remains an in-game check after reloading.
|
||
|
||
## FOV signature and original integration test
|
||
|
||
The FOV signature was checked against executable sections read from the running
|
||
Minecraft Windows **1.26.5203.0 (26.52)** process. It matched exactly once, at
|
||
RVA `0x46bd250`. Disassembly identified the `video.fov` option (`0x2f`), a float
|
||
return in degrees, a default of 70 degrees, and the game's 130-degree upper clamp.
|
||
Call sites pass `(renderer, frame_alpha, bool)` using the Windows x64 ABI.
|
||
|
||
`fov_changer_test.vcxproj` is a standalone x64 integration test. Its executable
|
||
fixture uses the verified function prologue with a controlled 70-degree return;
|
||
it is **not** an in-game rendering test. It exercises the production signature
|
||
scanner, MinHook, and FOV module, including:
|
||
|
||
- Missing and ambiguous signatures refuse to enable the module.
|
||
- Default off, slider updates, finite bounds, and NaN fallback.
|
||
- Forwarding calls with the projection flag false.
|
||
- Zoom composition with vanilla/overridden FOV and unchanged hand projection.
|
||
- Repeated enable/disable cycles restore the original getter.
|
||
|
||
Build the test project with Visual Studio/MSBuild in `Debug|x64`, then run
|
||
`client/build/tests/fov_changer_test.exe`. Assertions remain enabled in this project.
|
||
|
||
## In-game check
|
||
|
||
Load the updated client DLL using your existing workflow. Under **VISUAL**, enable
|
||
**fov changer** and expand its **fov** slider. The default is 90 degrees; the range
|
||
is 30–130. Check 30, 90, and 130 degrees in a world, then disable the module and
|
||
confirm the game's normal FOV returns. This sets a fixed world FOV, including
|
||
during sprinting. The zoom module magnifies this FOV when active. Neither module
|
||
writes Minecraft's saved FOV setting.
|
||
|
||
The Debug and Release client DLLs build successfully, and the isolated integration
|
||
test passes. Visual behavior inside Minecraft still requires the in-game check.
|
||
Future game updates may require a new signature; a missing or ambiguous match
|
||
leaves the module unavailable.
|