MrFunreal

Cubemap Deletion and Extraction

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