Created ACNL Mod, but can't figure out how to make CIA

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by rainbowPhoenix, Aug 8, 2016.

  1. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    So I created a mod for Animal Crossing: New Leaf to insert myself as a custom villager (it's a gift for my girlfriend). When I build the romfs file and apply it with HANS, it works perfectly. But although I've tried several different ways to create a CIA, they all crash immediately on launch, with the generic "An error has occured" message.

    I have tried the following steps:

    - I built the CIA using makerom. I used a default rsf I found here: (https://gist.githubusercontent.com/...69e4519a6e0007f997f0bc1d680cbd5716d15/app.rsf) (although I had to fix a typo on line 79), and my command line argument was (recalling from memory, excluding file path arguments) "makerom -target t -f cia -i <path>:1:1" Result: Once installed, the app had no banner, no icon, no name, and crashed immediately on run. (In addition, when I went to uninstal in system settings, the system reported the app was 0 blocks. The CIA was also 1.5GB, when every other method I tried gave a CIA of about 750MB)

    - I used the PackHack 3ds builder to make a .3ds CXI file (I tried both CARD1 and CARD2 options). I then used Riku's 3DS to CIA converter to make the CIAs. I did not provide the xorpads because, as I undersrand it, the 3ds builder created unencrypted CXIs. Result: Once installed, the app had the correct icon and name, but still no banner. It still crashed immediately on run.

    - I used the PackHack 3ds builder to make a .3ds CXI file (I only tried CARD1 this time). I then used ihaveamac's 3dsconv to create the CIA. But 3dsconv said the .3ds file was encrypted (weird, because Riku's script didn't have a problem with it). So I made the ncchinfo.bin and used Decrypt9WIP to get the xorpads. But 3dsconv rejected the pads, saying they were either corrupt or not the correct pads (I checked the titleID of the xorpad, and it was the correct ID.)

    I feel like I've tried everything, and I don't understand why it's not working. Am I missing something obvious or doing something wrong? Any help would be greatly appreciated. I can provide any of the files I was working with if anyone thinks they would help, but I'm not sure which ones would be most helpful, and some of them are pretty large.

    Thank you, to anyone who's willing to take a look at this for me. I really appreciate it.
     


  2. Ev1l0rd

    Ev1l0rd (⌐◥▶◀◤) Knight of Void

    Member
    1,015
    715
    Oct 26, 2015
    Netherlands
    Land of Darkness and Bounty
    Create a layeredFS plugin and use NTR CFW and put the files that need patching on the SD card. Much easier than going through the hassle of recompiling a CIA.
     
  3. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,895
    5,045
    Mar 17, 2010
    Norway
    Alola
    PackHack should work, did you remember to encrypt the CIA after creation with Decrypt9?
     
  4. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,803
    553
    Nov 26, 2015
    United States
  5. samcambolt270

    samcambolt270 GBAtemp Advanced Fan

    Member
    687
    295
    Dec 24, 2014
    United States
    when you get it to work, post some pics and stuff, i'd love to see the mod.
     
  6. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    I did not encrypt the CIA. I assumed that it wasn't necessary, that if a CFW could bypass signautre checks, it could run unencrypted binaries.

    I tried to use Decrypt9WIP to encrypt the CIA, but it said the CIA was corrupt. This reminded me of how 3dsconv said the .3ds was already encrypted, and how after I generated the xorpad it said that they were corrupt. My interpretation of this is that my .3ds is bad. So since I know the romfs is good, that means I'm doing something wrong while building the .3ds.

    This might be relevant, but I originally installed the game via FreeShop and dumped all the files by using Braindump. Would this interefere with using PackHack's 3ds builder to create a good 3ds?

    I'm going to try to get my hands on an Animal Crossing .3ds so I can see how PackHack or Decrypt9 dumps it. Maybe that will show me what I need to be able to repack.
     
  7. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,895
    5,045
    Mar 17, 2010
    Norway
    Alola
    I don't think you can dump all the files needed to make a working ROM with braindump. *hax doesn't have access to them.
     
  8. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    I've done this before, but I don't want my GF to have to use NTR or Hans every time she wants to play.

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

    That makes sense, and would explain why the installed title was missing a banner. That makes me disappointed.

    I found a .3ds, so I'm going to try unpacking and repacking it. But for the future, is there any a9lh tool that can dump installed titles? From what I understand, Decrypt9WIP only works on carts.
     
  9. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,895
    5,045
    Mar 17, 2010
    Norway
    Alola
    Decrypt9 can dump the title keys/tickets then you can download the files with a PC, I'm pretty sure you can decrypt the SD card content with it too.
     
  10. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    I got it working! Thank you so much!

    You were right that I didn't have everything I needed to build a valid NCSD. After starting fresh with a valid .3ds of the game, I was able to add my changes and rebuild it.

    FTR, I didn't have to encrypt the CIA.

    Pictures incoming, but it's midnight in my timezone and I want to celebrate my success with well deserved sleep. (And I have work tomorrow.)
     
  11. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,895
    5,045
    Mar 17, 2010
    Norway
    Alola
    I think the "full" dump braindump makes is meant for Citra, as it's just enough to get a game working in Citra and therefore people no longer need a <=9.2 console to make legal copies of their games to use in Citra, but it's not enough to make it work on real hardware.
    Glad to hear you got it working though :)
     
  12. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    There's not much to see. But here's some pics of the new villager in their house (no NTR screenshots because I forgot that was a thing):

    https://goo.gl/photos/ztkEJZEQbJ3cDJn79

    I used Redd as the base, but changed the palette to make him brighter, and switched out his eyes with someone elses (I forget whose)
     
    Last edited by rainbowPhoenix, Aug 10, 2016
    SirBeethoven likes this.
  13. samcambolt270

    samcambolt270 GBAtemp Advanced Fan

    Member
    687
    295
    Dec 24, 2014
    United States
    it looks kinda like redd, is it a kitsune?
     
  14. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    From my previous post:

    "I used Redd as the base, but changed the palette to make him brighter, and switched out his eyes with someone elses (I forget whose)"
     
  15. samcambolt270

    samcambolt270 GBAtemp Advanced Fan

    Member
    687
    295
    Dec 24, 2014
    United States
    did you change his dialogue?
     
  16. CeeDee

    CeeDee hm?

    Member
    3,807
    5,319
    May 4, 2014
    United States
    somewhere
    Huh, looks impressive! How easy is villager editing? I might give it a try sometime soon.
     
  17. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    Some of it. The two big obstacles for dialog editing is:
    1) Dialog isn't unique per villager, but determined by the villager's personality.
    2) There's a whole ton of it.

    I wanted my villager to have the Lazy personality, because my girlfriend's pet nickname for me is "lazy fox". Fortunately, Biskit was the only villager in her town that was lazy, and when villagers move in, it's less likely to give you two villagers with the same personality. I edited the dialog for lazy villagers to include some references to our relationship, so at least for right now, this guy should be the only guy who says it.

    The hardest part was patching the changed files into the game. Ohana makes editing the models easy, and for changing dialog, you just use a hex editor.
     
  18. CeeDee

    CeeDee hm?

    Member
    3,807
    5,319
    May 4, 2014
    United States
    somewhere
    What about names, personalities, and default catchphrases? If I wanted to change a bunny villager into a normal or peppy villager and name it Judy, how easy would that be?
     
    Last edited by CeeDee, Aug 14, 2016
  19. rainbowPhoenix
    OP

    rainbowPhoenix Newbie

    Newcomer
    9
    2
    Aug 8, 2016
    United States
    Names are easy. There's two files that just contain a list of names, and you can edit those files. (Although the name you add needs to be the same length or shorter as the name you take out, otherwise the alignment of all the names after it gets messed up.)

    Personalities are harder. As I understand it, personalities aren't actually by a single flag in the characters file, but actually computed by a couple of other flags. It's easier to find a villager who already has the personality you want and change everything else.

    Default catchphrases I didn't bother with, because it won't change the catchphrases of villagers already in your village.
     
  20. CeeDee

    CeeDee hm?

    Member
    3,807
    5,319
    May 4, 2014
    United States
    somewhere
    "Judy" is a short name nonetheless so it should be easy to do.

    I'm sure there's a normal or peppy rabbit villager I can replace... (But not Chrissy, I'd never replace Chrissy)

    I'll look into catchphrases. There is an option on the online save editor to change the villager's stuff to default (inc. catchphrase) if you wanted to change it and reset.
     
  21. LiamTheHackermon
    This message by LiamTheHackermon has been removed from public view by Minox, Sep 4, 2016, Reason: Offtopic.
    Aug 15, 2016
  22. CeeDee
    This message by CeeDee has been removed from public view by Minox, Sep 4, 2016, Reason: Offtopic.
    Aug 15, 2016