TrenchBroom
TrenchBroom copied to clipboard
Add some way to easily create default compilation profiles
Reading through the mapping help thread on func, it becomes apparent that setting up compilation profiles is a major problem for a lot of people. We should come up with a way to generate / prepackage these for some common use cases (e.g. Quake / tyrutils-ericw).
Did you have a solution in mind already or is this open for suggestions?
What if upon the first time compiling, the user is asked for the location of qbsp ,vis, and lit and it plugs them into:
As an addendum to this, if a compile profile is already created, default to highlight the last used profile in the list. It is a slight annoyance to have to click the profile everytime before compiling.
As a possible interesting reference for this issue I'll attach my Quake 3 compile task configs. These correspond to the default compile tasks in netradiant-custom.
As the file currently stands it assumes that the q3map2 executable is named q3map2.x86_64 and that it is in my executable path. Obviously that would need to be changed on other systems.
Example of the standard full compile task I have:
{
"name": "complete final - full",
"tasks": [
{
"target": "${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map",
"type": "export"
},
{
"parameters": "-v -game quake3 -fs_basepath ${GAME_DIR_PATH} -fs_game ${MODS[-1]} -meta ${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map",
"tool": "q3map2.x86_64",
"type": "tool"
},
{
"parameters": "-v -game quake3 -fs_basepath ${GAME_DIR_PATH} -fs_game ${MODS[-1]} -vis -saveprt ${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map",
"tool": "q3map2.x86_64",
"type": "tool"
},
{
"parameters": "-v -game quake3 -fs_basepath ${GAME_DIR_PATH} -fs_game ${MODS[-1]} -light -fast -super 2 -filter -bounce 8 ${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map",
"tool": "q3map2.x86_64",
"type": "tool"
},
{
"source": "${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.bsp",
"target": "${GAME_DIR_PATH}/${MODS[-1]}/maps/${MAP_BASE_NAME}.bsp",
"type": "copy"
}
],
"workdir": "${MAP_DIR_PATH}"
}
If built-in profiles are off the table as mentioned here: https://github.com/TrenchBroom/TrenchBroom/issues/2033#issuecomment-1349649805
Then, hmm. Another possibility would be to add buttons in the Compile window for export/import of a single profile (for import it would be good to support either import from a file or from a URL). Then any TB tutorial, or person helping folks on Discord, could provide a profile for folks to use, without requiring the user to manually mess around with JSON files or type a lot of stuff.
I like something around this idea. I have done this, shared profiles, but the person needs to either replace their files with the one I share, or merge it manually into an existing compile profile which is daunting for new people to TrenchBroom or even mapping period. I think your idea has some merit.
Yes, import/export of profiles is fine and would help. But I think the problem is that setting up a profile in the first place is just too complicated and technical. It's a UX issue.