There are several tools available ingame to test and debug content. To activate these features, the debug mode has to be enabled. To do this, change the according debugMode
value in the settings.lua to true
or toggle the option in the game settings advanced options.
Once enabled, you have:
The following hotkeys are available with activated debug mode:
(In the US keyboard layout, the AltGr key is the right Alt)
Hotkey | Function |
---|---|
AltGr + A | Reload sound sets |
AltGr + B | Show bounding boxes |
AltGr + D | Open Debug Tool Window (see below) |
AltGr + E | Show chunk refresh |
AltGr + G | Hide user interface |
AltGr + I | Show GPU workload statistics and simulation diagrams |
AltGr + L | Show lanes |
AltGr + R | Recompile shaders (keep existing when compilation fails) |
AltGr + Z | Open camera tool |
In general, most of these modes can be switched on and off by repeating the keyboard combination.
The debug tool window has several tabs with different functions that are described below. It can be opened with AltGr + D.
The MAIN tab has several options regarding rendering and miscellaneous other tools.
In the General section, the current cursor position is shown with all three coordinates.
The Rendering options cover several modes that are available as Hotkeys as well as some others:
The Simulation options provide buttons to increase the simulation speed up to 32 compared to the regular maximum of 4.
Finally the UI Debug tools have two tools:
Some rendering intermediate frames can be reached in the FRAMEBUFFERS tab. These are:
The views depend on the current main viewport and can be scaled to various sizes.
To get an overview over the currently loaded textures, the TEXTURES tab can be used. It shows a complete folder tree with all loaded textures or only the subset with file sizes larger than the Threshold that can be set in the text box at the bottom edge.
The DRAW CALLS tab lists all current draw calls proceeded by the engine. There are several different properties listed in the top section:
Below is a sortable table with different columns:
either
opaque for non transparent materials or transp
for transparent materials.tris
for triangle based objects. points
are very rare.There is a dropdown where the score maps for animals can be selected. They are visualized with red and blue colors. The current animal movements and distribution can be shown with the two buttons at Debug rendering below.
The settings of environments can be tested live in the ENVIRONMENT tab. It provides several input fields to test the different properties. See the documentation of environments for more information on their meaning.
At the bottom is a Load From Camera Tool and a Save to Camera Tool button. These can be used to temporarily store an environment setting for the use in the camera tool.
A list of component types of an entity can be gathered from the Entity information dump. By entering an entity id, confirming it with REFRESH and pressing GOTO, it is possible to jump to the entity on the map.
The last tab CRASH provides several buttons that can be used to force a crash of the game. Usually this is not needed for modders, but if you like you can test various ways of forced crashes there.
The ingame console can be used to see the output that is written in the stdout.txt as well as to test and execute lua commands. The console can be opened and closed by default with the key below the ESC key. Depending on your keyboard layout it could be either `, § or ^.
You can execute lua commands in the command line by typing them and pressing ENTER. To enter complex statements with several lines of code, simply press ENTER inbetween. The console will execute the commands once syntactically complete, even if they span over many lines.
There are some assisting commands available:
\help
shows this list of available shortcuts and assisting commands. \clear
clears the console.\stdout <on|off>
regulates the output in stdout.txt
. Default is on
. If set to off
there will be no output in the stdout.txt
.\timestamp <on|off>
shows timestamp in front of output if set to on
. Default is off
.\scrlk <on|off>
does not jump to the bottom if new output appears if set to on
. Default is off
.\history
prints a history of recent sent commands.You may use the Up and Down keys to recall and cycle through the recent sent commands from the history.
To see a list of available functions, press CTRL + SPACE. This opens the autocomplete menu. You may use the Up and Down keys or the scroll wheel to navigate in the autocomplete menu. Press ENTER or click on a command to add the selected command to the console command line.
If you press TAB in the command line, the command will be completed if it can be completed unambiguously. Pressing TAB twice prints the available commands from the current autocomplete menu view to the console.