1. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    I know this isn't exactly the most popular game to hack or mess around with but I think it deserves its own thread, due to the lack of information elsewhere on this subject.

    All the game's files are in bcstm, dsc, or bin extensions. Dsc files are still mostly a mystery, although custom songs have been made (and I have no clue how). Most of the game's files are in .bin format, and are actually disguised as more files such as CTPK textures, Nintendo archives (.narc files), camera/stage/animation data, 3D models, and more.

    Also check out the new Mirai Toolkit, a collection of tools I put together to make hacking easier. It includes many pre-existing tools as well as one or two custom ones made specifically for this game!

    ~Textures~
    There are multiple categories of textures with this game, one more difficult to edit than the other. Here they are:

    Stage/Character Model Textures
    You'll find these in the /romfs/nwbin folder. The ones you want will always be named "obj_*.bin". These are extremely easy to edit; open them in Ohana3ds and you'll be able to extract the textures to png format, edit them, and import hem back before hitting "Save". Easy as that.

    At this point, I don't think models can be imported, but you can use Every File Explorer to export them.
    PV, UI and Menu Textures
    These are the tougher ones. You'll need the following:
    • CTPKTool
    • HxD or your favorite hex editor
    • Your texture file from the /romfs/aet_en folder, making sure it starts with spr_ae
    To start, open up your /romfs/aet_en/spr_ae_whatever.bin file in HxD or your hex editor of choice. Find the first "CTPK" header and take note of which line it starts on. This header will include both an uppercase "CTPK" and a lowercase "ctpk" a few lines down; there are both part of one header.

    Next up, find the next header and take note of which line the uppercase "CTPK" is on. Now select everything before the 2nd header (not including), and stop selecting when you finish highlighting the 1st header (nothing before it!). This is your image data. Copy this all and paste it into a new file and save it as <whatever>.ctpk, then extract it with CTPKTool. At this point it's a good idea to make a backup of your original spr_ae_whatever.bin file, because you'll need one later.

    [​IMG]
    This is the header. Copy everything right from the start of my selection right up until (but not including) the next CTPK header.

    You should end up with a folder containing your extracted image as well as an xml file - keep the xml file with the png! You're free to edit the png freely, just leave the xml alone. Once you finish editing, repack your file as ctpk using CTPKTool.

    [​IMG]
    Example command line. Change the filenames to match your setup. I renamed my CTPKTool exe file to just "ctpktool.exe" to make things easier. -x is for extract, -c is for create.

    Next, open your new ctpk file with HxD or your editor of choice and select everything. Copy it. Next up, select the same section of the original file you selected in the second step. Delete it, then paste in the modified data. Now compare it with your original file; if it's bigger, delete zeroes from the end of the modified part until the filesize matches. If it's smaller, add zeroes until it matches. It had to match exactly or the game will crash!

    [​IMG]
    I went and added some zeroes here since the file was 4 bytes too small.

    Make sure you have it set to "Insert" and not "Overwrite" to add zeroes. You can do this by hitting the Insert button on your keyboard. There's a bit at the bottom right that tells you whether you're on Insert or Overwrite.

    Remember, each spr_ae file is made of multiple CTPK files; for each, you can select everything from and including one header up until just before the next one, doesn't have to be the top one in the list. Do this if you can't find the textures you're looking for. For example, if you want to modify the buttons, you'll have to select the 3rd CTPK file down from the top to acually get the button textures. Otherwise you'll end up with some of the bottom screen textures, not the button icons.
    ~Chart editing~
    I can't get this to work properly, but your mileage may vary to mine. You can give these a shot, though I doubt they'll work properly:
    Remember, your mileage may vary. And when I say the old editor requires you to do math, I'm not kidding. Have a calculator ready.
    ~Music editing~
    This is probably the easiest of all the hacks. You'll need:
    You'll find the game's audio files under /sound/stream, and they'll be in bcstm format. Convert this to wav by opening the file in EFE, File > Save As... And select wav from the dropdown. Open this in Audacity.

    Notice the silent space at the beginning? Take note of how long it lasts by zooming in (ctrl+1) and making a selection right before the audio starts. Take note of the number displayed in the "Selection end" box. For example, let's say it says 00:03:15. That's 3.15 seconds. Write that number down somewhere.

    [​IMG]

    Next, take the song you want to replace the default one with and open it in Audacity, then delete any silent space at the beginning. Go under "Generate > Silence" on the top toolbar and input the number from earlier (might not be this exact path, going from memory here). You have now synced the song! Save the file as .wav with the same name as the original file, then open it with Looping Audio Converter.

    [​IMG] [​IMG]

    Once it's open, make sure to select "BCSTM" (not BRSTM) and start the conversion. Name the newly converted file the same name as the original, and you're done! This program also does bulk conversion, so if you have multiple files in a folder to convert you can do them all at once.

    [​IMG]
    Anyway, please feel free to share any info you've found on this topic! There's still lots that has yet to be figured out, such as proper dsc editing and such.

    I've made a public document for information that anyone can edit. Misuse WILL cause it to be locked and removed. Please don't be a jerk and ruin it for everyone. This will be used for documenting information, filetypes, and everything related to hacking this game.

    Also, before anyone else mentions it, no nsfw mods or content.
     
    Last edited by dj505, Jul 10, 2017
  2. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    Quick update, I found this chart editor in a post on the VocaloidOtaku forum that can be used to edit the dsc files.
     
  3. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    Holy crap thanks for finding that editor, I've been looking everywhere! (Also thanks for.. thanking me :) )

    EDIT: also, I can't test right now, but I bet you can reimport models with EFE, since it can export. Also, how do you edit the moflex files?

    EDIT EDIT: you can just find the list of pv id association from a text file in the pc folder I think, but I bet you already knew that lol
     
    Last edited by ElijahZAwesome, Mar 28, 2017
  4. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    I could import the files with EFE, but I couldn't save the file because it would error out. Ended up using the original Ohana3DS to import files.

    The moflex files weren't too difficult. I had to track down a copy of the Mobiclip editor (I think it was) along with the Nintendo licence, so it's probably not legal to share it here :/ Wasn't very difficult to find tho.
     
    Last edited by dj505, Mar 28, 2017
  5. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    Oh okay, thnx
     
  6. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    Ok, so the only way to edit pretty much anything in the aet_en folder is through hex editing, according to Stewie1.0. I have absolutely no clue where to even start with this. Wish me luck.
     
  7. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    Good luck! I don't know anything about hex editing lol
     
  8. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    OK I FIGURED OUT HOW TO EDIT THE FILES IN THE aet_en FOLDER!

    Apparently they're actually ctpk files! I opened the files in a hex editor and reoved EVERYTHING up until the line that starts with "CTPK" then used an extraction tool, and it worked perfectly!
     
    ElijahZAwesome likes this.
  9. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    So what does this accomplish exactly? Is this the games actual code or menu images?

    EDIT: never mind rechecked the OP. Once I can get back on my computer I'm gonna try to work with that DSC editor.
     
    Last edited by ElijahZAwesome, Mar 29, 2017
  10. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    What converter did you use? the only ones I know of don't convert bcstm to wav or anything for that matter.[/spoiler]
     
  11. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    I used EFE to convert bcstm to wav, then to convert it back I used this one. You have to select bcstm instead of brstm from the dropdown.
     
  12. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    oh i didnt know EFE converted those as well, woops!
     
  13. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    Neither did I until a few days ago haha. Just open the bcstm file, click on file > save as... and make sure you select wav
     
  14. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    thanks for the help,

    (lol im making a undertale mod of this game and i feel both cringe and happiness at the same time)
     
  15. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    Ok that sounds amazing tbh XD If you need anyone to test it I'd be happy to help!
     
  16. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    right now im just working on dscs and music, maybe ill try editing the pvs??? im basing as many songs as i can from animated pvs instead of 3d ones so hopefully i can make it work... im also debating whether or not to make it the original or the vocaloid a cappella cover, ()

    also, i have almost nothing done so far cause its so hard to find out how to do it XD So ive only just started. but when something even testable is made ill let you know!

    Its also REALLY annoying to test dscs becuase SD cards...
     
    Last edited by ElijahZAwesome, Mar 31, 2017
  17. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    just checking now, i dont think EFE supports bcstm. do i have the wrong version or something?
     
  18. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    556
    Country:
    Canada
    Weird, it's what I've been using... Try dragging and dropping the bcstm file into EFE. If that doesn't work download the newest version
     
  19. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    i did both, but i guess anyway i seems the loopingaudioconverter does it as well so ill use that.
     
  20. ElijahZAwesome

    ElijahZAwesome Hey. I exist. Woo
    Member

    Joined:
    Jul 12, 2016
    Messages:
    833
    Country:
    United States
    is there a way to straight up make a song shorter or longer so i dont have to heavily edit the song im importing?
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Hatsune, Project, Hacking