Applying the Patches [WIP] - KunoichiZ/SunMoon-SaltySD-QR-Injection-Guide GitHub Wiki

Applying the Patches [WIP]

What you will need:

  • This test .bcstm file. It will replace the Sun/Moon Wild Pokemon Battle music with a mashup of RSE/ORAS's Wild Pokemon Battle music.

What you will need from the Prerequisites & File Setup page:

  • LunarIPS
  • The IPS Patches zip**

** If you are using the latest nightly version of Luma3DS, you should have already chosen an .ips file to put inside of luma/titles/0004000000164800 folder (for Pokemon Sun) or luma/titles/0004000000175E00 folder (for Pokemon Moon) then go to the [Testing the Patch] section.

What you will need from the Using GodMode9 page:

  • The decompressed code.bin from the v1.1 update

An Overview of SciresM's SunMoon Patches

From SciresM's SMPatcher GitHub releases page:

  • Allows for the resigning of any QR type, via hooked QR decryption.
  • Allows for the scanning of Injection QRs, generatable via PKHeX
  • Grants unlimited QR scans/day
  • Enables one to scan the same QR multiple times.
  • Optionally, disable outlines from being drawn.

Applying the Patches

If you are using the latest stable version of Luma3DS and:

If you are using the latest nightly version of Luma3DS and:

  • you only want SaltySD, go to this section or
  • you only want the QR injection, go to this section.
  • you want to test both patches, start by testing SaltySD then by testing the QR injection.

Applying SunMoon Patches

  1. Navigate to the QR Injection folder inside of the IPS Patches folder.
  2. If you want to keep the outlines, open the Outlines folder. If you do not want to keep the outlines, open the No Outlines folder.
  3. Choose the game you have and move the .ips patch to the same folder as your code.bin and LunarIPS.
  4. Open LunarIPS and check the box that says Register File Type then close LunarIPS.
  5. Double-click the code.ips patch, change the dropdown that says "Most Common ROM Files" to say "All Files". Click on your code.bin when the dialog box opens then click Open.
  6. You should get a popup saying that your file was successfully patched.
  7. Rename your code.bin to 0004000000164800.bin (for Pokemon Sun) or 0004000000175E00.bin (for Pokemon Moon).
  8. Go to this section to test the patch.

Applying SaltySD Patch

  1. Navigate to the SaltySD folder inside of the IPS Patches folder.
  2. If you want to keep the outlines, open the Outlines folder. If you do not want to keep the outlines, open the No Outlines folder.
  3. Choose the game you have and move the .ips patch to the same folder as your code.bin and LunarIPS.
  4. Open LunarIPS and check the box that says Register File Type then close LunarIPS.
  5. Double-click the code.ips patch, change the dropdown that says "Most Common ROM Files" to say "All Files". Click on your code.bin when the dialog box opens then click Open.
  6. You should get a popup saying that your file was successfully patched.
  7. Rename your code.bin to 0004000000164800.bin (for Pokemon Sun) or 0004000000175E00.bin (for Pokemon Moon).
  8. Go to this section to test the patch.

Applying Both Patches

  1. Navigate to the SaltySD with QR Injection folder inside of the IPS Patches folder.
  2. If you want to keep the outlines, open the Outlines folder. If you do not want to keep the outlines, open the No Outlines folder.
  3. Choose the game you have and move the .ips patch to the same folder as your code.bin and LunarIPS.
  4. Open LunarIPS and check the box that says Register File Type then close LunarIPS.
  5. Double-click the code.ips patch, change the dropdown that says "Most Common ROM Files" to say "All Files". Click on your code.bin when the dialog box opens then click Open.
  6. You should get a popup saying that your file was successfully patched.
  7. Rename your code.bin to 0004000000164800.bin (for Pokemon Sun) or 0004000000175E00.bin (for Pokemon Moon).
  8. Go to this section and then this section to see if both patches worked.

Testing and Using the SaltySD Patch with the latest nightly version of Luma3DS

  1. Make sure that you can see your file extensions on whatever computer you are using.
  2. Place the bgm_nj_vs_norapoke.dspadpcm.bcstm file inside of your SaltySD/SunMoon/data/sound folder.
  3. Put your SD card back into your 3DS, press and hold the Select button and the Power button to boot into your Luma3DS configuration, and make sure that Enable game patching is enabled [enabled looks like this: (x)]
  4. Start Sun or Moon and encounter a wild Pokemon. If all goes well, the Wild Pokemon Battle Music should be replaced with our custom .bcstm.

Testing and Using the SaltySD Patch with the latest stable version of Luma3DS

  1. Make sure that you can see your file extensions on whatever computer you are using.
  2. Place the bgm_nj_vs_norapoke.dspadpcm.bcstm file inside of your SaltySD/SunMoon/data/sound folder.
  3. Place your 0004000000164800.bin (for Pokemon Sun) or 0004000000175E00.bin file (for Pokemon Moon) inside of your luma/code_sections folder. If you have both games, you can place both patched .bin files inside of the code_sections folder.
  4. Put your SD card back into your 3DS, press and hold the Select button and the Power button to boot into your Luma3DS configuration, and make sure that Enable region/language emu. and ext. .code is enabled [enabled looks like this: (x)]
  5. Start Sun or Moon and encounter a wild Pokemon. If all goes well, the Wild Pokemon Battle Music should be replaced with our custom .bcstm.

Testing the SunMoon (QR Injection) Patch with the latest stable Luma3DS

  1. Press and hold the Select button and the Power button to boot into your Luma3DS configuration, and make sure that Enable region/language emu. and ext. .code is enabled [enabled looks like this: (x)]
  2. Start Pokemon Sun or Moon and start your save file.
  3. Make sure that you do not have a Pokemon in Box 1, Slot 1 of your PC.
  4. Press X to bring up the menu, tap the arrow to move the menu over a page, and select QR Scanner.
  5. Open this link in a new tab to bring up a test QR code. Hold down the R button on your 3DS to scan the QR code.
  6. If all goes well, you should have a Female Bulbasaur in Box 1, Slot 1 of your PC (This Bulbasaur is just a test and should not be traded or used online).

Testing the SunMoon (QR Injection Patch with the latest nightly Luma3DS

  1. Press and hold the Select button and the Power button to boot into your Luma3DS configuration, and make sure that Enable game patching is enabled [enabled looks like this: (x)]
  2. Start Pokemon Sun or Moon and start your save file.
  3. Make sure that you do not have a Pokemon in Box 1, Slot 1 of your PC.
  4. Press X to bring up the menu, tap the arrow to move the menu over a page, and select QR Scanner.
  5. Hold down the R button on your 3DS to scan the QR code below.
  6. If all goes well, you should have a Female Bulbasaur in Box 1, Slot 1 of your PC (This Bulbasaur is just a test and should not be traded or used online).

Female Bulbasaur test QR code


Final Notes:

  • If you want to make changes to any of the music in Sun and Moon, I've made a list of what the .bcstms are, available here. Place the .bcstm you want in your SaltySD/SunMoon/data/sound folder and make sure to name it to THE EXACT NAME as I have it in that text file. For example, to replace the Pokemon Center music, rename the .bcstm you placed in your SaltySD/SunMoon/data/sound folder (not the .bcstm from above) to bgm_nj_pokecen.dspadpcm.bcstm.
  • If you want to inject your own Pokemon, you can make your own Pokemon with PKHeX. After you have finished making your Pokemon, right click on the Pokemon icon next to the legality checker, and click "QR!". You can then set what box and slot you want that Pokemon to appear in.