Post by Null on Mar 9, 2015 13:16:07 GMT -5
OUTDATED: Please get TrenchBroom V2 instead:
kristianduske.com/trenchbroom/
-------------
XXX OUTDATED XXX:
How to place custom Models in Trenchbroom 1.0
First make sure you have Trenchbroom 1.0 all set by following the original thread:
leray.proboards.com/thread/3529/trenchbroom-simplest-editor-quake2-addon
Mext you'll need to download models_addon for Trenchbroom in order of have custom model previews in the UI.
(Remember to put models_addon.pak in Addons and models_addon.fgd in Trenchbroom\Resources\Defs)
(Note: Since you can only select one .fgd settings file in Trenchbroom at a time for each map, if you want to have it display both quake2 entities and custom model entities together, merge models_addon.fgd and quake2_addon.fgd into one file, and use that instead.)
Note the .bsp file must match the .map name for override to find it. When you run the button, it will save your map to a .bsp.override with the same name as .map & .bsp name. It'll also automatically substitute all contained model paths with correct names for usermodels, since Trenchbroom doesn't support this natively. Example:
//(MAP)
{
"spawnflags" "0"
"classname" "model_path"
"origin" "96 -944 16"
"angle" "-0"
}
Becomes:
//(OVERRIDE)
{
"spawnflags" "0"
"classname" "model_spawn"
"origin" "96 -944 16"
"angle" "-0"
"usermodel" "model_path"
}
Note: you can use this to place custom entities in your source map files, as well as overrides (which are just a layer overtop of bsp). To place them in your source map file, you'll need to cut and paste the lines from the TB map file into your source map file using a text editor, just before compiling your bsp.
Using Trenchbroom to place models, will speed up your workflow many fold, now that you have drag and drop, and don't have to use the old viewpos method for placement in overrides. Note: optionally you can adjust the bounding boxes for any of the models if they're using the solid spawnflag. For the entities you use a lot, you can fine tune the bounding boxes in the .fgd file to make placement even easier. So you can open up model_addon.fgd and edit the entity bounding box by adjusting it's size value so it doesn't clip the floor so much. For example you can change the size from: size(-10 -10 -10, 10 10 10) to size(-10 -10 -20, 10 10 10) to adjust its bottom, which is probably all you need for snapping to the floor. But when you do, make sure it's not too much and doesn't clip the floor plane, and it still shows up in the game. When placing models, remember to use Alt in TB to move up and down in combination with Ctrl - Plus/Minus to adjust move increment, and R to rotate.
Here's how you can bring over a map from Quark to TB manually:
Open your map in Quark, next...
File -> Save in Quark Explorer (This will open a new window)
Games -> Quake -> Quake 1 (This will change the mode to TB-Q1 format, it will also get rid of surface flags)
File -> Save object as file...
Save as type: Quake .map file (*.map) (Next you'll be able to open your map in Trenchbroom 1.0)
kristianduske.com/trenchbroom/
-------------
XXX OUTDATED XXX:
How to place custom Models in Trenchbroom 1.0
First make sure you have Trenchbroom 1.0 all set by following the original thread:
leray.proboards.com/thread/3529/trenchbroom-simplest-editor-quake2-addon
Mext you'll need to download models_addon for Trenchbroom in order of have custom model previews in the UI.
(Remember to put models_addon.pak in Addons and models_addon.fgd in Trenchbroom\Resources\Defs)
(Note: Since you can only select one .fgd settings file in Trenchbroom at a time for each map, if you want to have it display both quake2 entities and custom model entities together, merge models_addon.fgd and quake2_addon.fgd into one file, and use that instead.)
Note the .bsp file must match the .map name for override to find it. When you run the button, it will save your map to a .bsp.override with the same name as .map & .bsp name. It'll also automatically substitute all contained model paths with correct names for usermodels, since Trenchbroom doesn't support this natively. Example:
//(MAP)
{
"spawnflags" "0"
"classname" "model_path"
"origin" "96 -944 16"
"angle" "-0"
}
Becomes:
//(OVERRIDE)
{
"spawnflags" "0"
"classname" "model_spawn"
"origin" "96 -944 16"
"angle" "-0"
"usermodel" "model_path"
}
Note: you can use this to place custom entities in your source map files, as well as overrides (which are just a layer overtop of bsp). To place them in your source map file, you'll need to cut and paste the lines from the TB map file into your source map file using a text editor, just before compiling your bsp.
Using Trenchbroom to place models, will speed up your workflow many fold, now that you have drag and drop, and don't have to use the old viewpos method for placement in overrides. Note: optionally you can adjust the bounding boxes for any of the models if they're using the solid spawnflag. For the entities you use a lot, you can fine tune the bounding boxes in the .fgd file to make placement even easier. So you can open up model_addon.fgd and edit the entity bounding box by adjusting it's size value so it doesn't clip the floor so much. For example you can change the size from: size(-10 -10 -10, 10 10 10) to size(-10 -10 -20, 10 10 10) to adjust its bottom, which is probably all you need for snapping to the floor. But when you do, make sure it's not too much and doesn't clip the floor plane, and it still shows up in the game. When placing models, remember to use Alt in TB to move up and down in combination with Ctrl - Plus/Minus to adjust move increment, and R to rotate.
Here's how you can bring over a map from Quark to TB manually:
Open your map in Quark, next...
File -> Save in Quark Explorer (This will open a new window)
Games -> Quake -> Quake 1 (This will change the mode to TB-Q1 format, it will also get rid of surface flags)
File -> Save object as file...
Save as type: Quake .map file (*.map) (Next you'll be able to open your map in Trenchbroom 1.0)