Table of Contents

Ingame Tools

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:

Hotkeys



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.

Debug Tool Window

The debug tool window has several tabs with different functions that are described below. It can be opened with AltGr + D.

Main

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:

Framebuffers

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.

Textures

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.

Draw Calls

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:

Animals

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.

Environment

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.

Dump

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.

Crash

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.

Console

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:

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.