Dead or Alive series formats and tools

Post questions about game models here, or help out others!
Protocol X27
ultra-veteran
ultra-veteran
Posts: 340
Joined: Wed Dec 14, 2011 5:46 pm
Has thanked: 140 times
Been thanked: 117 times

Re: Dead or Alive series formats and tools

Post by Protocol X27 » Thu Jun 27, 2013 9:35 pm

b0ny wrote:
Protocol X27 wrote: Thanks for your ongoing work on this. :) Glad to see your finding more files.

I was looking to swap some of the animation files (MPM). I noticed that in some cases files have identical file lengths. As of right now the only way I know to find a file in Hex is using it's length. If the lengths are the same I don't know if I'm updating the correct file or not. Since the unpackers display the hex address (or at least doa5_tool does) while they are processing is there anyway to get the offsets for each file it dumps? There are a lot of files in the chara_common, and the Windows cmd window will only display so many lines. Any tips or techniques for getting those offsets would be appreciated.

Thanks
swapping game files is more trivial than repacking huge lnk files - you could just edit the executable(default.xex), if you're ready to work with the xex tool i could help you dive in that thing. the idea is to edit the file table instead of editing the lnk archives.
i could create a tool -> that would help you find the offsets of needed files in table -> so you could swap their entries -> and the game would use the new file from it's modified "file table".(or maybe instead of a tool, a text file with offsets and description for the entire table would be enough).
so: unpacking with xex, hex editing, and packing back(not sure if this is necessary). tell me when you're ready...

or maybe, if there is a tool to edit the xbox 360 memory, you could use it to edit the executable directly in the memory without all that sh#t, you could create trainers for swapping costumes characters and stages(don't get to excited about this, this requires a lot of research to find where the stages are initialized).
Thanks, that might be helpful. I actually do know how to do swaps already, I have been doing that for the default.xex and chara_common.lnk. I just didn't know how to find the indexes for some files. I may have spoken incorrectly, I think it is the PHYD files that are similar in size like 47KB or something. Because of that I didn't know if I was swapping the correct indexes. I don't know what they do, but I was trying to find animation files at the time.

If making the tool is of assistance to anyone else as well and not too much trouble, it's cool, but not something I'd trouble you over. :) Right now, I'm getting frustrated trying to figure out how to get vertices from different models injected. Some people know how, but I haven't been able to discover the full method yet.

Edit:
On another thought b0ny, if you're willing to help with a tool, injecting into those --HL, --C,--P image files would be helpful if you have knowledge of how to do that. I still need to check out the bundler method that you mentioned early, but being able to inject those textures would be fantastic. :)

Darko
double-veteran
double-veteran
Posts: 702
Joined: Mon Jul 13, 2009 6:16 pm
Has thanked: 70 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by Darko » Fri Jun 28, 2013 6:54 am

b0ny wrote:zaykho
unfortunately my old radeon9550 ain't compatible with webgl :(

doax, doax2, doap and doa5 have the same skeleton structure, plus you anyway convert the models to your own format, so there's just no sense to not use any animation on any model.
(doa 2/3/4 also use the same skeleton structure)

also how do you convert the models, maybe you need a special converter that will preserve the triangle strips - using triangle strips could increase the performance...

Darko
i didn't do it, team ninja did :)
you can see that the mesh in the neck area is distorted and the skeleton is following it's shape.

io_import_TMC-GMD.py - fixed the wrong positions when assembling the doa5 skin parts

[edit]
hot fixed and reuploaded the doa5 importer
Thanks.
Image

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Sat Jun 29, 2013 2:59 pm

tecmo360texturesExtractorV13 - with injection functionality

Protocol X27
try injecting textures with this version of tecmo360textureextractor.
in this version i added an injection functionality which is a wrapper on "bundler.exe", so you have to have "bundler.exe" in the same folder
it still needs testing...

