Users browsing this thread: 1 Guest(s)
Summoners War
#1
Someone offered help and asked me to share how I ripped this game's models so I decided to open this thread for those interested. I kind of quit trying to figure out so perhaps more people can continue with this.

It's a mobile game and downloads lots of files. There are many different formats but the ones for units are of "dat" extension and go like "unit_mdl_archangel.dat". In this game most monsters have "awakened" form and their name has "_hr" in it like "unit_mdl_archangel_hr.dat". Buildings/stages seem to be using a different format.

There were a few exceptions like "special_mdl_irene.dat" which have slight differences but generally the format goes like the following. (It's been a while since I worked on these so I may remember a few things wrong.) The formats are in LITTLE_ENDIAN.


Let's say the file consists of chunks, each chunk has 4 byte integer size value, then this size amount of bytes.
  • First chunk is a short unknown chunk, probably some kind of header.
  • PMM chunk which contains vertices, indices, normals, uvs and weights data. Weights seem to be 1 joint assignment per vertex.
  • PLM chunk which contains bones and animation data I think, this needs figuring out the most.
  • Textures chunk which contains PNG images for different elements. (Monsters come in various elements in the game.) Each element seems to be using a single texture for the entire model, 3D geometry is common for each element. This chunk seems to lack chunk_size value. Read below.

Now I'll explain what I managed to figure out so far regarding these chunks.

I just skip the header chunk.

PMM Chunk:
  • 4 bytes String "PMM$"
  • 2 bytes Unknown
  • 2 bytes indice_count
  • 2 bytes vertex_count
  • 4 bytes unknown
  • 2 bytes scale_divider
  • 55 bytes unknown
  • vertex_count * 12 bytes > x,y,z values each 4 bytes signed integer. Divide each by scale_divider.
  • vertex_count * 3 bytes > normal values each 1 signed byte. Divide each by 127.
  • vertex_count * 8 bytes > u,v values each 4 bytes signed integer. Divide each by 65536.
  • indice_count * 2 bytes > indice values that 3 of them make 1 face. Short value, probably unsigned .
  • vertex_count * 1 bytes > ID of the assigned joint of each vertex in order. Byte value, probably unsigned.
PLM Chunk:
  • 4 bytes String "PLM$"
  • 2 bytes > unknown_size_A
  • 20 bytes > some unknown value
  • unknown_size_A * 7 bytes > more unknown data
  • 1 byte joint_count, probably unsigned
  • 32 bytes unknown, might be armature/skeleton's values
  • joint_count * 39 bytes > So each joint has 39 bytes of data which I couldn't properly figure out. First byte is usually 0xff, second is ID (same in weights data above), third is parent joint ID. Seems to be right but can't be sure.
    Updated Info: If we count from 0, the bytes 7-14 of these 39 bytes are Quaternion values. Read 4 signed integer values (2 bytes each) and divide by 32767. These make up the x,y,z,w components of a quaternion. Then the next 12 bytes are x,y,z location values of the bone. Similar to vertex position data, each is 4 bytes signed integer and should be divided by scale_divider. Then the bones should be normalised.
  • The rest is probably animation data, length can be calculated using chunk_size value. The last 4 bytes seem to be always "****" string.
Textures chunk:
  • 4 bytes > element ID probably, you can see from 1 to 6
  • 4 bytes texture_size > if 0, no texture
  • texture_size * bytes > PNG data, simply export into PNG files
(This chunk seems to lack chunk_size value. I'm thinking maybe each element texture data is supposed to be treated like a chunk on its own.)

I can't share my export codes since they are in Flash AS3 and not in a ready-to-use-by-anyone state but I believe some people here can write scripts for common programs that are usually used around here.



Updated Info: Some models have an encrypted PMM chunk. Basically you need the array below. Simply read each byte and use it as an indice for this array to get the actual value. For example, the first 4 bytes of encrypted PMM chunks are 0xa68a8ac8 hexadecimal values. Get the values in the array from indices a6, 8a and c8. We end up with 0x504d4d24 which are the ascii codes for "PMM$" string as in regular files.
Quote:var encrypt_array = [
0x2f,0x7c,0x47,0x55,0x32,0x77,0x9f,0xfb,0x5b,0x86,0xfe,0xb6,0x3e,0x06,0xf4,0xc4,
0x2e,0x08,0x49,0x11,0x0e,0xce,0x84,0xd3,0x7b,0x18,0xa6,0x5c,0x71,0x56,0xe2,0x3b,
0xfd,0xb3,0x2b,0x97,0x9d,0xfc,0xca,0xba,0x8e,0x7e,0x6f,0x0f,0xe8,0xbb,0xc7,0xc2,
0xd9,0xa4,0xd2,0xe0,0xa5,0x95,0xee,0xab,0xf3,0xe4,0xcb,0x63,0x25,0x70,0x4e,0x8d,
0x21,0x37,0x9a,0xb0,0xbc,0xc6,0x48,0x3f,0x23,0x80,0x20,0x01,0xd7,0xf9,0x5e,0xec,
0x16,0xd6,0xd4,0x1f,0x51,0x42,0x6c,0x10,0x14,0xb7,0xcc,0x82,0x7f,0x13,0x02,0x00,
0x72,0xed,0x90,0x57,0xc1,0x2c,0x5d,0x28,0x81,0x1d,0x38,0x1a,0xac,0xad,0x35,0x78,
0xdc,0x68,0xb9,0x8b,0x6a,0xe1,0xc3,0xe3,0xdb,0x6d,0x04,0x27,0x9c,0x64,0x5a,0x8f,
0x83,0x0c,0xd8,0xa8,0x1c,0x89,0xd5,0x43,0x74,0x73,0x4d,0xae,0xea,0x31,0x6e,0x1e,
0x91,0x1b,0x59,0xc9,0xbd,0xf7,0x07,0xe7,0x8a,0x05,0x8c,0x4c,0xbe,0xc5,0xdf,0xe5,
0xf5,0x2d,0x4b,0x76,0x66,0xf2,0x50,0xd0,0xb4,0x85,0xef,0xb5,0x3c,0x7d,0x3d,0xe6,
0x9b,0x03,0x0d,0x61,0x33,0xf1,0x92,0x53,0xff,0x96,0x09,0x67,0x69,0x44,0xa3,0x4a,
0xaf,0x41,0xda,0x54,0x46,0xd1,0xfa,0xcd,0x24,0xaa,0x88,0xa7,0x19,0xde,0x40,0xeb,
0x94,0x5f,0x45,0x65,0xf0,0xb8,0x34,0xdd,0x0b,0xb1,0x29,0xe9,0x2a,0x75,0x87,0x39,
0xcf,0x79,0x93,0xa1,0xb2,0x30,0x15,0x7a,0x52,0x12,0x62,0x36,0xbf,0x22,0x4f,0xc0,
0xa2,0x17,0xc8,0x99,0x3a,0x60,0xa9,0xa0,0x58,0xf6,0x0a,0x9e,0xf8,0x6b,0x26,0x98
];

Here's an example file for those who don't have the game or don't want to bother getting, which should produce this model:
http://www.models-resource.com/mobile/su...odel/9565/


.zip   unit_mdl_ninja.zip (Size: 510.49 KB / Downloads: 650)
Reply
#2
Interesting format. The data that follows after the parent bone ID is likely to be a 3x3 matrix (3x3*4 = 36)
Reply
Thanked by:
#3
I added an example file in the OP.
Reply
Thanked by:
#4
Interesting, maybe it wont be so hard to rip these after all, still I wonder how hard will the rigging be, so far i couldn't even start the game on bluestacks to download the files directly on my computer, I've heard C2us doesn't allow it anymore, and it looks like my phone doesn't allow me to touch the game files for some reason .
Cold as Regice Cool
[Image: Regice_Signature_by_evanscythe13.png]
Reply
Thanked by:
#5
Well, the rigging could be automatic if someone can figure out how to get default joint orientations from these files. I'm not sure if the default pose that's supposed to fit the geometry (they aren't t-posed) is included in those 39 bytes.

Someone experienced with animation data might be able to export animations as well.
Reply
Thanked by:
#6
(05-25-2015, 11:04 AM)aceres Wrote: Well, the rigging could be automatic if someone can figure out how to get default joint orientations from these files. I'm not sure if the default pose that's supposed to fit the geometry (they aren't t-posed) is included in those 39 bytes.

Someone experienced with animation data might be able to export animations as well.

Well it would be quite the shot to find motion data in there, pre-made walk cycles etc...
It seems that everytime that I try to import gamedata on my pc the phone crashes why is that?
I can't find any unit_mltd files, just some texture and scenario models.
Cold as Regice Cool
[Image: Regice_Signature_by_evanscythe13.png]
Reply
Thanked by:
#7
(05-25-2015, 11:12 AM)kutaras Wrote: I can't find any unit_mltd files, just some texture and scenario models.

They should be amongst them, maybe in another folder. Perhaps it didn't complete download process.
Reply
Thanked by:
#8
(05-25-2015, 12:25 PM)aceres Wrote:
(05-25-2015, 11:12 AM)kutaras Wrote: I can't find any unit_mltd files, just some texture and scenario models.

They should be amongst them, maybe in another folder. Perhaps it didn't complete download process.

I found them!
They were hidden for some reason, I needed to redownload the whole game tho.
Cold as Regice Cool
[Image: Regice_Signature_by_evanscythe13.png]
Reply
Thanked by:
#9
Alright...
I thought I found a way to easily convert those .dat files into wawefront, but it turned out to be a complete failure.
Someone suggested me to use some python scripts and such, at first it looked like it worked but than the meshes just decided to die on me, so I did a research about that script this old friend gave me, and I found out that, this script was made for some "oolite models" dunno what it is and now I'm back at the beginning.
Cold as Regice Cool
[Image: Regice_Signature_by_evanscythe13.png]
Reply
Thanked by:
#10
You need to know the format you are going to export into well, perhaps you are missing something. OBJ is not a good choice by the way because it doesn't have armature/skeleton support. I used it because I didn't know how to export skeletons anyway. I recommend DAE(Collada) files since many programs seem to support it. In fact I modified my codes to export into DAE but skeleton is always messed up. Bone parent structure seems to be correct but cannot be sure, I just couldn't match their positions/rotations with the mesh.
Reply
Thanked by: kutaras
#11
(05-27-2015, 01:39 AM)aceres Wrote: You need to know the format you are going to export into well, perhaps you are missing something. OBJ is not a good choice by the way because it doesn't have armature/skeleton support. I used it because I didn't know how to export skeletons anyway. I recommend DAE(Collada) files since many programs seem to support it. In fact I modified my codes to export into DAE but skeleton is always messed up. Bone parent structure seems to be correct but cannot be sure, I just couldn't match their positions/rotations with the mesh.

I tried obj just to see what I could do with those .dat, and I'm pretty sure I've checked inside those .dat before trying to convert them, and for a moment I had the illusion "I've already seen this", but what i saw was an old android game and the files were pretty different, so now I'm trying to find an easy way to convert them, via some script but I'm still just scratching the surface of this game,  and the code for the script is kinda of unknown to me right now, since it's the first time that I'm trying to export the model with the rigging  Unimpressed 
Cold as Regice Cool
[Image: Regice_Signature_by_evanscythe13.png]
Reply
Thanked by:
#12
If you're just interested in ripping the meshes, you can use the MaxScript I attached.
I didn't manage to figure out the bones though, so that's kinda sad.
It exports the pngs as well.


Attached Files
.zip   SummonerWar_DAT.zip (Size: 1.85 KB / Downloads: 635)
Reply
Thanked by: kutaras, Koakuh, TwiliChaos
#13
(05-27-2015, 08:50 AM)TGE Wrote: If you're just interested in ripping the meshes, you can use the MaxScript I attached.
I didn't manage to figure out the bones though, so that's kinda sad.
It exports the pngs as well.

Well it's more about the rig that I'm interested in, but it seems that inside that 34 kb file there's nothing or at least I couldn't find nothing.
Anyway, you're awesome! this will at least help the models thread to grow don't worry about the rig we will find out a way eventually Big Grin
Cold as Regice Cool
[Image: Regice_Signature_by_evanscythe13.png]
Reply
Thanked by:
#14
The bones are there, it's just put together in a really odd way. There's some code for it in the maxscript, but the bones don't look right.
Either way, the models are really low poly so rigging them wouldn't be that much of a deal. Not to mention that they're already posed.
Reply
Thanked by:
#15
I can't find Garuda's model nowhere, searched everywhere and redownloaded the game several times, I'm doing a small archive with all the models listed following the game's order but Garuda's model seems to be missing, I'm rigging them one by one and this is the only model that is missing right now...
Any idea where i could find it?
Cold as Regice Cool
[Image: Regice_Signature_by_evanscythe13.png]
Reply
Thanked by:


Forum Jump: