Originally posted by MadGypsy
View Post
1) download this, unzip it and stick it in your root radiant folder. I included the reference material for the compilers. This will explain the available compile switches for each
2) you need to find local.prefs. This file is probably located in your version of windows path that is equivalent to this:
C:\Documents and Settings\You\Application Data\RadiantSettings\1.5.0\something.game\local.prefs
you need to find:
Make sure that A PATH is the path to build_menu.xml (ex: C:\A PATH\build_menu.xml ). This should be in the same folder as local.prefs. It should also already be correct.
then find:
A PATH needs to equal the path to your game engine. Only the path (ex: C:\Quake\)
Next open up build_menu.xml and overwrite the entire thing with this
NOTE: This is a working EXAMPLE! You will need to change darkplaces.exe to the engine you use. The example part is that you can mix and match these compilers in a number of ways and they all have special compile switches (ex -extra4). Read the refs (included). Do not change my [Tokens], they have to be there and they have to be what they already are! However, you could add a custom build. For instance:
Next you need to make Run.bat and put it in your root engine folder
run.bat - paste in a blank text doc and save as run.bat
Note: I have stripped out working from a mod folder, because you need to learn how to walk before you run. There are a few more steps to getting a mod folder working in GTKRadiant using my method. GTKRadiant does not like mod folders and you have to cheat. Cheating involves understanding this first.
Lastly go to your root radiant folder and open /game/q1.game. Make sure your enginepath_win32= is correct. I'm suspicious that this matters not-at-all, but it can't hurt to set it.
What is exactly going on:
Your build menu defines all your tools which are then re-used as tokens in the commands, some of these tokens are defined in local.prefs (EnginePath for instance - actually that's the only one). The [RadiantPath] token is native, Radiant already knows where it is. When you open Radiant and click build you should see the options Full and RunMap. If you would like to add newskip, add this build:
That would add a new option to the list named "skip it". Conversely you could just combine it all into one build. Like this:
This would add a build option named "hmap build skip and run" (except that is probably too many characters). You can add as many build nodes as you desire. You are only limited by the height of your screen.
GTKRadiant has a shitty "run map" feature that doesn't work. My run build coupled with my bat fixes this. Use that instead of the built in radiant "run map" feature.
Final
In a sense, you could skip a whole freakin lot of this and just write a bat that does the work. I am a purist. If Radiant is intended to let you build and run from within the editor, then that is what I want it to do. I mastered this crap. There are posts on here that are the equivalent of "FOK RADIANTS BUILD MENU!" (I exaggerate). I couldn't agree more, except for the fact that I disagree (you read that right). I showed you how to manipulate Radiant, not railroad it for the sense of ease. It's a lot of stupid bullshit, but when you have it set up properly and you understand what you did, you will have a Radiant that is doing it's damn job, instead of external scripts and pointless navigation every time you want to compile a map.
You must always compile a map in this order BSP, VIS, LIGHT, EXTRA CRAP (newskip). I believe that is all. If you have any problems, explain them as detailed as you can and I will solve them. If you need more info on the build menu that I left for you as sort of a simple puzzle, simply ask. I will go line by line and explain the entire thing if you would like.
your buddy and pal,
Michael
Shout Out: Thank you to my heroes Golden_Boy and Seven for unknowingly being my heroes and pushing me to learn/figure out all of this stuff with your excellent creations and inspiring threads.
2) you need to find local.prefs. This file is probably located in your version of windows path that is equivalent to this:
C:\Documents and Settings\You\Application Data\RadiantSettings\1.5.0\something.game\local.prefs
you need to find:
Code:
<epair name="BuildMenu">A PATH/build_menu.xml</epair>
then find:
Code:
<epair name="EnginePath">A PATH</epair>
Next open up build_menu.xml and overwrite the entire thing with this
Code:
<?xml version="1.0"?> <project version="2.0"> <!-- engine/mod/QC config vars --> <var name="Engine"> "darkplaces.exe" </var> <!-- relies on above config vars --> <var name="Run"> "[EnginePath]run.bat" </var> <!-- hmap2 compiler --> <var name="hmap2"> "[RadiantPath]/compilers/map2/hmap2.exe" </var> <!-- bsp1 compilers --> <var name="bsp"> "[RadiantPath]/compilers/map1/txqbsp.exe" </var> <var name="vis"> "[RadiantPath]/compilers/map1/wvis.exe" </var> <var name="light"> "[RadiantPath]/compilers/map1/light.exe" </var> <!-- newskip tool --> <var name="skip"> "[RadiantPath]/compilers/newskip.exe" </var> <build name="Full"> <command>[hmap2] "[MapFile]"</command> <command>[vis] -threads 1 "[MapFile]"</command> <command>[light] -extra4 "[MapFile]"</command> </build> <build name="Run Map"> <command>[Run] [Engine] "[MapFile]"</command> </build> </project>
Code:
<build name="hmap build"> <command>[hmap2] "[MapFile]"</command> <command>[hmap2] -vis -noambientsky "[MapFile]"</command> <command>[hmap2] -light -extra4x4 "[MapFile]"</command> </build>
run.bat - paste in a blank text doc and save as run.bat
Code:
cd /d %~dp0 %1 +map %~n2
Lastly go to your root radiant folder and open /game/q1.game. Make sure your enginepath_win32= is correct. I'm suspicious that this matters not-at-all, but it can't hurt to set it.
What is exactly going on:
Your build menu defines all your tools which are then re-used as tokens in the commands, some of these tokens are defined in local.prefs (EnginePath for instance - actually that's the only one). The [RadiantPath] token is native, Radiant already knows where it is. When you open Radiant and click build you should see the options Full and RunMap. If you would like to add newskip, add this build:
Code:
<build name="skip it"> <command>[skip] "[MapFile]"</command> </build>
Code:
<build name="hmap build skip and run"> <command>[hmap2] "[MapFile]"</command> <command>[hmap2] -vis -noambientsky "[MapFile]"</command> <command>[hmap2] -light -extra4x4 "[MapFile]"</command> <command>[skip] "[MapFile]"</command> <command>[Run] [Engine] "[MapFile]"</command> </build>
GTKRadiant has a shitty "run map" feature that doesn't work. My run build coupled with my bat fixes this. Use that instead of the built in radiant "run map" feature.
Final
In a sense, you could skip a whole freakin lot of this and just write a bat that does the work. I am a purist. If Radiant is intended to let you build and run from within the editor, then that is what I want it to do. I mastered this crap. There are posts on here that are the equivalent of "FOK RADIANTS BUILD MENU!" (I exaggerate). I couldn't agree more, except for the fact that I disagree (you read that right). I showed you how to manipulate Radiant, not railroad it for the sense of ease. It's a lot of stupid bullshit, but when you have it set up properly and you understand what you did, you will have a Radiant that is doing it's damn job, instead of external scripts and pointless navigation every time you want to compile a map.
You must always compile a map in this order BSP, VIS, LIGHT, EXTRA CRAP (newskip). I believe that is all. If you have any problems, explain them as detailed as you can and I will solve them. If you need more info on the build menu that I left for you as sort of a simple puzzle, simply ask. I will go line by line and explain the entire thing if you would like.
your buddy and pal,
Michael
Shout Out: Thank you to my heroes Golden_Boy and Seven for unknowingly being my heroes and pushing me to learn/figure out all of this stuff with your excellent creations and inspiring threads.
Following directions as best I can partially works on Linux but generates some errors as well as missing some steps in the build.It does however generate .bsp's into the maps dir right out of box.
Comment