Skip to content

Instantly share code, notes, and snippets.

@ItsCrocoSwine
Last active March 26, 2024 21:23
Show Gist options
  • Save ItsCrocoSwine/e9bf17d1e3d685d0dda5322a85e7e910 to your computer and use it in GitHub Desktop.
Save ItsCrocoSwine/e9bf17d1e3d685d0dda5322a85e7e910 to your computer and use it in GitHub Desktop.
# Pokemon Cart Redirect Helper script https://gist.github.com/ItsCrocoSwine/e9bf17d1e3d685d0dda5322a85e7e910 by - ItsCrocoSwine
# for use with https://github.com/zaksabeast/DreamRadarCartRedirect by - zaksabeast
# V1.3
# Copy the contents of patches/out/ to sd:/3ds/CartRedirectPatches/ before following this script
#check for patches
set PREVIEW_MODE "Checking for problems..."
if not find 0:/3ds/CartRedirectPatches NULL
mkdir 0:/3ds/CartRedirectPatches
echo "No patches found\nplease copy the contents of patches/out/\n to sd:/3ds/CartRedirectPatches/ and try again"
poweroff
elif not find 0:/3ds/CartRedirectPatches/* NULL
echo "No patches found\nplease copy the contents of patches/out/\n to sd:/3ds/CartRedirectPatches/ and try again"
poweroff
end
if find 0:/3ds/CartRedirectPatches/patches/out NULL
if ask -o -s "Patches misplaced,\nattempt to move them now?"
mv -w 0:/3ds/CartRedirectPatches/patches/out 0:/3ds/CartRedirectPatches
rm -o -s 0:/3ds/CartRedirectPatches/patches
echo "success!"
else
echo "Fine, do it yourself"
goto MainMenu_Exit
end
end
if find 0:/3ds/CartRedirectPatches/out NULL
if ask -o -s "Patches misplaced,\nattempt to move them now?"
mv -w 0:/3ds/CartRedirectPatches/out 0:/3ds/CartRedirectPatches
echo "success!"
else
echo "Fine, do it yourself"
goto MainMenu_Exit
end
end
if not find 0:/3ds/CartRedirectPatches/jpn_radar NULL
echo "jpn_radar folder missing\nplease copy the contents of patches/out/\nto sd:/3ds/CartRedirectPatches/ and try again"
poweroff
elif not find 0:/3ds/CartRedirectPatches/radar NULL
echo "radar folder missing\nplease copy the contents of 'patches/out/\nto sd:/3ds/CartRedirectPatches/ and try again"
poweroff
elif not find 0:/3ds/CartRedirectPatches/transporter NULL
echo "transporter folder missing\nplease copy the contents of patches/out/\nto sd:/3ds/CartRedirectPatches/ and try again"
poweroff
end
# check for titles
if not find 0:/luma/titles/00040000000AE100 NULL
mkdir 0:/luma/titles/00040000000AE100
end
if not find 0:/luma/titles/0004000000073200 NULL
mkdir 0:/luma/titles/0004000000073200
end
if not find 0:/luma/titles/00040000000C9C00 NULL
mkdir 0:/luma/titles/00040000000C9C00
end
# check for saves
if find 0:/roms/nds/saves/black.sav NULL
set BLACKSAV found
else
set BLACKSAV missing
end
if find 0:/roms/nds/saves/black2.sav NULL
set BLACK2SAV found
else
set BLACK2SAV missing
end
if find 0:/roms/nds/saves/white.sav NULL
set WHITESAV found
else
set WHITESAV missing
end
if find 0:/roms/nds/saves/white2.sav NULL
set WHITE2SAV found
else
set WHITE2SAV missing
end
#####################Main Menu####################
@Start
set PREVIEW_MODE "Cart Redirect Helper Script\nblack.sav - $[BLACKSAV]\nblack2.sav - $[BLACK2SAV]\nwhite.sav - $[WHITESAV]\nwhite2.sav - $[WHITE2SAV]"
labelsel -s "Choose an Option." MainMenu_*
goto Start
#####################Dream Radar####################
@MainMenu_Dream_Radar
labelsel -o -s "Choose a game to \ninstall the patch for" Dream_Radar_*
goto Start
@Dream_Radar_Black_2
if find 0:/luma/titles/00040000000AE100/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/Radar/black2.ips 0:/luma/titles/00040000000AE100/code.ips
echo "Dream radar patch\nsuccessfully overwritten\nfor Black 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black2.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/Radar/black2.ips 0:/luma/titles/00040000000AE100/code.ips
echo "Dream radar patch\nsuccessfully installed\nfor Black 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black2.sav"
end
goto Start
@Dream_Radar_White_2
if find 0:/luma/titles/00040000000AE100/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/Radar/white2.ips 0:/luma/titles/00040000000AE100/code.ips
echo "Dream radar patch\nsuccessfully overwritten\nfor white 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white2.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/Radar/white2.ips 0:/luma/titles/00040000000AE100/code.ips
echo "Dream radar patch\nsuccessfully installed\nfor white 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white2.sav"
end
goto Start
@Dream_Radar_Remove
if find 0:/luma/titles/00040000000AE100/code.ips NULL
if ask -o -s "Remove the patch for Dream Radar?"
rm 0:/luma/titles/00040000000AE100/code.ips
echo "Dream Radar patch removed"
else
echo "cancelled"
end
else
echo "nothing to remove"
end
goto MainMenu_Dream_Radar
#####################JPN Dream Radar####################
@MainMenu_JPN_Dream_Radar
labelsel -o -s "Choose a game to \ninstall the patch for" JPN_Dream_Radar_*
goto Start
@JPN_Dream_Radar_Black_2
if find 0:/luma/titles/0004000000073200/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/jpn_Radar/black2.ips 0:/luma/titles/0004000000073200/code.ips
echo "JPN dream radar patch\nsuccessfully overwritten\nfor Black 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black2.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/jpn_Radar/black2.ips 0:/luma/titles/0004000000073200/code.ips
echo "JPN dream radar patch\nsuccessfully installed\nfor Black 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black2.sav"
end
goto Start
@JPN_Dream_Radar_White_2
if find 0:/luma/titles/0004000000073200/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/jpn_Radar/white2.ips 0:/luma/titles/0004000000073200/code.ips
echo "JPN dream radar patch\nsuccessfully overwritten\nfor white 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white2.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/jpn_Radar/white2.ips 0:/luma/titles/0004000000073200/code.ips
echo "JPN dream radar patch\nsuccessfully installed\nfor white 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white2.sav"
end
goto Start
@JPN_Dream_Radar_Remove
if find 0:/luma/titles/0004000000073200/code.ips NULL
if ask -o -s "Remove the patch for JPN Dream Radar?"
rm 0:/luma/titles/0004000000073200/code.ips
echo "JPN Dream Radar patch removed"
else
echo "cancelled"
end
else
echo "nothing to remove"
end
goto MainMenu_JPN_Dream_Radar
#####################Transporter####################
@MainMenu_Transporter
labelsel -o -s "Choose a game to \ninstall the patch for" Transporter_*
goto Start
@Transporter_Black
if find 0:/luma/titles/00040000000C9C00/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/transporter/black.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully overwritten\nfor Black\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/transporter/black.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully installed\nfor Black\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black.sav"
end
goto Start
@Transporter_Black_2
if find 0:/luma/titles/00040000000C9C00/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/transporter/black2.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully overwritten\nfor Black 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black2.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/transporter/black2.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully installed\nfor Black 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/black2.sav"
end
goto Start
@Transporter_White
if find 0:/luma/titles/00040000000C9C00/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/transporter/white.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully overwritten\nfor white\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/transporter/white.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully installed\nfor white\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white.sav"
end
goto Start
@Transporter_White_2
if find 0:/luma/titles/00040000000C9C00/code.ips NULL
if ask -o -s "A patch is already present\nwould you like to overwrite?"
cp -w 0:/3ds/CartRedirectPatches/transporter/white2.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully overwritten\nfor white 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white2.sav"
else
echo "cancelled"
end
else
cp 0:/3ds/CartRedirectPatches/transporter/white2.ips 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch\nsuccessfully installed\nfor white 2\n \nensure you have game patching enabled\nin Luma configuration, and a save located at\n0:/roms/nds/saves/white2.sav"
end
goto Start
@Transporter_Remove
if find 0:/luma/titles/00040000000C9C00/code.ips NULL
if ask -o -s "Remove the patch for Transporter?"
rm 0:/luma/titles/00040000000C9C00/code.ips
echo "Transporter patch removed"
else
echo "cancelled"
end
else
echo "nothing to remove"
end
goto MainMenu_Transporter
@MainMenu_Exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment