Debug functions
print()
Prints one or more objects to the CET Console and CET Console Logs file. Multiple objects will be printed separated by a space.
Definition
Usage example
spdlog
Write a string in the Individual Mod Logs file, eg, <
>/mods/my_mod/my_mod.log
.
There are several spdlog
methods, all are identical and have the same output:
spdlog.debug()
spdlog.trace()
spdlog.info()
spdlog.warning()
spdlog.error()
spdlog.critical()
Definition
Usage example
Usage tips
It is recommended to use spdlog.info(tostring(my_var))
to make sure the variable is compatible, as boolean
, interger
and other types will throw an error.
Dump()
Returns a JSON-ish string with details about the members of obj
:
Type name
Instance functions
Static functions
Properties
The listed functions include their signatures.
If detailed
is true, function descriptions will include the function's full name hash, short name, and short name hash.
obj
must be an instance of a wrapped game type, such as PlayerPuppet
which is returned by Game.GetPlayer()
. DumpAllTypeNames() will dump the names of all such types.
Definition
Usage example
GameDump()
Returns the game's internal debug string for the given object. This string displays the object's properties and their values.
Beware that this string probably won't have any line breaks, so it's more advisable to open <
>/scripting.log
in a text editor with line wrapping to view the output of this function.
Definition
Usage example
DumpType()
Like Dump(), but takes a type name rather than an object instance. Use DumpAllTypeNames() to get a list of all types.
Definition
Usage example
DumpAllTypeNames()
Dump all type names to <
>/cyber_engine_tweaks.log
and prints to the CET Console the number of types dumped.
Definition
Usage example
Last updated