[Tutorial] How to Rebuild a Custom Update for Pokémon XY/ORAS

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Asia81, Jun 22, 2015.

  1. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    With this tutorial, you will be able to rebuild a custom update for Pokemon X/Y, OmegaRuby/AlphaSapphire.

    If you decrypt and use the latest update as a base, you will also can go online, such as GTS :)

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    Summary:

    -Prerequisites
    - Decrypt your Update
    - Edit your Update
    - Rebuild your Update​

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    Prerequisites

    Download and install my PackHack:
    http://pastebin.com/A1s8cmsD

    Install the new SetupUS.exe of HackingToolkit3DS as a common tool:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    Decrypt your Update

    First, you need to decrypt your Update.cia with Decrypt9WIP.
    For more infos, and the tutorial, go here:
    https://gbatemp.net/threads/tutorial-how-to-decrypt-extract-and-rebuild-a-cia.388677/

    Once your update is extracted, your folder should be something like this:
    [​IMG]

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    Edit your Update

    Part 1 - Prepare your Custom RomFS:

    For now, you can just edit/inject GARC files and the sound folder.
    Don't touch other files/folders (GARC are files without extension).

    First Way : Edit a GARC already in the update

    Extract your GARC with GARC Tool.
    Edit what you want.
    Rebuild the GARC with GARC Tool.

    You can also take a GARC from your full game, and put it in the same path, by deleting the same/old GARC from your update.

    Second Way: Inject a GARC which is not in the Update
    For this example, I will use the AlphaSapphire's Title Banner (GARC a/1/5/2).

    For add a new GARC in your update, you need to know the A path.
    And make a new folder in the romfs folder of your update.

    Now, you need to rename this new folder by the A letter and the first number of the GARC path.
    In my case, I need to name the folder a1. In this a1 folder, I will make another folder, name it 5, and in this 5 folder, I will put my GARC "2".

    Look, you will understand:
    [​IMG]

    You can also see it in video, if you always don't understand.
    I'm sure you'll can understand with it:


    Once your custom A folder and your GARC are ready, you need to edit the .code.bin file to tell him that you want to load the GARC from the update, and not the game.

    You need a decompressed code.bin file!

    Open HackingToolkit3DS, write pppt.
    Pokemon Patch Pointer Tool is now open.

    With it, target and open the decompressed code.bin from your update.
    In the tool, write the path after the A:
    [​IMG]
    Do the same for all other GARC you injected.

    And press the Patch button :
    [​IMG]
    Third Way: Inject a Sound folder
    For this, you need first to extract your full game.

    Take the following folders from your full game:
    Code:
    sound
    sounddebug
    And replace sound by sons:
    Code:
    sound become sons
    sounddebug become sonsdebug
    Now put your both folder from your full game and renamed, in the romfs of your update.
    Open .code.bin (Decompressed, I recall) in an hexadecimal editor. HxD is highly recommended.

    Search and Replace the following string:
    Code:
    72 6F 6D 3A 2F 73 6F 75 6E 64 2F 73 61 6E 67 6F 5F 73 6F 75 6E 64 2E 62 63 73 61 72
    By:
    Code:
    72 6F 6D 32 3A 2F 73 6F 6E 73 2F 73 61 6E 67 6F 5F 73 6F 75 6E 64 2E 62 63 73 61 72
    Part 2 - Rebuild your Custom RomFS:

    Open HackingToolkit3DS, write RFSB.
    RomFS Builder is now open.
    With it, open your ExtractedRomFS folder (in PackHack).
    Click GO. Wait and save it named CustomRomFS.bin.
    Done !


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

    Rebuild the Update

    [​IMG] [​IMG]

    Open HackingToolkit3DS, write ppb.
    Write if you want rebuild your update for X/Y, OmegaRuby/AlphaSapphire (x/y/or/as)

    Wait until the full rebuild, now you should have a new Patch.CIA in this folder.

    Try to install it, and run the game.
    See if it's working.

    Enjoy.

    This is a Proof Of Working showing the installation of CIAs created in the Part 1 of my video, you will can see the installation, then the in-game banner as expected:


    [​IMG] [​IMG]

    Credits and Thanks To
     
    Last edited by Asia81, Apr 11, 2016


  2. froggestspirit

    froggestspirit D/P/Pt Demix Guy

    Member
    1,075
    528
    Jul 28, 2011
    United States
    This should work for unpacking and repacking other updates, right?
     
  3. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    For other games ?
    No, it's not the same thing to do
     
  4. KazoWAR

    KazoWAR GBAtemp Advanced Maniac

    Member
    1,799
    681
    Aug 12, 2008
    United States
    Winter Haven
    ill give it a shot. but i was rebuilding the cias pretty much the same way(from the spoofed 1.2 update source)

    *EDIT 1*Still same thing, if i leave romfs alone, it works, but if i touch romfs(even repacking untouched files) it broken, this is with the v1.5 update BTW, let me test with v1.2

    *EDIT 2* v1.2 not working either. what the fuck.

    *EDIT 3* Turns out I was using an old version of RomFS Builder :(
     
    Last edited by KazoWAR, Jun 22, 2015
  5. DJPlayer

    DJPlayer Banned

    Banned
    542
    184
    May 21, 2015
    Netherlands
    I used you PackHack so I wrote it in this thread

    Not sure but could your RomFS-extractor have Problems with japanese filenames?
    I'm not sure if the FIlenames should be really like "#0.bch.lz" and some foldernames like: #######_###

    I decrypted and extracted Fire Emblem If and want to rebuilt it.
    But the filesize of the rebuilt romfs.bin is ~ 85MB smaller?

    Not sure if the RomFS extractor extracted all files correctly.
    here's a example of some foldernames:
    Warning: Spoilers inside!
     
  6. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    If you want, i can make a tutorial vidéo ?

    — Posts automatically merged - Please don't double post! —

    RomFS Extractor is from SciresM, not me.

    Use my batch > partition > romfs
     
  7. DJPlayer

    DJPlayer Banned

    Banned
    542
    184
    May 21, 2015
    Netherlands
    I used your batch...
    I wrote my own DUmp-TOol. That worked fine
     
  8. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    It seems working fine.
    Maybe your OS does not allow japanese character.

    What's your game ?
     
  9. DJPlayer

    DJPlayer Banned

    Banned
    542
    184
    May 21, 2015
    Netherlands
    I'm using Windows 8.1 Ultimate (Japanese & Chinese Fonts installed)
    Decrypted and extracted Fire Emblem If
     
  10. KazoWAR

    KazoWAR GBAtemp Advanced Maniac

    Member
    1,799
    681
    Aug 12, 2008
    United States
    Winter Haven
    i got it working, i was using a older version of romfs builder and it was making bad romfs.
     
  11. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    Working for you ? Nice
     
  12. Stoned

    Stoned GBAtemp Advanced Fan

    Member
    778
    113
    Mar 26, 2014
    Gambia, The
    2 Quick Question.
    I have Changed my Box Layouts whit Ohana3ds.
    I Have Saved the new Layouts and repack the Garc file.

    1. Question must i delete the .garc or not? Example 123.garc to 123?
    2. When i Link the Boxlayouts to the Patch Exampe Folder a1 Folder 0 and 3.garc than build the romfs and the Patch i become a Blackscreen when i Enter the Pc
    What can i Do?

    @Edit: Works. :D
    My Problem was i have the garc extracted whit ohana and Repacked whit Garctool. :D
     
    Last edited by Stoned, Jun 28, 2015
  13. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    @Stoned

    1) Yeah. Delete the .garc. Test.garc become Test (For example).
    So your 3.garc should be 3. (a/1/0/3 ?)

    2) With Patch RomFS Pointer Tool.exe, have you target 1 0 3 ? :
    http://image.noelshack.com/fichiers/2015/26/1435482527-patchbuilder1.png

    And put your garc like here: ?
    http://image.noelshack.com/fichiers/2015/26/1435482877-patchbuilder2.png

    Now you need to rebuild the update romfs.
    Then take the romfs.bin, code.bin, icon.bin, DecryptedExHeader.bin (rename it exheader.bin) (all from the update)
    And puts these files in the AS folder (or OR). and use my batch > as / or and wait.
     
  14. Stoned

    Stoned GBAtemp Advanced Fan

    Member
    778
    113
    Mar 26, 2014
    Gambia, The
    Yes i Have.
    Or can i this not use whit cfw?
    I Have no Gateway. I Have Only Cfw (Rxtools)
     
  15. Stoned

    Stoned GBAtemp Advanced Fan

    Member
    778
    113
    Mar 26, 2014
    Gambia, The
    New Problem.
    When i Put the 0/0/8 to a0/0/8 and Point whit the pointer Tool, it´s doesnt work Ingame.
    By rebuild the update become i a Message whit not cxikey found or so
    What make i Wrong?
     
  16. Stoned

    Stoned GBAtemp Advanced Fan

    Member
    778
    113
    Mar 26, 2014
    Gambia, The
    What am I doing wrong ?

    I try to Inject the Overworld data romfs a0 2 1 (buildet to romfs.bin
     

    Attached Files:

  17. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    These two messages are quite normal, you can ignore them
     
  18. Stoned

    Stoned GBAtemp Advanced Fan

    Member
    778
    113
    Mar 26, 2014
    Gambia, The
    Okay. The Models Doesnt show up.

    Or must i Start a new Game?
     
  19. Asia81
    OP

    Asia81 In my Ecchi World <3

    Member
    4,958
    2,452
    Nov 15, 2014
    France
    Albi
    what's your garc ?
     
  20. Stoned

    Stoned GBAtemp Advanced Fan

    Member
    778
    113
    Mar 26, 2014
    Gambia, The
    0/2/1 22Mb