Contents:
To the index
Introduction
The zSpy is a debugging tool for reporting the debug messages during starting and running GOTHIC. We strongly recommend to always use the zSpy when working on MODs!
WARNING: The zSpy must be running before you start Gothic, so that the Gothic program can find it. (For Gothic 1 you must manually start the zSpy, for Gothic 2 the GothicStarter takes care of this.)
In order to follow what the zSpy is reporting, Gothic should be started in a window. You can find the corresponding option
start in a window (G1) or
Fenstermodus (G2) in the
GothicStarter. If you also enter the parameter
-devmode there, then Gothic runs in MARVIN mode and you can use the key F3 to switch between window-mode and fullscreen-mode at any time during GOTHIC.
zSpy log level
With the parameter
-zlog:#,s you can specify how many messages will be reported in zSpy.
For
# you need to set a number (level) between -1 and 9:
- -1 suppresses every message (except Fatals)
- 0 shows only Warnings and Faults
- 1-9 shows further information. With 1 you get only a few messages, with 5 quite a lot and with 9 pretty much everything what Gothic can report.
You do not need to manually enter this parameter in GothicStarter.exe. Instead, you can use the zSpy-Messages listbox to set the log level. For this, look into the
documentation for GothicStarter.
For general debugging we recommend level 5. (Setting "zSpy-Messages: more" (G1) or "zSpy-Nachrichten: normal" (G2) in GothicStarter.)
zSpy output
The Spy reports its messages in the following form:
05:06 Info: 5 B: message ... <filename,#line>
First in the line is the time from the start of the gothic.exe
Then follows a code for the type of the message:
- FATAL: critical error (followed by immediate program termination)
- FAULT: normal error, which does not cause a program break, but has the consequences either in the display or in the program functioning.
- WARN: a warning before possible consequences. An error following soon after could (!) be caused by it.
- INFO: general information about the program.
After that there is the level of the message, followed by user-code: D(ieter), U(ulf), B(ert), C(arsten), A(ndre), X=Kurt. Now follows the most important part: the message itself, often with an abbreviation for indicating the program module (for example MDL = 3D-Models). At the end is the location of the message (in the source code).
Tip: In the console, enter "HELP" to print all usable console commands into zSpy window. A list of these commands is also available in
Console commands.
With two of these console commands you can influence the zSpy:
- ZERR LEVEL: set the new level
- ZERR SEARCHSPY: Search for existing zSpy if started later than game, so that it can output the messages.
zSpy configuration
Both the font and the different colors can be configured in zSpy: the program colors the line according to the message type (Fatal, Fault, Warn, Info). Further adjustings can be made in the Logging-Settings. These are in detail:
- The filtering of various message types (Info, Warn, Fault, Critical=Fatal)
- Automatic showing/hiding of the zSpy when starting/ending Gothic
- Logging in a specified file
The Remote-Logging cannot be activated!