Advertisement
laice

Stardew Valley Simple mod Manager Batch SC

Mar 2nd, 2016
564
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. if not exist "%~dp0tobeinstalled" md "%~dp0tobeinstalled"
  3. if not exist "%~dp0Update\version.ext" echo 0.34>"%~dp0Update\version.txt"
  4. if exist set /p ver=<"%~dp0Update\version.txt"
  5. if not exist "C:\Program Files (x86)\Microsoft XNA" goto XNA
  6. if exist "C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley" set d=C& goto start
  7. if exist "D:\Program Files (x86)\Steam\steamapps\common\Stardew Valley" set d=D& goto start
  8. if exist "E:\Program Files (x86)\Steam\steamapps\common\Stardew Valley" set d=E& goto start
  9. echo couldnt find Game, are you sure it installed?
  10.  
  11. :XNA
  12. echo Warning you dont seem to have installed the XNA Framework this is a common but with Steam
  13. echoe.
  14. if exist "%d%:\Program Files (x86)\\Steam\steamapps\common\Stardew Valley\_CommonRedist\XNA\4.0" goto XNA2
  15. echoe Sadly Steam didnt download it either, you can get it here
  16. goto end
  17.  
  18. :XNA2
  19. echo Luckily Steam already downloaded it, do you want to install it now? (j/n)
  20. if %choose%==y goto yes1
  21. if %choose%==n goto no1
  22. :yes1
  23. "%d%:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\_CommonRedist\XNA\4.0\xnafx40_redist.msi"
  24. goto select
  25. :no1
  26. echo Ok you can find the file in "%d%:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\_CommonRedist\XNA\4.0"
  27. goto end
  28.  
  29.  
  30. :start
  31. if not exist "%appdata%\StardewValley\Mods" goto mods
  32. goto start1
  33.  
  34. :mods
  35. md "%appdata%\StardewValley\Mods"
  36. xcopy "%~dp0Mods" "%appdata%\StardewValley\Mods" /s /e /y
  37. rmdir /S/Q "%~dp0Mods"
  38. goto start1
  39.  
  40. :start1
  41. if not exist "%appdata%\StardewValley\ErrorLogs" md "%appdata%\StardewValley\ErrorLogs"
  42. if not exist "%~dp0Update" md "%~dp0Update"
  43. echo ************************************
  44. echo **** Stardew Valley Mod Manager ****
  45. echo **** ****
  46. echo **** Version 1.01 by Yuuki ****
  47. echo ************************************
  48.  
  49. :select
  50. echo.
  51. echo [0] Changelog
  52. echo [1] Install Mod from tobeinstalled Folder
  53. echo [2] delete Mod
  54. echo [3] Install/Update SMAPI
  55. echo [4] Launch SMAPI
  56. if not exist "%~dp0Mods" goto select1
  57. echo [5] Modding Tools
  58. :select1
  59. echo anything else = end
  60. echo
  61. set asw=9
  62. set /p asw="Please Select: "
  63. if %asw%==0 goto changelog
  64. if %asw%==1 goto install
  65. if %asw%==2 goto delmod
  66. if %asw%==3 goto update
  67. if %asw%==4 goto launch
  68. if not exist "%~dp0node" goto end
  69. if %asw%==5 goto moding
  70. goto end
  71.  
  72.  
  73. :install
  74. xcopy "%~dp0tobeinstalled" "%appdata%\StardewValley\Mods\" /Y
  75. del /S/Q "%~dp0tobeinstalled\*.*"
  76. echo new mods installed
  77. echo.
  78. goto select
  79.  
  80. :delmod
  81. cd /d %appdata%\StardewValley\Mods\
  82. ls
  83. set /p file=which one (use Tab to scroll through them):
  84. set /p choose=are you sure (y/n):
  85. if %choose%==y goto yes
  86. if %choose%==n goto no
  87. goto end
  88. :yes
  89. del /Q/S "%appdata%\StardewValley\Mods\%file%"
  90. goto select
  91. :no
  92. goto select
  93.  
  94. :update
  95. if not exist "%~dp0Update\StardewModdingAPI.exe" echo there are no files in the Update folder & goto select
  96. xcopy "%~dp0Update\StardewModdingAPI.exe" "%d%:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\" /Y
  97. del /Q/S "%~dp0Update\StardewModdingAPI.exe"
  98. xcopy "%~dp0Update\steam_appid.txt" "%d%:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\" /Y
  99. del /Q/S "%~dp0Update\steam_appid.txt"
  100. xcopy "%~dp0Mods" "%appdata%\StardewValley\Mods\" /s /e /y
  101. rmdir /S/Q "%~dp0Update\Mods"
  102. del /Q/S "%~dp0Update\use.txt"
  103. echo Version succsesfully updated
  104. echo.
  105. goto select
  106.  
  107. :launch
  108. if not exist "%d%:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe" echo StardewModdingAPI.exe not found! & goto select
  109. echo launching game, please wait.
  110. call "%d%:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe"
  111. echo game closed!
  112. goto select
  113.  
  114. :moding
  115. if not exist "%~dp0node" goto end
  116. echo Moding Tools Menu
  117. echo This Feature is WIP
  118. echo.
  119. echo [1] Unpack
  120. echo [2] Repack
  121. set asw=0
  122. set /p asw="Please Select: "
  123. if %asw%==1 goto unpack
  124. if %asw%==2 goto repack
  125. echoe.
  126. goto end
  127.  
  128. :unpack
  129. echo please wait, this can take a while.
  130. cd node
  131. call xnb_node.cmd -q extract "%~dp0content" "%~dp0unpacked"
  132. echo unpacking done!
  133. echo you can find the files in unpacked
  134. cd ..
  135. goto select
  136.  
  137.  
  138. :repack
  139. echo please wait, this could take a while!
  140. cd node
  141. call xnb_node.cmd -q pack "%~dp0unpacked" "%~dp0content"
  142. echo repacking complete!
  143. cd..
  144. rmdir /S/Q "%~dp0unpacked" & md "%~dp0unpacked"
  145. goto select
  146.  
  147. :changelog
  148. echo Version 1.01
  149. echo -fixed some errors.
  150. echo -added XNB Un/repack function (to activate this option just place Xnb_node.bat and the app folder in ../node)
  151. echo -you now can launch SMAPI directly from here.
  152. echo.
  153. echo Version 1.00
  154. echo -initial release
  155. echo.
  156. goto select
  157.  
  158. :end
  159. pause
Advertisement
RAW Paste Data Copied
Advertisement