Users normally have issues with pk3DS, likely because they had a bad ROM dump, and the files extracted from it causes issues.
This guide will teach users how to extract good files using GodMode9. This would require a hacked 3DS to achieve the desired result.
For illustrative purposes, the screenshots featured will use Moon. However, do understand that the methodology works for other mainline Pokémon games on the 3DS (ignoring Virtual Console games).
This tutorial is not about how to randomize your games.
This tutorial is about how to get the requisite files to be used by pk3DS.
I will not entertain any questions on how to randomize your game, you have been warned.
We will not be providing any ROMs nor the files from within ROMs, as linking to or providing data files extracted from ROMs are against our forum's rules.
1. Have GodMode9 on your SD card.
(gm9 folder on SD root, GodMode9.firm in luma/payloads)
[Note: Emunand isn't one of my options, as I don't have an Emunand]
3. Mount the game's image to drive (look in the spoilers below, to see the steps)
If Physical Cartridge -> GAMECART
If Digital Copy on Sysnand -> SYSNAND SD
If Digital Copy on Emunand -> EMUNAND SD
You only need to go into either spoiler under 3.1 or 3.2, depending on whether your game is physical or digital.
No need to do both.
3.1.1 Go in the GAMECART folder. You should find something similar to this:
3.1.2 Press the A button while hovering over the .3ds file (Not the trim.3ds file)
3.1.3 On bottom screen, go into NCSD image options...
3.1.4 On bottom screen, select Mount image to drive
3.1.5 Go into content0.game
3.2 SYSNAND SD or EMUNAND SD
3.2.1 Go into SYSNAND SD folder or EMUNAND SD folder.
(the one you enter, depends on whether your stored game is in sysnand or emunand)
(I'm using SYSNAND SD, cause I do not have emunand)
3.2.2 Go into title
3.2.3 Go into 00040000
3.2.4 On On top screen, navigate to the folder that has the game ID that represents the game you're trying to extract from:
|Pokémon Omega Ruby
|Pokémon Alpha Sapphire
|Pokémon Ultra Sun
|Pokémon Ultra Moon
Since game used is Moon in this example, the game ID to go into is 00175E00.
3.2.5 Go into content
3.2.6 Press the A button on the .app file that has the largest filesize.
In this case, it would be 00000002.app
3.2.7 On bottom screen, select NCCH image options...
3.2.8 On bottom screen, select Mount image to drive
4. On top screen, navigate down to exefs (not exefs.bin), and press the Y button once. (This copies the exefs folder)
Hovering over exefs on top screen, and button options on bottom screen
5. Press the B button a few times to back all the way to the root screen.
6. Now go into SDCARD
This screen shows the SD card. Yours probably won't look like mine. In any case, press the Y button while hovering over the two dots (. .) to paste the exefs into the root of the SD card.
7. Now paste it here.
8. Once exefs pasted, repeat from step 4 to step 7, but instead of exefs, copy romfs folder.
The romfs copying and pasting will probably take awhile. Sit patiently. Keep your 3DS charged.
9. Congratulations, you now have working files for PK3DS.
Shift them into whatever folder on your computer that PK3DS reads from.
Note: If you want to include files from a game update:
a. Paste the base game folders, as listed above
b. Then paste the files from the game update into the folders as obtained in part a.
b1. to extract the update files, go into your SYSNAND SD/EMUNAND SD in step 3
b2. For step 3.2.3 navigate to 0004000e instead.
c. The rest of the steps would be similar to what I mentioned above. If you're confused, at least try to get the base game to work first.