Suggestion Extracting .DAT Files from Fire Emblem: Three Houses for Rom-Hacking?

Discussion in 'Switch - ROM Hacking, Saves, Translations & Tools' started by xXDungeon_CrawlerXx, Aug 5, 2019.

  1. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Addict

    Member
    10
    Jul 29, 2015
    Liverpool
    Hey Guys,

    I wonder if it may be possible to extract/rebuild the .dat-files inside the romFS of Fire Emblem: Three Houses.
    upload_2019-8-5_12-12-42.

    I'd like to extract/edit Ingame Models of that game, if possible.
     
  2. masagrator

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    QuickBMS + arslan.bms script will unpack files without correct filenames. It can't replace files in archives.
     
    Last edited by masagrator, Aug 5, 2019
  3. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Addict

    Member
    10
    Jul 29, 2015
    Liverpool
    Tried it
    upload_2019-8-5_15-1-21.

    Where can I find the IDX File for it?


    EDIT:
    Using the filecutter.bms gives me two 2048kb files
    upload_2019-8-5_15-7-44.

    but renaming them to DATA.idx and use the arslan.bms doesn't work either. (DATA1.bin and DATA1.idx are in the same folder)

    Mind explaining how to extract the bin files and sharing the bms files you use?
     
    Last edited by xXDungeon_CrawlerXx, Aug 5, 2019
  4. masagrator

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    you need to rename data0.bin to linkdata.idx and data1.bin to linkdata.bin
    And you use script on linkdata.idx
     
    xXDungeon_CrawlerXx likes this.
  5. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Addict

    Member
    10
    Jul 29, 2015
    Liverpool
    Well, renaming DATA0.bin to DATA1.idx seems to be enough. It's extracting now.
    Is there a way to find out which file does what?
     
  6. masagrator

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    Nope, if you don't know hex structure of each file you want to search.
     
  7. Ranford

    Ranford Member

    Newcomer
    1
    Mar 30, 2017
    Russia
    All text files have a header:
    0x1 0x1 0x20 0x10

    Starting at file 30776, begin the SARC archives.

    File 70, 71, 72, 73, 74, 537 are font graphics.

    Compressed archives have a structure:

    uint32 size uncompressed chunk
    uint32 chunk count
    uint32 uncompressed file size

    For I to chunk count
    uint32 compressed chunk size with meta

    chunk:
    uint32 $size
    [$size]: zlib data

    Maybe someone else knows information.
     
    Last edited by Ranford, Aug 7, 2019
    xXDungeon_CrawlerXx likes this.
  8. masagrator

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    Hmm, arcording to quickbms script SARC archives are between 65a3-65d6.

    They contain some textures (bntx) like profile images of students, cursors, loading parts when game is booting, chapter background, etc + 2D layouts (bflyt) for them, animation data (bflan) + sometimes shaders (bnsh+bushvt).

    Edit: Now I understand you are using custom tool from other topic. But in this case has some issues.

    So for now we have
    - SARC archives (contains BNTX textures, BFLYT layouts, BFLAN animations, BNSH+BUSHVT shaders) - can be opened with Switch Toolbox
    - KTSR files (probably sound files)
    - GT1 textures (they can containt many texture files and contains also mipmaps) - Can be opened with Switch Toolbox (some of them are crashing because of mipmap error)

    Some files after decompressing with quickbms (f.e. 8e3) and linkdata tool are still compressed with zlib. After uncompressing they are not readable.

    Pretty messed up thing. :D
     
    Last edited by masagrator, Aug 11, 2019
  9. Ranford

    Ranford Member

    Newcomer
    1
    Mar 30, 2017
    Russia
    I found only 1 .g1tg file (GT1G0600 magic). The rest are either inside the zlib archives, or I made a mistake in unpacking.

    Edit: I write a tool that gets .ktss from .ktsl2stbin and converts to .wav using vgmstream.

    Warning: Spoilers inside!
     
    Last edited by Ranford, Aug 18, 2019 at 12:20 PM
    phaie likes this.
  10. phaie

    phaie Member

    Newcomer
    1
    Aug 3, 2018
    Brazil
    Thank for your tool, but it shows file not not found. idk what is wrong
     
Loading...