Difference between revisions of "Script/Debugging"
(Created page with "= Tools for Debugging and Testing = This page contains useful tips and tricks for checking for flaws in your script code and making testing in general a bit easier. == Debug...") |
(No difference)
|
Revision as of 08:52, 3 April 2017
Contents
Tools for Debugging and Testing
This page contains useful tips and tricks for checking for flaws in your script code and making testing in general a bit easier.
Debug Menu
The first place to go if you're having a problem or just want to make your life easier is the debug menu, which you can open at any time by pressing Ctrl + D.
You can open any sub menu/execute any function by pressing the corresponding key combination. Below is a list of some of the most commonly useful menus and features.
Dialogues
To check the current state of your dialogues and to lock/unlock certain topics for testing purposes, you can use the dialogue debug menu accessible via Ctrl + H -> Alt + D. This menu provides extensive information about all dialogues and highlights potential problems/reasons why your dialogue might not behave as intended (look for anything that's marked in a bright red).
Global Variables
To display a list of all the global variables currently in use along with their values, you can use the the menu under Ctrl + G -> Alt + V.
Creature Behavior
If a creature does not behave the way you expect them to, you can tell the game to print a detailed history of their actions and received commands to the dev console. To do so, open the creature debug menu using Ctrl + C, then display the creature's action and animation details using Alt + B. Finally, locate the creature whose actions you want to track and click on the "Track" button above it. In the dev console, you should then see the confirmation New target set for history log: <Creature Name> (id: xxx). To display only the creature's action history in the console, use the cr filter at the top.