[edit]
doa5filesrefs.ods - download this for swapping files in 'default.xex'(or in memory). to swap a file, do this:
for example we want to swap kasumi's animation from the selection screen with ayane's. we have to swap two files "KASUMI_SELECT.mpm" and "KASUMI_SELECT.cam" with these "AYANE_SELECT.mpm" and "AYANE_SELECT.cam"

1. open the downloaded "doa5filesrefs.ods" in "Libre Office"

2. seach(ctrl+f) for "AYANE_SELECT.mpm" and get it's Offset (0xEA150 - this is the offset)

3. decrypt doa5 "default.xex" with xex tool and open it in a hex editor

4. go in the opened "default.xex" to "AYANE_SELECT.mpm" Offset from pt.2 (0xEA150)

5. copy 12 bytes from that offset(description bellow)
you'll see this: 82 16 27 D0 00 00 00 07 82 16 57 CC. (nameoffset, type, lnknameoffset)
every 4 bytes are a value: 0x821627D0, 0x00000007, 0x821657CC

6. search as in pt.2 for "KASUMI_SELECT.mpm" and get it's Offset (0xE9A9C)

7. go in the hex editor to "KASUMI_SELECT.mpm" Offset (0xE9A9C)

8. write here 12 bytes from pt.4, at this point swapping for 'mpm' files is done

9. do the same thing to swap the 'cam' files (points 2, 4, 5, 6, 7, 8 )

10. save the edited "default.xex" and encrypt it back with "xex tool"

11. put the encrypted "default.xex" with the game back on the disk, and see if kasumi's animation from the selection screen has changed to ayane's one


