Page 1 of 2

Battle of the Immortals Game File Format

Posted: Wed Jul 13, 2011 1:54 am
by Rimbros
Battle of the Immortals its the 1st game i see of the New Mmorpg dont have the textures encrypted, i think the skel, animation and mesh are stored in the *.M4F files also each model have a cfg file, good luck to everyone.

Image

File Formats:

Textures: *.DDS
Mesh, Skel and Ani: *M4F (maybe packed on this file)

Download to Test
http://www.megaupload.com/?d=FSYKO15P

Re: Battle of the Immortals Game File Format

Posted: Fri Jul 15, 2011 8:31 am
by CriticalError
Rimbros wrote:Battle of the Immortals its the 1st game i see of the New Mmorpg dont have the textures encrypted, i think the skel, animation and mesh are stored in the *.M4F files also each model have a cfg file, good luck to everyone.

Image

File Formats:

Textures: *.DDS
Mesh, Skel and Ani: *M4F (maybe packed on this file)

Download to Test
http://www.megaupload.com/?d=FSYKO15P
a friend working in it, him have 85% program done, very soon are up

Re: Battle of the Immortals Game File Format

Posted: Fri Jul 15, 2011 5:52 pm
by finale00
Will he release the source? Or file format?

Re: Battle of the Immortals Game File Format

Posted: Fri Jul 15, 2011 8:23 pm
by CriticalError
finale00 wrote:Will he release the source? Or file format?
not source, only packer and unpacker tool.

Re: Battle of the Immortals Game File Format

Posted: Fri Jul 15, 2011 8:29 pm
by finale00
Oh I see. That will be useful also.

Re: Battle of the Immortals Game File Format

Posted: Sun Jul 24, 2011 7:57 am
by Nazaroff
CriticalError wrote:a friend working in it, him have 85% program done, very soon are up
No news?

Re: Battle of the Immortals Game File Format

Posted: Sun Jul 24, 2011 9:05 am
by howfie
Oh yeah, those M4F files look very parsable. Vertices and indices are clearly visible. Models look nice too. If they don't finish it I'll probably work one too as I finish up alibat.

Re: Battle of the Immortals Game File Format

Posted: Sun Jul 24, 2011 6:02 pm
by finale00
The contents of this post was deleted because of possible forum rules violation.

Re: Battle of the Immortals Game File Format

Posted: Tue Jul 26, 2011 11:20 pm
by Rimbros
Good job finale, i never see this format before *..m4f

Re: Battle of the Immortals Game File Format

Posted: Fri Aug 19, 2011 1:29 pm
by CriticalError
nobody found a way to import m4f files into max,blender? I get unpacker and anyway is the same, sqp unpacker/packerget same files like En Client :S.

Re: Battle of the Immortals Game File Format

Posted: Fri Aug 19, 2011 2:24 pm
by finale00
Guess I'll look at it now lol I've been busy trying to improve my program to support modding plugins as well as conversion plugins.

The header has an offset table with what appears to be counts of whatever section it is.

There are 14 dwords, which is basically 7 sections (a count and an offset for each).

The first pair of dwords are the numTex and the texOffset. Each texture name is 292 bytes long, and contains unicode characters (most likely chinese, GB2312 or something like that)

The third pair of dwords are the numMesh and meshOffset. Each mesh is defined sequentially, starting with the name, followed by a lot of dwords. The name is 80 bytes long, followed by FF FF FF FF, followed by 17 dwords, followed by 72 bytes of 00's. We can probably just say that's 18 dwords.

A quick search for vertex offsets leads me to believe that those 17 dwords are also counts and offsets, amongst other things.

Re: Battle of the Immortals Game File Format

Posted: Fri Aug 19, 2011 2:36 pm
by CriticalError
finale00 wrote:Guess I'll look at it now lol I've been busy trying to improve my program to support modding plugins as well as conversion plugins.

The header has an offset table with what appears to be counts of whatever section it is.

There are 14 dwords, which is basically 7 sections (a count and an offset for each).

The first pair of dwords are the numTex and the texOffset. Each texture name is 292 bytes long, and contains unicode characters (most likely chinese, GB2312 or something like that)

The third pair of dwords are the numMesh and meshOffset. Each mesh is defined sequentially, starting with the name, followed by a lot of dwords. The name is 80 bytes long, followed by FF FF FF FF, followed by 17 dwords, followed by 72 bytes of 00's. We can probably just say that's 18 dwords.

A quick search for vertex offsets leads me to believe that those 17 dwords are also counts and offsets, amongst other things.
good interesting view, the truth is appreciated and sorry, there is not an easy job but you are one of the more experience here in the forum and ask why good simply because the game has very good models, good will wait for new news take care.

Re: Battle of the Immortals Game File Format

Posted: Fri Aug 19, 2011 2:46 pm
by finale00
mesh stores vertCount, faceCount, normCount, uvCount, along with their offsets. Some other counts I am not sure of.

Looks like

Code: Select all

struct Mesh {
   char_80 name
   dword unk
   dword matNum
   dword_4 ???
   dword_2 vertCount, vertOffset
   dword_2 faceCount, faceOffset
   dword_2 normCount, normOffset
   dword_2 weightCount, weightOffset
   dword_2 uvCount, uvOffset
   dword_2 boneIndexCount, boneIndexOffset
   byte_72 padding
}

struct Vertex {
   float_3 coords
}

struct Face {
   word_3 indices
}

struct Normal {
   float_3 normals
}

struct UV {
   float_3 uv
}

struct weights {
   float_3 weights
}

struct boneIndex {
   byte index
}

Re: Battle of the Immortals Game File Format

Posted: Fri Aug 19, 2011 2:51 pm
by CriticalError
finale00 wrote:mesh stores vertCount, faceCount, normCount, uvCount, along with their offsets. Some other counts I am not sure of.

Looks like

Code: Select all

struct Mesh {
   char_80 name
   dword_6 unk
   dword_2 vertCount, vertOffset
   dword_2 faceCount, faceOffset
   dword_2 normCount, normOffset
   dword_2 unk
   dword_2 unk
   dword_2 unk
   byte_72 padding
}
Didn't figure out the material section so I don't know which is the UV. There are then two additional counts/offsets that I am not sure of.
wow you rock man, gratz for new job still waiting :) i'm not pro for make it alone so thats the problem :( anyway thanks again for your support.

Re: Battle of the Immortals Game File Format

Posted: Fri Aug 19, 2011 3:04 pm
by finale00
The boneCount and offset is the fourth pair of dwords in the header.

Code: Select all

#header

dword idstring "C9 8D 32 01"
dword numTex
dword texOffset
dword num
dword offset
dword numMesh
dword meshOffset
dword numBone
dword boneOffset
dword num2
dword offset2
dword_4 null
dword num3
dword offset3
num3 is sometimes 0. Don't know.

Code: Select all

struct Bone { #332 bytes
	char_80 name
	...
}
Multiple meshes may have the same name. These need to be dealt with appropriately. They might be assigning materials per mesh rather than per face.