Today I've been setting up Godot plugin Qodot, and level editor Trenchbroom, for my new project on my Arch Linux where I haven't done that before.
It remains convoluted. Perhaps that's unavoidable.
Trenchbroom is not available in the main Arch repositories, but it is in the AUR so I got it from there.
I was intending to use the old version of Qodot from Wanderer, but unfortunately there's some kind of incompatibility with the new version of Trenchbroom. So, I cloned Qodot's repo.
The new Qodot doesn't use C#? The first version I used, for Godot 3 with the 3D car, didn't, and then Wanderer's version does, and this new version doesn't. Curious.
As with all addons, Qodot is added to the res://addons
folder, enabled in Project Settings, then the project is reloaded for good measure.
Qodot can create a Game Configuration for Trenchbroom to work with. This contains the entity definitions for brush entities such as sliding panels, and point entities such as spawn points. The game configuration probably contains other things too :)
Creating a game configuration is done by first opening the res://addons/qodot/game_definitions/trenchbroom_game_config.tres
file with Qodot. We need to give it the path of Trenchbroom's games
folder - on Windows this was inside Trenchbroom's directory, but on Linux it's ~/.TrenchBroom/games
. We need to give the game configuration a name. Lastly, we need to give it one or more "FGD" definitions inside the Fgd Files
array. I believe by default it already contained the res://addons/qodot/game_definitions/fgd/qodot_fgd.tres
file. With these things set up, press the Export File button to create a new game configuration for Trenchbroom.
I went to create a new FGD, so it would be all set up when I was ready to start making my own entity definitions. But the new Qodot is missing the essentials_fgd.tres
file so I'll have to figure out what to do there.
Now we can open Trenchbroom and create a new map. We'll be able to pick our new game as the target. Opening the new map, we notice that there aren't any textures available!
You do have your textures ready, don't you? Trenchbroom looks for a textures
folder, that contains any number of subfolders, and it is in these subfolders that the textures reside. For instance, in my new game I'm going to use the Modern Exteriors pack by limezu and the texture files are in textures/Modern_Exteriors_Complete_Singles_16x16
.
In Wanderer I created a folder called trenchbroom
in the project directory and I put all the Trenchbroom-related files I had in there, textures included. I'll do the same thing here.
Trenchbroom needs to be told where to find game files. Go to View -> Preferences, select the new game from the list, and set its Game Path to the aforementioned trenchbroom
folder. Now Trenchbroom will be able to find your textures, and they will be available in the Texture Browser.
In Wanderer I have entity definitions for doors, farmland, switches, signs, water... It takes some work to set them up, but you can place them around the level in Trenchbroom and have them generated alongside the level geometry by Qodot. It's very handy.