Appearance
sdk.zoom
Official world-map camera scaling for the current client. IDA confirms that TGameSessionBase owns shared_ptr<TWorldMapCamera> at session+0xC8 and that the official float setter rebuilds both QMatrix4x4 instances and emits the viewport-change signal. The server viewport remains the constructor-default 18x14 rectangle (15x11 playable plus margins).
lua
local M = require("sdk.zoom")Constants
Lua 5.4 has no enums — these are integer (or string) fields on the module.
| Name | Value | Summary |
|---|---|---|
MIN | 0.9 | 0.9 is the smallest useful scale that stays inside the server-provided 18x14 rectangle. Lower values expose tiles the server has not supplied. |
MAX | 1.6 | Maximum official camera scale. |
STEP | 0.1 | Default zoom step. |
DEFAULT | 1.0 | Default camera scale. |
clamp
function · clamp(scale)
Clamp a scale into the official range.
camera
function · camera()
Current camera scale, when readable.
supported
function · supported()
True when the camera setter signature is available.
restore_default_viewport
function · restore_default_viewport()
Restore the default world-map scale.
get
function · get()
Current zoom scale.
set
function · set(scale)
Set zoom via game.dbg.set_world_map_scale.
zoom_in
function · zoom_in()
Step zoom in.
zoom_out
function · zoom_out()
Step zoom out.
reset
function · reset()
Reset zoom to DEFAULT.
hold
function · hold(scale)
Hold a scale until restore.