XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 23, 2018 10:53 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Dragons Crown .ftx .mbs & bsb files
PostPosted: Thu Aug 01, 2013 12:47 pm 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 651
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times














You can make the ads go away by registering

Hi Guys

I've extracted from the game Dragons Crown, the .CPK file, inside of this archive was a lot of different folders for characters, environments etc, however 3 specific formats popped up commonly:
    .bsb
    .ftx
    .mbs
    .mcb

I know that .ftx files are textures, and I've tried to use this Noesis script from however there's an error and the files don't successfully open, nor are they exportable.

I'm not sure what the other files contain however, but its all in the graphics/stages folder, so it should be graphics I imagine.

I've uploaded the files to dropbox here: https://www.dropbox.com/sh/azf19y7homu8qnj/u-JOQibN1q

The Noesis script is here:

Code:
from inc_noesis import *
def registerNoesisTypes():
   handle = noesis.register("FTX Texture Bundle", ".ftx")
   noesis.setHandlerTypeCheck(handle, ftxCheckType)
   noesis.setHandlerLoadModel(handle, ftxLoad)
   return 1

class FtxFile:
   def __init__(self, bs):
      self.bs = bs
   def loadImageInfo(self):
      if self.bs.dataSize < 32:
         return 0
      self.texInfos = []
      hdrInfo = noeUnpack("<iiii", self.bs.readBytes(32)[:16])
      if hdrInfo[0] != 0x58455446 or hdrInfo[3] <= 0 or 32+hdrInfo[3]*48+32+4 >= self.bs.dataSize:
         return 0
      for i in range(0, hdrInfo[3]):
         self.texInfos.append( (noeStrFromBytes(self.bs.readBytes(32)), self.bs.readBytes(16)) )
      self.bs.seek(32, NOESEEK_REL)
      return 1
   def loadImages(self, texList = []):
      for texInfo in self.texInfos:
         texHdr = noeUnpack("<iii", self.bs.readBytes(12))
         self.bs.seek(texHdr[2]-12, NOESEEK_REL)
         tex = rapi.loadTexByHandler(self.bs.readBytes(texHdr[1]), ".gim")
         tex.name = texInfo[0]
         texList.append(tex)
      return texList

def ftxCheckType(data):
   ftx = FtxFile(NoeBitStream(data))
   if ftx.loadImageInfo() == 0:
      return 0
   return 1
def ftxLoad(data, mdlList):
   ftx = FtxFile(NoeBitStream(data))
   if ftx.loadImageInfo() == 0:
      return 0
   mdlList.append(NoeModel([], [], [], NoeModelMaterials(ftx.loadImages(), [])))
   return 1


I hope someone is able to work out what I'm missing here.

Thankyou

_________________
"Lemons are people nice hardworking & honest people too..."


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Thu Aug 01, 2013 10:19 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
I found this: Image

Just adding a header to the first dds (0x240..0x4023F) in bg00a_00.ftx:
Code:
Offset  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F

0000   44 44 53 20 7C 00 00 00  07 10 0A 00 00 02 00 00   DDS |...........
0010   00 02 00 00 00 00 08 00  00 00 00 00 0B 00 00 00   ................
0020   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0030   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0040   00 00 00 00 00 00 00 00  00 00 00 00 20 00 00 00   ............ ...
0050   04 00 00 00 44 58 54 35  00 00 00 00 00 00 00 00   ....DXT5........
0060   00 00 00 00 00 00 00 00  00 00 00 00 08 10 40 00   ..............@.
0070   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................

Did not recalculate pitch or other values in the header so DirectX Texture Tools fails.
Could open the dds using DXTBmp.

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Fri Aug 02, 2013 1:50 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 651
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
shakotay2 wrote:
Just adding a header to the first dds (0x240..0x4023F) in bg00a_00.ftx:
Code:
Offset  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F

0000   44 44 53 20 7C 00 00 00  07 10 0A 00 00 02 00 00   DDS |...........
0010   00 02 00 00 00 00 08 00  00 00 00 00 0B 00 00 00   ................
0020   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0030   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
0040   00 00 00 00 00 00 00 00  00 00 00 00 20 00 00 00   ............ ...
0050   04 00 00 00 44 58 54 35  00 00 00 00 00 00 00 00   ....DXT5........
0060   00 00 00 00 00 00 00 00  00 00 00 00 08 10 40 00   ..............@.
0070   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................

Did not recalculate pitch or other values in the header so DirectX Texture Tools fails.
Could open the dds using DXTBmp.


Oh, now that was a lot simpler than I had anticipated, though with going on 1000+ ftx files at least, I wonder if theres perhaps a faster way than changing the header in each file. I'm still quite new to all this, sorry. But happy to learn.

_________________
"Lemons are people nice hardworking & honest people too..."


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Fri Aug 02, 2013 10:36 am 
Offline
Moderator
User avatar

