Engine Specific API

Unreal Engine Helpers (unreal_engine)

The unreal_engine table contains helpers for working with Unreal Engine games (UE4 / UE5).


unreal_engine.read_tarray

unreal_engine.read_tarray(proc, tarray_address[, max_count]) -> table

Reads an Unreal-style dynamic array (TArray) and returns its contents as a Lua array of pointers.

Parameters

  • proc Process object used for reading game memory.

  • tarray_address Integer address of the array in game memory.

  • max_count (optional, default: 4096) Maximum number of elements to read. Used as a safety limit.

Returns

  • A Lua array table indexed from 1 upward, containing integer addresses (pointers).

  • If anything is invalid (bad address, null pointer, weird count), an empty table is returned.

Example

local actors = unreal_engine.read_tarray(proc, actors_array_addr, 1024)

for i, actor_ptr in ipairs(actors) do
    -- actor_ptr is an integer address inside the game
end

unreal_engine.read_minimal_view_info

Reads a camera/view structure and converts it into a normalized Lua table.

Parameters

  • proc Process object.

  • view_info_address Address of the camera/view information in memory.

Returns

A table with this structure:

If the address or process is invalid, an empty table is returned.

Example


unreal_engine.read_minimal_view_info_f64

Same purpose as read_minimal_view_info, but for layouts that use double-precision values (common in some UE5 setups).

Parameters

  • proc Process object.

  • view_info_address Address of the camera/view information in memory.

Returns

Same shape as the float version:

If inputs are invalid, returns an empty table.

Example


unreal_engine.world_to_screen

Projects a point from world space to screen space using camera data.

Parameters

  • world_position Can be either:

    • A table: { x = number, y = number, z = number }, or

    • Three numbers: x, y, z

  • view_info The camera table returned from:

    • unreal_engine.read_minimal_view_info, or

    • unreal_engine.read_minimal_view_info_f64

    Must contain:

Returns

  • On success (point is in front of the camera):

  • If the point is behind the camera: nil.

  • If input is invalid: a Lua error is raised.

Example


Source 2 Helpers (source2)

The source2 table contains helpers for working with Source 2 games.


source2.world_to_screen

Projects a world-space point using a 4×4 row-major view-projection matrix.

Parameters

  • world_position Either:

    • Table { x = number, y = number, z = number }, or

    • Three numbers: x, y, z

  • view_matrix16 A Lua array with 16 numeric values:

    The matrix should be the combined view-projection matrix for the current camera.

Returns

  • On success:

  • If the point is behind the camera: nil.

  • If view_matrix16 does not contain at least 16 numbers: a Lua error is raised.

Example


Fortnite Helper

A small helper for reading player names in Fortnite.


fortnite_get_player_name

Attempts to read and decode a player name from game memory.

Parameters

  • proc Process object.

  • address Address pointing to a name-related structure in Fortnite.

Returns

  • The player name as a string on success.

  • An empty string "" if:

    • The process is invalid,

    • The memory cannot be read safely,

    • The decoded name is empty.

Example


Rust Helper

A helper for getting world-space transform positions in Rust (Unity).


rust_get_transform_position

Resolves the world-space position of a Unity transform hierarchy used by Rust.

Parameters

  • proc Process object.

  • address Address of a transform-related structure for a given entity.

Returns

  • On success: three numbers x, y, z (Lua returns them as multiple values).

  • On failure (invalid process, invalid address, or any internal error): 0, 0, 0.

Example

Last updated