Advertisement
MrFunreal

Cubemap Deletion and Extraction (Singlemap)

Aug 13th, 2021
2,126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @echo off
  2.     ::Base settings of where the game and its bin folder is
  3.     SET Binpath=D:\programme\steam\steamapps\common\left 4 dead 2\bin
  4.     SET gameinfopath=D:\programme\steam\steamapps\common\left 4 dead 2\left4dead2
  5.    
  6.     ::BSP file names. Used for both "deletecubemaps" and "extractcubemaps".
  7.     ::Assuming you added cubemaps, compiled the map just for the cubemaps and now want to transfer them from the "cubemap only" map into your "Final" compile map.
  8.     ::Uncomment the additional listings if you want to work on mor files at once.
  9.     SET bspname1=mapname1_witout_extension
  10. ::  SET bspname2=mapname2_witout_extension
  11. ::  SET bspname3=mapname3_witout_extension
  12. ::  SET bspname4=mapname4_witout_extension
  13. ::  SET bspname5=mapname5_witout_extension
  14.  
  15.     ::BSP file location of which the cubemaps should be DELETED (Deletes all embedded VTF files!!!).
  16.     SET bsp_location_todelete=D:\Programme\Steam\steamapps\common\Left 4 Dead 2\!!CUSTOM_CONTENT\Hardly_Rain\maps
  17.     ::BSP file location of which the cubemaps should be EXTRACTED FROM.
  18.     SET bsp_location_toextract=D:\programme\steam\steamapps\common\left 4 dead 2\left4dead2\maps
  19.     ::pick where the cubemaps get extracted. Creates a foldername called "MAPNAME_cubemaps" in the picked folder.
  20.     SET Cubemap_ectract_location=D:\programme\steam\steamapps\common\left 4 dead 2\!!CUSTOM_CONTENT\Hardly_Rain\maps
  21.  
  22.     ::Deletes cubemaps from all the BSP files listed in "bsp_location_todelete"
  23.     "%Binpath%\bspzip.exe" -deletecubemaps "%bsp_location_todelete%\%bspname1%.bsp"  -game "%gameinfopath%"
  24. ::  "%Binpath%\bspzip.exe" -deletecubemaps "%bsp_location_todelete%\%bspname2%.bsp"  -game "%gameinfopath%"
  25. ::  "%Binpath%\bspzip.exe" -deletecubemaps "%bsp_location_todelete%\%bspname3%.bsp"  -game "%gameinfopath%"
  26. ::  "%Binpath%\bspzip.exe" -deletecubemaps "%bsp_location_todelete%\%bspname4%.bsp"  -game "%gameinfopath%"
  27. ::  "%Binpath%\bspzip.exe" -deletecubemaps "%bsp_location_todelete%\%bspname5%.bsp"  -game "%gameinfopath%"
  28.  
  29.     ::Extracts cubemaps from all the BSP files listed in "bsp_location_toextract", and puts them into the folder specified in "Cubemap_ectract_location"
  30.     "%Binpath%\bspzip.exe" -extractcubemaps  "%bsp_location_toextract%\%bspname1%.bsp"  "%Cubemap_ectract_location%\%bspname1%_cubemaps"
  31. ::  "%Binpath%\bspzip.exe" -extractcubemaps  "%bsp_location_toextract%\%bspname2%.bsp"  "%Cubemap_ectract_location%\%bspname2%_cubemaps"
  32. ::  "%Binpath%\bspzip.exe" -extractcubemaps  "%bsp_location_toextract%\%bspname3%.bsp"  "%Cubemap_ectract_location%\%bspname3%_cubemaps"
  33. ::  "%Binpath%\bspzip.exe" -extractcubemaps  "%bsp_location_toextract%\%bspname4%.bsp"  "%Cubemap_ectract_location%\%bspname4%_cubemaps"
  34. ::  "%Binpath%\bspzip.exe" -extractcubemaps  "%bsp_location_toextract%\%bspname5%.bsp"  "%Cubemap_ectract_location%\%bspname5%_cubemaps"
  35.  
  36.    
  37.     echo.
  38.     echo.
  39.     echo.
  40.     echo Cubemaps extracted to %Cubemap_ectract_location%
  41.     echo.
  42.     echo You can use VIDE to import cubemaps to another map.
  43.     echo Use the PACKFILE LUMP EDITOR tool to load a map which had its cubemaps deleted,
  44.     echo press the ADD button and select all cubemap vtf files you just extracted.
  45.     echo When it pompts you to pick a folder; CANCEL.
  46.     echo A new window appears, asking you for a new relative path
  47.     echo delete everything BEFORE the last "materials"
  48.     echo you should only have "materials\maps\%bspname1%" (or any other mapname) in that text window
  49.     echo Press OKAY and save the map.
  50.     echo.
  51.    
  52. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement