all you are doing is adding -rogue before -game, that's the only difference in the command line that you gave me.
The run.bat is not as complicated as it looks
the first line says "change the directory to one level up from the folder this bat is in"
so if you have C:/Quake/Virtuoso/run.bat
when you run the bat it will change the working directory to C:/Quake/ (which is where the engine is)
The next line is a dynamic command line that is provided by the build menu
default_build_menu.xml
The Run Map option works like this:
1) run.bat is started and 3 variables are stuck in it
variable 1: [Engine] - this is a token that is defined at the top of your build menu
variable 2: [GameName] - this is determined by your game pack and in this case will always be Virtuoso
variable 3: "[MapFile]" - this is the full qualified path to your map
Those three variables are considered %1, %2 & %3 by the bat. Where a little bit of confusion may arise is, there is no %3 in the bat, but actually there is. %~n3 is %3 with a ~n in it. ~n means strip the file extension and path from whatever %3 is.
and that's it. It's really a very simple script. It just grabs the vars you put in and places them in the right spot to a complete a proper command line for the engine. Then it executes that line.
RE:
%1 = [Engine] = darkplaces.exe (by default)
%2 = [GameName] = Virtuoso (by default with the virtuoso game pack)
%~n3 = "[MapFile]" = C:/Quake/Virtuoso/maps/yourMap.map (apply ~n) = yourMap
becomes
@cd C:/Quake - this is a bit of a poetic example. As I stated earlier it is really going up one directory level from wherever run.bat is stored. In the case of virtuoso, run.bat is stored one directory level deeper than the engine. So the cd line is really just trying to get to the engine directory and always will as long as virtuoso is on the same level as ID1.
cd - change directory
/d - directory
%~dp0 - this program (ie run.bat)
..\ - go back one directory level
The run.bat is not as complicated as it looks
the first line says "change the directory to one level up from the folder this bat is in"
so if you have C:/Quake/Virtuoso/run.bat
when you run the bat it will change the working directory to C:/Quake/ (which is where the engine is)
The next line is a dynamic command line that is provided by the build menu
default_build_menu.xml
Code:
<var name="Engine">darkplaces.exe</var> <var name="Run">"[EnginePath]/Virtuoso/run.bat</var> <build name="Run Map"> <command>[Run] [Engine] [GameName] "[MapFile]"</command> </build>
1) run.bat is started and 3 variables are stuck in it
variable 1: [Engine] - this is a token that is defined at the top of your build menu
variable 2: [GameName] - this is determined by your game pack and in this case will always be Virtuoso
variable 3: "[MapFile]" - this is the full qualified path to your map
Those three variables are considered %1, %2 & %3 by the bat. Where a little bit of confusion may arise is, there is no %3 in the bat, but actually there is. %~n3 is %3 with a ~n in it. ~n means strip the file extension and path from whatever %3 is.
and that's it. It's really a very simple script. It just grabs the vars you put in and places them in the right spot to a complete a proper command line for the engine. Then it executes that line.
RE:
%1 = [Engine] = darkplaces.exe (by default)
%2 = [GameName] = Virtuoso (by default with the virtuoso game pack)
%~n3 = "[MapFile]" = C:/Quake/Virtuoso/maps/yourMap.map (apply ~n) = yourMap
Code:
cd /d %~dp0..\ %1 -game %2 +map %~n3
Code:
cd C:/Quake darkplaces.exe -game Virtuoso +map yourMap
cd - change directory
/d - directory
%~dp0 - this program (ie run.bat)
..\ - go back one directory level
Comment