SWAG98

ID-Tech1-Engine-Modstarter

Mar 7th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.77 KB | None | 0 0
  1. :: prerequirement: create_array function and gzdoom
  2.  
  3. :: all mods should be located in ./bin/mods
  4. :: the gzdoom.exe and everyting it needs to run should be in ./bin
  5. :: the create_array.bat and create_string.bat files should be in ./bin/recources
  6. :: feel free to modify the paths on your own if you find the correct lines in this file...
  7.  
  8. :: the variables for everything to work out well
  9. @echo off
  10. mode con cols=26 lines=6
  11. setlocal EnableDelayedExpansion
  12. title SmarStart
  13. color 02
  14.  
  15. cd bin\recources
  16.  
  17. set pos=1
  18. set msc=true
  19.  
  20. :: GFX-Variable: the list of graphical mods to add to a version by simply typing %gfx%
  21. set gfx=
  22.  
  23. :: EXE-Array:the list of mods, separated with space compared to the game mode, separated with comma
  24. :: syntax: call create_array exe "," " ,%gfx%,[names of files of modpack]"
  25. call create_array exe "," " ,%gfx%"
  26.  
  27. :: LIST-Array: the list of names for the dedicated game mode
  28. :: syntax: call create_array list "," "vanilla,gfx,[displayname of modpack]"
  29. call create_array list "," "vanilla,gfx"
  30.  
  31. :: The code for the menu
  32. :mnucode
  33.     setlocal
  34.     cls
  35.     set /a a=%pos%-1
  36.     echo        w=last
  37.     echo a=accept   s=next
  38.     echo m=toggle music
  39.     echo mode: !list[%a%]!
  40.     echo music=%msc%
  41.     choice /c WSAEM /n
  42.     if %errorlevel%==5 (
  43.         if %msc% == true (
  44.             set msc=false
  45.         ) ELSE (
  46.             set msc=true
  47.         )
  48.     )
  49.     if %errorlevel%==4 exit
  50.     if %errorlevel%==3 goto :exe
  51.     if %errorlevel%==2 (
  52.         if %pos% LSS %list_lenght% (
  53.             set /a pos=%pos%+1
  54.         )
  55.     )
  56.     if %errorlevel%==1 (
  57.         if %pos% GTR 1 (
  58.             set /a pos=%pos%-1
  59.         )
  60.     )
  61.     goto :mnucode
  62.     endlocal
  63. goto :eof
  64.  
  65. :: the executive function
  66. :exe
  67.     if %msc%==true (
  68.         set music=music2.wad CustomMusic.wad
  69.     )
  70.     cd ..\mods
  71.     ..\gzdoom.exe -iwad doom2.wad -file %music% !exe[%a%]!
  72.     cd ..\recources
  73.     goto mnucode
  74. goto :eof
Advertisement
Add Comment
Please, Sign In to add comment