Users browsing this thread: 2 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: 578)
Reply


Messages In This Thread
Summoners War - by aceres - 05-25-2015, 09:48 AM
RE: Summoners War - by TGE - 05-25-2015, 10:22 AM
RE: Summoners War - by aceres - 05-25-2015, 10:59 AM
RE: Summoners War - by kutaras - 05-25-2015, 11:02 AM
RE: Summoners War - by aceres - 05-25-2015, 11:04 AM
RE: Summoners War - by kutaras - 05-25-2015, 11:12 AM
RE: Summoners War - by aceres - 05-25-2015, 12:25 PM
RE: Summoners War - by kutaras - 05-25-2015, 12:36 PM
RE: Summoners War - by kutaras - 05-26-2015, 12:08 PM
RE: Summoners War - by aceres - 05-27-2015, 01:39 AM
RE: Summoners War - by kutaras - 05-27-2015, 07:47 AM
RE: Summoners War - by TGE - 05-27-2015, 08:50 AM
RE: Summoners War - by kutaras - 05-27-2015, 12:25 PM
RE: Summoners War - by CrankyCvnt - 03-24-2022, 12:44 AM
RE: Summoners War - by TGE - 05-27-2015, 03:45 PM
RE: Summoners War - by kutaras - 06-01-2015, 06:46 AM
RE: Summoners War - by aceres - 06-01-2015, 07:04 AM
RE: Summoners War - by kutaras - 07-09-2015, 07:12 AM
RE: Summoners War - by xHighx - 05-12-2016, 08:47 AM
RE: Summoners War - by TGE - 05-13-2016, 03:34 AM
RE: Summoners War - by xHighx - 05-13-2016, 12:02 PM
RE: Summoners War - by TGE - 05-25-2016, 06:51 AM
RE: Summoners War - by aceres - 10-21-2016, 03:41 PM
RE: Summoners War - by aceres - 10-28-2016, 07:04 AM
RE: Summoners War - by Carpaccio - 10-23-2016, 10:58 AM
RE: Summoners War - by aceres - 10-23-2016, 12:48 PM
RE: Summoners War - by aceres - 11-08-2016, 03:15 PM
RE: Summoners War - by aceres - 11-13-2016, 02:20 AM
RE: Summoners War - by aceres - 11-16-2016, 04:53 AM
RE: Summoners War - by aceres - 01-01-2017, 03:01 AM
RE: Summoners War - by aceres - 01-07-2017, 03:47 AM
RE: Summoners War - by TwiliChaos - 03-28-2018, 02:03 PM
RE: Summoners War - by TwiliChaos - 03-30-2018, 02:50 AM
RE: Summoners War - by TwiliChaos - 04-22-2018, 09:27 AM
RE: Summoners War - by NatoriousB - 09-09-2020, 01:00 PM
RE: Summoners War - by NatoriousB - 09-13-2020, 08:07 AM
RE: Summoners War - by RedBear - 09-13-2020, 08:07 AM
RE: Summoners War - by richenberg - 02-02-2021, 10:25 AM
RE: Summoners War - by RedBear - 02-04-2021, 11:22 AM
RE: Summoners War - by NatoriousB - 09-14-2020, 12:54 AM
RE: Summoners War - by richenberg - 02-22-2022, 07:46 AM
RE: Summoners War - by RedBear - 04-18-2022, 07:45 AM
RE: Summoners War - by Neostatos4 - 05-15-2023, 04:17 PM
RE: Summoners War - by andre.aguiar - 05-30-2023, 10:13 AM
RE: Summoners War - by Neostatos4 - 05-30-2023, 11:10 AM
RE: Summoners War - by andre.aguiar - 05-30-2023, 01:23 PM
RE: Summoners War - by RedBear - 06-24-2023, 12:45 PM
RE: Summoners War - by Neostatos4 - 06-26-2023, 11:57 PM
RE: Summoners War - by RedBear - 06-27-2023, 11:38 AM
RE: Summoners War - by andre.aguiar - 05-30-2023, 03:35 PM
RE: Summoners War - by Neostatos4 - 05-30-2023, 04:37 PM
RE: Summoners War - by andre.aguiar - 06-02-2023, 08:21 AM
RE: Summoners War - by Neostatos4 - 06-02-2023, 09:46 AM
RE: Summoners War - by Neostatos4 - 06-28-2023, 10:15 AM
RE: Summoners War - by RedBear - 06-29-2023, 10:16 AM
RE: Summoners War - by TwiliChaos - 11-24-2023, 08:30 PM
RE: Summoners War - by andre.aguiar - 04-24-2024, 07:46 AM
RE: Summoners War - by Dandy Cadet - 11-27-2023, 09:19 PM
RE: Summoners War - by endriu - 01-08-2024, 05:30 AM
RE: Summoners War - by RedBear - 04-02-2024, 12:07 AM
RE: Summoners War - by andre.aguiar - 04-26-2024, 09:34 AM

Forum Jump: