FGD (Forge Game Data) parser for Godot
- Make sure tbloader is installed and you have added the
tb-gameconfig
folder (from the tbloader repo) into the trenchbroom games folder. - Add the game path to your game root in the Trenchbroom settings.
- Run
run.sh
to compile the fgd file - At the bottom of the Trenchbroom right hand panel there is an option to add "External" fgd files. Add the generated one to your map.
- You can now use the entities in your map.
The script will process all .tscn and .gd files in the entities folder. It will gather the exported variables and generate a fgd file that can be used in Trenchbroom.
When exporting these variables, they will be used to configure the entity for use with Trenchbroom.
fgd_solid
- Whether the entity is a SolidClass/Brush or not. i.etrue
fgd_size
- The scale factor for the entity in trenchbroom. i.e4
fgd_color
- The color of the entity in trenchbroom. i.e0 255 0
(yellow)fgd_model
- The model settings for the entity in trenchbroom. See an example here.fgd_block
- An array of variables NOT to export. i.e["my_var", "bar"]
Different variable types will have different controls in Trenchbroom.
- bool - 1 or 0 in an input box
- string - text input
- int - number input
- float - number input
- Color - color picker
- string array - drop down list (choices)
- dictionary - checkboxes (flags)
- Make sure the model actually exists
- Make sure you have set the game path in Trenchbroom settings.
- Make sure the entities folder exists and that it is configured correctly in tbloader.