Jump to content

Fate/Samurai Remnant .fdata


Rein
Go to solution Solved by ailephi,

Recommended Posts

I am looking for a way to unpack the .fdata in the game, I've heard there was a BMS Script that would do this, sadly I wasn't able to get the script before the site closed. Also any other info on the extraction of the files would be a very helpful to newcomers and myself.

Link to comment
Share on other sites

  • Solution

try this one

im not sure if this is the correct one since i cant test it myself
 

Comtype ZLIB
Get FILETOTALSIZE asize

if FILETOTALSIZE > 128

Set IDRKOFFSET long 0x10

Do

Goto IDRKOFFSET
Print "%IDRKOFFSET%"
Getdstring MAGICVERSION 8 
Get ENTRYSIZE longlong
Get COMPSIZE longlong
Get DECOMPSIZE longlong
Get ENTRYTYPE long
Get FILEKTID long
Get TYPEINFOKTID long
Set SKIP long ENTRYSIZE
Math SKIP - COMPSIZE
Math SKIP - 0x2C
Goto SKIP 0 SEEK_CUR
Savepos TEMP
Print "%TEMP%"

String FNAME p "0x%08x." FILEKTID
String FEXT p "%08x" TYPEINFOKTID

If TYPEINFOKTID == 0x563bdef1
Set FULLNAME string "g1m/"
String FNAME + "g1m"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x6fa91671
Set FULLNAME string "g1a/"
String FNAME + "g1a"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0xafbec60c
Set FULLNAME string "g1t/"
String FNAME + "g1t"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x20a6a0bb
Set FULLNAME string "kidsobjdb/"
String FNAME + "kidsobjdb"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x5153729b || TYPEINFOKTID == 0xb340861a 	
Set FULLNAME string "mtl/"
String FNAME + "mtl"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x8e39aa37 || TYPEINFOKTID == 0xbe144b78 	
Set FULLNAME string "ktid/"
String FNAME + "ktid"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x56efe45c || TYPEINFOKTID == 0xbbf9b49d
Set FULLNAME string "grp/"
String FNAME + "grp"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0xbbd39f2d
Set FULLNAME string "srsa/"
String FNAME + "srsa"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x0d34474d
Set FULLNAME string "srst/"
String FNAME + "srst"
String FULLNAME + FNAME

Else
Set FULLNAME string FEXT
String FULLNAME + "/"
String FNAME + FEXT
String FULLNAME + FNAME
Endif

Savepos OFFSET

If COMPSIZE == DECOMPSIZE

Get MAGIC long 0 OFFSET
If MAGIC == 1194412127
Set FULLNAME string "g1h/"
String FNAME p "0x%08x." FILEKTID
String FNAME + "g1h"
String FULLNAME + FNAME
Endif
Log FULLNAME OFFSET DECOMPSIZE

Else

Set MEMORY_FILE binary ""
Append
Do
Get ZSIZE short
Get Junk longlong
Savepos OFFSET
If DECOMPSIZE > 16384
Clog MEMORY_FILE OFFSET ZSIZE 16384
Math DECOMPSIZE - 16384
Else
Clog MEMORY_FILE OFFSET ZSIZE DECOMPSIZE
Math DECOMPSIZE - DECOMPSIZE
Endif
Math OFFSET + ZSIZE
Goto OFFSET 
While DECOMPSIZE > 0
Append

Get LSIZE asize MEMORY_FILE
GetVarChr MAGIC MEMORY_FILE 0 long
Print "%MAGIC%"
If MAGIC == 1194412127
Set FULLNAME string "g1h/"
String FNAME p "0x%08x." FILEKTID
String FNAME + "g1h"
String FULLNAME + FNAME
Endif
Log FULLNAME 0 LSIZE MEMORY_FILE
Endif

Math ENTRYSIZE x 0x10
Math IDRKOFFSET + ENTRYSIZE

While IDRKOFFSET < FILETOTALSIZE

Endif

 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 12/5/2023 at 7:26 AM, Rein said:

Now I just need a way to unpack the .bin files for the characters

 

The .bin file you uploaded is just a video file.
Script posted above by @ailephi works well, and you can access most resources with just that.

 

P.S You will need Joschuka's Noesis plugin for g1m files.

20231220_180644.png

20231220_180932.png

Link to comment
Share on other sites

  • 2 weeks later...
On 12/20/2023 at 1:13 AM, RRRR said:

The .bin file you uploaded is just a video file.
Script posted above by @ailephi works well, and you can access most resources with just that.

 

P.S You will need Joschuka's Noesis plugin for g1m files.

