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
print(obj: object, [obj2: object, [...]]) -> nilUsage example
print('Hey', 'there', 1, 2, true)> Hey there 1 2 truespdlog
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
spdlog.info(string: string) -> nilUsage example
spdlog.info('Custom log')> [02:31:08] Cutom logUsage 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.
Definition
Dump(obj: GameDataType, detailed: bool) -> stringUsage example
print(Dump(Game.GetPlayer(), false)){
name: PlayerPuppet,
functions: {
IsPlayer() => (Bool),
IsReplacer() => (Bool),
IsVRReplacer() => (Bool),
IsJohnnyReplacer() => (Bool),
IsReplicable() => (Bool),
GetReplicatedStateClass() => (CName),
IsCoverModifierAdded() => (Bool),
IsWorkspotDamageReductionAdded() => (Bool),
IsWorkspotVisibilityReductionActive() => (Bool),
GetOverlappedSecurityZones() => (array:gamePersistentID),
...
}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
GameDump(obj: GameDataType) -> stringUsage example
print(GameDump(Game.GetPlayer()))> PlayerPuppet[ customCameraTarget:ECCTV_OnlyOnscreen, renderSceneLayerMask:<Default;Cyberspace>, persistentState:, playerSocket:gamePlayerSocket[ ], ...]DumpType()
Like Dump(), but takes a type name rather than an object instance. Use DumpAllTypeNames() to get a list of all types.
Definition
DumpType(typeName: string, detailed: boolean) -> stringUsage example
print(DumpType('PlayerPuppet', false)){
name: PlayerPuppet,
functions: {
IsPlayer() => (Bool),
IsReplacer() => (Bool),
IsVRReplacer() => (Bool),
IsJohnnyReplacer() => (Bool),
IsReplicable() => (Bool),
GetReplicatedStateClass() => (CName),
IsCoverModifierAdded() => (Bool),
IsWorkspotDamageReductionAdded() => (Bool),
IsWorkspotVisibilityReductionActive() => (Bool),
GetOverlappedSecurityZones() => (array:gamePersistentID),
...
}DumpAllTypeNames()
Dump all type names to <>/cyber_engine_tweaks.log and prints to the CET Console the number of types dumped.
Definition
DumpAllTypeNames() -> nilUsage example
DumpAllTypeNames()> Dumped 26811 types[operator ()] [4416] handle:gamedataUICharacterCreationAttribute_Record
[operator ()] [4416] DamageTypeIndicator
[operator ()] [4416] worldAIDirectorSpawnNode
[operator ()] [4416] UI_DEV_ScriptableSystemUseNewTooltips
[operator ()] [4416] array:SDocumentThumbnailWidgetPackage
[operator ()] [4416] gameIPersistencySystem
[operator ()] [4416] DelayedComDeviceClose
[operator ()] [4416] inkSettingsSelectorController
[operator ()] [4416] array:handle:AICombatSquadScriptInterface
[operator ()] [4416] animAnimNode_LocomotionAdjusterOnEvent
[operator ()] [4416] whandle:gamedataLightPreset_Record
[operator ()] [4416] handle:C4ControllerPS
...Last updated