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

DK Online (XAC)

Post questions about game models here, or help out others!
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: DK Online (XAC)

Post by finale00 »

Nice.

Ok, I looked at the xac file using chrrox's maxscript for reference, and it's the typical chunk-based format.

One problem I see is the material chunk. There might be an extra struct afterwards which doesn't follow the proper chunk-based format for whatever reason (maybe they just hacked it in lol).

Anyways this is how I handled the materials in DK online:

Code: Select all

def parse_material(self):
        
        self.inFile.read('16f')
        power = self.inFile.readFloat()
        self.inFile.read('4f')
        matName = self.read_name()
        
        #stuff in DK online
        unk = self.inFile.readFloat()
        while unk == 1:
            self.parse_material_extra()
            unk = self.inFile.readFloat()
        else:
            self.inFile.seek(-4, 1)
There are several ways to deal with it, but considering the range of numbers used for chunks, if you don't get an integer less than 100 or something, then you know it's the extra data (and any float parsed as an integer will probably be much larger than 100 anyways)
Last edited by finale00 on Sun Feb 12, 2012 1:23 am, edited 2 times in total.
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

Re: DK Online (XAC)

Post by CriticalError »

finale00 wrote:Nice.

Ok, I looked at the xac file using chrrox's maxscript for reference, and it's the typical chunk-based format.

One problem I see is the material chunk. There might be an extra struct afterwards which doesn't follow the proper chunk-based format for whatever reason (maybe they just hacked it in lol).

Anyways this is how I handled the materials in DK online:

Code: Select all

def parse_material(self):
        
        self.inFile.read('16f')
        power = self.inFile.readFloat()
        self.inFile.read('4f')
        matName = self.read_name()
        
        #stuff in DK online
        unk = self.inFile.readFloat()
        while unk == 1:
            self.parse_material_extra()
            unk = self.inFile.readFloat()
        else:
            self.inFile.seek(-4, 1)
There are several ways to deal with it, but considering the range of numbers used for chunks, if you don't get an integer less than 100 or something, then you know it's the extra data (and any float parsed as an integer will probably be much larger than 100 anyways)
well great news so about chrox MaxScript not work, he say need be changed some in Importer but no respond anymore so maybe you can take a look and adapt it to Noesis, thanks finalle00, really you doing a great job in community, maybe you can promoved to Moderator :)
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: DK Online (XAC)

Post by finale00 »

Being a moderator probably means you might have to actually do some work like move topics that are in the wrong forum or listen to boring reports or to uphold some level of professionalism (eg: following the rules even more than a regular member)

I've been wanting to write a noesis plugin for the xac format but didn't really feel like it whenever I looked at the existing plugins where they were just jumping all over the places. But then if it's just a chunk-based format then it's easy. I'm not a big fan of offset seeking, but I think that is the only choice you have in maxscript.
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: DK Online (XAC)

Post by finale00 »

k someone upload a couple models with their textures. I can't seem to find my samples for war of dragons or argo OR valiant.......

Image
Last edited by finale00 on Sun Feb 12, 2012 4:19 am, edited 2 times in total.
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

Re: DK Online (XAC)

Post by CriticalError »

finale00 wrote:k someone upload a couple models with their textures. I can't seem to find my samples for war of dragons or argo OR valiant.......

Does the company have anymore games?
ok here samples finale00, about others games well yes, they have a lot more games, here you have the web site.

http://www.mgame.com/

Valiant 3D Samples [Samples]

Image

Argo 3D Samples [Samples]

Image
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: DK Online (XAC)

Post by finale00 »

Hmm, I don't really understand how the materials work.
One of the models is referencing material index 2 (so third material), but I have no clue which one that is.

Chunk 3 and chunk 4 are confusing.
Chunk 3 looks like material definitions, and chunk 4 defines which texture *some* material uses.

Several models may be using like 4-5 materials; it's not obvious which texture goes with which material.

Some models have less materials than textures, because there are normal and diffuse textures both assigned to a particular material.
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: DK Online (XAC)

Post by finale00 »

Ok I hacked around with some numbers in chunk 4 and it seems to work.
Mainly because I really can't follow what the other two scripts are doing...

Chunk 4 looks like this

Code: Select all

float[6] ?
int16 ?
int16 ?
texName
I took the first integer and used that as the material index. Sometimes it's greater than however many materials are defined, so I just skipped those.

I also had to check the texName because War of Dragons models use diffuse and normal texture maps, whereas Argos, Valiant, and DK Online don't.

http://db.tt/WlwzHo43

Verify that the textures are applied properly.
Again, model loading config is at the top of the script.

Image
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

Re: DK Online (XAC)

Post by CriticalError »

finale00 wrote:Ok I hacked around with some numbers in chunk 4 and it seems to work.
Mainly because I really can't follow what the other two scripts are doing...

Chunk 4 looks like this

Code: Select all

float[6] ?
int16 ?
int16 ?
texName
I took the first integer and used that as the material index. Sometimes it's greater than however many materials are defined, so I just skipped those.

I also had to check the texName because War of Dragons models use diffuse and normal texture maps, whereas Argos, Valiant, and DK Online don't.

http://db.tt/WlwzHo43

