Skip to main content

traceless.unsafe

Native-access operations. Schema writes use the same type strings as schema.read.

create_interface​

traceless.unsafe.create_interface(module_name, interface_name)

Returns: lightuserdata pointer; or nil.

Both names are strings. Looks up an already-loaded module's CreateInterface export; it does not load a DLL. Missing module/export/interface returns nil.

find_signature​

traceless.unsafe.find_signature(module_name, pattern)

Returns: lightuserdata pointer; or nil.

Searches an already-loaded PE image. Pattern is a string containing space-separated hexadecimal bytes and ? wildcards, or raw bytes with 0xCC as wildcard. Empty patterns, invalid/missing modules, allocation failure, and no match return nil.

get_pointer​

traceless.unsafe.get_pointer(entity)

Returns: lightuserdata pointer; or nil, reason.

Resolves a current entity handle. The native pointer is not lifetime-managed and must not be retained across entity replacement or unload.

schema_write​

traceless.unsafe.schema_write(entity, field, type, value [, array_index = 0])

Returns: true; or nil, reason.

Writes the selected native schema range. Missing fields, stale handles, and invalid ranges return nil with a reason; invalid type names or required values raise errors. bool uses Lua truthiness, numeric types use their native-width casts, vector requires Vector userdata, and handle accepts an entity handle userdata or an integer value. This does not perform game-level consistency validation.