Back to Editor's Guide
Debugging Tips
You can turn debugging output on or off during the game by typing "-debug on" or "-debug off" as a chat command (or just type "-debug" to toggle). If you need debugging information at the very start of the map, or if you just get tired of typing -debug, you can cause your player name to be automatically added to the debugging group. Go to the "Map Initialization" trigger (Initialization category) and find this part of the trigger:
Simply add a new condition with your player name to the list.
If you need more information about what a particular trigger is doing, just have it display text messages to the DebugPlayers group with whatever information you need.
When you're done debugging a specific problem, you can leave in any messages that will provide useful context to future debuggers, but please remove or disable anything that will generate a big flood of messages, or that would reveal any information that could give the debugging players an unfair advantage in a real game.
If you're trying to test a specific Haunt, you'll probably want to play that Haunt every time. Go to the "Select Haunt" trigger (Random Forest Generation category):
The disabled line near the end can force a specific Haunt to always be played. Enable it, and set it to the Haunt of your choice. Make sure to disable it again when you're done.
If you need to use a specific hero for testing purposes, find the "Choose Hero" building (in Units/Custom/Human/Melee/Buildings) and add your hero of choice to the "Techtree - Units Sold" field. Remember to remove it when you're done.
Back to Editor's Guide