SHARE
TWEET

portal2_bsp_launcher.bat

joric May 25th, 2018 (edited) 401 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. ::Portal 2 custom map launcher (associate with .bsp files to launch with a mouse click)
  3. ::works with https://greasyfork.org/en/scripts/5729-enhanced-steam-workshop-downloader
  4. ::also works well with http://steamworkshopdownloader.com and its userscripts
  5.  
  6. set portal2=C:\Games\Portal 2
  7.  
  8. ::chdir to script directory
  9. cd /d %~dp0
  10.  
  11. if [%1]==[] goto loadmap
  12. echo PARAMETER %1
  13. set map=%~nx1
  14. ::if the map name is any differrent from the original - you lose cubemaps
  15. ::"mymaps_" prefix affects cubemaps (glass objects appear white), remove it
  16. ::"sp_" prefix is sometimes responsible for spawning a portal gun (coders, right)
  17. ::if anything, move map to portal2_dlc2\maps and type buildcubemaps in console
  18. set map=%map:mymaps_=%
  19. ::remove chrome file postfixes for multiple downloads
  20. set map=%map: (1)=%
  21. set map=%map: (2)=%
  22. ::copying map to portal2_dlc2\maps sometimes breaks scripts
  23. ::e.g. "the index 'say_hello' does not exist" (sendificate part 4)
  24. ::if it happens try copying to portal2\maps
  25. copy %1 "%portal2%\portal2_dlc2\maps\%map%"
  26. echo %map%>last_map.txt
  27.  
  28. :loadmap
  29. ::load last map name (helps if launched without parameters)
  30. set /p map=<last_map.txt
  31. ::append map name to log file for review and scores
  32. echo %map%>>custom-portal2-maps-2.txt
  33. echo USING MAP %map%
  34. cd /d "%portal2%"
  35. portal2.exe -novid -hijack -noborder -windowed +gameinstructor_enable "0" +map %map%
  36.  
  37. ::I recommend these maps from two guys who made Portal Stories: MEL
  38. ::https://steamcommunity.com/id/LoneWolf2056/myworkshopfiles (reconstruction series)
  39. ::https://steamcommunity.com/id/tmast98/myworkshopfiles (winter testing initiative)
  40. ::also try Sendificate maps: https://steamcommunity.com/id/portal_HMW/myworkshopfiles
  41. ::also visit https://www.thinking.withportals.com
  42. ::Portal 2 lives!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top