Repacking Garc files back into Xorpad?

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by jastolze, Jan 17, 2015.

  1. jastolze
    OP

    jastolze GBAtemp Fan

    Member
    359
    43
    May 2, 2012
    United States
  2. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,096
    4,003
    Oct 7, 2007
    United States
    Levelland, Texas
    You don't edit the xorpads. Since you have decrypted everything, you no longer need the xorpad files. You need to repack the romfs file then repack the rom.

    As you can see here:



    I've already succeeded in doing this. :D

    I followed these video tutorials found in this post below:

    http://gbatemp.net/threads/may-over-world-location.377769/#post-5255255

    The site text is in french, but if you just follow what he does, you can pretty much get it done. You already got all the hard parts done (decrypted, extracted RomFS). You just need to follow the rebuilding rom tutorial video.
     
    jastolze likes this.
  3. jastolze
    OP

    jastolze GBAtemp Fan

    Member
    359
    43
    May 2, 2012
    United States
    Okay, so lemme get this straight: By repacking the romfs files, it'll use the (new) garc files that I edited? I don't need to do anything else? How does the program know if the garc files have been updated? Nonetheless, I'll try this immediately :)
     
  4. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,096
    4,003
    Oct 7, 2007
    United States
    Levelland, Texas
    You repack the entire extracted RomFS folder that you edited the files in. (Make sure you remove the garc file extension to the edited GARC files. The GARC packer I know of will tack on that to new GARC files. Delete the unedited original GARC of coarse). For Pokemon ORAS or X/Y, they are just numbers as their file name. ;) )

    You can instead just use this:

    https://github.com/kwsch/pk3DS

    It comes bundled with RSWE and RSTE (both of which already have the randomizer feature). The big plus to using this is that you only point it to the "a" folder of your extracted RomFS. It handles unpacking/repacking of the GARC files automatically. ;)

    If you decide to migrate over to using that, be sure to repack your edited GARCs and remove the extracted folders generated from unpacking the GARC files you changed.

    You can also just redo your edits. Which ever is faster for you. ;)
     
  5. jastolze
    OP

    jastolze GBAtemp Fan

    Member
    359
    43
    May 2, 2012
    United States
    Thanks. I did not know that PK3ds would repack the files. However, I'm having an issue with the Extract Romfs.bin part. I opened CMD like it said and pasted what it said, but it's just giving me a whole range of options.

    Like, -i --info,
    or -x extract

    And it's not extracting anything. What did I do wrong?

    Edit: can i use GARCTool to extract? or will that mess it up? I had success when using GarcTool.
     
  6. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,096
    4,003
    Oct 7, 2007
    United States
    Levelland, Texas
    This command extracts RomFS from your unpacked rom. You had to have already extracted the Encrypted RomFS bin file and decrypted it using the xorpad files.

    Rename your original RomFS file "DecryptedRomFS.bin" so that the following command works. Or edit the command to point to the file name of your extracted RomFS.bin file. (of coarse make sure it's the decrypted version)

    It should then create an ExtractedRomFS folder which will contain all the game data you will need to edit.

    If it didn't extract, you either did not decrypt the file correctly or you told it to extract a file that doesn't exist. A typo in one of the commands will also cause it to not do anything.
     
  7. Traiver

    Traiver GBAtemp Maniac

    Member
    1,103
    1,158
    Aug 1, 2014
    Germany
    Pew! *Out of the bag*
    Apache Thunder: First: great work! :) Second: Do you know how to change the pokemon colors?
     
    XRaidersP likes this.
  8. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,096
    4,003
    Oct 7, 2007
    United States
    Levelland, Texas
    You'll probably need this tool for that:

    http://projectpokemon.org/forums/showthread.php?44168-Ohana3DS-(BCH-Tool)

    Can be used to alter model related data. Pokemon colors is defined by their texture files. (FYI, the shiny version of each pokemon has a separate texture file for that as well)

    Thus far I've only done changes to encounter data. I wouldn't be the person to ask about that so unfortunately can't help you much on that front. Sorry. :(
     
  9. Traiver

    Traiver GBAtemp Maniac

    Member
    1,103
    1,158
    Aug 1, 2014
    Germany
    Pew! *Out of the bag*
    Thank you, man. You're still a great help. I have a problem with this: I have a fully decrypted and ripped Alpha Sapphire but there are no files that I can open with this tool, How do I do this?
     
    XRaidersP likes this.
  10. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,096
    4,003
    Oct 7, 2007
    United States
    Levelland, Texas
    You have to extract the ExeFS, RomFS, and ExHeader from the 3DS file. Two of which you can just use 3DSExplorer to extract. However in my experience 3DSExplorer will crash if you try to extract the RomFS file from any of the gen 6 pokemon games (the file sizes are too large for it to handle)

    You'll need a program called "getromfs.exe" to extract it instead. It comes packaged with the tools the tutorial videos come with that I linked you to in my initial post. ;)
     
  11. Traiver

    Traiver GBAtemp Maniac

    Member
    1,103
    1,158
    Aug 1, 2014
    Germany
    Pew! *Out of the bag*
    You dont understand, I have already extracted my game xD But there are no files with the end name .bch and so on... Only some sounds and a "a" folder.
     
    XRaidersP likes this.
  12. jastolze
    OP

    jastolze GBAtemp Fan

    Member
    359
    43
    May 2, 2012
    United States
    Hey Apache, I'm still having that error on this command: ctrtool.exe -t exefs --exefsdir =. / ExtractedExeFs DecryptedExeFS.bin
    I don't know why, but it's not letting me continue... I'm following the guide as is, but he didn't run into this error...
     
  13. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,096
    4,003
    Oct 7, 2007
    United States
    Levelland, Texas
    You have to find the correct files within the "a" folder and unpack them with a GARC unpacker. If you have an "a" folder, you already have the RomFS.bin file extracted. Not sure why you are trying to extract it again?

    Since I never tried to edit the models, I don't know where you'd find them. Sorry. :(
     
    Traiver likes this.
  14. Traiver

    Traiver GBAtemp Maniac

    Member
    1,103
    1,158
    Aug 1, 2014
    Germany
    Pew! *Out of the bag*
    No, no, I dont want to extract them twice xD I only cant open a file in OHANA3DS. So thats why I need a GARC unpacker? :)
     
    XRaidersP likes this.
  15. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,096
    4,003
    Oct 7, 2007
    United States
    Levelland, Texas
    Traiver likes this.
  16. Traiver

    Traiver GBAtemp Maniac

    Member
    1,103
    1,158
    Aug 1, 2014
    Germany
    Pew! *Out of the bag*
    Thanks, you're the man! :)