Advertisement
Guest User

DagF's sample script

a guest
Nov 14th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 4.04 KB | None | 0 0
  1. @echo off
  2. title Batch Ccompiler v1.2 - Working with : %~n1
  3. color 70
  4.  
  5. :Start
  6. cls
  7.  
  8. rem Get paths
  9. rem complie lines
  10. set __BSP=-v -meta
  11. set __VIS=-vis
  12. set __LIGHT=-light -filter -shade -patchshadows -dark -samples 2 -lightmapsize 256
  13.  
  14. rem bot compile
  15. set __ASS=-forcesidesvisible -optimize
  16.  
  17. rem paths
  18. set __BasePath=D:\urtmapping\
  19.  
  20. set __FSGame=q3ut4
  21. set __GameEXE=iourbanterror.exe
  22. set __CompilerPath=D:\gtk1.6\q3map2_urt.exe
  23. set __BSPPath=compile\sfs\bsp.exe
  24. set __BSPCPath=compile\bots\bspc.exe
  25.  
  26. cd %__BasePath%
  27.  
  28.  
  29. :MainMenu
  30. cls
  31.  
  32. echo 0. Refresh
  33. echo 1. Test Compile
  34. echo 2. Devmap
  35. echo 3. Compile
  36. echo 4. Surface Sound
  37. echo 5. bots
  38. echo 6. Autoscript
  39. echo 7. Convert
  40. echo 8. Settings
  41. echo 9. Exit
  42.  
  43.  
  44. CHOICE /C 0123456789 /N /M "Choose a option."
  45.  
  46.  
  47. if errorlevel 10 goto :Exit
  48. if errorlevel 9 goto :Settings
  49. if errorlevel 8 goto :Convert
  50. if errorlevel 7 goto :AS
  51. if errorlevel 6 goto :BOT
  52. if errorlevel 5 goto :SFS
  53. if errorlevel 4 goto :Compile
  54. if errorlevel 3 goto :Devmap
  55. if errorlevel 2 goto :TestCompile
  56. if errorlevel 1 goto :Start
  57.  
  58. goto :MainMenu
  59.  
  60.  
  61.  
  62. :TestCompile
  63. cls
  64.  
  65. time /T
  66. echo STARTING BSP:
  67. start /low /B /wait %__CompilerPath% -v -meta -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.map"
  68.  
  69. time /T
  70. echo STARTING VIS:
  71. start /low /B /wait %__CompilerPath% -v -vis -fast -fs_basepath %__basePath% -fs_game %__FSGame% "%~d1%~p1%~n1.bsp"
  72.  
  73. time /T
  74. echo STARTING RAD:
  75. start /low /B /wait %__CompilerPath% -v -light -fast -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.bsp"
  76. rem -shade makes nice shadows
  77. goto :MainMenu
  78.  
  79.  
  80.  
  81. :Devmap
  82. start %__basepath%%__GameEXE% +sv_pure 0 +r_gamma 1 +devmap %~n1
  83. goto :MainMenu
  84.  
  85.  
  86.  
  87. :Compile
  88.  
  89. time /T
  90. echo STARTING BSP:
  91. start /normal  /B /wait %__CompilerPath% %__BSP% -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.map"
  92.  
  93. time /T
  94. echo STARTING VIS:
  95. start /normal   /B /wait %__CompilerPath% %__VIS% -fs_basepath %__basePath% -fs_game %__FSGame% "%~d1%~p1%~n1.bsp"
  96.  
  97. time /T
  98. echo STARTING RAD:
  99. start /normal  /B /wait %__CompilerPath% %__LIGHT% -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.bsp"
  100.  
  101. goto :MainMenu
  102.  
  103.  
  104.  
  105. :SFS
  106.    
  107. start "Making .surface file" /B /wait %__BasePath%%__BSPPath% -se %~d1%~p1%~n1.bsp %~d1%~p1%~n1.surface
  108. start "Opening surface sounds" /B compile/sfs/surfacesounds.surface "C:\Program Files (x86)\Windows NT\Accessories\wordpad.exe"                                       rem C:\Program Files (x86)\Windows NT\Accessories\
  109. Start "Editing . surface file" /B /wait %~d1%~p1%~n1.surface "C:\Program Files (x86)\Windows NT\Accessories\wordpad.exe"                                  rem C:\Program Files (x86)\Windows NT\Accessories\
  110. start "Applying .surface file to .bsp" /B /wait %__BasePath%%__BSPPath% -si %~d1%~p1%~n1.bsp %~d1%~p1%~n1.surface
  111.  
  112. pause
  113. goto :MainMenu
  114.  
  115.  
  116.  
  117. :BOT
  118. time /T
  119. echo STARTING Bots:
  120.  
  121.  
  122. start /low /B /wait %__BasePath%%__BSPCPath% -bsp2aas "%~d1%~p1%~n1.bsp" %__ASS%
  123. goto :MainMenu
  124.  
  125.  
  126.  
  127. :AS
  128. echo not done yet
  129. pause
  130. goto :MainMenu
  131.  
  132.  
  133.  
  134. :Convert
  135. cls
  136.  
  137. echo 0. map to ase
  138. echo 1. bsp to ase
  139. echo 2. bsp to map
  140. echo 3. Main Menu
  141.  
  142.  
  143. CHOICE /C 0123 /N /M "Choose a option."
  144.  
  145. if errorlevel 4 goto :MainMenu
  146. if errorlevel 3 goto :Convert_bsp_map
  147. if errorlevel 2 goto :Convert_bsp_ase
  148. if errorlevel 1 goto :Convert_map_ase
  149.  
  150. goto :MainMenu
  151.  
  152.  
  153.  
  154. :Convert_map_ase
  155. start /low /B /wait %__BasePath%%__CompilerPath% -v -meta -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.map"
  156. start /low /B /wait %__BasePath%%__CompilerPath% -convert -format ase -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.bsp"
  157.  
  158. goto :MainMenu
  159.  
  160.  
  161.  
  162. :Convert_bsp_ase
  163. start /low /B /wait %__BasePath%%__CompilerPath% -convert -format ase -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.bsp"
  164.  
  165. goto :MainMenu
  166.  
  167. :Convert_bsp_map
  168. start /low /B /wait %__BasePath%%__CompilerPath% -convert -format map -fs_basepath %__BasePath% -fs_game %__FSGame% "%~d1%~p1%~n1.bsp"
  169.  
  170. goto :MainMenu
  171.  
  172.  
  173.  
  174. :Settings
  175. notepad.exe "compile_v.1.1.bat"
  176. goto :MainMenu
  177.  
  178.  
  179.  
  180. :Exit
  181. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement