The Forum is up for sale: XeNTaX Forum looking for new owner

[XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post questions about game models here, or help out others!
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Are you sure about unk1 ??

since I have one model that require this settings:

Code: Select all

    def parse_unk1(self, count):
        
        for i in range(count):
            
            self.inFile.seek(168, 1)
            
    def parse_unk2(self):
        
        self.inFile.seek(80, 1)
            
    def parse_unk3(self, count):
        
        for i in range(count):
            self.inFile.seek(32, 1)

For now:
----------------unk1,2,3
Play0,weapon0 = 144,96,32
Play0,weapon1 = 144,96,32
Play0,weapon2 = 144,160,32
Play0,weapon3 = 144,112,32

Play1,weapon0 = 144,64,32
Play1,weapon1 = 144,80,32
Play1,weapon2 = 168,80,32


I know it's maybe useless, but I think I need to index all of this, maybe we will find why some unk2 is so variable, shader ? animate object ? animate texture ? glossy texture ?
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: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

since I have one model that require this settings:
Which model is that?
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Play1,weapon2 = 168,80,32

player\p001\w002\w002r.mdl


EDIT: *list update*
----------------unk1,2,3

Play0,weapon0 = 144,96,32
Play0,weapon1 = 144,96,32
Play0,weapon2 = 144,160,32
Play0,weapon3 = 144,112,32

Play1,weapon0 = 144,64,32
Play1,weapon1 = 144,80,32
Play1,weapon2 = 168,80,32

Play2,weapon0 = 144,64,32
Play2,weapon1 = 144,64,32
Play2,weapon2 = 144,48,32
Last edited by zaykho on Tue Aug 21, 2012 7:25 am, edited 1 time 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: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

unk1 structs are still 144 bytes each.
The int at offset 60 gives you the start of unk1 section

The int at offset 24 gives you how many unk1 structs there are.

144 * 2 structs = 288, and then you get unk2 struct.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

unk1 structs are still 144 bytes each.
The int at offset 60 gives you the start of unk1 section

The int at offset 24 gives you how many unk1 structs there are.

144 * 2 structs = 288, and then you get unk2 struct.
Yes but why we can't load this model without a 168 unk1 ?
I have tested a lot of multiple of 16, but it work's only with 168, and this is the only 1 model to do that for now.

Code: Select all

----------------unk1,2,3

Play0,weapon0 = 144,96,32
Play0,weapon1 = 144,96,32
Play0,weapon2 = 144,160,32
Play0,weapon3 = 144,112,32

Play1,weapon0 = 144,64,32
Play1,weapon1 = 144,80,32
Play1,weapon2 = 168,80,32

Play2,weapon0A = 144,64,32
Play2,weapon0B = 144,64,32
Play2,weapon0C = 144,48,32

Play2,weapon1A = 144,64,32
Play2,weapon1B = 144,64,32
Play2,weapon1C = 144,64,32

Play2,weapon2A = 144,64,32
Play2,weapon2B = 144,96,32
Play2,weapon2C = 144,96,32
With this list, I can say now that unk2 must have some material/animation info.
the weapons who have the lowest unk2 bytes, doesn't have any animation or glossy effect in the game.....
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: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

Loads fine for me.

Image
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

but what do you use :

unk1: 144
unk2: 80
unk3: 32

this ?

EDIT:
OK, I found why, I didn't updated my noesis with your last update (with unk2 pass)
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: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

unk2 might be related to materials, since there is no obvious way how you would assign 5 materials to one big mesh.
And that might be how it's partitioned.

I'm currently looking for models with different combinations of materials and textures in otogi 2

i115 - 3 mat, 3 tex, 16 + 96 byte unk2
i118 - 1 mat, 2 tex, 16 + 32 byte unk2
i124 - 2 mat, 2 tex, 16 + 64 byte unk2
i129 - 2 mat, 3 tex, 16 + 48 byte unk2
i500 - 1 mat, 2 tex, 16 + 32 byte unk2

Would need to look at what the actual numbers are and whether they relate to any of the values in the header.

I've separated unk2 into two parts. If you look at the second integer, you might notice that it's always the same as the 4th integer in the second line. For small files anyways like items.

It would be important to also keep in mind that there are 3 different vertex types, so the size may also depend on that.
Last edited by finale00 on Tue Aug 21, 2012 8:05 pm, edited 1 time in total.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

I'm currently looking for models with different combinations of materials and textures in otogi 2

i115 - 3 mat, 3 tex, 16 + 96 byte unk2
i118 - 1 mat, 2 tex, 16 + 32 byte unk2
i124 - 2 mat, 2 tex, 16 + 64 byte unk2
i129 - 2 mat, 3 tex, 16 + 48 byte unk2
i500 - 1 mat, 2 tex, 16 + 32 byte unk2

Would need to look at what the actual numbers are and whether they relate to any of the values in the header.
Ok I will list some of the weapon folders too.
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: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

Ok, unk2 is definitely two different parts.

If you look at p006.mdl, this is how unk2 starts

Image

You see a bunch of shorts there, and then there's some odd 0x49's in between. There's obvious patterns in other files as well: some shorts, followed by some large number (an int), followed by more small shorts.

Now look at c015_hairA.mdl

Image

I've highlighted the shorts.

If you go to the top of the file, you'll notice that the number of count1's is 7. So maybe these index into unk1 structs. Would be nice to know what they are.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Code: Select all

----------------mat,tex,unk2

player\p000\w000 = 1 mat, 1 tex, 16 + 96 byte unk2
player\p000\w001 = 2 mat, 1 tex, 16 + 96 byte unk2
player\p000\w002 = 2 mat, 2 tex, 16 + 160 byte unk2
player\p000\w003 = 2 mat, 2 tex, 16 + 112 byte unk2

player\p001\w000 = 1 mat, 1 tex, 16 + 64 byte unk2
player\p001\w001 = 3 mat, 1 tex, 16 + 80 byte unk2
player\p001\w002 = 2 mat, 1 tex, 16 + 80 byte unk2

player\p002\w000\w000l  = 1 mat, 3 tex, 16 + 64 byte unk2
player\p002\w000\w000r2 = 1 mat, 1 tex, 16 + 64 byte unk2
player\p002\w000\w000r  = 1 mat, 3 tex, 16 + 32 byte unk2

player\p002\w001\w001l  = 1 mat, 3 tex, 16 + 64 byte unk2
player\p002\w001\w001r2 = 1 mat, 2 tex, 16 + 64 byte unk2
player\p002\w001\w001r  = 1 mat, 2 tex, 16 + 64 byte unk2

player\p002\w001\w002l  = 1 mat, 3 tex, 16 + 64 byte unk2
player\p002\w001\w002r2 = 2 mat, 4 tex, 16 + 96 byte unk2
player\p002\w001\w002r  = 2 mat, 4 tex, 16 + 96 byte unk2

EDIT:
Where do you find how many materials are assigned to the model ?
For me I find the offset of the texture data, but I manually search for the material.....
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: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

The material offset is right before the texture offset.
The matCount is right before the texCount

Just look at the outline. There's a couple unknowns that might be important.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

Ok I know where is that:

I will re-look quickly into weapons files, for confirm the material and texture data.


Image


EDIT:
Ok! here the correction *updating unk2 now*

Code: Select all


----------------mat,tex,unk2

-------Raikoh----------P000-------------------

player\p000\w000 = 2 mat, 2 tex, 16 + 96 byte unk2
player\p000\w001 = 2 mat, 3 tex, 16 + 96 byte unk2
player\p000\w002 = 5 mat, 4 tex, 16 + 160 byte unk2
player\p000\w003 = 2 mat, 4 tex, 16 + 112 byte unk2

-------Kintoki---------P001-------------------

player\p001\w000 = 1 mat, 2 tex, 16 + 64 byte unk2
player\p001\w001 = 2 mat, 4 tex, 16 + 80 byte unk2
player\p001\w002 = 2 mat, 3 tex, 16 + 80 byte unk2

-------Tsuna-----------P002-------------------

player\p002\w000\w000l  = 1 mat, 3 tex, 16 + 64 byte unk2
player\p002\w000\w000r2 = 1 mat, 3 tex, 16 + 64 byte unk2
player\p002\w000\w000r  = 1 mat, 3 tex, 16 + 32 byte unk2

player\p002\w001\w001l  = 1 mat, 3 tex, 16 + 64 byte unk2
player\p002\w001\w001r2 = 1 mat, 2 tex, 16 + 64 byte unk2
player\p002\w001\w001r  = 1 mat, 2 tex, 16 + 64 byte unk2

player\p002\w002\w002l  = 1 mat, 3 tex, 16 + 64 byte unk2
player\p002\w002\w002r2 = 3 mat, 4 tex, 16 + 96 byte unk2
player\p002\w002\w002r  = 3 mat, 4 tex, 16 + 96 byte unk2

-------Sadamitsu-------P003-------------------

player\p003\w000 = 1 mat, 2 tex, 16 +  byte unk2
player\p003\w001 = 2 mat, 3 tex, 16 +  byte unk2
player\p003\w002 = 2 mat, 3 tex, 16 +  byte unk2

-------Suetake---------P004-------------------

player\p004\w000\w000l = 1 mat, 2 tex, 16 +  byte unk2
player\p004\w000\w000r = 1 mat, 2 tex, 16 +  byte unk2

player\p004\w001\w001l = 1 mat, 2 tex, 16 +  byte unk2
player\p004\w001\w001r = 1 mat, 2 tex, 16 +  byte unk2

player\p004\w002\w002l = 1 mat, 2 tex, 16 +  byte unk2
player\p004\w002\w002r = 2 mat, 3 tex, 16 +  byte unk2

-------Seimei----------P005-------------------

player\p005\w000\w000l = 0 mat, 0 tex, 16 +  byte unk2
player\p005\w000\w000r = 0 mat, 0 tex, 16 +  byte unk2

player\p005\w001\w001l = 0 mat, 0 tex, 16 +  byte unk2
player\p005\w001\w001r = 0 mat, 0 tex, 16 +  byte unk2

player\p005\w002\w002l = 0 mat, 0 tex, 16 +  byte unk2
player\p005\w002\w002r = 0 mat, 0 tex, 16 +  byte unk2


-------Raikoh(2)--------P006-------------------

player\p000\w000 = 2 mat, 2 tex, 16 + 96 byte unk2
player\p000\w001 = 2 mat, 3 tex, 16 + 96 byte unk2
player\p000\w002 = 5 mat, 4 tex, 16 + 160 byte unk2
player\p000\w003 = 2 mat, 4 tex, 16 + 112 byte unk2


there is a problem with SEIMEI (player005) her weapons doesn't store a lot of data, even MatCount and TexCount are not stored.
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: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by finale00 »

Maybe that character doesn't have weapons.
User avatar
zaykho
mega-veteran
mega-veteran
Posts: 217
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 158 times
Been thanked: 52 times

Re: [XBOX] OTOGI 1 & 2 char, item, maps ? (.dat & .mdl)

Post by zaykho »

No this character have weapons,

Image
Post Reply