20231220_180644.png

20231220_180932.png

Where are the Characters files for servants and masters?

Link to comment
Share on other sites

18 hours ago, Rein said:

Where are the Characters files for servants and masters?

I found them, I'm stuck now on how to get the textures on the models?

Link to comment
Share on other sites

  • 2 months later...

hey everyone, I'm new here but I wanted  to ask you somthing, I want to know how to get the 3d models files for make a cosplay for miyamoto iori. I want to print his swords, but I don't know how to extract the files. I tried to do it with ryujinx emulator on nsp file game but It didn't work for me. I saw that you share here some bin and fdata files but how to open and use them? please help me

thank you

elior

On 1/2/2024 at 10:33 PM, Rein said:

I found them, I'm stuck now on how to get the textures on the models?

how did you find them?

Link to comment
Share on other sites

On 12/3/2023 at 4:58 AM, ailephi said:

try this one

im not sure if this is the correct one since i cant test it myself
 

Comtype ZLIB
Get FILETOTALSIZE asize

if FILETOTALSIZE > 128

Set IDRKOFFSET long 0x10

Do

Goto IDRKOFFSET
Print "%IDRKOFFSET%"
Getdstring MAGICVERSION 8 
Get ENTRYSIZE longlong
Get COMPSIZE longlong
Get DECOMPSIZE longlong
Get ENTRYTYPE long
Get FILEKTID long
Get TYPEINFOKTID long
Set SKIP long ENTRYSIZE
Math SKIP - COMPSIZE
Math SKIP - 0x2C
Goto SKIP 0 SEEK_CUR
Savepos TEMP
Print "%TEMP%"

String FNAME p "0x%08x." FILEKTID
String FEXT p "%08x" TYPEINFOKTID

If TYPEINFOKTID == 0x563bdef1
Set FULLNAME string "g1m/"
String FNAME + "g1m"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x6fa91671
Set FULLNAME string "g1a/"
String FNAME + "g1a"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0xafbec60c
Set FULLNAME string "g1t/"
String FNAME + "g1t"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x20a6a0bb
Set FULLNAME string "kidsobjdb/"
String FNAME + "kidsobjdb"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x5153729b || TYPEINFOKTID == 0xb340861a 	
Set FULLNAME string "mtl/"
String FNAME + "mtl"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x8e39aa37 || TYPEINFOKTID == 0xbe144b78 	
Set FULLNAME string "ktid/"
String FNAME + "ktid"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x56efe45c || TYPEINFOKTID == 0xbbf9b49d
Set FULLNAME string "grp/"
String FNAME + "grp"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0xbbd39f2d
Set FULLNAME string "srsa/"
String FNAME + "srsa"
String FULLNAME + FNAME

Elif TYPEINFOKTID == 0x0d34474d
Set FULLNAME string "srst/"
String FNAME + "srst"
String FULLNAME + FNAME

Else
Set FULLNAME string FEXT
String FULLNAME + "/"
String FNAME + FEXT
String FULLNAME + FNAME
Endif

Savepos OFFSET

If COMPSIZE == DECOMPSIZE

Get MAGIC long 0 OFFSET
If MAGIC == 1194412127
Set FULLNAME string "g1h/"
String FNAME p "0x%08x." FILEKTID
String FNAME + "g1h"
String FULLNAME + FNAME
Endif
Log FULLNAME OFFSET DECOMPSIZE

Else

Set MEMORY_FILE binary ""
Append
Do
Get ZSIZE short
Get Junk longlong
Savepos OFFSET
If DECOMPSIZE > 16384
Clog MEMORY_FILE OFFSET ZSIZE 16384
Math DECOMPSIZE - 16384
Else
Clog MEMORY_FILE OFFSET ZSIZE DECOMPSIZE
Math DECOMPSIZE - DECOMPSIZE
Endif
Math OFFSET + ZSIZE
Goto OFFSET 
While DECOMPSIZE > 0
Append

Get LSIZE asize MEMORY_FILE
GetVarChr MAGIC MEMORY_FILE 0 long
Print "%MAGIC%"
If MAGIC == 1194412127
Set FULLNAME string "g1h/"
String FNAME p "0x%08x." FILEKTID
String FNAME + "g1h"
String FULLNAME + FNAME
Endif
Log FULLNAME 0 LSIZE MEMORY_FILE
Endif

Math ENTRYSIZE x 0x10
Math IDRKOFFSET + ENTRYSIZE

While IDRKOFFSET < FILETOTALSIZE

Endif

 

how to use it? on what emulator and on what file? I used ryujinx and nsp file

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...