From 9ea14210b39414760593f584b279af18f191b905 Mon Sep 17 00:00:00 2001 From: alberic89 Date: Thu, 17 Aug 2023 15:43:55 +0200 Subject: [PATCH 1/4] Create dir before try to copy in --- scripts/nsmbw/newerfallingleaf.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/nsmbw/newerfallingleaf.sh b/scripts/nsmbw/newerfallingleaf.sh index 80ac427..0b532ba 100644 --- a/scripts/nsmbw/newerfallingleaf.sh +++ b/scripts/nsmbw/newerfallingleaf.sh @@ -73,6 +73,7 @@ place_files () { cp "${RIIVOLUTION_DIR}"/BGs/* "${WORKDIR}"/files/Object/ cp "${RIIVOLUTION_DIR}"/SpriteTex/* "${WORKDIR}"/files/Object/ cp "${RIIVOLUTION_DIR}"/Layouts/* "${WORKDIR}"/files/Layout/ + mkdir "${WORKDIR}"/files/Sound/new/ cp -r "${RIIVOLUTION_DIR}"/Music/*.er "${WORKDIR}"/files/Sound/new/ cp "${RIIVOLUTION_DIR}"/Music/stream/* "${WORKDIR}"/files/Sound/stream/ cp "${RIIVOLUTION_DIR}"/Music/rsar/* "${WORKDIR}"/files/Sound/ From 8e55981f4482b169cdcf939ea65a2b78d17355ac Mon Sep 17 00:00:00 2001 From: alberic89 Date: Thu, 17 Aug 2023 18:54:49 +0200 Subject: [PATCH 2/4] Do this cleaner --- scripts/nsmbw/newerfallingleaf.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/nsmbw/newerfallingleaf.sh b/scripts/nsmbw/newerfallingleaf.sh index 0b532ba..30e022a 100644 --- a/scripts/nsmbw/newerfallingleaf.sh +++ b/scripts/nsmbw/newerfallingleaf.sh @@ -39,7 +39,7 @@ detect_game_version () { place_files () { - NEW_DIRS=( "${WORKDIR}"/files/LevelSamples "${WORKDIR}"/files/NewerRes "${WORKDIR}"/files/Maps ) + NEW_DIRS=( "${WORKDIR}"/files/LevelSamples "${WORKDIR}"/files/NewerRes "${WORKDIR}"/files/Maps "${WORKDIR}"/files/Sound/new ) for dir in "${NEW_DIRS[@]}"; do mkdir -p "${dir}" done @@ -73,7 +73,6 @@ place_files () { cp "${RIIVOLUTION_DIR}"/BGs/* "${WORKDIR}"/files/Object/ cp "${RIIVOLUTION_DIR}"/SpriteTex/* "${WORKDIR}"/files/Object/ cp "${RIIVOLUTION_DIR}"/Layouts/* "${WORKDIR}"/files/Layout/ - mkdir "${WORKDIR}"/files/Sound/new/ cp -r "${RIIVOLUTION_DIR}"/Music/*.er "${WORKDIR}"/files/Sound/new/ cp "${RIIVOLUTION_DIR}"/Music/stream/* "${WORKDIR}"/files/Sound/stream/ cp "${RIIVOLUTION_DIR}"/Music/rsar/* "${WORKDIR}"/files/Sound/ From 94706261d4efa916a0a739d45605fb80bd879b22 Mon Sep 17 00:00:00 2001 From: alberic89 Date: Sat, 19 Aug 2023 12:53:01 +0200 Subject: [PATCH 3/4] Add Newer Alpine Dream Newer Alpine Dream is a short mod based on Newer. I have also add a missing luigi dark moon entrie. --- database/nsmbw.db | 1 + database/scripts.db | 1 + database/titles.db | 5 +- patchimage.sh | 2 +- scripts/common/messages.sh | 3 + scripts/nsmbw/alpinedream.sh | 125 +++++++++++++++++++++++++++++++++++ 6 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 scripts/nsmbw/alpinedream.sh diff --git a/database/nsmbw.db b/database/nsmbw.db index 9197b51..edee469 100644 --- a/database/nsmbw.db +++ b/database/nsmbw.db @@ -28,3 +28,4 @@ SMN*ZY:Super Mario Skyland SMV*01:Super Mario Vacation MRR*01:New Super Mario Bros. Wii Retro Remix SMN*ZB:Newer Super Luigi Wii - Dark Moon +SAD*12:Newer Alpine Dream diff --git a/database/scripts.db b/database/scripts.db index 94ce891..117b542 100644 --- a/database/scripts.db +++ b/database/scripts.db @@ -28,6 +28,7 @@ NSMB27:MLGSuperLuigi:nsmbw/mlgsuperluigibroswii.sh NSMB28:Cliff:nsmbw/cliffsmb.sh NSMB29:Virtual:nsmbw/virtualspecial.sh NSMB30:NSLDM:nsmbw/luigidarkmoon.sh +NSMB31:Alpine:nsmbw/alpinedream.sh NSMB99:NSMBWCharacters:nsmbw/nsmbw_characters.sh MKW1:Wiimmfi:mkwii/wiimmfi.sh MKW2:Wiimmpatch:wiimmfi_generic.sh diff --git a/database/titles.db b/database/titles.db index 21ae927..f28c27c 100644 --- a/database/titles.db +++ b/database/titles.db @@ -4028,6 +4028,9 @@ RYAJSC:Yatterman Wii (Simplified Chinese Translation) RZDC01:The Legend of Zelda: Twilight Princess (Custom) S02PES:Sing It Star 90's S80U3Q:SingItStar Ultimate 80s +SADP12:Newer Alpine Dream +SADE12:Newer Alpine Dream +SADJ12:Newer Alpine Dream SAME01:New Super Mario Bros. Wii 11 American Revolution SANE01:New Super Mario Bros. Wii Five Spica Edition SANT3Q:SingItStar Anthems @@ -6201,7 +6204,7 @@ MB4J:Party Quiz Mega Q MB5J:Rangurissah II MB6E:Shining Force II MB6J:Shining Force II: Inishie no Fuuin -MB6P:Shining Force II +MB6P:Shining Force II MB7E:Mega Turrican MB7P:Mega Turrican MB8E:Phantasy Star II diff --git a/patchimage.sh b/patchimage.sh index 017c7f1..1052bca 100755 --- a/patchimage.sh +++ b/patchimage.sh @@ -56,7 +56,7 @@ setup_tools for game in ${GAME[@]}; do case ${game} in NSMB_ALL ) - NEW_GAME=(${NEW_GAME[@]} NSMB{1..29}) + NEW_GAME=(${NEW_GAME[@]} NSMB{1..31}) ;; PKMN_ALL ) diff --git a/scripts/common/messages.sh b/scripts/common/messages.sh index 684ac24..42d4d44 100644 --- a/scripts/common/messages.sh +++ b/scripts/common/messages.sh @@ -36,6 +36,7 @@ NSMB27 MLGSuperLuigi MLG Super Luigi Bros. Wii NSMB28 Cliff Cliff Super Mario Bros. Wii NSMB29 Virtual Challenging Super Mario Bros. Wii: Virtual Special NSMB30 NSLDM Newer Super Luigi Wii: Dark Moon +NSMB31 Alpine Newer Alpine Dream NSMB99 NSMBWCharacters Customize Characters @@ -139,6 +140,8 @@ NSMB26 RevisedSuperMarioBros RSMBW Version 1.1.zip NSMB27 MLGSuperLuigi MLGLuigiWii.zip NSMB28 Cliff Cliff_Super_Mario_Brothers_Wiiv1.1.1.zip NSMB29 Virtual ChaSMBW_VrS_v0.2.zip +NSMB30 NSLDM Luigi_Dark_Moon_1.1.zip +NSMB31 Alpine Newer-Alpine-Dream-main.zip NSMB99 NSMBWCharacters Alternative Character Files are supplied " diff --git a/scripts/nsmbw/alpinedream.sh b/scripts/nsmbw/alpinedream.sh new file mode 100644 index 0000000..0bf1931 --- /dev/null +++ b/scripts/nsmbw/alpinedream.sh @@ -0,0 +1,125 @@ +#!/bin/bash + +WORKDIR=nsmb.d +DOL=${WORKDIR}/sys/main.dol +DOWNLOAD_LINK="https://github.com/AlphaT12/Newer-Alpine-Dream/archive/refs/heads/main.zip" +RIIVOLUTION_ZIP="Newer-Alpine-Dream-main.zip" +RIIVOLUTION_DIR="Newer-Alpine-Dream-main/NewerAD" +GAMENAME="Newer Alpine Dream" +XML_SOURCE="${RIIVOLUTION_DIR}" +XML_FILE="${RIIVOLUTION_DIR}"/../riivolution/NewerAD.xml +GAME_TYPE=RIIVOLUTION +BANNER_LOCATION=${WORKDIR}/files/opening.bnr +WBFS_MASK="SMN[PEJ]01" + +show_notes () { + +echo -e \ +"************************************************ +${GAMENAME} + +11 levels with 8 classic levels, 1 tower level, 1 castle level, 1 secret hard level + +By ALPHA_T + +Source: https://github.com/AlphaT12/Newer-Alpine-Dream +Base Image: New Super Mario Bros. Wii (SMN?01) +Supported Versions: EURv1, EURv2, USAv1, USAv2, JPNv1 + +************************************************" + +} + +detect_game_version () { + + nsmbw_version + + GAMEID=SAD${REG_LETTER}12 + +} + +place_files () { + + NEW_DIRS=( "${WORKDIR}"/files/LevelSamples "${WORKDIR}"/files/NewerRes "${WORKDIR}"/files/Sound/new/sfx "${WORKDIR}"/files/Maps ) + for dir in "${NEW_DIRS[@]}"; do + mkdir -p "${dir}" + done + + case ${VERSION} in + EUR* ) + LANGDIRS=( EngEU FraEU GerEU ItaEU SpaEU NedEU ) + for dir in "${LANGDIRS[@]}"; do + cp -r "${RIIVOLUTION_DIR}"/{Font,Message}/ "${WORKDIR}"/files/EU/"${dir}"/ + done + cp "${RIIVOLUTION_DIR}"/OthersP/* "${WORKDIR}"/files/EU/Layout/openingTitle/ + ;; + + USAv* ) + LANGDIRS=( FraUS EngUS SpaUS ) + for dir in "${LANGDIRS[@]}"; do + cp -r "${RIIVOLUTION_DIR}"/{Font,Message}/ "${WORKDIR}"/files/US/"${dir}"/ + done + cp "${RIIVOLUTION_DIR}"/OthersE/* "${WORKDIR}"/files/US/Layout/openingTitle/ + ;; + + JPNv1 ) + cp "${RIIVOLUTION_DIR}"/Font/* "${WORKDIR}"/files/JP/Font/ + cp "${RIIVOLUTION_DIR}"/Message/* "${WORKDIR}"/files/JP/Message/ + cp "${RIIVOLUTION_DIR}"/OthersJ/* "${WORKDIR}"/files/JP/Layout/openingTitle/ + ;; + esac + + cp "${RIIVOLUTION_DIR}"/Tilesets/* "${WORKDIR}"/files/Stage/Texture/ + cp "${RIIVOLUTION_DIR}"/TitleReplay/* "${WORKDIR}"/files/Replay/title/ + cp "${RIIVOLUTION_DIR}"/BGs/* "${WORKDIR}"/files/Object/ + cp "${RIIVOLUTION_DIR}"/SpriteTex/* "${WORKDIR}"/files/Object/ + cp "${RIIVOLUTION_DIR}"/Layouts/* "${WORKDIR}"/files/Layout/ + cp -r "${RIIVOLUTION_DIR}"/Music/*.er "${WORKDIR}"/files/Sound/new/ + cp "${RIIVOLUTION_DIR}"/Music/sfx/* "${WORKDIR}"/files/Sound/new/sfx/ + cp "${RIIVOLUTION_DIR}"/Music/stream/* "${WORKDIR}"/files/Sound/stream/ + cp "${RIIVOLUTION_DIR}"/Music/rsar/* "${WORKDIR}"/files/Sound/ + cp "${RIIVOLUTION_DIR}"/NewerRes/* "${WORKDIR}"/files/NewerRes/ + cp "${RIIVOLUTION_DIR}"/LevelSamples/* "${WORKDIR}"/files/LevelSamples/ + cp "${RIIVOLUTION_DIR}"/Others/charaChangeSelectContents.arc "${WORKDIR}"/files/Layout/charaChangeSelectContents/charaChangeSelectContents.arc + cp "${RIIVOLUTION_DIR}"/Others/characterChange.arc "${WORKDIR}"/files/Layout/characterChange/characterChange.arc + cp "${RIIVOLUTION_DIR}"/Others/continue.arc "${WORKDIR}"/files/Layout/continue/continue.arc + cp "${RIIVOLUTION_DIR}"/Others/controllerInformation.arc "${WORKDIR}"/files/Layout/controllerInformation/controllerInformation.arc + cp "${RIIVOLUTION_DIR}"/Others/corseSelectMenu.arc "${WORKDIR}"/files/Layout/corseSelectMenu/corseSelectMenu.arc + cp "${RIIVOLUTION_DIR}"/Others/corseSelectUIGuide.arc "${WORKDIR}"/files/Layout/corseSelectUIGuide/corseSelectUIGuide.arc + cp "${RIIVOLUTION_DIR}"/Others/dateFile.arc "${WORKDIR}"/files/Layout/dateFile/dateFile.arc + cp "${RIIVOLUTION_DIR}"/Others/dateFile_OLD.arc "${WORKDIR}"/files/Layout/dateFile/dateFile_OLD.arc + cp "${RIIVOLUTION_DIR}"/Others/easyPairing.arc "${WORKDIR}"/files/Layout/easyPairing/easyPairing.arc + cp "${RIIVOLUTION_DIR}"/Others/extensionControllerNunchuk.arc "${WORKDIR}"/files/Layout/extensionControllerNunchuk/extensionControllerNunchuk.arc + cp "${RIIVOLUTION_DIR}"/Others/extensionControllerYokomochi.arc "${WORKDIR}"/files/Layout/extensionControllerYokomochi/extensionControllerYokomochi.arc + cp "${RIIVOLUTION_DIR}"/Others/fileSelectBase.arc "${WORKDIR}"/files/Layout/fileSelectBase/fileSelectBase.arc + cp "${RIIVOLUTION_DIR}"/Others/fileSelectBase_OLD.arc "${WORKDIR}"/files/Layout/fileSelectBase/fileSelectBase_OLD.arc + cp "${RIIVOLUTION_DIR}"/Others/fileSelectPlayer.arc "${WORKDIR}"/files/Layout/fileSelectPlayer/fileSelectPlayer.arc + cp "${RIIVOLUTION_DIR}"/Others/gameScene.arc "${WORKDIR}"/files/Layout/gameScene/gameScene.arc + cp "${RIIVOLUTION_DIR}"/Others/infoWindow.arc "${WORKDIR}"/files/Layout/infoWindow/infoWindow.arc + cp "${RIIVOLUTION_DIR}"/Others/miniGameCannon.arc "${WORKDIR}"/files/Layout/miniGameCannon/miniGameCannon.arc + cp "${RIIVOLUTION_DIR}"/Others/miniGameWire.arc "${WORKDIR}"/files/Layout/miniGameWire/miniGameWire.arc + cp "${RIIVOLUTION_DIR}"/Others/pauseMenu.arc "${WORKDIR}"/files/Layout/pauseMenu/pauseMenu.arc + cp "${RIIVOLUTION_DIR}"/Others/pointResultDateFile.arc "${WORKDIR}"/files/Layout/pointResultDateFile/pointResultDateFile.arc + cp "${RIIVOLUTION_DIR}"/Others/pointResultDateFileFree.arc "${WORKDIR}"/files/Layout/pointResultDateFileFree/pointResultDateFileFree.arc + cp "${RIIVOLUTION_DIR}"/Others/preGame.arc "${WORKDIR}"/files/Layout/preGame/preGame.arc + cp "${RIIVOLUTION_DIR}"/Others/select_cursor.arc "${WORKDIR}"/files/Layout/select_cursor/select_cursor.arc + cp "${RIIVOLUTION_DIR}"/Others/sequenceBG.arc "${WORKDIR}"/files/Layout/sequenceBG/sequenceBG.arc + cp "${RIIVOLUTION_DIR}"/Others/staffCredit.arc "${WORKDIR}"/files/Layout/staffCredit/staffCredit.arc + cp "${RIIVOLUTION_DIR}"/Others/stockItem.arc "${WORKDIR}"/files/Layout/stockItem/stockItem.arc + cp "${RIIVOLUTION_DIR}"/Others/stockItemShadow.arc "${WORKDIR}"/files/Layout/stockItemShadow/stockItemShadow.arc + cp "${RIIVOLUTION_DIR}"/Others/yesnoWindow.arc "${WORKDIR}"/files/Layout/yesnoWindow/yesnoWindow.arc + cp -r "${RIIVOLUTION_DIR}"/Maps/* "${WORKDIR}"/files/Maps/ + cp "${RIIVOLUTION_DIR}"/Stages/* "${WORKDIR}"/files/Stage/ + +} + +dolpatch () { + + cp "${XML_FILE}" "${XML_FILE}".new + sed -e 's/80001800/803482C0/g' -i "${XML_FILE}".new + XML_FILE="${XML_FILE}".new + + ${WIT} dolpatch ${DOL} xml="${XML_FILE}" -s "${XML_SOURCE}" xml="${PATCHIMAGE_PATCH_DIR}/NewerSMBW-Loader.xml" -q + ${WIT} dolpatch ${DOL} xml="${PATCHIMAGE_PATCH_DIR}/NSMBW_AP.xml" -q + +} From 545ce0c22da5a7793186523716b009a977f265cf Mon Sep 17 00:00:00 2001 From: alberic89 Date: Sat, 19 Aug 2023 14:40:16 +0200 Subject: [PATCH 4/4] Show two links if the download of riivolution patch failed --- scripts/common/downloader.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/common/downloader.sh b/scripts/common/downloader.sh index aa42873..eb94385 100644 --- a/scripts/common/downloader.sh +++ b/scripts/common/downloader.sh @@ -47,7 +47,7 @@ download_riivolution_patch () { ${GDOWN} "${DOWNLOAD_LINK}" \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp >/dev/null || \ ( rm "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp && \ - echo -e "\nDownload failed!" && exit 57 ) + download_riivolution_failed && exit 57 ) mv "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" echo "*** >> unpacking" @@ -61,7 +61,7 @@ download_riivolution_patch () { --path="${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${DOWNLOAD_LINK}" >/dev/null || \ ( rm "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp && \ - echo -e "\nDownload failed!" && exit 57 ) + download_riivolution_failed && exit 57 ) mv "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" echo "*** >> unpacking" @@ -80,6 +80,7 @@ download_riivolution_patch () { "" ) echo "no download link for ${GAMENAME} available." + download_riivolution_failed exit 21 ;; @@ -89,7 +90,7 @@ download_riivolution_patch () { wget -nv --no-check-certificate "${DOWNLOAD_LINK}" \ -O "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp || \ ( rm "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp && \ - echo -e "\nDownload failed!" && exit 57 ) + download_riivolution_failed && exit 57 ) mv "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}"__tmp \ "${PATCHIMAGE_RIIVOLUTION_DIR}/${RIIVOLUTION_ZIP}" echo "*** >> unpacking" @@ -122,3 +123,11 @@ download_covers () { done } + +download_riivolution_failed () { + echo -e "\nDownload failed! +You can try to download manualy from : + https://goaibox.com/sl/3suwkMVFZj + https://archive.org/download/new-super-mario-bros-wii-mod-archive/" + +}