Verify that the textures are applied properly.
Again, model loading config is at the top of the script.
cool work mate, thanks a lot for it, now I downloading others MMO of this company MGAME, anyway thanks again for your support, really gratefull.
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: DK Online (XAC)

Post by finale00 »

Here's the plugin for the textures.
It can probably be more efficient...

http://db.tt/y25FyG9Z
User avatar
CriticalError
double-veteran
double-veteran
Posts: 678
Joined: Sun Jul 05, 2009 2:03 am
Has thanked: 104 times
Been thanked: 41 times

Re: DK Online (XAC)

Post by CriticalError »

yeah ofc this is better, is a pain ass convert all xtex to dds, with is think is more usefull :D, thanks a lot again for your great contributions, maybe you can take a look this topic, I read a topic you request for get Client Ilgh :)

[Request] Ilgh
User avatar
Rimbros
ultra-veteran
ultra-veteran
Posts: 495
Joined: Fri Jul 09, 2010 12:23 am
Has thanked: 41 times
Been thanked: 16 times

Re: DK Online (XAC)

Post by Rimbros »

maybe you can promoved to Moderator :)[/quote]

Not please, dont become moderator, if finale become moderator the users of this 3D models area like me are lost, coz same chroxxx i sure he not release good thinks this days because he its bussy checking all the treadhs and helping all the people, finale dont go to the heaven with this boys, continue here with the mortals bro. :cry:
Renders Art by Rimbros
http://s303.photobucket.com/albums/nn12 ... E/Renders/

Personal Game repository samples, send PM
archiryo
ultra-n00b
Posts: 3
Joined: Wed Feb 15, 2012 4:47 pm
Has thanked: 1 time

Re: DK Online (XAC)

Post by archiryo »

does any ones know how to download this game? (i can't download from offical web)
iaw
advanced
Posts: 52
Joined: Wed Oct 21, 2009 12:52 pm
Has thanked: 9 times
Been thanked: 10 times

Re: DK Online (XAC)

Post by iaw »

archiryo wrote:does any ones know how to download this game? (i can't download from offical web)
:wink:
http://full-dkonlinedn.cdn.x-cdn.com/dk ... ine_FT.exe
Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1823
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 92 times
Been thanked: 1058 times

Re: DK Online (XAC)

Post by Ekey »

Models rly awesome Image

http://i42.tinypic.com/hwiyo2.png
http://i42.tinypic.com/970bro.png
http://i42.tinypic.com/1qqyx2.png
http://i43.tinypic.com/fxc5yv.png

But for some reason in the game does not display the models. I hope it affects ping. Somebody have same problem? Image
http://i40.tinypic.com/28a6mp4.png
iaw
advanced
Posts: 52
Joined: Wed Oct 21, 2009 12:52 pm
Has thanked: 9 times
Been thanked: 10 times

Re: DK Online (XAC)

Post by iaw »

finale00 wrote:k someone upload a couple models with their textures. I can't seem to find my samples for war of dragons or argo OR valiant.......
I find this.
for fatduck

Code: Select all

char[4]  HeaderID  //"XSAM "
byte[4]  Version
dword[5] ?
byte  numString
byte[3]  ?
dword  ?
struct Stg {
   dword Len
   char[Len] FileReference
}
dword[4] ?
dword  numBone
dword  ?
struct Bone {
   float[4] QuatXYZW
   float[4] QuatXYZW //animation reference
   float[3] PosXYZ
   float[3] ScaleXYZ
   float[3] ?  //inverse scale!?
   dword[2] ?
   dword ParentID
   dword numChild
   dword ?
   float[12] Matrix4X3 //Axis Matrix
   float[3] WorldPosXYZ
   float[2] ?
   dword Len
   char[Len] BoneName
}
dword[3] ?
dword  *numMaterial
dword  *numMaterial //same as about!?
dword  ?
struct Material {
   dword[3] ?
   float[4] ColorRGBA
   float[4] ColorRGBA
   float[4] ColorRGBA
   float[4] ColorRGBA
   float SpecularPower
   dword[3] ?
   byte[3] ?
   byte  numTexture
   dword Len
   char[Len] MaterialName
   struct Texture {
      float[6] ?
      word ?  
      word TextureType
      dword Len
      char[Len] TextureName   
   }
}

struct Mesh {
   dword BlockType //1
   dword[2] ?
   dword ParentID
   dword numSkinIndices
   dword numVerts
   dword numFaceIndices
   dword numFacePart
   dword numVertElement
   dword ?
   struct VertElement {
      dword elementType //0=coordinates, 1=Normals
      dword BytesPerElement //3=UVs, 5=Slinindices4
      word elementID
      word ?
      <Data>
   }
   struct Face {
      dword numPartIndices
      dword numPartVerts
      dword MaterialID
      dword numUsedBone
      <Data> 
   }
}
struct SkinData {
   dword BlockType //2
   dword[2] ?
   dword MeshID
   dword numwSkinIndices
   dword numWeightBonePair
   dword ?
   struct WeightBonePair {
      float Weight
      dword BoneID
   }
   struct SkinIndex {
      dword Index
      dword numSkinInPair
   } 
}
Post Reply