Source Tools.bci 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. // Specification: Source Tools
  2. // Written by: Ryan Gregg
  3. // Version: N/A
  4. // Created: November 5, 2004
  5. // Last updated: Febuary 23, 2005
  6. // Updated by: Ryan Gregg
  7. // Date: Febuary 23, 2005
  8. // Updated all tools to refelect changes to the SDK.
  9. // Updated by: Ryan Gregg
  10. // Date: December 1, 2004
  11. // Added BinRoot and ValveProject variables.
  12. Include "Templates.bci"
  13. Variable
  14. {
  15. Name "BinRoot"
  16. Type "Folder"
  17. Optional "True"
  18. Hint "SDK bin directory.\n...\\Steam\\SteamApps\\<User Name>\\sourcesdk\\bin\\"
  19. }
  20. Variable
  21. {
  22. Name "ValveProject"
  23. Type "Folder"
  24. Optional "True"
  25. Hint "The directory your gameinfo.txt is located in."
  26. }
  27. Batch
  28. {
  29. Name "Source Tools"
  30. Priority "2"
  31. Links "Source SDK,http://www.valve-erc.com/srcsdk/"
  32. Filter "Supported Files|*.vmf;*.bsp|VMF Files (*.vmf)|*.vmf|BSP Files (*.bsp)|*.bsp"
  33. Stages "BSP|VIS|RAD|Shared|ZIP"
  34. Template "@echo off\n"_
  35. "set VPROJECT=${ValveProject}\n"_
  36. "cd ${BinRoot}\n"_
  37. "\"${StagePath=BSP}\" ${StageParam=BSP} \"${FilePath}\\${FileName}\"\n"_
  38. "if ERRORLEVEL 1 goto failed\n"_
  39. "\"${StagePath=VIS}\" ${StageParam=VIS} \"${FilePath}\\${FileName}\"\n"_
  40. "if ERRORLEVEL 1 goto failed\n"_
  41. "\"${StagePath=RAD}\" ${StageParam=RAD} \"${FilePath}\\${FileName}\"\n"_
  42. "if ERRORLEVEL 1 goto failed\n"_
  43. "\"${StagePath=ZIP}\" ${StageParam=ZIP}\n"_
  44. "if ERRORLEVEL 1 goto failed\n"_
  45. "goto succeeded\n"_
  46. ":failed\n"_
  47. "echo.\n"_
  48. "echo There was a problem compiling your map, check your ${FileName}.log file for errors.\n"_
  49. ":succeeded\n"_
  50. "echo.\n"_
  51. "${LogViewerRun}\n"
  52. }
  53. Batch
  54. {
  55. Name "BSP"
  56. Priority "1"
  57. Stages "BSP|Shared"
  58. Filter "VMF Files (*.vmf)|*.vmf"
  59. Template "@echo off\n"_
  60. "set VPROJECT=${ValveProject}\n"_
  61. "cd ${BinRoot}\n"_
  62. "\"${StagePath=BSP}\" ${StageParam=BSP} \"${FilePath}\\${FileName}\"\n"_
  63. "${LogViewerRun}\n"
  64. }
  65. Batch
  66. {
  67. Name "VIS"
  68. Priority "1"
  69. Stages "VIS|Shared"
  70. Filter "VMF Files (*.vmf)|*.vmf"
  71. Template "@echo off\n"_
  72. "set VPROJECT=${ValveProject}\n"_
  73. "cd ${BinRoot}\n"_
  74. "\"${StagePath=VIS}\" ${StageParam=VIS} \"${FilePath}\\${FileName}\"\n"_
  75. "${LogViewerRun}\n"
  76. }
  77. Batch
  78. {
  79. Name "RAD"
  80. Priority "1"
  81. Stages "RAD|Shared"
  82. Filter "VMF Files (*.vmf)|*.vmf"
  83. Template "@echo off\n"_
  84. "set VPROJECT=${ValveProject}\n"_
  85. "cd ${BinRoot}\n"_
  86. "\"${StagePath=RAD}\" ${StageParam=RAD} \"${FilePath}\\${FileName}\"\n"_
  87. "${LogViewerRun}\n"
  88. }
  89. Batch
  90. {
  91. Name "ZIP"
  92. Priority "1"
  93. Stages "ZIP"
  94. Filter "VMF Files (*.vmf)|*.vmf"
  95. Template "@echo off\n"_
  96. "set VPROJECT=${ValveProject}\n"_
  97. "cd ${BinRoot}\n"_
  98. "\"${StagePath=ZIP}\" ${StageParam=ZIP}\n"
  99. }
  100. //
  101. // BSP
  102. //
  103. Stage
  104. {
  105. Name "BSP"
  106. Title "Binary Space Partition"
  107. Type "Program"
  108. Filter "VBSP (vbsp.exe)|vbsp.exe"
  109. CheckBox
  110. {
  111. Name "Bump All"
  112. Param "-bumpall"
  113. Hint "\tForce all surfaces to be bump mapped."
  114. }
  115. CheckBox
  116. {
  117. Name "Dump Collide"
  118. Param "-dumpcollide"
  119. Hint "\tWrite files with collision info."
  120. }
  121. CheckBox
  122. {
  123. Name "Dump Static Props"
  124. Param "-dumpstaticprop"
  125. Hint "\tDump static props to staticprop*.txt."
  126. }
  127. CheckBox
  128. {
  129. Name "Full Detail"
  130. Param "-fulldetail"
  131. Hint "\tMark all detail geometry as normal geometry (so all detail geometry will affect visibility)."
  132. }
  133. CheckBox
  134. {
  135. Name "GLView"
  136. Bold "True"
  137. Param "-glview"
  138. Hint "\tWrites .gl files in the current directory that can be viewed with glview.exe. If you use -tmpout, it will write the files into the \\tmp folder."
  139. }
  140. CheckBox
  141. {
  142. Name "Keep Stale Zip"
  143. Param "-keepstalezip"
  144. Hint "\tKeep the BSP's zip files intact but regenerate everything else."
  145. }
  146. CheckBox
  147. {
  148. Name "Leak Test"
  149. Param "-leaktest"
  150. Hint "\tStop processing the map if a leak is detected. Whether or not this flag is set, a leak file will be written out at <vmf filename>.lin, and it can be imported into Hammer."
  151. }
  152. CheckBox
  153. {
  154. Name "Light If Missing"
  155. Param "-lightifmissing"
  156. Hint "\tForce lightmaps to be generated for all surfaces even if they don't need lightmaps."
  157. }
  158. CheckBox
  159. {
  160. Name "No Detail"
  161. Param "-nodetail"
  162. Bold "True"
  163. Hint "\tGet rid of all detail geometry. The geometry left over is what affects visibility."
  164. }
  165. CheckBox
  166. {
  167. Name "No Linux Data"
  168. Param "-nolinuxdata"
  169. Hint "\tBy default, BSP writes physics data for linux servers. This parameter disables writing linux physics data into the map."
  170. }
  171. TextBox
  172. {
  173. Name "Additional Parameters"
  174. Type "String"
  175. Quote "False"
  176. Size "3"
  177. Hint "\tAdd additional parameters here as you would a command line."
  178. }
  179. CheckBox
  180. {
  181. Name "No Water"
  182. Param "-nowater"
  183. Bold "True"
  184. Hint "\tGet rid of water brushes."
  185. }
  186. CheckBox
  187. {
  188. Name "No CSG"
  189. Param "-nocsg"
  190. Hint "\tDon't chop out intersecting brush areas."
  191. }
  192. /*CheckBox
  193. {
  194. Name "No Linux Data"
  195. Param "-nolinuxdata"
  196. Hint "\tForce it to not write physics data for linux multiplayer servers, even if there are multiplayer entities in the map."
  197. }*/
  198. CheckBox
  199. {
  200. Name "No Merge"
  201. Param "-nomerge"
  202. Hint "\tDon't merge together chopped faces on nodes."
  203. }
  204. CheckBox
  205. {
  206. Name "No Merge Water"
  207. Param "-nomergewater"
  208. Hint "\tDon't merge together chopped faces on water."
  209. }
  210. CheckBox
  211. {
  212. Name "No Opt"
  213. Param "-noopt"
  214. Hint "\tBy default, vbsp removes the 'outer shell' of the map, which are all the faces you can't see because you can never get outside the map. -noopt disables this behaviour."
  215. }
  216. CheckBox
  217. {
  218. Name "No Prune"
  219. Param "-noprune"
  220. Hint "\tDon't prune neighboring solid nodes."
  221. }
  222. CheckBox
  223. {
  224. Name "No Share"
  225. Param "-noshare"
  226. Hint "\tEmit unique face edges instead of sharing them."
  227. }
  228. CheckBox
  229. {
  230. Name "No Subdivide"
  231. Param "-nosubdiv"
  232. Hint "\tDon't subdivide faces for lightmapping."
  233. }
  234. CheckBox
  235. {
  236. Name "No T-Junction"
  237. Param "-notjunc"
  238. Hint "\tDon't fixup t-junctions."
  239. }
  240. CheckBox
  241. {
  242. Name "No Weld"
  243. Param "-noweld"
  244. Hint "\tDon't join face vertices together."
  245. }
  246. Space
  247. {
  248. Size "1"
  249. }
  250. CheckBox
  251. {
  252. Name "Snap Axial"
  253. Param "-snapaxial"
  254. Hint "\tSnap axial planes to integer coordinates."
  255. }
  256. CheckBox
  257. {
  258. Name "Only Entites"
  259. Param "-onlyents"
  260. Bold "True"
  261. Hint "\tThis option causes vbsp only import the entities from the .vmf file. -onlyents won't reimport brush models."
  262. }
  263. CheckBox
  264. {
  265. Name "Only Props"
  266. Param "-onlyprops"
  267. Bold "True"
  268. Hint "\tOnly update the static props and detail props."
  269. }
  270. CheckBox
  271. {
  272. Name "Verbose Entities"
  273. Param "-verboseentities"
  274. Hint "\tIf -verbose is on, this disables verbose output for submodels."
  275. }
  276. TextBox
  277. {
  278. Name "Block"
  279. Param "-Block"
  280. Type "String"
  281. Quote "False"
  282. Default "0.0 0.0"
  283. Hint "\tControl the grid size mins that vbsp chops the level on."
  284. }
  285. TextBox
  286. {
  287. Name "Blocks"
  288. Param "-Blocks"
  289. Type "String"
  290. Quote "False"
  291. Default "0.0 0.0 0.0 0.0"
  292. Hint "\tEnter the mins and maxs for the grid size vbsp uses."
  293. }
  294. TextBox
  295. {
  296. Name "Luxel Scale"
  297. Param "-luxelscale"
  298. Type "Single"
  299. Default "1.0"
  300. Min "0.0"
  301. Max "100.0"
  302. Hint "\tScale all lightmaps by this amount."
  303. }
  304. TextBox
  305. {
  306. Name "Micro"
  307. Param "-micro"
  308. Type "Single"
  309. Default "1.0"
  310. Min "0.0"
  311. Hint "\tvbsp will warn when brushes are output with a volume less than this number."
  312. }
  313. }
  314. //
  315. // VIS
  316. //
  317. Stage
  318. {
  319. Name "VIS"
  320. Title "Visibility Index Set"
  321. Type "Program"
  322. Filter "VVIS (vvis.exe)|vvis.exe"
  323. CheckBox
  324. {
  325. Name "No Sort"
  326. param "-nosort"
  327. Hint "\tDon't sort portals (sorting is an optimization)."
  328. }
  329. TextBox
  330. {
  331. Name "Radius Override"
  332. param "-radius_override"
  333. Type "Single"
  334. Default "0.0"
  335. Min "0.0"
  336. Hint "\tForce a VIS radius."
  337. }
  338. ComboBox
  339. {
  340. Name "VIS Type"
  341. Bold "True"
  342. Default "Normal"
  343. Options "Fast,-fast|Normal,"
  344. Hint "\tRun as fast or normal.\n\n"_
  345. "\tFast VIS only does a first quick pass on VIS calculations."
  346. }
  347. Space
  348. {
  349. Size "7"
  350. }
  351. TextBox
  352. {
  353. Name "Additional Parameters"
  354. Type "String"
  355. Quote "False"
  356. Size "3"
  357. Hint "\tAdd additional parameters here as you would a command line."
  358. }
  359. }
  360. //
  361. // RAD
  362. //
  363. Stage
  364. {
  365. Name "RAD"
  366. Title "Radiosity"
  367. Type "Program"
  368. Filter "VRAD (vrad.exe)|vrad.exe"
  369. CheckBox
  370. {
  371. Name "Center Samples"
  372. param "-centersamples"
  373. Hint "\tMove sample centers."
  374. }
  375. CheckBox
  376. {
  377. Name "Direct Lightmap"
  378. param "-dlightmap"
  379. Hint "\tForce direct lighting into different lightmap than radiosity."
  380. }
  381. CheckBox
  382. {
  383. Name "Debug Extra"
  384. param "-debugextra"
  385. Hint "\tPlaces debugging data in lightmaps to visualize supersampling."
  386. }
  387. CheckBox
  388. {
  389. Name "Dump"
  390. param "-dump"
  391. Hint "\tWrite debugging .txt files."
  392. }
  393. CheckBox
  394. {
  395. Name "Dump Normals"
  396. param "-dumpnormals"
  397. Hint "\tWrite normals to debug files."
  398. }
  399. CheckBox
  400. {
  401. Name "Log Hash"
  402. param "-loghash "
  403. Hint "\tLog the sample hash table to samplehash.txt."
  404. }
  405. CheckBox
  406. {
  407. Name "No Detail Light"
  408. param "-nodetaillight"
  409. Hint "\tDon't light detail props."
  410. }
  411. CheckBox
  412. {
  413. Name "No Extra"
  414. param "-noextra"
  415. Bold "true"
  416. Hint "\tDisable supersampling."
  417. }
  418. CheckBox
  419. {
  420. Name "Only Detail"
  421. param "-onlydetail"
  422. Hint "\tOnly light detail props and per-leaf lighting."
  423. }
  424. /*CheckBox
  425. {
  426. Name "Red Error"
  427. param "-rederror"
  428. Hint "\tShow errors in red."
  429. }*/
  430. CheckBox
  431. {
  432. Name "Stop On Exit"
  433. param "-stoponexit"
  434. Hint "\tWait for a keypress on exit."
  435. }
  436. TextBox
  437. {
  438. Name "Additional Parameters"
  439. Type "String"
  440. Quote "False"
  441. Size "3"
  442. Hint "\tAdd additional parameters here as you would a command line."
  443. }
  444. TextBox
  445. {
  446. Name "Bounce"
  447. Param "-bounce"
  448. Bold "True"
  449. Type "Integer"
  450. Default "100"
  451. Min "0"
  452. Hint "\tSet max number of bounces."
  453. }
  454. TextBox
  455. {
  456. Name "Luxel Density"
  457. Param "-luxeldensity"
  458. Type "Single"
  459. Default "1.0"
  460. Min "0.0"
  461. Max "1.0"
  462. Hint "\tRescale all luxels by the specified amount."
  463. }
  464. TextBox
  465. {
  466. Name "Max Disp Sample Size"
  467. Param "-maxdispsamplesize"
  468. Type "Single"
  469. Default "512.0"
  470. Min "0.0"
  471. Hint "\tSet max displacement sample size."
  472. }
  473. TextBox
  474. {
  475. Name "Smooth"
  476. Param "-smooth"
  477. Type "Single"
  478. Default "45.0"
  479. Min "0.0"
  480. Max "360.0"
  481. Hint "\tSet the threshold for smoothing groups, in degrees."
  482. }
  483. ComboBox
  484. {
  485. Name "RAD Type"
  486. Bold "True"
  487. Default "Normal"
  488. Options "Fast,-fast|Normal,"
  489. Hint "\tRun as fast or normal.\n\n"_
  490. "\tFast RAD does quick and dirty lighting calculations."
  491. }
  492. FileBox
  493. {
  494. Name "Lights File"
  495. Param "-lights"
  496. FullPath "True"
  497. Bold "True"
  498. Filter "Radiosity Files (*.rad)|*.rad|Text Files (*.txt)|*.txt"
  499. Hint "\tLoad a lights file in addition to lights.rad and the level lights file."
  500. }
  501. }
  502. //
  503. // ZIP
  504. //
  505. Stage
  506. {
  507. Name "ZIP"
  508. Title "BSP ZIP"
  509. Type "Program"
  510. Filter "BSPZIP (bspzip.exe)|bspzip.exe"
  511. ComboBox
  512. {
  513. Name "Operation"
  514. Checked "True"
  515. Default "Add"
  516. Options "Add,-addlist \"${FilePath}\\${FileName}.bsp\" \"${FilePath}\\${FileName}.lst\" \"${FilePath}\\${FileName}.bsp\"|Extract,-extract \"${FilePath}\\${FileName}.bsp\" \"${FilePath}\\${FileName}.zip\"|List,-dir \"${FilePath}\\${FileName}.bsp\""
  517. Hint "\tAdd files to, extract files from or list the files in the BSP's embedded ZIP file.\n\n"_
  518. "\tWhen adding files a <filename>.lst file must exist in your input file's folder. This file contains pairs in the format ZIP path Local path separated by new line characters. For example, to add the material walls/stonewall our <filename>.lst file would contain:\n\n"_
  519. "\tmaterials/walls/stonewall.vmt\n"_
  520. "\tC:\\materials\\walls\\stonewall.vmt\n"_
  521. "\tmaterials/walls/stonewall.vtf\n"_
  522. "\tC:\\materials\\walls\\stonewall.vtf"
  523. }
  524. Space
  525. {
  526. Size "9"
  527. }
  528. TextBox
  529. {
  530. Name "Additional Parameters"
  531. Type "String"
  532. Quote "False"
  533. Size "3"
  534. Hint "\tAdd additional parameters here as you would a command line."
  535. }
  536. }
  537. //
  538. // Shared
  539. //
  540. Stage
  541. {
  542. Name "Shared"
  543. Title "Shared Parameters"
  544. Type "ParameterList"
  545. CheckBox
  546. {
  547. Name "No VConfig"
  548. param "-novconfig"
  549. Stages "BSP|VIS|RAD"
  550. Hint "\tDon't bring up graphical UI on VPROJECT errors."
  551. }
  552. CheckBox
  553. {
  554. Name "MPI"
  555. param "-mpi"
  556. Stages "VIS|RAD"
  557. Hint "\tUse VMPI to distribute computations."
  558. }
  559. CheckBox
  560. {
  561. Name "Verbose"
  562. param "-verbose"
  563. Stages "BSP|VIS|RAD"
  564. Hint "\tCompile with verbose messages."
  565. }
  566. TextBox
  567. {
  568. Name "MPI Password"
  569. Param "-mpi_pw"
  570. Stages "VIS|RAD"
  571. Type "String"
  572. Hint "\tUse a password to choose a specific set of VMPI workers."
  573. }
  574. TextBox
  575. {
  576. Name "Threads"
  577. Param "-threads"
  578. Stages "BSP|VIS|RAD"
  579. Type "Integer"
  580. Default "1"
  581. Min "1"
  582. Hint "\tControl the number of threads vbsp uses (defaults to the # of processors on your machine)."
  583. }
  584. ComboBox
  585. {
  586. Name "Priority"
  587. Stages "BSP|VIS|RAD"
  588. Default "Normal"
  589. Options "Low,-low|Normal,"
  590. Hint "\tRun program an altered priority level.\n\n"_
  591. "\tSetting the priority of the compile tools to -low is very handy, as you can multitask and do other things without really feeling the drain of the compile programs on the system, provided there is enough memory for the tools and the other programs you use."
  592. }
  593. FolderBox
  594. {
  595. Name "Game"
  596. Param "-game"
  597. Stages "BSP|VIS|RAD"
  598. Bold "True"
  599. Hint "\tOverride the VPROJECT environment variable.\n\n"_
  600. "\tShould point to the folder your gameinfo.txt is located in."
  601. }
  602. }