Joined: Sun May 18, 2008 3:01 pm
Posts: 2487
Has thanked: 57 times
Have thanks: 1242 times
I have the format figured out for the texture files.
all the texture files are tiled and useless without their related other files that store the coordinates and frames.
all the textures are dxt 3 or 5.
I have the coordinate system mapped out i just need to assemble it when i get time.


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Fri Aug 02, 2013 3:42 pm 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 651
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
chrrox wrote:
I have the format figured out for the texture files.
all the texture files are tiled and useless without their related other files that store the coordinates and frames.
all the textures are dxt 3 or 5.
I have the coordinate system mapped out i just need to assemble it when i get time.


I see, are the files not similar to that of Muramasa, Grand Knights history and other Vanillaware titles?
I know for all the others its a texture sheet of sorts, but made up of tiles and they're arranged in game automatically but anyone outside of the game would have to manually match up the files, sometimes 1 scene can be on 12 or more texture sheets if I remember correctly.

Thanks for the update chroxx, look forward to your results.

_________________
"Lemons are people nice hardworking & honest people too..."


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Sun Aug 04, 2013 2:05 pm 
Offline
Moderator
User avatar

Joined: Sun May 18, 2008 3:01 pm
Posts: 2487
Has thanked: 57 times
Have thanks: 1242 times
Windows update made me loose all my notes and i don't care much for this game so here this lets you load the raw textures.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Tue Aug 06, 2013 12:22 pm 
Offline
ultra-n00b

Joined: Mon Apr 22, 2013 2:40 pm
Posts: 8
Has thanked: 0 time
Have thanks: 0 time
chrrox wrote:
Windows update made me loose all my notes and i don't care much for this game so here this lets you load the raw textures.


So this only extracts the textures as untiled, with no coordinates, etc?


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Tue Aug 06, 2013 11:48 pm 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 651
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
neurotech wrote:
chrrox wrote:
Windows update made me loose all my notes and i don't care much for this game so here this lets you load the raw textures.


So this only extracts the textures as untiled, with no coordinates, etc?


It lets you view them as texture sheets in Noesis, export them from there.

The 'cordinates' in Vanillaware games are erm... well there sort of arnt any, each individual texture from the sheet is placed on a polygon and then that polygon is moved around the screen via code, if that makes sense.

_________________
"Lemons are people nice hardworking & honest people too..."


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Tue Aug 06, 2013 11:58 pm 
Offline
ultra-n00b

Joined: Mon Apr 22, 2013 2:40 pm
Posts: 8
Has thanked: 0 time
Have thanks: 0 time
lionheartuk wrote:
neurotech wrote:
chrrox wrote:
Windows update made me loose all my notes and i don't care much for this game so here this lets you load the raw textures.


So this only extracts the textures as untiled, with no coordinates, etc?


It lets you view them as texture sheets in Noesis, export them from there.

The 'cordinates' in Vanillaware games are erm... well there sort of arnt any, each individual texture from the sheet is placed on a polygon and then that polygon is moved around the screen via code, if that makes sense.


Yep since my previous post I've been exporting a bunch of FTX files from Noesis using chrrox's script and I can see exactly what you mean.


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Fri Sep 20, 2013 12:12 pm 
Offline
beginner

Joined: Tue Jan 19, 2010 11:14 am
Posts: 21
Has thanked: 1 time
Have thanks: 2 times
lionheartuk wrote:
Hi Guys

I've extracted from the game Dragons Crown, the .CPK file, inside of this archive was a lot of different folders for characters, environments etc, however 3 specific formats popped up commonly:
    .bsb
    .ftx
    .mbs
    .mcb

I know that .ftx files are textures, and I've tried to use this Noesis script from however there's an error and the files don't successfully open, nor are they exportable.

I'm not sure what the other files contain however, but its all in the graphics/stages folder, so it should be graphics I imagine.

I've uploaded the files to dropbox here: https://www.dropbox.com/sh/azf19y7homu8qnj/u-JOQibN1q

The Noesis script is here:

Code:
from inc_noesis import *
def registerNoesisTypes():
   handle = noesis.register("FTX Texture Bundle", ".ftx")
   noesis.setHandlerTypeCheck(handle, ftxCheckType)
   noesis.setHandlerLoadModel(handle, ftxLoad)
   return 1

class FtxFile:
   def __init__(self, bs):
      self.bs = bs
   def loadImageInfo(self):
      if self.bs.dataSize < 32:
         return 0
      self.texInfos = []
      hdrInfo = noeUnpack("<iiii", self.bs.readBytes(32)[:16])
      if hdrInfo[0] != 0x58455446 or hdrInfo[3] <= 0 or 32+hdrInfo[3]*48+32+4 >= self.bs.dataSize:
         return 0
      for i in range(0, hdrInfo[3]):
         self.texInfos.append( (noeStrFromBytes(self.bs.readBytes(32)), self.bs.readBytes(16)) )
      self.bs.seek(32, NOESEEK_REL)
      return 1
   def loadImages(self, texList = []):
      for texInfo in self.texInfos:
         texHdr = noeUnpack("<iii", self.bs.readBytes(12))
         self.bs.seek(texHdr[2]-12, NOESEEK_REL)
         tex = rapi.loadTexByHandler(self.bs.readBytes(texHdr[1]), ".gim")
         tex.name = texInfo[0]
         texList.append(tex)
      return texList

def ftxCheckType(data):
   ftx = FtxFile(NoeBitStream(data))
   if ftx.loadImageInfo() == 0:
      return 0
   return 1
def ftxLoad(data, mdlList):
   ftx = FtxFile(NoeBitStream(data))
   if ftx.loadImageInfo() == 0:
      return 0
   mdlList.append(NoeModel([], [], [], NoeModelMaterials(ftx.loadImages(), [])))
   return 1


I hope someone is able to work out what I'm missing here.

Thankyou


your link is to a zip named "music as requested" with some random mp3's. please post a proper link to the ftx's.:)


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Fri Sep 20, 2013 7:00 pm 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 651
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
joeyq wrote:
your link is to a zip named "music as requested" with some random mp3's. please post a proper link to the ftx's.:)


Sorry, I deleted the FTX files after obtaining the working Noesis script on how to view them.
If I know why you need the ftx files then I may be able to reupload one or 2 of them for you to checkout.

_________________
"Lemons are people nice hardworking & honest people too..."


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Mon Sep 23, 2013 10:30 am 
Offline
beginner

Joined: Tue Jan 19, 2010 11:14 am
Posts: 21
Has thanked: 1 time
Have thanks: 2 times
lionheartuk wrote:
joeyq wrote:
your link is to a zip named "music as requested" with some random mp3's. please post a proper link to the ftx's.:)


Sorry, I deleted the FTX files after obtaining the working Noesis script on how to view them.
If I know why you need the ftx files then I may be able to reupload one or 2 of them for you to checkout.


Sorry for reacting so late, but i figured it out on my own. I'm such a noob, i just needed to extract the files from "DRACRO.CPK" with the latest noesis. [roll]
Thanx for quick response lionheartuk, and thanx for script chrrox!!


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Fri Nov 07, 2014 5:53 pm 
Offline
ultra-n00b

Joined: Fri Nov 07, 2014 5:38 pm
Posts: 4
Has thanked: 0 time
Have thanks: 0 time
chrrox wrote:
Windows update made me loose all my notes and i don't care much for this game so here this lets you load the raw textures.


Can't Extracting "The Demon Blade" ftx file.


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Fri Nov 07, 2014 5:56 pm 
Offline
ultra-n00b

Joined: Fri Nov 07, 2014 5:38 pm
Posts: 4
Has thanked: 0 time
Have thanks: 0 time
lionheartuk wrote:
chrrox wrote:
I have the format figured out for the texture files.
all the texture files are tiled and useless without their related other files that store the coordinates and frames.
all the textures are dxt 3 or 5.
I have the coordinate system mapped out i just need to assemble it when i get time.


I see, are the files not similar to that of Muramasa, Grand Knights history and other Vanillaware titles?
I know for all the others its a texture sheet of sorts, but made up of tiles and they're arranged in game automatically but anyone outside of the game would have to manually match up the files, sometimes 1 scene can be on 12 or more texture sheets if I remember correctly.

Thanks for the update chroxx, look forward to your results.


Can't Extracting "The Demon Blade" ftx file.


Top
 Profile  
 
 Post subject: Re: Dragons Crown .ftx .mbs & bsb files
PostPosted: Sat Nov 08, 2014 10:19 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Tue May 16, 2006 10:55 pm
Posts: 651
Location: Tokyo, Japan
Has thanked: 20 times
Have thanks: 22 times
maoxianfly wrote:
lionheartuk wrote:
chrrox wrote:
I have the format figured out for the texture files.
all the texture files are tiled and useless without their related other files that store the coordinates and frames.
all the textures are dxt 3 or 5.
I have the coordinate system mapped out i just need to assemble it when i get time.


I see, are the files not similar to that of Muramasa, Grand Knights history and other Vanillaware titles?
I know for all the others its a texture sheet of sorts, but made up of tiles and they're arranged in game automatically but anyone outside of the game would have to manually match up the files, sometimes 1 scene can be on 12 or more texture sheets if I remember correctly.

Thanks for the update chroxx, look forward to your results.


Can't Extracting "The Demon Blade" ftx file.


The script was made for Dragons Crown ftx files, the only similar thing between all the vanillaware games is the name of the extension as .ftx, the files themselves are never the same.

If you're really after textures from Muramasa then just play through it in the Dolphin Emulator with texture dumping, or alternatively grab the HD texture pack fromt he Dolphin forums (which I'm not going to link to as its probably against the rules here.

_________________
"Lemons are people nice hardworking & honest people too..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group