1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039 |
- @ECHO off
- MODE 80,40
- CLS
- echo.
- echo ----- SMG2 Mod ISO Builder (v0.4)
- echo ----- By Humming Owl
- echo.
- :: ===============================
- :: Get to the path the BAT file is
- :: ===============================
- cd %~dp0
- :: ================
- :: mods data storage
- :: ================
- call .\tools\mods_data.bat
- :: =============================
- :: actions before starting patch
- :: =============================
- if exist ".\savefiles" (rmdir /s /q ".\savefiles")
- if exist ".\temp" (rmdir /s /q ".\temp")
- if not exist ".\mods" (mkdir ".\mods")
- for /d %%a in (".\mods\*") do rd "%%a" /q /s
- if exist ".\*.tmp" (del /S *.tmp >nul)
- :: ===================================================
- :: Key command to work with variables inside variables
- :: ===================================================
- SETLOCAL EnableDelayedExpansion
- :: =====
- :: Tools
- :: =====
- set WGET=tools\wget.exe
- set EXTRACT=tools\7z.exe
- set PATCH=tools\patch.exe
- set WIT=tools\wit.exe
- :: ==========
- :: check_file
- :: ==========
- if not "%~x1" == ".iso" (
- if not "%~x1" == ".wbfs" (
- echo.
- echo File dropped IS NOT ISO/WBFS.
- echo Verify file and try again.
- echo.
- echo Press any key to exit.
- echo.
- pause >nul
- exit
- )
- )
- %WIT% verify --test --quiet "%~f1"
- if %ERRORLEVEL% NEQ 0 (
- echo.
- echo File dropped is ISO/WBFS, but not a valid one.
- echo Verify file and try again.
- echo.
- echo Press any key to exit.
- echo.
- pause >nul
- exit
- )
- echo.
- echo File dropped IS a valid ISO/WBFS.
- FOR /F "tokens=*" %%g IN ('%WIT% ID6 "%~f1"') do (set og_gameid=%%g)
- if not "%og_gameid%" == "SB4E01" (
- if not "%og_gameid%" == "SB4P01" (
- if not "%og_gameid%" == "SB4J01" (
- if not "%og_gameid%" == "SB4K01" (
- if not "%og_gameid%" == "SB4W01" (
- echo But is not an original SMG2 file.
- echo Verify the file and try again.
- echo.
- echo Press any key to exit.
- echo.
- pause >nul
- exit
- )
- )
- )
- )
- )
- :: ============
- :: region check
- :: ============
- if "%og_gameid%" == "SB4E01" (set reg=e)
- if "%og_gameid%" == "SB4P01" (set reg=p)
- if "%og_gameid%" == "SB4J01" (set reg=j)
- if "%og_gameid%" == "SB4K01" (set reg=k)
- if "%og_gameid%" == "SB4W01" (set reg=w)
- :: ============
- echo And its an original SMG2 file.
- echo Ready to go.
- echo.
- echo Press any key if you are ready.
- echo.
- pause
- CLS
- :: ==================
- :: SMG2 Rom Hack List
- :: ==================
- echo.
- echo --- SMG2 Hacks list:
- echo.
- echo 1. Kaizo Mario Galaxy 2
- echo 2. Super Mario Galaxy 2: Cosmic Clones Challenge
- echo 3. Super Mario Galaxy 2: The New Green Stars
- echo 4. Super Mario Galaxy 2: The Kaizo Green Stars
- echo 5. Spinless Mario Galaxy 2
- echo 6. Super Mario Gravity (DEMO)
- echo 7. Super Mayro Galaxy
- echo 8. Super Mayro Galaxy Twoad
- echo 9. Super Mario Galaxy 2.5 (DEMO)
- echo 10. Outer Mario Galaxy
- echo 11. Super Mario Galaxy Deluxe
- echo 12. Super Mario Spectral (SMG2: BlueXD Edition new Demo - E/P/J/K/W)
- echo 13. Super Mario Galaxy 2: Daredevil Challenge
- echo 14. Neo Mario Galaxy (2020 Build - E/P/J)
- echo 15. Super Mario Galaxy 64: Holiday Special (E/P/J)
- echo 16. Super Mario Galaxy 2: Fog Edition
- echo 17. Super Mario Galaxy 2: The Green Star Festival
- echo 18. Super Mario Galaxy 2: Underwater Edition
- echo 19. Super Mario Galaxy 2: Master Mode
- echo 20. Super Mario Galaxy 2: The Lost Levels (v1.0)
- echo 21. Super Mario Starshine (DEMO - E/P/J)
- echo 22. Super Mario Galaxy 2: Cosmos Collapse (v1.03R - E/P/J/K/W)
- echo 23. Super Mario Galaxy 63 (v1.02 - 30 Star Demo - E/P)
- echo 24. Spring Mario Galaxy 2 (v1.0 - E/P/J)
- echo 25. Super Mario Galaxy 2: The Spacial Journey (v1.3 - E/P/J)
- echo 26. Super Mario Galaxy 2: The Green Star Festival 2 (v1.1 - E/P/J/K/W)
- echo 27. Neo Mario Galaxy: The New Green Stars (v1.0 - E/P/J)
- echo 28. Super Mario Galaxy 2: Collectors Anxiety (v1.42 - E/P/J - DEMO)
- echo 29. Super Mario 3D Galaxy (E/P/J)
- echo.
- set /P apply_mod=Select Mod number to apply to ISO/WBFS image:
- if %apply_mod%==1 (set mod=KMG2)
- if %apply_mod%==2 (set mod=SMG2CCC)
- if %apply_mod%==3 (set mod=SMG2TNGS)
- if %apply_mod%==4 (set mod=SMG2TKGS)
- if %apply_mod%==5 (set mod=SpinMG2)
- if %apply_mod%==6 (set mod=SMGRAV)
- if %apply_mod%==7 (set mod=SMAYG1)
- if %apply_mod%==8 (set mod=SMAYGT)
- if %apply_mod%==9 (set mod=SMG25D)
- if %apply_mod%==10 (set mod=OUTMG2)
- if %apply_mod%==11 (set mod=SMG2DX)
- if %apply_mod%==12 (set mod=SMG2BXDE)
- if %apply_mod%==13 (set mod=SMG2DC)
- if %apply_mod%==14 (set mod=NMG)
- if %apply_mod%==15 (set mod=SMG64HS)
- if %apply_mod%==16 (set mod=SMG2FE)
- if %apply_mod%==17 (set mod=SMG2TGSF)
- if %apply_mod%==18 (set mod=SMG2UE)
- if %apply_mod%==19 (set mod=SMG2MM)
- if %apply_mod%==20 (set mod=SMG2TLL)
- if %apply_mod%==21 (set mod=SMSS)
- if %apply_mod%==22 (set mod=SMG2CC)
- if %apply_mod%==23 (set mod=SMG63)
- if %apply_mod%==24 (set mod=SPRINGMG2)
- if %apply_mod%==25 (set mod=SMG2TSJ)
- if %apply_mod%==26 (set mod=SMG2TGSF2)
- if %apply_mod%==27 (set mod=NMGTNGS)
- if %apply_mod%==28 (set mod=SMG2CA)
- if %apply_mod%==29 (set mod=SMG3D)
- ::=====================
- :: Common build process
- ::=====================
- CLS
- echo.
- echo ----- !%mod%[0]! Mod ISO Builder
- echo ----- !%mod%[1]! !%mod%[2]!
- echo.
- set /P question1=Download Hack files (approx. size !%mod%[4]!)? (y/n):
- echo.
- if %question1%==y GOTO :down_hack
- if %question1%==n GOTO :question2
- :question2
- set /P question2=Already downloaded compressed hack file in the "mods" folder? (y/n):
- echo.
- if %question2%==y GOTO :confirm_file
- if %question2%==n GOTO :exit_1
- :exit_1
- echo Download Rom Hack files and try again.
- echo Terminating program...
- echo Press any key to close program.
- echo.
- pause >nul
- exit
- :down_hack
- echo Downloading Rom Hack files...
- echo.
- %WGET% -q --show-progress -t inf "https://archive.org/download/SMG_1-2_Rom_Hacks/!%mod%[3]!" -P mods >nul
- echo.
- :confirm_file
- if exist ".\mods\!%mod%[3]!" GOTO :extract_file
- echo Rom Hack file not found.
- echo Press any key to close program.
- echo.
- pause > nul
- exit
- :extract_file
- echo Rom Hack file found.
- echo Extracting file contents...
- :: =========================================================
- :: Win11 issue with double backslash extract path workaround
- :: =========================================================
- set "extractpath=.\mods\!%mod%[5]!"
- set "fixextractpath=%extractpath:\\=\%"
- :: =========================================================
- %EXTRACT% x ".\mods\!%mod%[3]!" -o"%fixextractpath%" >nul
- echo.
- :build_iso
- echo Building modded disc image...
- echo This will take a while.
- echo.
- echo Extracting image contents...
- %WIT% EXTRACT "%~f1" ".\temp" >nul
- :: =======================================
- :: Redirector to other mods unique options
- :: =======================================
- if %mod%==SMG2TSJ GOTO :SMG2TSJ_custom
- if %mod%==SMG2TGSF2 GOTO :SMG2TGSF2_custom
- :: ====================================
- echo Copying and replacing mod files...
- if exist ".\temp\DATA\" (xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\*" ".\temp\DATA\files\" /E /Y >nul)
- if not exist ".\temp\DATA\" (xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\*" ".\temp\files\" /E /Y >nul)
- :: ==================================
- :: Redirector to mod's unique options
- :: ==================================
- if %mod%==KMG2 GOTO :KMG2_custom
- if %mod%==SMG2TNGS GOTO :SMG2TNGS_custom
- if %mod%==SMG2TKGS GOTO :SMG2TKGS_custom
- if %mod%==NEOMG2 GOTO :NEOMG2_custom
- if %mod%==SMG2BE GOTO :SMG2BE_custom
- if %mod%==NMG GOTO :NMG_custom
- if %mod%==SMG64HS GOTO :SMG64HS_custom
- if %mod%==SMG2BXDE GOTO :SMG2BXDE_custom
- if %mod%==SMG2MM GOTO :SMG2MM_custom
- if %mod%==SMG2TLL GOTO :SMG2TLL_custom
- if %mod%==SMSS GOTO :SMSS_custom
- if %mod%==SMG2CC GOTO :SMG2CC_custom
- if %mod%==SMG63 GOTO :SMG63_custom
- if %mod%==NMGTNGS GOTO :NMGTNGS_custom
- if %mod%==SMG2CA GOTO :SMG2CA_custom
- if %mod%==SMG3D GOTO :SMG3D_custom
- :: ==================================
- :final_steps
- echo Assembling game image...
- %WIT% COPY ".\temp" ".\!%mod%[0]!.wbfs" >nul
- echo Removing temp folders...
- rmdir /s /q ".\temp"
- rmdir /s /q ".\mods\!%mod%[6]!"
- echo Editing game IDs...
- %WIT% EDIT --id "!%mod%[8]!" ".\!%mod%[0]!.wbfs" >nul
- %WIT% EDIT --tt-id "!%mod%[9]!" ".\!%mod%[0]!.wbfs" >nul
- %WIT% EDIT --name "!%mod%[1]!" ".\!%mod%[0]!.wbfs" >nul
- if exist ".\!%mod%[0]!.wbfs" GOTO :print-info
- if not exist ".\!%mod%[0]!.wbfs" GOTO :print-error
- :print-error
- echo.
- echo Error while modding the image.
- echo Please try again.
- echo Press any key to continue.
- echo.
- pause >nul
- exit
- :print-info
- echo.
- echo Disc image modded correctly.
- echo.
- echo Game ID: !%mod%[8]!
- echo TMD ID: !%mod%[9]!
- echo Game name: !%mod%[1]!
- echo.
- echo If you want to contribute (New Hack/Improve Tool)
- echo go to my GitHub repository and open an Issue.
- echo Have fun^!
- echo.
- echo Press any key to exit.
- echo.
- pause >nul
- exit
- :: ===============================
- :: Unique options/commands per mod
- :: ===============================
- :: ====
- :: KMG2
- :: ====
- :KMG2_custom
- echo.
- echo Detected Region: %reg%
- set /P luigi=Play with Luigi? (y/n):
- echo Applying hex patches...
- if %luigi%==y (set luigipatch=_Luigi.patch)
- if %luigi%==n (set luigipatch=.patch)
- if %reg%==e (set KMG2[8]=KG2E01)
- if %reg%==p (set KMG2[8]=KG2P01)
- if %reg%==j (set KMG2[8]=KG2J01)
- if %reg%==k (set KMG2[8]=KG2K01)
- if %reg%==w (set KMG2[8]=KG2W01)
- if exist ".\temp\DATA" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\%KMG2[8]%%luigipatch%" >nul)
- if not exist ".\temp\DATA" (%PATCH% ".\temp\sys\main.dol" < ".\patches\%KMG2[8]%%luigipatch%" >nul)
- echo.
- GOTO :final_steps
- :: ========
- :: SMG2TNGS
- :: ========
- :SMG2TNGS_custom
- echo.
- echo Detected Region: %reg%
- echo.
- echo Applying hex patches...
- if %reg%==e (set SMG2TNGS[8]=NGSE01)
- if %reg%==p (set SMG2TNGS[8]=NGSP01)
- if %reg%==j (set SMG2TNGS[8]=NGSJ01)
- if %reg%==k (set SMG2TNGS[8]=NGSK01)
- if %reg%==w (set SMG2TNGS[8]=NGSW01)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- echo This hack works with a 120 star savefile and a txt file.
- echo The savefiles need to be applied manually.
- echo In the "instructions" folder read the "savefiles.txt"
- echo file to know how to apply the savefiles to the game.
- echo.
- echo Copying savefiles to "safefiles" folder...
- echo.
- xcopy ".\mods\SMG2 The New Green Stars\SMG2 The New Green Stars\SaveGame\SB4E01\*" ".\savefiles\" /E /Y >nul
- GOTO :final_steps
- :: ========
- :: SMG2TKGS
- :: ========
- :SMG2TKGS_custom
- echo.
- echo This hack works with a 120 stars savefile.
- echo The savefiles need to be applied manually.
- echo In the "instructions" folder read the "savefiles.txt"
- echo file to know how to apply them.
- echo.
- echo Copying savefiles to "safefiles" folder...
- echo.
- xcopy ".\mods\TKGS 1.1.0\SMG2 The Kaizo Green Stars\SaveGame\SB4E01\*" ".\savefiles\" /E /Y >nul
- GOTO :final_steps
- :: ===
- :: NMG
- :: ===
- :NMG_custom
- echo.
- echo Detected Region: %reg%
- set /P dd=Play in Daredevil mode? (y/n):
- echo Applying hex patches...
- if %dd%==y (set ddpatch=Daredevil.patch)
- if %dd%==n (set ddpatch=noDaredevil.patch)
- if %reg%==e (set NMG[8]=NMGE01)
- if %reg%==p (set NMG[8]=NMGP01)
- if %reg%==j (set NMG[8]=NMGJ01)
- if exist ".\temp\DATA" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\%NMG[8]%_%ddpatch%" >nul)
- if not exist ".\temp\DATA" (%PATCH% ".\temp\sys\main.dol" < ".\patches\%NMG[8]%_%ddpatch%" >nul)
- echo.
- GOTO :final_steps
- :: =======
- :: SMG64HS
- :: =======
- :SMG64HS_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG64HS[8]=M64E01)
- if %reg%==p (set SMG64HS[8]=M64P01)
- if %reg%==j (set SMG64HS[8]=M64J01)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- GOTO :final_steps
- :: ========
- :: SMG2BXDE
- :: ========
- :SMG2BXDE_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG2BXDE[8]=BXDE01)
- if %reg%==p (set SMG2BXDE[8]=BXDP01)
- if %reg%==j (set SMG2BXDE[8]=BXDJ01)
- if %reg%==k (set SMG2BXDE[8]=BXDK01)
- if %reg%==w (set SMG2BXDE[8]=BXDW01)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- :: if exist ".\temp\DATA" (
- :: xcopy ".\mods\!%mod%[6]!\Regions\NTSC (USA)\*" ".\temp\DATA\files\" /E /Y >nul
- :: xcopy ".\mods\!%mod%[6]!\Regions\PAL (Europe)\*" ".\temp\DATA\files\" /E /Y >nul)
- :: if not exist ".\temp\DATA" (
- :: xcopy ".\mods\!%mod%[6]!\Regions\NTSC (USA)\*" ".\temp\files\" /E /Y >nul
- :: xcopy ".\mods\!%mod%[6]!\Regions\PAL (Europe)\*" ".\temp\files\" /E /Y >nul)
- echo.
- GOTO :final_steps
- :: ======
- :: SMG2MM
- :: ======
- :SMG2MM_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG2MM[8]=SB4MME)
- if %reg%==p (set SMG2MM[8]=SB4MMP)
- if %reg%==j (set SMG2MM[8]=SB4MMJ)
- if %reg%==k (set SMG2MM[8]=SB4MMK)
- if %reg%==w (set SMG2MM[8]=SB4MMW)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- GOTO :final_steps
- :: =======
- :: SMG2TLL
- :: =======
- :: SMG2TLL_custom (old)
- :: echo.
- :: echo Detected Region: %reg%
- :: set /P tlldd=Play in Daredevil mode? (y/n):
- :: set /P bluestar=Play with Blue Launch stars? (y/n):
- :: echo Applying hex patches...
- :: if %tlldd%==y (set ddpatch=Daredevil.patch)
- :: if %tlldd%==n (set ddpatch=noDaredevil.patch)
- :: if %tllreg%==e (set SMG2TLL[8]=TLLE01)
- :: if %tllreg%==p (set SMG2TLL[8]=TLLP01)
- :: if %tllreg%==j (set SMG2TLL[8]=TLLJ01)
- :: if %bluestar%==y (
- :: if exist ".\temp\DATA" (
- :: xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\SystemData\SuperSpinDriver.arc" ".\temp\DATA\files\ObjectData\" /E /Y >nul
- :: xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\SystemData\SpinDriver.arc" ".\temp\DATA\files\ObjectData\" /E /Y >nul
- :: xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\SystemData\YellowChip.arc" ".\temp\DATA\files\ObjectData\" /E /Y >nul)
- :: if not exist ".\temp\DATA" (
- :: xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\SystemData\SuperSpinDriver.arc" ".\temp\files\SystemData\" /E /Y >nul
- :: xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\SystemData\SpinDriver.arc" ".\temp\files\ObjectData\" /E /Y >nul
- :: xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\SystemData\YellowChip.arc" ".\temp\files\ObjectData\" /E /Y >nul)
- :: )
- :: if exist ".\temp\DATA" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\%SMG2TLL[8]%_%ddpatch%" >nul)
- :: if not exist ".\temp\DATA" (%PATCH% ".\temp\sys\main.dol" < ".\patches\%SMG2TLL[8]%_%ddpatch%" >nul)
- :: GOTO :final_steps
- :SMG2TLL_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG2TLL[8]=TLLE01)
- if %reg%==p (set SMG2TLL[8]=TLLP01)
- if %reg%==j (set SMG2TLL[8]=TLLJ01)
- if %reg%==k (set SMG2TLL[8]=TLLK01)
- if %reg%==w (set SMG2TLL[8]=TLLW01)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- GOTO :final_steps
- :: ====
- :: SMSS
- :: ====
- :SMSS_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMSS[8]=MSSE01)
- if %reg%==p (set SMSS[8]=MSSP01)
- if %reg%==j (set SMSS[8]=MSSJ01)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- GOTO :final_steps
- :: ======
- :: SMG2CC
- :: ======
- :SMG2CC_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG2CC[8]=MCCE01)
- if %reg%==p (set SMG2CC[8]=MCCP01)
- if %reg%==j (set SMG2CC[8]=MCCJ01)
- if %reg%==k (set SMG2CC[8]=MCCK01)
- if %reg%==w (set SMG2CC[8]=MCCW01)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- GOTO :final_steps
- :: =====
- :: SMG63
- :: =====
- :SMG63_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG63[8]=MG63E1)
- if %reg%==p (set SMG63[8]=MG63P1)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- GOTO :final_steps
- :: =======
- :: SMG2TSJ
- :: =======
- :SMG2TSJ_custom
- echo.
- echo 1. Green Plains
- echo 2. Pull Path
- echo 3. Rocky Gardens
- echo 4. Nostalgic Valley
- echo.
- set /P galaxy=Choose a galaxy (1, 2, 3 or 4):
- echo.
- echo Replacing pertinent files...
- if %galaxy%==1 (
- if exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\GreenPlains\*" ".\temp\DATA\files\" /E /Y >nul )
- if not exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\GreenPlains\*" ".\temp\files\" /E /Y >nul )
- )
- if %galaxy%==2 (
- if exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\PullPath\*" ".\temp\DATA\files\" /E /Y >nul )
- if not exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\PullPath\*" ".\temp\files\" /E /Y >nul )
- )
- if %galaxy%==3 (
- if exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\RockyGardens\*" ".\temp\DATA\files\" /E /Y >nul )
- if not exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\RockyGardens\*" ".\temp\files\" /E /Y >nul )
- )
- if %galaxy%==4 (
- if exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\NostalgicValley\*" ".\temp\DATA\files\" /E /Y >nul )
- if not exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\NostalgicValley\*" ".\temp\files\" /E /Y >nul )
- )
- echo.
- echo This hack works with a savefile.
- echo The savefiles need to be applied manually.
- echo In the "instructions" folder read the "savefiles.txt"
- echo file to know how to apply them.
- echo.
- echo Copying savefiles to "safefiles" folder...
- echo.
- if %galaxy%==1 ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\GreenPlains\SaveGame\*" ".\savefiles\" /E /Y >nul )
- if %galaxy%==2 ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\PullPath\SaveGame\*" ".\savefiles\" /E /Y >nul )
- if %galaxy%==3 ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\RockyGardens\SaveGame\*" ".\savefiles\" /E /Y >nul )
- if %galaxy%==4 ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\NostalgicValley\SaveGame\*" ".\savefiles\" /E /Y >nul )
- echo.
- GOTO :final_steps
- :: =========
- :: SMG2TGSF2
- :: =========
- :SMG2TGSF2_custom
- echo.
- echo 1. Green Star Festival 2
- echo 2. Red Star DLC
- echo.
- set /P dlc=Choose a gamemode (1 or 2):
- echo.
- echo Replacing pertinent files...
- if %dlc%==1 GOTO :GSF2gamemode1
- if %dlc%==2 GOTO :GSF2gamemode2
- :GSF2gamemode1
- if exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\tgsf2\*" ".\temp\DATA\files\" /E /Y >nul )
- if not exist ".\temp\DATA" ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\tgsf2\*" ".\temp\files\" /E /Y >nul )
- echo.
- GOTO :GSF2pre_final
- :GSF2gamemode2
- if exist ".\temp\DATA" (xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\RedStarsDLC\*" ".\temp\DATA\files\" /E /Y >nul)
- if not exist ".\temp\DATA" (xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\RedStarsDLC\*" ".\temp\files\" /E /Y >nul)
- echo.
- echo Detected Region: %reg%
- echo.
- echo Applying hex patches...
- if %reg%==e (set SMG2TGSF2[8]=SGF2E1)
- if %reg%==p (set SMG2TGSF2[8]=SGF2P1)
- if %reg%==j (set SMG2TGSF2[8]=SGF2J1)
- if %reg%==k (set SMG2TGSF2[8]=SGF2K1)
- if %reg%==w (set SMG2TGSF2[8]=SGF2W1)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- :GSF2pre_final
- echo.
- echo This hack works with a savefile.
- echo The savefiles need to be applied manually.
- echo In the "instructions" folder read the "savefiles.txt"
- echo file to know how to apply them.
- echo.
- echo Copying savefiles to "safefiles" folder...
- echo.
- if %dlc%==1 ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\tgsf2\SaveGame\*" ".\savefiles\" /E /Y >nul )
- if %dlc%==2 ( xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\RedStarsDLC\SaveGame\*" ".\savefiles\" /E /Y >nul )
- echo.
- GOTO :final_steps
- :: =======
- :: NMGTNGS
- :: =======
- :NMGTNGS_custom
- echo.
- set /P dd=Play in Daredevil mode? (y/n):
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %dd%==y (set ddpatch=Daredevil.patch)
- if %dd%==n (set ddpatch=noDaredevil.patch)
- if %reg%==e (set NMGTNGS[8]=NMGGSE)
- if %reg%==p (set NMGTNGS[8]=NMGGSP)
- if %reg%==j (set NMGTNGS[8]=NMGGSJ)
- if exist ".\temp\DATA" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\%NMGTNGS[8]%_%ddpatch%" >nul)
- if not exist ".\temp\DATA" (%PATCH% ".\temp\sys\main.dol" < ".\patches\%NMGTNGS[8]%_%ddpatch%" >nul)
- echo.
- echo.
- echo This hack works with a savefile.
- echo The savefiles need to be applied manually.
- echo In the "instructions" folder read the "savefiles.txt"
- echo file to know how to apply them.
- echo.
- echo Copying savefiles to "safefiles" folder...
- echo.
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\SaveGame\*" ".\savefiles\" /E /Y >nul
- echo.
- GOTO :final_steps
- :: ======
- :: SMG2CA
- :: ======
- :SMG2CA_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG2CA[8]=MGCAE1)
- if %reg%==p (set SMG2CA[8]=MGCAP1)
- if %reg%==j (set SMG2CA[8]=MGCAJ1)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- echo.
- GOTO :final_steps
- :: =====
- :: SMG3D
- :: =====
- :SMG3D_custom
- echo.
- echo Detected Region: %reg%
- echo Applying hex patches...
- if %reg%==e (set SMG3D[8]=MG3DE1)
- if %reg%==p (set SMG3D[8]=MG3DP1)
- if %reg%==j (set SMG3D[8]=MG3DJ1)
- if exist ".\temp\DATA\" (%PATCH% ".\temp\DATA\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- if not exist ".\temp\DATA\" (%PATCH% ".\temp\sys\main.dol" < ".\patches\!%mod%[8]!.patch" >nul)
- :: Replace all language folders with EuEnglish folder contents
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\EuDutch\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\EuFrench\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\EuGerman\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\EuItalian\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\EuSpanish\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\UsEnglish\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\UsFrench\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\UsSpanish\" /E /Y >nul
- xcopy ".\mods\!%mod%[6]!\!%mod%[7]!\LocalizeData\EuEnglish\*" ".\temp\DATA\files\LocalizeData\JpJapanese\" /E /Y >nul
- echo.
- GOTO :final_steps
|