Gildor's Forums

Author Topic: Trying to modify a XXX package...  (Read 22933 times)
mariokart64n
Newbie
*
Posts: 3


View Profile
Trying to modify a XXX package...
« on: June 15, 2012, 01:25 »

I'm working on a xbox360 game called lollipop chainsaw and trying to edit the vertex positions of a character model in a XXX file.

I'm trying to first import the vertex positions, but I'm not sure of the vertex format.
I can only assume the positions are shorts(2bytes) based on the low precision witnessed on the PSK imports

Anyway my goal is import the vertex positions, enlarge boobs and write new position back into the xxx. then play my game with a playable character with HUGE knockers !! Cheesy

can anyone advise on how I can either
A. Import the vertex positions directly from the XXX (I can program, just need to know the format spec for verts)
or
B. A way to re-author a new XXX


I'm also wondering how abouts do I mod the textures in the textures.tfc From some quick googling seems that the xxx refers to the texture.tfc and decompresses the texture with zlib.
how or where do I get the texture.tfc block compression offset and compress size info?
Logged
warrantyvoider
Full Member
***
Posts: 109


View Profile
Re: Trying to modify a XXX package...
« Reply #1 on: June 15, 2012, 11:50 »

well, take a look at my code, its customized for Mass Effect 3 but the inner working is mostly the same: http://sourceforge.net/projects/me3explorer/ there you can edit meshes and textures, and load xbox files (well for mass effect, but again the compression is the same)

greetz

Warranty Voider
Logged
mariokart64n
Newbie
*
Posts: 3


View Profile
Re: Trying to modify a XXX package...
« Reply #2 on: June 15, 2012, 22:08 »

don't see source there, and the wiki info doesn't talk about the mesh format.

I tried converting my XXX into a PCC file, but get a 0K file. No errors reported in the console window.
Code:
Loading file: F:\LOLIPOP\costume21.xxx
CSize: 244252672
DCSize: 83886080
BlockSize: 755173376
Blockcount: 1
  00000000 0          out.bin
#0BlockOffset: 24
#0BlockCompressed: 1701736270
#0BlockUnCompressed: 9052672
  00000018 9052672    out.bin

File "F:\LOLIPOP\costume21.pcc" written to disk.
Just need to know how to interpret the vertex coordinates.. how are they stored? short, halffloat, ?
Logged
warrantyvoider
Full Member
***
Posts: 109


View Profile
Re: Trying to modify a XXX package...
« Reply #3 on: June 16, 2012, 00:09 »

just normal floats, for the code you have to click "browse all files" and go to versions, there is always a binary.rar and a source.rar. As I said my tool probably can't handle your file, because every developer can make his own modification to the unreal engine. Its just for comparison. the wiki says about staticmesh and skeletalmesh, thats what you are looking for. Good luck

greetz

PS: your xxx file is lzx compressed, you have to unpack it before you can use a hexeditor or whatever
Logged
mariokart64n
Newbie
*
Posts: 3


View Profile
Re: Trying to modify a XXX package...
« Reply #4 on: June 18, 2012, 04:28 »

I altered the xxx package, but it needs to be recompressed to work ingame. is there a tool that can do that? I used gild0r's tool to decompress the original XXX package. But now the game won't load the decompressed file
Logged
warrantyvoider
Full Member
***
Posts: 109


View Profile
Re: Trying to modify a XXX package...
« Reply #5 on: August 26, 2012, 02:34 »

there should be a file like *TOC.bin file or something, which contains the filesize of each file (at least at me3, there its PCConsoleTOC.bin), so if you decompress you should at least enter the new value (again with hexeditor)
Logged
Maddmatt
Newbie
*
Posts: 21


View Profile
Re: Trying to modify a XXX package...
« Reply #6 on: June 07, 2014, 22:11 »

Hello:

@Gildor: i also sent you a PM on the subject

But, i also wanted to offer the question up to the smart members as well:)

Today im modding MK9 characters and im able to use Gildor's extractor tool on the .xxx files to get at the contents. Furthermore i did find a way to repackage those contents back into a .xxx file; but the only short coming of this tool is that it uses the original .xxx file header as a basis. So, if you need to expand the header you need to either write those bytes out yourself or use hex editor to make your adjustments. Currently im using the hex editor. I know certain positions such as headerlenght, name/export/import counts, and the actual import names visible within most he. Editors. The problem is after i make my changes to the header (increase header lenght and various other count lengths for extending the name table) im getting Fstring is not null terminated errors when trying to re-extract my newly built .xxx file. So my guess is that im lacking a more understanding of the header and im needing to change more within. The inner workings of the extractor tool seems to have these secrets but im polling the audience to see if others might as well and are willing to share with me:)

