Announcement

Collapse
No announcement yet.

Netradiant build menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Netradiant build menu

    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:

    Code:
    <epair name="BuildMenu">A PATH/build_menu.xml</epair>
    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:

    Code:
    <epair name="EnginePath">A PATH</epair>
    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
    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>
    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:

    Code:
    	<build name="hmap build">
    		<command>[hmap2] "[MapFile]"</command>
    		<command>[hmap2] -vis -noambientsky "[MapFile]"</command>
    		<command>[hmap2] -light -extra4x4 "[MapFile]"</command>
    	</build>
    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
    Code:
    cd /d %~dp0
    %1 +map %~n2
    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:

    Code:
    	<build name="skip it">
    		<command>[skip] "[MapFile]"</command>
            </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:

    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>
    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.
    Michael was nice enough to write this up for windows users it works well no doubt so I am moving it to this section for future reference.
    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.
    Last edited by bluntz; 08-17-2012, 02:49 PM.
    WARNING
    May be too intense for some viewers.
    Stress Relief Device
    ....BANG HEAD HERE....
    ---------------------------
    .
    .
    .
    .
    .--------------------------

  • #2
    My issue with the XML it turns out was because it is written for a Q3 compiler and when I tried to use another one for Q1 it caused some problems.Notably Hmap2 is a great compiler but it did not like being asked to compile in 3 modes at once.After Dividing up the load among 3 different compilers the menu works.XML is platform independent so being on Linux was not an issue.
    ..So there is nothing wrong with the menu unless you modify it.
    I did see other instances of folks complaining that XML was trying to pass an argument before a variable was set so it is still likely a poorly coded menu.
    My fix may just be a workaround but I can use it without having to resort to custom scripting,even if it is a better approach in the end.
    My choices of alternative compilers were compiled for x86_64 and included:
    TREEQBSP..by Greg Lewis
    LIGHT.......by Bengt Jardrup
    VIS.......by Bengt Jardrup
    HMAP2...by Lord Havok
    Should anyone be interested or have need of the bins feel free to PM me and I will pass them along.This has been a nice learning experience and I must thank Michael and Jonas for all their kind help.
    Last edited by bluntz; 08-19-2012, 09:58 PM.
    WARNING
    May be too intense for some viewers.
    Stress Relief Device
    ....BANG HEAD HERE....
    ---------------------------
    .
    .
    .
    .
    .--------------------------

    Comment


    • #3
      I am using Debian Squeeze x86_64 and have gotten this Netradiant build from here.http://ingar.satgnu.net/gtkradiant/There are builds for Mac Windows and Linux Deb and RH based.
      Last edited by bluntz; 08-17-2012, 02:59 PM.
      WARNING
      May be too intense for some viewers.
      Stress Relief Device
      ....BANG HEAD HERE....
      ---------------------------
      .
      .
      .
      .
      .--------------------------

      Comment


      • #4
        My issues are small as everything seems to work but just a few snags in the XML I suspect some syntax out of place in my editing.
        I chose Lord Havok's hmap2 compiler to start with since it was the only one I found the source for.I compiled and moved it into /usr/bin for easy access.
        You can find it here:LordHavoc's DarkPlaces Quake Modification
        WARNING
        May be too intense for some viewers.
        Stress Relief Device
        ....BANG HEAD HERE....
        ---------------------------
        .
        .
        .
        .
        .--------------------------

        Comment


        • #5
          Snags

          Console prints a error :for each section that I edited in the menu.
          undefined build variable: "/home/bluntz/netradiant/"
          undefined build variable: "/home/bluntz/netradiant/"
          undefined build variable: "/home/bluntz/netradiant/"
          undefined build variable: "hmap2"
          undefined build variable: "hmap2"
          undefined build variable: "hmap2"
          I wrote a bash script to test the compiler and it output all the files as it should so I eliminated it as the cause.
          What it seems to be doing is running the compiler through the first stage and outputting the results to the map folder.My suspicion is it stops moving to the next step when it finds missing textures.The textures show in the preview however.
          here is the junk.txt
          Attached Files
          Last edited by bluntz; 08-17-2012, 04:02 PM.
          WARNING
          May be too intense for some viewers.
          Stress Relief Device
          ....BANG HEAD HERE....
          ---------------------------
          .
          .
          .
          .
          .--------------------------

          Comment


          • #6
            lol, I have to leave for work literally right now. I will address this at 3am CST tomorrow morning.

            Edt: I already wrote the entire build menu tutorial here. I am not speaking of the one I wrote for you (Bluntz). That link leads to a line by line explanation.
            http://www.nextgenquake.com

            Comment


            • #7
              Looks like that build script uses [RadiantPath] but never defines it.

              Apart from that, fuck Radiant's build menu. I hate XML and I have been using a bash script / bat file to compile my maps for years.

              You can't argue with results

              Scout's Journey
              Rune of Earth Magic

              Comment


              • #8
                Originally posted by Myself
                The [RadiantPath] token is native, Radiant already knows where it is.
                LOL @ can't argue with results. Gimme all your files and I could compile it identical with the Radiant build menu. In other words, your results come from being a highly talented artist, not your method of compiling.

                Beautiful work by the way, gb.

                Now I really gotta get my ass to work...

                peace.
                http://www.nextgenquake.com

                Comment


                • #9
                  Indeed it does GB.
                  However I am just learning this editor and want to iron out any issues before they come back to bite me later.You are a pro who knows what he wants and can make his own solutions.
                  Here is the default_build_menu.xml from the netradiant dir. Not the build_menu.xml from the .netradiant dir. Here is that one also.
                  These are the errors I am getting on map load at the console.
                  Open file /home/bluntz/quake/id1/maps/autosave.map for read...success
                  Texture load failed: "textures/"
                  Doom3LightRadius: failed to parse default light radius
                  map load timer: 0.00 second(s) elapsed
                  --- LoadMapFile ---
                  /home/bluntz/quake/id1/maps/autosave.map
                  12 primitive
                  3 entities
                  And the errors on the console after hitting build.
                  undefined build variable: "/home/bluntz/netradiant/"
                  undefined build variable: "/home/bluntz/netradiant/"
                  undefined build variable: "/home/bluntz/netradiant/"
                  Writing the compile script to '/home/bluntz/.netradiant/1.5.0/qe3bsp.sh'
                  The build output will be saved in '/home/bluntz/.netradiant/1.5.0/junk.txt'
                  Attached Files
                  Last edited by bluntz; 08-17-2012, 04:52 PM.
                  WARNING
                  May be too intense for some viewers.
                  Stress Relief Device
                  ....BANG HEAD HERE....
                  ---------------------------
                  .
                  .
                  .
                  .
                  .--------------------------

                  Comment


                  • #10
                    Fixed the undefined variable error by removing the "]["from the path to radiant tags.Whew that took a crash course in XML
                    OK so now the build menu is fixed..
                    Next up is the Texture errors.
                    WARNING
                    May be too intense for some viewers.
                    Stress Relief Device
                    ....BANG HEAD HERE....
                    ---------------------------
                    .
                    .
                    .
                    .
                    .--------------------------

                    Comment


                    • #11
                      The token is not representative of something else you are supposed to write.

                      Code:
                      [/home/bluntz/netradiant]hmap2
                      should be:

                      Code:
                      [RadiantPath]/hmap2.xxx
                      Where xxx = the extension (ex win = .exe)

                      However your way will also work (without the "[]")

                      Watch, dump this in your build_menu (whichever one you told radiant to use in local.prefs). Actually, back it up and make a new one that is ONLY this. Remember to change my .xxx to the file extension.

                      Code:
                      <?xml version="1.0"?>
                      
                      <project version="2.0">
                      
                              <!-- creates a new token called hmap2 -->
                      	<var name="hmap2">"[RadiantPath]/hmap2.xxx"</var>
                      
                              <!-- the three compile stages in their most basic form utilizing the hmap2 token we created above-->
                      	<build name="Simple Hmap Build">
                      		<command>[hmap2] "[MapFile]"</command>
                      		<command>[hmap2] -vis "[MapFile]"</command>
                      		<command>[hmap2] -light "[MapFile]"</command>
                      	</build>
                      
                      </project>
                      maaaaybe (cause I am not familiar with linux) you dont need the slash after [RadiantPath] and maybe, just maybe you do not need the file extension. However the rest of that is solid and WILL work

                      Code:
                      <!-- stuff -->
                      is a comment in any markup language (html, xml, etc)

                      your textures have to be a wad (unless you are using shaders) and they should be located in your ID1 folder (or mod folder if you got that far). You have to make a brush, select it, open the properties panel, make sure it is on worldspawn and in the "WAD: field" type the name of the wad. hmap can accept multiple wad files separated by semi-colon. You MIGHT need to use complete paths.

                      Example:

                      Wad: id.wad;someOther.wad;anotherCool.wad

                      Complete path example:

                      Wad:C:\Quake\ID1\id.wad;C:\Quake\ID1\someOther.wad ;C:\Quake\ID1\anotherCool.wad

                      barely advanced

                      First off, you can get the BSP2 compilers here. They come with the source. Now, some small talk about this. bjmh light (2) is arguably more robust than hmap2 light and WVis(2) has multi threading so you can vis a map using more than one processor. My personal tastes are to use hmap2 to compile the BSP, especially during testing because it can compile leaky maps with no problem. So let's say you built a room with a bunch of doors that are open to the void, but you wanted to see what you have so far, hmap2 can do this with ease. Then WVis to vis the map, using the -threads switch to utilize my entire machine and then finally use light just because it seems nicer than hmap2 light. Here is a compile script that would utilize all 3. Remember to change .xxx to the proper extension.

                      Code:
                      <?xml version="1.0"?>
                      
                      <project version="2.0">
                      
                              <!-- creates compiler tokens -->
                      	<var name="hmap2">"[RadiantPath]/hmap2.xxx"</var>
                      	<var name="WVis">"[RadiantPath]/WVis.xxx"</var>
                      	<var name="light">"[RadiantPath]/light.xxx"</var>
                      
                              <!-- change -threads switch to the number of available processors you wish to use-->
                      	<build name="Simple Collective Build">
                      		<command>[hmap2] "[MapFile]"</command>
                      		<command>[WVis] -threads 8 "[MapFile]"</command>
                      		<command>[light]  "[MapFile]"</command>
                      	</build>
                      
                      </project>
                      This is quite bare bones. There are quite a few more switches that can be added to the build to advance or even degrade the build time and final result.

                      Can I build from the radiant menu but use a bat for all this shit

                      Yes, absolutely and this would be how I would do it

                      first of all let's create the bat/bash (? I think linux uses $ instead of % ?). Remember to change .xxx to the proper file extension. Place this in your radiant root with your compilers.

                      compiler.bat
                      Code:
                      cd /d %~dp0
                      
                      hmap2.xxx %1
                      Wvis.xxx -threads 8 %1
                      light.xxx %1
                      note: cd /d %~dp0 - changes the directory to the current directory that the .bat resides in. I use this as a failsafe. It may not even be necessary and the syntax may be different in linux. Considering you are putting the bat in the same directory as radiant, this is probably not doing anything. NONE of my compilers or redirect bats are stored in the radiant directory, so for me this is a necessity.

                      now lets create our build
                      Code:
                      <?xml version="1.0"?>
                      
                      <project version="2.0">
                      
                              <!-- turn compiler.bat into a token -->
                      	<var name="compile">"[RadiantPath]/compiler.bat"</var>
                      
                              <!-- inject MapFile as %1 into compiler.bat-->
                      	<build name="I Like To Cheat">
                      		<command>[compile] "[MapFile]"</command>
                      	</build>
                      
                      </project>
                      I do not use this simple method cause of the same reasons I stated before. I want my build menu to work like it is supposed to. However, this method will produce the EXACT same results, it's just an alternate way of achieving them.
                      Last edited by MadGypsy; 08-18-2012, 03:15 AM.
                      http://www.nextgenquake.com

                      Comment


                      • #12
                        your textures have to be a wad (unless you are using shaders) and they should be located in your ID1 folder (or mod folder if you got that far). You have to make a brush, select it, open the properties panel, make sure it is on worldspawn and in the "WAD: field" type the name of the wad. hmap can accept multiple wad files separated by semi-colon. You MIGHT need to use complete paths.

                        Example:

                        Wad: id.wad;someOther.wad;anotherCool.wad

                        Complete path example:

                        Wad:C:\Quake\ID1\id.wad;C:\Quake\ID1\someOther.wad ;C:\Quake\ID1\anotherCool.wad
                        The wads were indeed placed in id1 and do show in the preview window.For whatever reason they seem to be affected by my choice of gridsize.When I change gridsize some of the textures load and some don't.
                        After selecting a brush where do I find this properties panel?make sure it is on worldspawn? OH, you mean the Entities button.
                        Regarding the XML, I have no file extention and do have to remove the bracts.
                        As for those compilers, I will be sticking to hmap2 for this setup throughout.
                        Last edited by bluntz; 08-18-2012, 03:32 PM.
                        WARNING
                        May be too intense for some viewers.
                        Stress Relief Device
                        ....BANG HEAD HERE....
                        ---------------------------
                        .
                        .
                        .
                        .
                        .--------------------------

                        Comment


                        • #13
                          I must admit I am almost having too much fun testing the maps to correct the
                          XML.
                          At least I have determined that it is another issue of it,rather than the textures not loading or a compiler problem.
                          Last edited by bluntz; 08-18-2012, 01:35 PM.
                          WARNING
                          May be too intense for some viewers.
                          Stress Relief Device
                          ....BANG HEAD HERE....
                          ---------------------------
                          .
                          .
                          .
                          .
                          .--------------------------

                          Comment


                          • #14


                            Select a brush that is not an entity and click view/entity inspector (shortcut key = N).

                            If your XML works there is really no reason to "fix" it. I keep pushing (anally) for the exact syntax so you understand what is going on.
                            http://www.nextgenquake.com

                            Comment


                            • #15
                              Only the first level runs as the second and third parameters are not being passed off to the compiler,I can certainly see why everbody just swerves at this point since it becomes such a blast to dive right in!
                              Last edited by bluntz; 08-18-2012, 01:37 PM.
                              WARNING
                              May be too intense for some viewers.
                              Stress Relief Device
                              ....BANG HEAD HERE....
                              ---------------------------
                              .
                              .
                              .
                              .
                              .--------------------------

                              Comment

                              Working...
                              X