[edit]
i have a question, can anyone help me?
does the doa5 patch 1.03(with zack's island) bring a new "default.xex"?

tcl36478655
beginner
Posts: 34
Joined: Mon Apr 08, 2013 2:22 am
Has thanked: 25 times
Been thanked: 3 times

Re: Dead or Alive series formats and tools

Post by tcl36478655 » Sun Jun 30, 2013 5:22 pm

b0ny wrote: i have a question, can anyone help me?
does the doa5 patch 1.03(with zack's island) bring a new "default.xex"?
you should encrypt default-done.xex then replace 0x000-0x45c0 from default.xex(original).

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Sun Jun 30, 2013 8:31 pm

tcl36478655 wrote:
b0ny wrote: i have a question, can anyone help me?
does the doa5 patch 1.03(with zack's island) bring a new "default.xex"?
you should encrypt default-done.xex then replace 0x000-0x45c0 from default.xex(original).
[edit]
seems like the files table is the same, and they hide the information for additional files like zack's island somewhere else...
Last edited by b0ny on Mon Jul 01, 2013 9:17 am, edited 1 time in total.

tcl36478655
beginner
Posts: 34
Joined: Mon Apr 08, 2013 2:22 am
Has thanked: 25 times
Been thanked: 3 times

Re: Dead or Alive series formats and tools

Post by tcl36478655 » Mon Jul 01, 2013 5:17 am

i'll pm you.

Protocol X27
ultra-veteran
ultra-veteran
Posts: 340
Joined: Wed Dec 14, 2011 5:46 pm
Has thanked: 140 times
Been thanked: 117 times

Re: Dead or Alive series formats and tools

Post by Protocol X27 » Tue Jul 02, 2013 9:56 pm

b0ny wrote:tecmo360texturesExtractorV13 - with injection functionality

Protocol X27
try injecting textures with this version of tecmo360textureextractor.
in this version i added an injection functionality which is a wrapper on "bundler.exe", so you have to have "bundler.exe" in the same folder
it still needs testing...

[edit]
doa5filesrefs.ods - download this for swapping files in 'default.xex'(or in memory). to swap a file, do this:
for example we want to swap kasumi's animation from the selection screen with ayane's. we have to swap two files "KASUMI_SELECT.mpm" and "KASUMI_SELECT.cam" with these "AYANE_SELECT.mpm" and "AYANE_SELECT.cam"

1. open the downloaded "doa5filesrefs.ods" in "Libre Office"

2. seach(ctrl+f) for "AYANE_SELECT.mpm" and get it's Offset (0xEA150 - this is the offset)

* snip *

[edit]
i have a question, can anyone help me?
does the doa5 patch 1.03(with zack's island) bring a new "default.xex"?
Thank you, that will give me a bunch of stuff to try.

I have successfully swapped select animations before. However, changing the select.cam crashes when doing a swap. If the .ods file has the offsets though, that will be a huge help too. Have you by chance discovered which .mpm files store the in game moves?

tcl's suggestion is correct about default.xex with the patch. Just need to reencrypt after editing and then copy the initial block from the original one.

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Wed Jul 03, 2013 1:37 pm

Protocol X27
tell me how it goes. also maybe you can test this:

when you go to an offset you see 3 values in 12 bytes: first 4 bytes are the "memory offsets" for the filename name; then you have 4 bytes for the file type; then you have 4 bytes for the lnk name "memory offset". you can try to change the offset to the right lnk name, for examle to save a dlc file directly in the dlc without packing it back to it's lnk container(this could fasten your workflow)

Code: Select all

these are the offsets for LNK names:
0x8216588c      NO_LINK
0x82165868      common
0x821657cc      chara_common
0x82165324      chara_rtm
0x82152d88      stage_common
0x82150884      stage_rtm
0x8214e09c      sprite_ingame
0x8214c334      sprite_common
0x82142b4c      rtm_common
0x82142888      message
0x8214ef5c      stage_debug
0x8216fae8      chara_dlccos_b
0x82170ad4      chara_dlccos_c
0x8216ec08      chara_dlccos_d
0x82170c80      chara_dlccos_e
0x82171200      chara_dlccos_f
0x82170d14      chara_dlccos_g
0x8216ff88      chara_dlccos_h
0x8217116c      chara_dlccos_i
0x82170bec      chara_dlccos_j
0x821710d4      chara_dlccos_none
you can go to the <Offset of the file>+8 offset for the needed file, and change 4 bytes of the offset to the LNK name to 0x8216588c for a common file - to pack it directly to the disk; or to 0x821710d4 for a dlc file - to pack it direcly in the dlc(without packing it to LNK)
<Offset of the file> = offset from the "doa5filesrefs.ods"

P.S. the game already have files with lnk set as NO_LINK or as chara_dlccos_none. all files that are on the game disk outside of lnk files have their lnk set to NO_LINK, and all the files in dlc's that are outside of the lnk file from that dlc have their lnk name set to chara_dlccos_none
Last edited by b0ny on Fri Jul 05, 2013 6:24 am, edited 1 time in total.

Protocol X27
ultra-veteran
ultra-veteran
Posts: 340
Joined: Wed Dec 14, 2011 5:46 pm
Has thanked: 140 times
Been thanked: 117 times

Re: Dead or Alive series formats and tools

Post by Protocol X27 » Wed Jul 03, 2013 6:22 pm

Thanks I haven't worked my way up to editing stuff in memory yet, XD Does seem like it would be helpful though.

I finally installed LibreOffice and I am looking for the offsets.

As you mentioned in your editing instructions...

"2. seach(ctrl+f) for "AYANE_SELECT.mpm" and get it's Offset (0xEA150 - this is the offset)"

I'm not seeing the offset, In column A this file is 6760, and Column B is 0x07. How do I calculate the offset from those? Or do I have an outdated doa5filerefs.ods?

I tried the injector last night, so far it injected & extracted correctly. Now, I just need to test with the container put back into the game.

Edit:
b0ny, the injector works for those alternate textures! Great work! 8D

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Thu Jul 04, 2013 5:12 am

Protocol X27 wrote: I'm not seeing the offset, In column A this file is 6760, and Column B is 0x07. How do I calculate the offset from those? Or do I have an outdated doa5filerefs.ods?

the file linked in here is the one with offsets. scroll at the beginning of the table to see the headers for columns. the column with offsets is the rightmost one with data of type "0xNNNNN", these offsets are for decrypted default.xex file.

the "memory offsets" for the lnk i mentioned before are the offsets that you can see in the default.xex, you don't need to go on them - the idea is to swap them with other lnk offsets(from the given list) that will tell the game to search that file in other lnk or directly on the disk.
Protocol X27 wrote: I tried the injector last night, so far it injected & extracted correctly. Now, I just need to test with the container put back into the game.

Edit:
b0ny, the injector works for those alternate textures! Great work! 8D
yea you can inject in any files you can extract from! (doa and ninja gaiden)
inside dlc you can find the icons of the costumes, that you scroll in select screen when cosing the costume, these icons are saved in files with extension: "*.--P"(given by simple doa5 unpacker). you can swap the inside image with your own image of your modded costume...

Protocol X27
ultra-veteran
ultra-veteran
Posts: 340
Joined: Wed Dec 14, 2011 5:46 pm
Has thanked: 140 times
Been thanked: 117 times

Re: Dead or Alive series formats and tools

Post by Protocol X27 » Thu Jul 04, 2013 1:39 pm

b0ny wrote: the file linked in here is the one with offsets. scroll at the beginning of the table to see the headers for columns. the column with offsets is the rightmost one with data of type "0xNNNNN", these offsets are for decrypted default.xex file.
My bad, I didn't see the link and had just used one I already had on my PC. :(
b0ny wrote: yea you can inject in any files you can extract from! (doa and ninja gaiden)
inside dlc you can find the icons of the costumes, that you scroll in select screen when cosing the costume, these icons are saved in files with extension: "*.--P"(given by simple doa5 unpacker). you can swap the inside image with your own image of your modded costume...
That's Awesome!! I've wondered what it would take to change those. That's huge for helping keep track of custom ones. :)

Edit:

#1) Updating the Icon image worked!! :D That's a great tip.

#2) I tried the .mpm & .cam swap as suggested and nothing changed. Any time that I have done a swap it has always been of the index table in chara_common.lnk. I'll swap the offset from one object to that of another, most of the time it will work. Is there possibly anything that would need to be combined with this method plus the edit of the default.xex?

What exactly are the offsets mentioned in the .xex? When I check the lnk offset it is out of bounds of the chara_common.lnk.

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Fri Jul 05, 2013 10:57 am

Protocol X27 wrote:
b0ny wrote: the file linked in here is the one with offsets. scroll at the beginning of the table to see the headers for columns. the column with offsets is the rightmost one with data of type "0xNNNNN", these offsets are for decrypted default.xex file.
My bad, I didn't see the link and had just used one I already had on my PC. :(
b0ny wrote: yea you can inject in any files you can extract from! (doa and ninja gaiden)
inside dlc you can find the icons of the costumes, that you scroll in select screen when cosing the costume, these icons are saved in files with extension: "*.--P"(given by simple doa5 unpacker). you can swap the inside image with your own image of your modded costume...
That's Awesome!! I've wondered what it would take to change those. That's huge for helping keep track of custom ones. :)

Edit:

#1) Updating the Icon image worked!! :D That's a great tip.
:)
Protocol X27 wrote:#2) I tried the .mpm & .cam swap as suggested and nothing changed. Any time that I have done a swap it has always been of the index table in chara_common.lnk. I'll swap the offset from one object to that of another, most of the time it will work. Is there possibly anything that would need to be combined with this method plus the edit of the default.xex?
you don't need anything else, just swapping these 12 bytes in default.xex. try swapping costumes for a character - try to swap ayane costume 1 with ayane costume 3, for this you have to swap entries for "AYANE_COS_001.TMC"/"AYANE_COS_001.TMCL" with "AYANE_COS_003.TMC"/"AYANE_COS_003.TMCL". see if the costumes will swap...
Protocol X27 wrote:What exactly are the offsets mentioned in the .xex? When I check the lnk offset it is out of bounds of the chara_common.lnk.
there are three values: "offset to filename", "file type id", "offset to file lnk name"
the offset called "offset to file lnk name" does literally what it's name says, the only thing is that this is a memory offset of the executable loaded in the xbox360 memory, to convert it to xex offset you have to do this:
offset to "chara_common" is 0x821657cc we have to add 0x5000 and subtract 0x82000000 so
0x821657cc + 0x5000 - 0x82000000 = 0x16A7CC, if you go to this offset in default.xex you literally see the text "chara_common". that's it...
the same for "offset to filename", by swapping these three values you tell the game to look for the name of the new offset, and also in the new lnk name. then when it tries to load this file, it goes searches for these three values, it gets the filename from the "filename offset" and searches it in the lnk file with the name from the "lnk name offset"

Protocol X27
ultra-veteran
ultra-veteran
Posts: 340
Joined: Wed Dec 14, 2011 5:46 pm
Has thanked: 140 times
Been thanked: 117 times

Re: Dead or Alive series formats and tools

Post by Protocol X27 » Sat Jul 06, 2013 10:30 pm

b0ny wrote: you don't need anything else, just swapping these 12 bytes in default.xex. try swapping costumes for a character - try to swap ayane costume 1 with ayane costume 3, for this you have to swap entries for "AYANE_COS_001.TMC"/"AYANE_COS_001.TMCL" with "AYANE_COS_003.TMC"/"AYANE_COS_003.TMCL". see if the costumes will swap...
Okay, I tried this method on the costumes, and still nothing changed. Either I'm missing something, or you perhaps did something else to get this method to work. :-/
b0ny wrote: there are three values: "offset to filename", "file type id", "offset to file lnk name"
the offset called "offset to file lnk name" does literally what it's name says, the only thing is that this is a memory offset of the executable loaded in the xbox360 memory, to convert it to xex offset you have to do this:
offset to "chara_common" is 0x821657cc we have to add 0x5000 and subtract 0x82000000 so
0x821657cc + 0x5000 - 0x82000000 = 0x16A7CC, if you go to this offset in default.xex you literally see the text "chara_common". that's it...
the same for "offset to filename", by swapping these three values you tell the game to look for the name of the new offset, and also in the new lnk name. then when it tries to load this file, it goes searches for these three values, it gets the filename from the "filename offset" and searches it in the lnk file with the name from the "lnk name offset"
Thanks for explaining the formula. I didn't quite understand what was listed in the .ods. So really the chara_common offset is just the file location itself and not the offsets 'within' the file. I think those are the ones that I was looking for. I notice the unpackers output those when dumping data. Is there anyway to track those down?

b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 118 times

Re: Dead or Alive series formats and tools

Post by b0ny » Sun Jul 07, 2013 7:11 am

Protocol X27 wrote:Okay, I tried this method on the costumes, and still nothing changed. Either I'm missing something, or you perhaps did something else to get this method to work. :-/
pm me with your "default.xex" that didn't work with the swapped files, i'll have a look.
Protocol X27 wrote:Is there anyway to track those down?
simple doa5 unpacker ver 4.4 - added a more detailed log for unpacking. after unpacking look into "doa5_unpacker.log", first hex number is the offset of the "file info" in the lnk file (file info = {?, file_offset, ?, file_size, ?, file_compressed_size})

Protocol X27
ultra-veteran
ultra-veteran
Posts: 340
Joined: Wed Dec 14, 2011 5:46 pm
Has thanked: 140 times
Been thanked: 117 times

Re: Dead or Alive series formats and tools

Post by Protocol X27 » Tue Jul 09, 2013 3:17 am

b0ny wrote:pm me with your "default.xex" that didn't work with the swapped files, i'll have a look.

simple doa5 unpacker ver 4.4 - added a more detailed log for unpacking. after unpacking look into "doa5_unpacker.log", first hex number is the offset of the "file info" in the lnk file (file info = {?, file_offset, ?, file_size, ?, file_compressed_size})
Awesome!! Exactly what I needed for that log file. That'll save me a ton of time, guesswork and trial & error. :D

You've really been kickin' some butt with this stuff lately. Thank you!

I'll send you what I did with the default.xex later on, after I finish my current project, and reset it back to the basic one.

Post Reply