Thank you all
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7971



View Profile WWW
Re: Trying to modify a XXX package...
« Reply #7 on: June 07, 2014, 22:44 »

Hi.
FString should include trailing zero byte. So, string length is really 1 byte longer than strlen returns.
Logged
Maddmatt
Newbie
*
Posts: 21


View Profile
Re: Trying to modify a XXX package...
« Reply #8 on: June 07, 2014, 23:18 »

@Gildor

Thanks for the reply, and that makes sense; but i think i'm doing that according to the hex editor.  Attached is some screen shots of my problem.  The first part of the attachment is a screen shot of the error message within CMD window after executing the extraction on my new CHAR_SubZero_D.xxx  You see that it is throwing the error at line 322 of the nametable (that's the first line that I added to the name table with C_Tie_00)

The second part of the attachment is a screen shot of the hexeditor that i'm using.  I've highlighted the section that which I believe the extractor tool is throwing the Fstring error message; but i don't understand why as after the insertion of C_Tie_00 i have a zero Byte inserted.  What else am i missing?

Thanks again,

[вложение удалено Администратором]
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7971



View Profile WWW
Re: Trying to modify a XXX package...
« Reply #9 on: June 07, 2014, 23:23 »

I see the string of length 9, but your length holded value 0xF, should be 9+1 = 0xA.
Umodel framework performs very simple validation for string correctness - it checks character at position [len-1] for holding a zero value.
Logged
Maddmatt
Newbie
*
Posts: 21


View Profile
Re: Trying to modify a XXX package...
« Reply #10 on: June 08, 2014, 00:15 »

Gildor:

Thank you so much for you speedy replies!  Very appreciated!  Do you mean the section i have circled in red needs to change to 0A instead of 0F?  I'm not sure of why as because the section before it with C_Rag_R11 has the same length and doesn't throw an error as that line was part of the original header (seen in the square blue section i highlighted in the attachment).  I do admit my Hex reading these days is a little rusty.

I also looked at the documentation for Umodel and does the exe state were strings are not correct?

[вложение удалено Администратором]
« Last Edit: June 08, 2014, 00:16 by Maddmatt » Logged
Maddmatt
Newbie
*
Posts: 21


View Profile
Re: Trying to modify a XXX package...
« Reply #11 on: June 08, 2014, 00:29 »

wait...im and idiot...i see my mistake now.  I'll make that change and post up my next issue:)
Logged
Maddmatt
Newbie
*
Posts: 21


View Profile
Re: Trying to modify a XXX package...
« Reply #12 on: June 08, 2014, 00:34 »

Hmm, well that didn't fix the error.  The extractor is still throwing the same error message for line 322.  Is there something else that i'm missing with that line?

Thanks again,
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7971



View Profile WWW
Re: Trying to modify a XXX package...
« Reply #13 on: June 08, 2014, 00:41 »

I think you replaced some Name which was 14 characters long with a shorter version "C_Tie_C00". But you can't change the string length, which is marked with blue square (4 bytes before the string data). So, you should fill replaced bytes with zeros. At least, byte at offset 24D7 which causes umodel verification to raise error.
Logged
Maddmatt
Newbie
*
Posts: 21


View Profile
Re: Trying to modify a XXX package...
« Reply #14 on: June 08, 2014, 01:05 »

I think i see that now; so if i'm wanting to add new entries to the header section for my name table do i append it at the end of the nametable within the header?  For example, attached is the end of my nametable (I think within the header) how should i proceed in adding the following lines

C_Tie_C00
C_Tie_L00
C_Tie_L01
C_Tie_L02
C_Tie_L03
C_Tie_L04
C_Tie_L05
C_Tie_L06
C_Tie_L07
C_Tie_L08
C_Tie_R00
C_Tie_R01
C_Tie_R02
C_Tie_R03
C_Tie_R04
C_Tie_R05
C_Tie_R06
C_Tie_R07
C_Tie_R08
RetroNinja_Male_MK2_Reflection

Also, within the original nametable section of the header i do need to change one existing string from "MK_Cloth_Damage" to "MK_Cloth_Ties"

Thank you again (i swear i'll figure this out yet!)


[вложение удалено Администратором]
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS