Re: TwelveSky 2 Model Format
Posted: Thu Jul 21, 2011 3:37 am
The contents of this post was deleted because of possible forum rules violation.
well sorry just I try help, i'm not expert in this, just learning mate, and how you get DDS? replacing header of the file? or how?finale00 wrote:You don't get any nice filenames with offzip though lol.
I want to at least keep the package name so I know where it came from.
(..without manually renaming them)
Code: Select all
# Game: TwelveSky & TwelveSky 2 (PC)
# by fatduck Jul2011
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
get PRENAME basename
get NUMRES long
savepos OFS_RES
for i = 1 to NUMRES
goto OFS_RES
get FLAG1 long
get USIZE long
if FLAG1 != 1
math FLAG1 -= USIZE
math FLAG1 *= -1
else
math FLAG1 -= 1
endif
get CSIZE long
savepos OFS_RES
set RESNAME PRENAME
string RESNAME += _
if i < 10
string RESNAME += "0"
endif
string RESNAME += i
string RESNAME += .mdl
if USIZE > 0
clog RESNAME OFS_RES CSIZE USIZE
endif
math OFS_RES += CSIZE
math OFS_RES += FLAG1
goto OFS_RES
get FLAG1 long
get USIZE long
if FLAG1 != 1
math FLAG1 -= USIZE
math FLAG1 *= -1
else
math FLAG1 -= 1
endif
get CSIZE long
savepos OFS_RES
set RESNAME PRENAME
string RESNAME += _
if i < 10
string RESNAME += "0"
endif
string RESNAME += i
string RESNAME += .dds
if USIZE > 0
clog RESNAME OFS_RES CSIZE USIZE
endif
math OFS_RES += CSIZE
math OFS_RES += FLAG1
next iwow, really awesome man thanks a lot you are my hero mate grateful.fatduck wrote:I did the full format on Twelve Sky back on 2008. And the formats remain the same in Twelve Sky 2!
Here is the basic struct for the Archive! (*.mobject, *.sobject)
dword numResource
struct RES
{
<compressed model data>
<compressed Texture data>
}
Here is the bms script to help you decompress the Archive easily!
Good luck!
Code: Select all
# Game: TwelveSky & TwelveSky 2 (PC) # by fatduck Jul2011 # script for QuickBMS http://aluigi.org/papers.htm#quickbms get PRENAME basename get NUMRES long savepos OFS_RES for i = 1 to NUMRES goto OFS_RES get FLAG1 long get USIZE long if FLAG1 != 1 math FLAG1 -= USIZE math FLAG1 *= -1 else math FLAG1 -= 1 endif get CSIZE long savepos OFS_RES set RESNAME PRENAME string RESNAME += _ if i < 10 string RESNAME += "0" endif string RESNAME += i string RESNAME += .mdl if USIZE > 0 clog RESNAME OFS_RES CSIZE USIZE endif math OFS_RES += CSIZE math OFS_RES += FLAG1 goto OFS_RES get FLAG1 long get USIZE long if FLAG1 != 1 math FLAG1 -= USIZE math FLAG1 *= -1 else math FLAG1 -= 1 endif get CSIZE long savepos OFS_RES set RESNAME PRENAME string RESNAME += _ if i < 10 string RESNAME += "0" endif string RESNAME += i string RESNAME += .dds if USIZE > 0 clog RESNAME OFS_RES CSIZE USIZE endif math OFS_RES += CSIZE math OFS_RES += FLAG1 next i
Well its not a common mdl but can you write a bms or something importer to load this format? i found this code in the link you post but i cant understand how to use, its this Discuz Archiver 7.0.0 program function to save this MDL to tsmdl?, Regards.finale00 wrote:I changed it to tsmdl so people wouldn't assume it's one of the common mdl formats. Plus it makes it easier for me.
Archiver also works without login: http://gameresearch.5d6d.com/archiver/tid-96.html
Just modify the bms script that appends mdl to the name.to save this MDL to tsmdl?,
Thanks fInale i take a look but i see a incomplete model fileformat alson in Twelve Sky 1, fatduck only make the unpacker object files and this works also in Twelve Sky 2, if you know a bms or maxscript to load this models of Twelve sky 1 can be usefull, cheers.finale00 wrote:The model format fatduck reference to is for the 1st Twelve Sky.
The samples uploaded here are for twelve sky 2. Same developer, so maybe that's why same format used for the files, but the model format seems difference I think.
You can get the first game http://download.mmosite.com/html/1/2252/
to save this MDL to tsmdl?,
Code: Select all
dword ?? //header??
dword ?? //header??
float Emission
float_4 color1
float_4 color2
byte_76 ??
dword numMatrix
dword numVerts
dword ?? //same as numVerts
dword numFaceIdx
struct Animation {
float_12 Matrix3X4
float_4 sphereXYZR
}
struct AnimatedVert {
float_3 posXYZ
float_3 normatXYZ
float_2 texUV
}
struct Face {
word_3 index123
}
Code: Select all
dword ?? //header??
dword ?? //model type
float Emission
float_4 color1
float_4 color2
byte_76 ??
dword numMatrix
dword numVerts
dword ??
dword numFaces
byte_40 ???
numVerts vertex {
float_3 posXYZ
float_3 normatXYZ
float_2 texUV
}
numMatrix Animation {
float_8 ???
}
numFaces Face {
word_3 index123
}
