Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.62 KB | None | 0 0
  1. @echo off
  2. Setlocal EnableDelayedExpansion
  3.  
  4. ::begin
  5. :BEGIN
  6. cls
  7. echo ========================================
  8. echo ======NSMBW Mod ISO Builder v1.00=======
  9. echo ========================================
  10. echo ===Builder by damysteryman/Team DARK====
  11. echo ========Powered by WIT by Wiimm=========
  12. echo ========More info in README.txt=========
  13. echo ========================================
  14. pause
  15.  
  16. :: Mod Select Menu
  17. cls
  18. echo ============NSMBW Mod Select============
  19. echo 1. Newer SMBW
  20. echo (Supports all NSMBW versions)
  21. echo.
  22. echo 2. Cannon SMBW
  23. echo (Supports all except JPNv2)
  24. echo.
  25. echo 3. Another SMBW
  26. echo (Supports only USAv1 USAv2 EURv1)
  27. echo.
  28. echo 4. Newer Summer Sun
  29. echo (Supports all except JPNv2)
  30. echo.
  31. echo 5. Newer Holiday Special
  32. echo (Supports all NSMBW versions)
  33. echo.
  34. echo =====Enter the Number corresponding=====
  35. echo ==========to the Mod you want===========
  36. SET MODINPUT=
  37. SET /P MODINPUT=Enter Number and press Enter:
  38.  
  39. IF %MODINPUT%==1 (
  40. SET MOD=Newer
  41. GOTO VERSELECT
  42. )
  43. IF %MODINPUT%==2 (
  44. SET MOD=Cannon
  45. GOTO VERSELECT
  46. )
  47. IF %MODINPUT%==3 (
  48. SET MOD=Another
  49. GOTO VERSELECT
  50. )
  51. IF %MODINPUT%==4 (
  52. SET MOD=SummerSun
  53. GOTO VERSELECT
  54. )
  55. IF %MODINPUT%==5 (
  56. SET MOD=HolidaySpecial
  57. GOTO VERSELECT
  58. )
  59.  
  60. GOTO INPUTERROR
  61.  
  62. :VERSELECT
  63. :: Version Select Menu
  64. cls
  65. echo ========Base ISO Version Select=========
  66. echo 0. Autodetect!
  67. echo 1. EUR v1
  68. echo 2. EUR v2
  69. echo 3. USA v1
  70. echo 4. USA v2
  71. echo 5. JPN v1
  72. echo . JPN v2 (still not supported atm...)
  73. echo.
  74. echo JPNv2 support still not implemented.
  75. echo Mods do not support KOR or TWN versions.
  76. echo.
  77. echo =====Enter the Number corresponding=====
  78. echo ======to your NSMBW image verison=======
  79. SET VERINPUT=
  80. SET /P VERINPUT=Enter Number and press Enter:
  81.  
  82. IF %VERINPUT%==0 (
  83. SET BASEVER=AUTO
  84. GOTO EXTSELECT
  85. )
  86. IF %VERINPUT%==1 (
  87. SET BASEVER=EURv1
  88. SET GAMEID=SMNP01
  89. GOTO EXTSELECT
  90. )
  91. IF %VERINPUT%==2 (
  92. SET BASEVER=EURv2
  93. SET GAMEID=SMNP01
  94. GOTO EXTSELECT
  95. )
  96. IF %VERINPUT%==3 (
  97. SET BASEVER=USAv1
  98. SET GAMEID=SMNE01
  99. GOTO EXTSELECT
  100. )
  101. IF %VERINPUT%==4 (
  102. SET BASEVER=USAv2
  103. SET GAMEID=SMNE01
  104. GOTO EXTSELECT
  105. )
  106. IF %VERINPUT%==5 (
  107. SET BASEVER=JPNv1
  108. SET GAMEID=SMNJ01
  109. GOTO EXTSELECT
  110. )
  111. ::IF %VERINPUT%==6 (
  112. :: SET BASEVER=JPNv2
  113. :: SET GAMEID=SMNJ01
  114. :: GOTO EXTSELECT
  115. :: )
  116.  
  117. GOTO INPUTERROR
  118.  
  119. :EXTSELECT
  120. cls
  121. echo ========Newer ISO Format Select=========
  122. echo 1. .iso
  123. echo 2. .wbfs
  124. echo =====Enter the Number corresponding=====
  125. echo ========to the filetype you want========
  126. SET EXTINPUT=
  127. SET /P EXTINPUT=Enter Number and press Enter:
  128.  
  129. IF %EXTINPUT%==1 (
  130. SET FILEEXT=iso
  131. GOTO SAVESELECT
  132. )
  133. IF %EXTINPUT%==2 (
  134. SET FILEEXT=wbfs
  135. GOTO SAVESELECT
  136. )
  137.  
  138. GOTO INPUTERROR
  139.  
  140. :SAVESELECT
  141. cls
  142. echo =========Newer Save "Slot" Select=========
  143. echo 1. Share save "slot" with original (SMNx)
  144. echo Original NSMBW save is unaltered, but both
  145. echo both are in same "slot" in Data Management
  146. echo.
  147. echo 2. Make new save "slot" (KMNx)
  148. echo Store save under a different custom "slot"
  149. echo in Data Management away from original
  150. echo.
  151. echo ======Enter the Number corresponding======
  152. echo ==========to the "slot" you want==========
  153. SET SLOTINPUT=
  154. SET /P SLOTINPUT=Enter Number and press Enter:
  155.  
  156. IF %SLOTINPUT%==1 (
  157. SET SLOT=SMNx-Original
  158. GOTO DOUBLECHECK
  159. )
  160. IF %SLOTINPUT%==2 (
  161. SET SLOT=KMNx-Custom
  162. GOTO DOUBLECHECK
  163. )
  164.  
  165. GOTO INPUTERROR
  166.  
  167. :DOUBLECHECK
  168. cls
  169. echo ==========Review Settings==========
  170. echo Selected NSMBW Mod: %MOD%
  171. echo Selected Base Version: %BASEVER%
  172. echo Selected Output Filetype: %FILEEXT%
  173. echo Selected Save "Slot": %SLOT%
  174. echo.
  175. echo =======Is this selection ok?=======
  176. echo 1. Yes, continue
  177. echo 2. No, change settings
  178. echo (Anything else). exit
  179. echo ===================================
  180. SET AREYOUSURE=
  181. SET /P AREYOUSURE=Enter Number and press Enter:
  182.  
  183. IF %AREYOUSURE%==1 GOTO EXTRACT
  184. IF %AREYOUSURE%==2 GOTO BEGIN
  185.  
  186. GOTO INPUTERROR
  187.  
  188. :INPUTERROR
  189. echo Invalid option selected, exiting...
  190. pause
  191. exit
  192.  
  193. :DETECTEDVER
  194. :Exit if supported version is not found (BASEVER not reset)
  195. IF %BASEVER%==AUTO (
  196. echo Unsupported ISO version detected, exiting...
  197. rmdir nsmb.d /s /q
  198. pause
  199. exit
  200. )
  201.  
  202. echo Autodetected Base ISO Version: %BASEVER%
  203. GOTO CONTINUE
  204.  
  205. :EXTRACT
  206. :: Check for Mod contents folder and riivolution xml before anything
  207. echo Checking for %MOD% resources...
  208. IF %MOD%==Newer (
  209. SET MODFOLDER=NewerSMBW
  210. SET MODFOLSRC=NewerSMBW.zip\NewerFiles\NewerSMBW\
  211. SET XML=NewerSMBW
  212. )
  213. IF %MOD%==Cannon (
  214. SET MODFOLDER=Cannon
  215. SET MODFOLSRC=Cannon_Super_Mario_Bros_Wii_v1.1.zip\Cannon_Super_Mario_Bros_Wii_v1.1\Cannon\
  216. SET XML=CannonP
  217. )
  218. IF %MOD%==Another (
  219. SET MODFOLDER=Another
  220. SET MODFOLSRC=Another_Super_Mario_Brothers_Wii_2.0.zip\Another\
  221. SET XML=Another
  222. )
  223. IF %MOD%==SummerSun (
  224. SET MODFOLDER=SumSun
  225. SET MODFOLSRC=Newer_Summer_Sun.zip\Newer Summer Sun\SumSun\
  226. SET XML=SumSunP
  227. )
  228. IF %MOD%==HolidaySpecial (
  229. SET MODFOLDER=XmasNewer
  230. SET MODFOLSRC=Newer_Super_Mario_Bros._Wii_HS.zip\XmasNewer\
  231. )
  232.  
  233. IF NOT EXIST %MODFOLDER%\ (
  234. echo Cannot find the "%MODFOLDER%" folder containing %MOD% files, exiting...
  235. echo Please make sure you have "%MODFOLDER%" in the same directory
  236. echo as this builder pack.
  237. echo [%MODFOLSRC%] This one!
  238. pause
  239. exit
  240. )
  241. IF %MOD%==HolidaySpecial GOTO SKIPXMLCHECK
  242. IF /I NOT EXIST riivolution\%XML%.xml (
  243. echo Cannot find \riivolution\%XML%.xml containing %MOD% patches, exiting...
  244. pause
  245. exit
  246. )
  247.  
  248. :SKIPXMLCHECK
  249. :: extract image
  250. :: Autodetect
  251. IF %BASEVER%==AUTO (
  252. wit\wit extract -s ../ -1 -n SMN.01 . nsmb.d --psel=DATA -ovv
  253.  
  254. :Detect version and assign BASEVER
  255. IF EXIST nsmb.d\files\COPYDATE_LAST_2009-10-03_232911 (
  256. SET BASEVER=EURv1
  257. SET GAMEID=SMNP01
  258. )
  259. IF EXIST nsmb.d\files\COPYDATE_LAST_2010-01-05_152101 (
  260. SET BASEVER=EURv2
  261. SET GAMEID=SMNP01
  262. )
  263. IF EXIST nsmb.d\files\COPYDATE_LAST_2009-10-03_232303 (
  264. SET BASEVER=USAv1
  265. SET GAMEID=SMNE01
  266. )
  267. IF EXIST nsmb.d\files\COPYDATE_LAST_2010-01-05_143554 (
  268. SET BASEVER=USAv2
  269. SET GAMEID=SMNE01
  270. )
  271. IF EXIST nsmb.d\files\COPYDATE_LAST_2009-10-03_231655 (
  272. SET BASEVER=JPNv1
  273. SET GAMEID=SMNJ01
  274. )
  275. GOTO DETECTEDVER
  276. ) ELSE (
  277. :: Not Autodetect
  278. wit\wit extract -s ../ -1 -n %GAMEID% . nsmb.d --psel=DATA -ovv
  279. )
  280.  
  281. :CONTINUE
  282. IF %MOD%==HolidaySpecial (
  283. IF %GAMEID%==SMNP01 SET XML=XmasP
  284. IF %GAMEID%==SMNE01 SET XML=XmasE
  285. IF %GAMEID%==SMNJ01 SET XML=XmasJ
  286. IF /I NOT EXIST riivolution\!XML!.xml (
  287. echo Cannot find \riivolution\!XML!.xml containing %MOD% patches, exiting...
  288. rmdir nsmb.d /s /q
  289. pause
  290. exit
  291. )
  292. )
  293.  
  294. :: many copy commands
  295. IF %MOD%==Newer GOTO NEWER
  296. IF %MOD%==Cannon GOTO CANNON
  297. IF %MOD%==Another GOTO ANOTHER
  298. IF %MOD%==SummerSun GOTO SUMMERSUN
  299. IF %MOD%==HolidaySpecial GOTO HOLIDAY
  300.  
  301. :NEWER
  302. copy /b NewerSMBW\Tilesets\ nsmb.d\files\Stage\Texture\
  303. copy /b NewerSMBW\TitleReplay\ nsmb.d\files\Replay\title\
  304. copy /b NewerSMBW\BGs\ nsmb.d\files\Object\
  305. copy /b NewerSMBW\SpriteTex\ nsmb.d\files\Object\
  306. copy /b NewerSMBW\Layouts\ nsmb.d\files\Layout\
  307. mkdir nsmb.d\files\Sound\new
  308. copy /b NewerSMBW\Music\ nsmb.d\files\Sound\new\
  309. mkdir nsmb.d\files\Sound\new\sfx
  310. copy /b NewerSMBW\Music\sfx\ nsmb.d\files\Sound\new\sfx\
  311. copy /b NewerSMBW\Music\stream nsmb.d\files\Sound\stream\
  312. copy /b NewerSMBW\Music\rsar\ nsmb.d\files\Sound\
  313.  
  314. IF %GAMEID%==SMNP01 (
  315. copy /b NewerSMBW\Font\ nsmb.d\files\EU\EngEU\Font\
  316. copy /b NewerSMBW\Font\ nsmb.d\files\EU\FraEU\Font\
  317. copy /b NewerSMBW\Font\ nsmb.d\files\EU\GerEU\Font\
  318. copy /b NewerSMBW\Font\ nsmb.d\files\EU\ItaEU\Font\
  319. copy /b NewerSMBW\Font\ nsmb.d\files\EU\SpaEU\Font\
  320. copy /b NewerSMBW\Message\ nsmb.d\files\EU\EngEU\Message\
  321. copy /b NewerSMBW\Message\ nsmb.d\files\EU\FraEU\Message\
  322. copy /b NewerSMBW\Message\ nsmb.d\files\EU\GerEU\Message\
  323. copy /b NewerSMBW\Message\ nsmb.d\files\EU\ItaEU\Message\
  324. copy /b NewerSMBW\Message\ nsmb.d\files\EU\SpaEU\Message\
  325. copy /b NewerSMBW\OthersP\ nsmb.d\files\EU\Layout\openingTitle\
  326. )
  327.  
  328. IF %GAMEID%==SMNE01 (
  329. copy /b NewerSMBW\Font\ nsmb.d\files\US\EngUS\Font\
  330. copy /b NewerSMBW\Font\ nsmb.d\files\US\FraUS\Font\
  331. copy /b NewerSMBW\Font\ nsmb.d\files\US\SpaUS\Font\
  332. copy /b NewerSMBW\Message\ nsmb.d\files\US\EngUS\Message\
  333. copy /b NewerSMBW\Message\ nsmb.d\files\US\FraUS\Message\
  334. copy /b NewerSMBW\Message\ nsmb.d\files\US\SpaUS\Message\
  335. copy /b NewerSMBW\OthersE\ nsmb.d\files\US\Layout\openingTitle\
  336. )
  337.  
  338. IF %GAMEID%==SMNJ01 (
  339. copy /b NewerSMBW\Font\ nsmb.d\files\JP\Font\
  340. copy /b NewerSMBW\Message\ nsmb.d\files\JP\Message\
  341. copy /b NewerSMBW\OthersJ\ nsmb.d\files\JP\Layout\openingTitle\
  342. )
  343.  
  344. mkdir nsmb.d\files\NewerRes
  345. copy /b NewerSMBW\NewerRes\ nsmb.d\files\NewerRes\
  346. mkdir nsmb.d\files\LevelSamples
  347. copy /b NewerSMBW\LevelSamples\ nsmb.d\files\LevelSamples\
  348. copy /b NewerSMBW\Others\charaChangeSelectContents.arc nsmb.d\files\Layout\charaChangeSelectContents\charaChangeSelectContents.arc
  349. copy /b NewerSMBW\Others\characterChange.arc nsmb.d\files\Layout\characterChange\characterChange.arc
  350. copy /b NewerSMBW\Others\continue.arc nsmb.d\files\Layout\continue\continue.arc
  351. copy /b NewerSMBW\Others\controllerInformation.arc nsmb.d\files\Layout\controllerInformation\controllerInformation.arc
  352. copy /b NewerSMBW\Others\corseSelectMenu.arc nsmb.d\files\Layout\corseSelectMenu\corseSelectMenu.arc
  353. copy /b NewerSMBW\Others\corseSelectUIGuide.arc nsmb.d\files\Layout\corseSelectUIGuide\corseSelectUIGuide.arc
  354. copy /b NewerSMBW\Others\dateFile.arc nsmb.d\files\Layout\dateFile\dateFile.arc
  355. copy /b NewerSMBW\Others\dateFile_OLD.arc nsmb.d\files\Layout\dateFile\dateFile_OLD.arc
  356. copy /b NewerSMBW\Others\easyPairing.arc nsmb.d\files\Layout\easyPairing\easyPairing.arc
  357. copy /b NewerSMBW\Others\extensionControllerNunchuk.arc nsmb.d\files\Layout\extensionControllerNunchuk\extensionControllerNunchuk.arc
  358. copy /b NewerSMBW\Others\extensionControllerYokomochi.arc nsmb.d\files\Layout\extensionControllerYokomochi\extensionControllerYokomochi.arc
  359. copy /b NewerSMBW\Others\fileSelectBase.arc nsmb.d\files\Layout\fileSelectBase\fileSelectBase.arc
  360. copy /b NewerSMBW\Others\fileSelectBase_OLD.arc nsmb.d\files\Layout\fileSelectBase\fileSelectBase_OLD.arc
  361. copy /b NewerSMBW\Others\fileSelectPlayer.arc nsmb.d\files\Layout\fileSelectPlayer\fileSelectPlayer.arc
  362. copy /b NewerSMBW\Others\gameScene.arc nsmb.d\files\Layout\gameScene\gameScene.arc
  363. copy /b NewerSMBW\Others\infoWindow.arc nsmb.d\files\Layout\infoWindow\infoWindow.arc
  364. copy /b NewerSMBW\Others\miniGameCannon.arc nsmb.d\files\Layout\miniGameCannon\miniGameCannon.arc
  365. copy /b NewerSMBW\Others\miniGameWire.arc nsmb.d\files\Layout\miniGameWire\miniGameWire.arc
  366. copy /b NewerSMBW\Others\pauseMenu.arc nsmb.d\files\Layout\pauseMenu\pauseMenu.arc
  367. copy /b NewerSMBW\Others\pointResultDateFile.arc nsmb.d\files\Layout\pointResultDateFile\pointResultDateFile.arc
  368. copy /b NewerSMBW\Others\pointResultDateFileFree.arc nsmb.d\files\Layout\pointResultDateFileFree\pointResultDateFileFree.arc
  369. copy /b NewerSMBW\Others\preGame.arc nsmb.d\files\Layout\preGame\preGame.arc
  370. copy /b NewerSMBW\Others\select_cursor.arc nsmb.d\files\Layout\select_cursor\select_cursor.arc
  371. copy /b NewerSMBW\Others\sequenceBG.arc nsmb.d\files\Layout\sequenceBG\sequenceBG.arc
  372. copy /b NewerSMBW\Others\staffCredit.arc nsmb.d\files\Layout\staffCredit\staffCredit.arc
  373. copy /b NewerSMBW\Others\stockItem.arc nsmb.d\files\Layout\stockItem\stockItem.arc
  374. copy /b NewerSMBW\Others\stockItemShadow.arc nsmb.d\files\Layout\stockItemShadow\stockItemShadow.arc
  375. copy /b NewerSMBW\Others\yesnoWindow.arc nsmb.d\files\Layout\yesnoWindow\yesnoWindow.arc
  376.  
  377. mkdir nsmb.d\files\Maps
  378. copy /b NewerSMBW\Maps\ nsmb.d\files\Maps\
  379. mkdir nsmb.d\files\Maps\Texture
  380. copy /b NewerSMBW\Maps\Texture\ nsmb.d\files\Maps\Texture\
  381. copy /b NewerSMBW\Stages\ nsmb.d\files\Stage\
  382.  
  383. GOTO REBUILD
  384.  
  385. :CANNON
  386.  
  387. copy /b Cannon\Stage\Texture\ nsmb.d\files\Stage\Texture\
  388. mkdir nsmb.d\files\NewerRes
  389. copy /b Cannon\NewerRes\ nsmb.d\files\NewerRes\
  390. copy /b Cannon\Stage\ nsmb.d\files\Stage\
  391.  
  392. IF %GAMEID%==SMNP01 (
  393. copy /b Cannon\MessageEN\ nsmb.d\files\EU\EngEU\Message\
  394. copy /b Cannon\MessageEN\ nsmb.d\files\EU\FraEU\Message\
  395. copy /b Cannon\MessageEN\ nsmb.d\files\EU\GerEU\Message\
  396. copy /b Cannon\MessageEN\ nsmb.d\files\EU\ItaEU\Message\
  397. copy /b Cannon\MessageEN\ nsmb.d\files\EU\SpaEU\Message\
  398. copy /b Cannon\OpeningP\ nsmb.d\files\EU\Layout\openingTitle\
  399. )
  400. IF %GAMEID%==SMNE01 (
  401. copy /b Cannon\MessageEN\ nsmb.d\files\US\EngUS\Message\
  402. copy /b Cannon\MessageEN\ nsmb.d\files\US\FraUS\Message\
  403. copy /b Cannon\MessageEN\ nsmb.d\files\US\SpaUS\Message\
  404. copy /b Cannon\OpeningE\ nsmb.d\files\US\Layout\openingTitle\
  405. )
  406. IF %GAMEID%==SMNJ01 (
  407. copy /b Cannon\MessageEN\ nsmb.d\files\JP\Message\
  408. copy /b Cannon\OpeningJ\ nsmb.d\files\JP\Layout\openingTitle\
  409. )
  410.  
  411. copy /b Cannon\Sound\Stream\ nsmb.d\files\Sound\stream\
  412. copy /b Cannon\Layout\textures\ nsmb.d\files\Layout\textures\
  413. copy /b Cannon\Layout\sequenceBG\ nsmb.d\files\Layout\sequenceBG\
  414. copy /b Cannon\Layout\preGame\ nsmb.d\files\Layout\preGame\
  415. copy /b Cannon\Layout\staffCredit\ nsmb.d\files\Layout\staffCredit\
  416. copy /b Cannon\Sound\ nsmb.d\files\Sound\
  417. copy /b Cannon\WorldMap\ nsmb.d\files\WorldMap\
  418. copy /b Cannon\Env\ nsmb.d\files\Env\
  419. copy /b Cannon\MovieDemo\ nsmb.d\files\MovieDemo\
  420. copy /b Cannon\Object\ nsmb.d\files\Object\
  421.  
  422. GOTO REBUILD
  423.  
  424. :BADVERAN
  425. echo ISO version (%BASEVER%) not supported by Another, exiting...
  426. rmdir nsmb.d /s /q
  427. pause
  428. exit
  429.  
  430. :ANOTHER
  431. pause
  432. IF %GAMEID%==SMNJ01 GOTO BADVERAN
  433. IF %BASEVER%==EURv2 GOTO BADVERAN
  434.  
  435. IF %GAMEID%==SMNP01 (
  436. copy /b Another\Lang\EUENGLISH.arc nsmb.d\files\EU\EngEU\Message\Message.arc
  437. copy /b Another\Lang\EUFRENCH.arc nsmb.d\files\EU\FraEU\Message\Message.arc
  438. copy /b Another\Lang\EUGERMAN.arc nsmb.d\files\EU\GerEU\Message\Message.arc
  439. copy /b Another\Lang\EUITALIAN.arc nsmb.d\files\EU\ItaEU\Message\Message.arc
  440. copy /b Another\Lang\EUSPANISH.arc nsmb.d\files\EU\SpaEU\Message\Message.arc
  441. copy /b Another\Lang\staffroll.bin nsmb.d\files\EU\EngEU\staffroll\staffroll.bin
  442. copy /b Another\Lang\staffroll.bin nsmb.d\files\EU\FraEU\staffroll\staffroll.bin
  443. copy /b Another\Lang\staffroll.bin nsmb.d\files\EU\GerEU\staffroll\staffroll.bin
  444. copy /b Another\Lang\staffroll.bin nsmb.d\files\EU\ItaEU\staffroll\staffroll.bin
  445. copy /b Another\Lang\staffroll.bin nsmb.d\files\EU\SpaEU\staffroll\staffroll.bin
  446. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\EU\EngEU\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  447. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\EU\FraEU\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  448. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\EU\GerEU\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  449. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\EU\ItaEU\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  450. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\EU\SpaEU\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  451. copy /b Another\Layout\OpeningP\ nsmb.d\files\EU\Layout\openingTitle\
  452. )
  453.  
  454. IF %GAMEID%==SMNE01 (
  455. copy /b Another\Lang\USENGLISH.arc nsmb.d\files\US\EngUS\Message\Message.arc
  456. copy /b Another\Lang\USFRENCH.arc nsmb.d\files\US\FraUS\Message\Message.arc
  457. copy /b Another\Lang\USSPANISH.arc nsmb.d\files\US\SpaUS\Message\Message.arc
  458. copy /b Another\Lang\staffroll.bin nsmb.d\files\US\EngUS\staffroll\staffroll.bin
  459. copy /b Another\Lang\staffroll.bin nsmb.d\files\US\FraUS\staffroll\staffroll.bin
  460. copy /b Another\Lang\staffroll.bin nsmb.d\files\US\SpaUS\staffroll\staffroll.bin
  461. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\US\EngUS\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  462. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\US\FraUS\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  463. copy /b Another\Lang\mj2d00_PictureFont_32_RGBA8.brfnt nsmb.d\files\US\SpaUS\Font\mj2d00_PictureFont_32_RGBA8.brfnt
  464. copy /b Another\Layout\OpeningE\ nsmb.d\files\US\Layout\openingTitle\
  465. )
  466.  
  467. copy /b Another\Lang\Other\01-01_N_1.bin nsmb.d\files\Replay\otehon\01-01_N_1.bin
  468. copy /b Another\Lang\Other\01-02_N_1.bin nsmb.d\files\Replay\otehon\01-02_N_1.bin
  469. copy /b Another\Lang\Other\01-04_N_1.bin nsmb.d\files\Replay\otehon\01-04_N_1.bin
  470. copy /b Another\Lang\Other\01-06_N_1.bin nsmb.d\files\Replay\otehon\01-06_N_1.bin
  471. copy /b Another\Stage\ nsmb.d\files\Stage\
  472. copy /b Another\Sound\BGM_HIKOUSEN_ROUKA.32.brstm nsmb.d\files\Sound\stream\BGM_HIKOUSEN_ROUKA.32.brstm
  473. copy /b Another\Sound\BGM_HIKOUSEN_ROUKA_FAST.32.brstm nsmb.d\files\Sound\stream\BGM_HIKOUSEN_ROUKA_FAST.32.brstm
  474. copy /b Another\Sound\kazan_tika_fast_lr.ry.32.brstm nsmb.d\files\Sound\stream\kazan_tika_fast_lr.ry.32.brstm
  475. copy /b Another\Sound\kazan_tika_lr.ry.32.brstm nsmb.d\files\Sound\stream\kazan_tika_lr.ry.32.brstm
  476. copy /b Another\Sound\wii_mj2d_sound.brsar nsmb.d\files\Sound\wii_mj2d_sound.brsar
  477. copy /b Another\Layout\controllerinformation.arc nsmb.d\files\Layout\controllerInformation\controllerInformation.arc
  478. copy /b Another\Layout\MultiCorseSelectTexture.arc nsmb.d\files\Layout\textures\MultiCorseSelectTexture.arc
  479. copy /b Another\Object\ nsmb.d\files\Object\
  480. copy /b Another\WorldMap\ nsmb.d\files\WorldMap\
  481. mkdir nsmb.d\files\AnotherRes
  482. copy /b Another\AnotherRes\ nsmb.d\files\AnotherRes\
  483. copy /b Another\Object\Background\ nsmb.d\files\Object\
  484. copy /b Another\Stage\Texture\ nsmb.d\files\Stage\Texture\
  485. mkdir nsmb.d\files\Sample
  486. copy /b Another\Sample\tobira.bti nsmb.d\files\Sample\tobira.bti
  487.  
  488. GOTO REBUILD
  489.  
  490. :SUMMERSUN
  491.  
  492. copy /b SumSun\Stage\Texture\ nsmb.d\files\Stage\Texture\
  493. mkdir nsmb.d\files\NewerRes
  494. copy /b SumSun\NewerRes\ nsmb.d\files\NewerRes\
  495. copy /b SumSun\Stage\ nsmb.d\files\Stage\
  496. copy /b SumSun\Env\ nsmb.d\files\Env\
  497.  
  498. IF %GAMEID%==SMNP01 (
  499. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\EU\EngEU\Message\
  500. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\EU\FraEU\Message\
  501. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\EU\GerEU\Message\
  502. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\EU\ItaEU\Message\
  503. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\EU\SpaEU\Message\
  504. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\EU\EngEU\staffroll\
  505. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\EU\FraEU\staffroll\
  506. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\EU\GerEU\staffroll\
  507. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\EU\ItaEU\staffroll\
  508. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\EU\SpaEU\staffroll\
  509. copy /b SumSun\OpeningP\ nsmb.d\files\EU\Layout\openingTitle\
  510. )
  511. IF %GAMEID%==SMNE01 (
  512. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\US\EngUS\Message\
  513. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\US\FraUS\Message\
  514. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\US\SpaUS\Message\
  515. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\US\EngUS\staffroll\
  516. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\US\FraUS\staffroll\
  517. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\US\SpaUS\staffroll\
  518. copy /b SumSun\OpeningE\ nsmb.d\files\US\Layout\openingTitle\
  519. )
  520. IF %GAMEID%==SMNJ01 (
  521. copy /b SumSun\EU\EngEU\Message\ nsmb.d\files\JP\Message\
  522. copy /b SumSun\EU\EngEU\staffroll\ nsmb.d\files\JP\staffroll\
  523. copy /b SumSun\OpeningJ\ nsmb.d\files\JP\Layout\openingTitle\
  524. )
  525.  
  526. copy /b SumSun\Sound\stream\ nsmb.d\files\Sound\stream\
  527. copy /b SumSun\Sound\ nsmb.d\files\Sound\
  528. copy /b SumSun\WorldMap\ nsmb.d\files\WorldMap\
  529. copy /b SumSun\Object\ nsmb.d\files\Object\
  530. copy /b SumSun\Layout\preGame.arc nsmb.d\files\Layout\preGame\pregame.arc
  531. copy /b SumSun\Layout\sequenceBG.arc nsmb.d\files\Layout\sequenceBG\sequenceBG.arc
  532. copy /b SumSun\Layout\sequenceBGTexture.arc nsmb.d\files\Layout\textures\sequenceBGTexture.arc
  533. GOTO REBUILD
  534.  
  535. :HOLIDAY
  536. copy /b XmasNewer\Stage\Texture\ nsmb.d\files\Stage\Texture\
  537. copy /b XmasNewer\Stage\ nsmb.d\files\Stage\
  538. copy /b XmasNewer\Env\ nsmb.d\files\Env\
  539.  
  540. IF %GAMEID%==SMNP01 (
  541. copy /b XmasNewer\MessageEN\ nsmb.d\files\EU\EngEU\Message\
  542. copy /b XmasNewer\MessageEN\ nsmb.d\files\EU\FraEU\Message\
  543. copy /b XmasNewer\MessageEN\ nsmb.d\files\EU\GerEU\Message\
  544. copy /b XmasNewer\MessageEN\ nsmb.d\files\EU\ItaEU\Message\
  545. copy /b XmasNewer\MessageEN\ nsmb.d\files\EU\SpaEU\Message\
  546. copy /b XmasNewer\OpeningP\ nsmb.d\files\EU\Layout\openingTitle\
  547. )
  548.  
  549. IF %GAMEID==SMNE01 (
  550. copy /b XmasNewer\MessageEN\ nsmb.d\files\US\EngUS\Message\
  551. copy /b XmasNewer\MessageEN\ nsmb.d\files\US\FraUS\Message\
  552. copy /b XmasNewer\MessageEN\ nsmb.d\files\US\SpaUS\Message\
  553. copy /b XmasNewer\OpeningE\ nsmb.d\files\US\Layout\openingTitle\
  554. )
  555.  
  556. IF %GAMEID==SMNJ01 (
  557. copy /b XmasNewer\MessageEN\ nsmb.d\files\JP\Message\
  558. copy /b XmasNewer\OpeningJ\ nsmb.d\files\JP\Layout\openingTitle\
  559. )
  560.  
  561. copy /b XmasNewer\Sound\stream\ nsmb.d\files\Sound\stream\
  562. copy /b XmasNewer\Layout\preGame\ nsmb.d\files\Layout\preGame\
  563. copy /b XmasNewer\Layout\textures\ nsmb.d\files\Layout\textures\
  564. copy /b XmasNewer\Sound\ nsmb.d\files\Sound\
  565. copy /b XmasNewer\WorldMap\ nsmb.d\files\WorldMap\
  566. copy /b XmasNewer\Object\ nsmb.d\files\Object\
  567.  
  568. GOTO REBUILD
  569.  
  570. :XMLMOD
  571. for /f "tokens=* delims=" %%f in ('type riivolution\%XML%.xml') do CALL :DOREPLACE "%%f"
  572.  
  573. EXIT /b
  574. :DOREPLACE
  575. SET INPUT=%*
  576. SET OUTPUT=%INPUT:80001800=803482C0%
  577.  
  578. for /f "tokens=* delims=" %%g in ('ECHO %OUTPUT%') do ECHO %%~g>>nsmb.d\%XML%-mod.xml
  579. EXIT /b
  580.  
  581. :REBUILD
  582. :: patch main.dol before rebuilding
  583. IF %MOD%==Newer (
  584. SET XML=NewerSMBW
  585. CALL :XMLMOD
  586. wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml --source ../NewerSMBW/
  587. wit\wit dolpatch nsmb.d/sys/main.dol xml=../patch/NR.xml
  588. )
  589.  
  590. IF %MOD%==Cannon (
  591. SET XML=CannonP
  592. CALL :XMLMOD
  593. wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml --source ../Cannon/
  594. wit\wit dolpatch nsmb.d/sys/main.dol 802F148C=43616E6E6F6E4D#7769696D6A3264 --verbose
  595. wit\wit dolpatch nsmb.d/sys/main.dol 802F118C=43616E6E6F6E4D#7769696D6A3264 --verbose
  596. wit\wit dolpatch nsmb.d/sys/main.dol 802F0F8C=43616E6E6F6E4D#7769696D6A3264 --verbose
  597. wit\wit dolpatch nsmb.d/sys/main.dol xml=../patch/CS.xml
  598. )
  599.  
  600. IF %MOD%==Another (
  601. SET XML=Another
  602. CALL :XMLMOD
  603. wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml
  604. wit\wit dolpatch nsmb.d/sys/main.dol xml=../patch/AN.xml
  605. )
  606.  
  607. IF %MOD%==SummerSun (
  608. SET XML=SumSunP
  609. CALL :XMLMOD
  610. wit\wit dolpatch nsmb.d/sys/main.dol xml=../nsmb.d/!XML!-mod.xml --source ../SumSun/
  611. wit\wit dolpatch nsmb.d/sys/main.dol 802F148C=53756D6D53756E#7769696D6A3264 --verbose
  612. wit\wit dolpatch nsmb.d/sys/main.dol 802F118C=53756D6D53756E#7769696D6A3264 --verbose
  613. wit\wit dolpatch nsmb.d/sys/main.dol 802F0F8C=53756D6D53756E#7769696D6A3264 --verbose
  614. wit\wit dolpatch nsmb.d/sys/main.dol xml=../patch/CS.xml
  615. )
  616.  
  617. IF %MOD%==HolidaySpecial (
  618. IF %GAMEID%==SMNP01 SET XML=XmasP
  619. IF %GAMEID%==SMNE01 SET XML=XmasE
  620. IF %GAMEID%==SMNJ01 SET XML=XmasJ
  621. wit\wit dolpatch nsmb.d/sys/main.dol xml=../riivolution/!XML!.xml --source ../NewerSMBW/
  622. wit\wit dolpatch nsmb.d/sys/main.dol xml=../patch/HS.xml
  623. )
  624.  
  625. :bye-bye AP
  626. wit\wit dolpatch nsmb.d/sys/main.dol xml=../patch/AP.xml
  627.  
  628. :: create new image
  629. IF %MOD%==Newer (
  630. IF %GAMEID%==SMNP01 SET GAMEID=SMNP03
  631. IF %GAMEID%==SMNE01 SET GAMEID=SMNE03
  632. IF %GAMEID%==SMNJ01 SET GAMEID=SMNJ03
  633. SET MODNAME=Newer SMBW
  634. )
  635.  
  636. IF %MOD%==Cannon (
  637. IF %GAMEID%==SMNP01 SET GAMEID=SMNP04
  638. IF %GAMEID%==SMNE01 SET GAMEID=SMNE04
  639. IF %GAMEID%==SMNJ01 SET GAMEID=SMNJ04
  640. SET MODNAME=Cannon SMBW
  641. )
  642.  
  643. IF %MOD%==Another (
  644. IF %GAMEID%==SMNP01 SET GAMEID=SMNP05
  645. IF %GAMEID%==SMNE01 SET GAMEID=SMNE05
  646. SET MODNAME=Another SMBW
  647. )
  648.  
  649. IF %MOD%==SummerSun (
  650. IF %GAMEID%==SMNP01 SET GAMEID=SMNP06
  651. IF %GAMEID%==SMNE01 SET GAMEID=SMNE06
  652. IF %GAMEID%==SMNJ01 SET GAMEID=SMNJ06
  653. SET MODNAME=Newer Summer Sun
  654. )
  655.  
  656. IF %MOD%==HolidaySpecial (
  657. IF %GAMEID%==SMNP01 SET GAMEID=SMNP07
  658. IF %GAMEID%==SMNE01 SET GAMEID=SMNE07
  659. IF %GAMEID%==SMNJ01 SET GAMEID=SMNJ07
  660. SET MODNAME=Newer Holiday Special
  661. )
  662.  
  663. IF %SLOTINPUT%==1 SET SLOT=S
  664. IF %SLOTINPUT%==2 SET SLOT=K
  665.  
  666. wit\wit copy nsmb.d ../%MOD%_%GAMEID%_%BASEVER%_%SLOT%-sav.%FILEEXT% -ovv --disc-id=%GAMEID% --ticket-id=%SLOT% --tmd-id=%SLOT% --name "%MODNAME%"
  667.  
  668. :: clean up working directory
  669. rmdir nsmb.d /s /q
  670.  
  671. :: wait to make errors visible
  672. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement