Important information: this site is currently scheduled to go offline indefinitely by end of the year.

combat arms

Post questions about game models here, or help out others!
MCDMaker
ultra-n00b
Posts: 8
Joined: Sun Apr 01, 2012 12:55 pm
Has thanked: 1 time

combat arms

Post by MCDMaker »

.
Last edited by MCDMaker on Thu Apr 05, 2012 10:35 pm, edited 3 times in total.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

Just post some .dat files. If the extractor works there's no need to post a rez archive.
I looked at some .dat files but didn't get anything that looks like vertices.

Am I able to create a map file from scratch using these tools?
For example, a simple cube so I can pin-point exactly what I need.

If so, provide a simple map that you have created yourself (either by taking an existing map and just replacing it with something simple). I imagine if you can mod maps with these tools, you could do something like that?
MCDMaker
ultra-n00b
Posts: 8
Joined: Sun Apr 01, 2012 12:55 pm
Has thanked: 1 time

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by MCDMaker »

Just added one of the .DAT files for download
http://www.mediafire.com/?jhb1hmbzlb43m0c

:)
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

I am looking at might and magic 9 models and can see that they use different format (based on the first integer).

Anyways onto the file you posted.
Can you post a render of how that rattlesnake map should look? (either in-game screenshot or something)

This is what I've gotten from hardcoding some offsets and plotting some points.
I went to offset 139997 and just picked out all the floats I saw.

Image

It looks like a part of a room with pillars of sorts. Or perhaps it's a building. I don't know.

So that's basically 1152 vertices. I don't know where the indices are, but the overall structure for format 85 follows a very obvious pattern. It's like

Code: Select all

texture path (can be a bunch of texture paths)
a bunch of bytes, for example a whole sheet of 0x03's>
a bunch of floats
a bunch of 4-byte integers, possibly face indices>
a nice section of integers mixed in with a bunch of FFFFFFFFFFF everywhere
more floats, this is where I grabbed the vertex coords from
It probably is straightforward.

EDIT: here's an outline for rattlesnake, starting at offset 336

Code: Select all

struct ex {
   dword ?
   dword null
   dword ?
   word nameLen
   char[nameLen] meshName
   dword numVerts?
   dword unkCount1
   dword[7] more counts and stuff, maybe numIdx is there also
   dword count1?
   float[9] ?
   dword texLens
   dword numTex?
   char[texLens] texture paths
   byte[count1] ??
   numVerts { #well, it's numVerts * 12, so...
       float[3]
   }
   unkCount1 {
      dword[2] #0x41, 0x??
   }
   <indices?>
   ...
}
Last edited by finale00 on Sun Apr 01, 2012 2:17 pm, edited 1 time in total.
MCDMaker
ultra-n00b
Posts: 8
Joined: Sun Apr 01, 2012 12:55 pm
Has thanked: 1 time

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by MCDMaker »

Thanks for helping btw!

Rattlesnake is a really big map so its kinda hard to take a print screen of the whole map. But here is a video of it:
http://www.youtube.com/watch?v=GuI8ngsosis

Some print screens: (not mine)


OVERVIEW of the map: http://images.wikia.com/combatarms/imag ... ESNAKE.jpg
Extra screens:
http://www.coptermonkey.com/rattlesnake.jpg
http://i301.photobucket.com/albums/nn42 ... rms_23.jpg
http://i301.photobucket.com/albums/nn42 ... s_15-1.jpg
http://i301.photobucket.com/albums/nn42 ... s_19-1.jpg
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

Are there any smaller maps (in terms of filesize) around? For comparison
MCDMaker
ultra-n00b
Posts: 8
Joined: Sun Apr 01, 2012 12:55 pm
Has thanked: 1 time

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by MCDMaker »

The smallest "file size" of the maps is the map Brushwood.

Download link (.DAT): http://www.mediafire.com/?g6yv95cuvuvrpas

EDIT: This is how the map looks like, video: http://www.youtube.com/watch?v=jPy98oU8jts

Overview of the map: http://images.wikia.com/combatarms/imag ... SHWOOD.jpg
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

The overall structure has been parsed except for two structures, the beginning of the file, and a struct I commented with "unk struct4". For the beginning I simply hardcoded it to skip to the start of the mesh section, starting with the numMesh. The one I hardcoded is for rattlesnake.

If anyone can figure out how to get past that section then we can plot all the points and move on to faces.

Basically, it looks like you have the matNum, followed by some integers for the indices.

However, sometimes you have 3 integers, sometimes you have 4 (tri's vs quads?). I am pretty sure that those are the face indices because if you look at the first integer, it is always less than the number of materials, and the largest integer is one less the numVerts.

The first 5 meshes followed the pattern I wrote down nicely, but then the 6th mesh doesn't follow it anymore (it's off by about 200 bytes?)

http://db.tt/ogpsoZNY

If you want to parse more meshes just go to the parse_file method and change the value to numMesh or something. I only wrote down 5 cause I couldn't get past that.

Brushwood meshes start at offset 211
It can parse up to 23 meshes before I run into an error.
It is because of that unk_struct4...
Last edited by finale00 on Sun Apr 01, 2012 4:26 pm, edited 1 time in total.
MCDMaker
ultra-n00b
Posts: 8
Joined: Sun Apr 01, 2012 12:55 pm
Has thanked: 1 time

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by MCDMaker »

waooooooow

that was way to complicated for me to understand :O
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

Hopefully someone will see something I'm not seeing :)
MCDMaker
ultra-n00b
Posts: 8
Joined: Sun Apr 01, 2012 12:55 pm
Has thanked: 1 time

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by MCDMaker »

Ya really hope so :)
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

Still don't know the unknown struct, but I was comparing it with Might and Magic 9 .dat format and it is very similar except they use different datatypes to store certain values (eg: shorts vs bytes). The only values that matter are those 10 integers defined in the mesh header, and most of them seem to be 0's anyways.

So figuring out one should make it easy to figure out the rest.

EDIT: thinking about it some more...that massive seemingly random section of 3's and 4's might actually be the number of indices per face...if I just add up that number and multiply it by the number of faces maybe I can skip the indices completely!

Code: Select all

struct Face {
   dword matNum
   dword ?
   dword[n] v1, v2, ..., vn
}
So if a face has 3 indices, then that face struct is 20 bytes long. If it has 4 indices, then it's 24 bytes long.
Last edited by finale00 on Sun Apr 01, 2012 7:09 pm, edited 1 time in total.
MCDMaker
ultra-n00b
Posts: 8
Joined: Sun Apr 01, 2012 12:55 pm
Has thanked: 1 time

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by MCDMaker »

ya true, do you think you will be avaible to do it ? :<
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

Alright, got the faces sorted out. Sort of looks like what was shown in the video.

Image

Though, no normals or UV's yet. I ignore everything after the meshes section.
Script updated.

The header is still hardcoded though.

What's really silly is that there are some faces with 8 and 12 vertices. Err......I'm not going to bother drawing those...
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Lithtech Jupiter Engine | .DAT Files (Combat Arms)

Post by finale00 »

I have updated the script so just download it again and try running them on some other dat files. If they don't work upload them.

I just need the header though, so just copy paste the first 100 KB or something of the file into a new file (make sure the hex is preserved) and upload those. I want the headers from a really large file, a medium size file, and a small file.

I think I have found some pattern to the headers. I have no idea what they are, and I don't know if you actually want to inject new maps into the game or whatever, but at least I can skip them.

Code: Select all

struct Header {
   dword version
   float[6] skip
   dword[8] null
   dword len
   char[len] some_info
   float[15] skip
   byte ?
   dword count
   byte[3] ?
   count {
       32 bytes?
   }
   byte[11]
}
Post Reply