Skip to content
Emberlynn Bland edited this page Nov 29, 2021 · 14 revisions

This Wiki is outdated and no longer being maintained. Qodot's new documentation can be found here: https://qodotplugin.github.io

Importing Maps to Godot

Qodot works as a bridge between Godot and an external map editor. This lets you iterate on a .map file outside of Godot, come back and see the changes immediately.

Map files can be added anywhere to your Godot project. To bring that map file into a scene, add a QodotMap node (or a derived class), set the "Map File" property to your .map file, and select the custom Full Build button from the top bar:

Quick Build generates a visible mesh with no collision, in case Full Builds take too long.

Using Qodot at Runtime

Qodot can also be used to generate maps at runtime, allowing an exported game to load levels prepared without need of the Godot editor.

To load a map at runtime, setup the appropriate properties on a QodotMap node, then invoke verify_and_build() to start the build.

Note that runtime-loaded maps can only use texture resources that already exist inside your Godot project, as an editor-side import process is necessary before they can be used by the renderer.

Exporting Game Definitions for Trenchbroom

Qodot also features tools to create game definitions for Trenchbroom. Inside of addons/qodot/game_definitions/trenchbroom/ are two example resource files:

  • Qodot_Trenchbroom_Config_Folder.tres produces a folder for the Game Definition
  • Qodot_Trenchbroom_Config_File.tres updates the .cfg file inside the Game Definition folder, if you make any changes

These can be opened and edited by double-clicking on them inside Godot.

After opening Qodot_Trenchbroom_Config_Folder.tres, use the inspector window to give Qodot the path to your /Trenchbroom/games/ folder. Click the Export File checkbox. Your Game Definition should now appear in Trenchbroom. If not, double-check that you're using the .tres for making a Config Folder, and to set the Trenchbroom Games Folder path to the "games" folder in your Trenchbroom installation.

When creating your own game, you should create project-specific versions of the TrenchBroom Config Folder and TrenchBroom Config File resources, as well as one or more FGD resources to store custom entity definitions.

To setup Trenchbroom for use with your Godot project, see Setting Up Trenchbroom for Godot Project Integration

UI Overview