Gildor's Forums

Author Topic: Injustice - Gods Among Us file format  (Read 51066 times)
Gildor
Administrator
Hero Member
*****
Posts: 7927



View Profile WWW
Injustice - Gods Among Us file format
« Reply #15 on: April 10, 2013, 19:57 »

That's completely depends on programmers. Data can be stored in inis, in archetypes, in objects itself, in UnrealScript code, or in non-standard places which are developed specially to tune the game (for example, in some online database).
Logged
sh0ck1
Newbie
*
Posts: 9


View Profile
Injustice - Gods Among Us file format
« Reply #16 on: April 10, 2013, 22:05 »

Wow, I guess writing out that question jump started my brain. I found the core data in TweakVars.xxx - Not sure why I was even browsing through it, but came upon some character names:

0x27946
Code:
00000006 0000000C 43686172 5F536861 7A616D00 000018B0 000018A4 00000000
00000000 00000001 00000001 00000008 00000009 00000009 00000000 00000001
00000001 00000001 00000001 00000001 00000001 0000003C 00000008 40400000
00000011 00000002 FFFFFFFE 00000000 0000000A 40400000 00000018 0000000D
00000003

Second set is the distance to offset (over the filename, sets 3,4,5) - not sure what the next 15 sets are yet, but just before that 404, theres an 8

I have some sample data for Shazam:
First move is 8,17,2,-2
Second move is 10,24,13,3
And if you look above, that TOTALLY is in there!

Also those first bytes after the file/character name, first one minus the second is 12 - which happens to be the number of moves. So I'm guessing those are offsets, maybe into the filename its pointing to where I can grab other information about the move itself (name/command/damage) etc. Very cool stuff.

Thanks again howfie! Couldn't have gotten this far without your decompresser
Logged
howfie
Newbie
*
Posts: 34


View Profile
Injustice - Gods Among Us file format
« Reply #17 on: April 11, 2013, 07:18 »

gildor, how do you determine where the object properties start? ME3 explorer uses a function called PropertyReader::detectStart, which is a cheap hack that only works with ME3. any tips would be appreciated, thanks!
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7927



View Profile WWW
Re: Injustice - Gods Among Us file format
« Reply #18 on: April 11, 2013, 12:56 »

gildor, how do you determine where the object properties start? ME3 explorer uses a function called PropertyReader::detectStart, which is a cheap hack that only works with ME3. any tips would be appreciated, thanks!
Umodel is not using any hacks or heuristics, like ME3 Explorer. I'm parsing all data in package, so object's properties are just at the beginning of each object.
Logged
warrantyvoider
Full Member
***
Posts: 109


View Profile
Re: Injustice - Gods Among Us file format
« Reply #19 on: April 11, 2013, 15:50 »

hey, I updated my hack! and yeah it was bad but it worked ;p now I found out, that you detect it with the flags of that object!

greetz WV
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7927



View Profile WWW
Re: Injustice - Gods Among Us file format
« Reply #20 on: April 11, 2013, 15:56 »

 Grin
Logged
sh0ck1
Newbie
*
Posts: 9


View Profile
Re: Injustice - Gods Among Us file format
« Reply #21 on: April 11, 2013, 16:11 »

Not sure if these are directly applicable howfie, but I found them the other day:
http://eliotvu.com/news/view/35/deserializing-unreal-packages-tables
http://eliotvu.com/news/view/34/deserializing-unreal-packages-data-structures

@howfie, it took me 3 days to figure out your explanation on the uncompressed files and their offsets lol, but now I get it! Hopefully in another 3 days I'll understand these properties/import tables/attributes better
Logged
howfie
Newbie
*
Posts: 34


View Profile
Re: Injustice - Gods Among Us file format
« Reply #22 on: April 12, 2013, 00:41 »

no problem shock, lol i know the feeling of spending days trying to figure stuff out as well too.  Smiley

and thanks guys and warrantyvoider for the tips, let's try to take one of these games off of gildor's building queue for him ha ha ha.
Logged
sh0ck1
Newbie
*
Posts: 9


View Profile
Re: Injustice - Gods Among Us file format
« Reply #23 on: April 12, 2013, 15:45 »

Edit: nm, just spent hours trying to figure out if I had the import/export tables confused - and now I know they were right, just misnamed, DoH!

How did you find the file extensions in the export tables howfie? I'm basically caught up to where you were a couple days ago lol. Progress haha
« Last Edit: April 12, 2013, 19:19 by sh0ck1 » Logged
howfie
Newbie
*
Posts: 34


View Profile
Re: Injustice - Gods Among Us file format
« Reply #24 on: April 13, 2013, 00:53 »

lol yeah i mixed up the names in my code. i didnt realize till later so i left it. anyways, file extensions... look at the gallery.xxx file. they are full of jpeg files. check out bottom export entries. they link to object properties. first entry will link to name table, such as WinderWoman_Color with associated type (also from name table) JPEGCompressedColor. next entry in object properties may reference alpha jpeg. each of these will also contain a one-based index back to the export table that points to the actual data. it is easy as pie.
Logged
sh0ck1
Newbie
*
Posts: 9


View Profile
Re: Injustice - Gods Among Us file format
« Reply #25 on: April 15, 2013, 20:54 »

hey Gildor, I was wondering if you have any knowledge about how patches are applied on console for Unreal Engine games. For ex, Injustice is patched. I extracted the files and some of them come from other files (for ex, Char_blah.xxx decompressed and exports Char_blah.mko). Now the patch has an MKO file in it, and the first 4 bytes are the patch file size, next 4 bytes MAY be the decompressed size, and the next 4 bytes is a number slightly less than the decompressed size. After that it appears to start a compressed section.

More info and samples here: http://forum.xentax.com/viewtopic.php?f=21&t=10336

Also, the second 4 bytes match values with the original unpatched file.

What I'm hoping you know is if this sounds related to Unreal Engine patching at all? Or is this proprietary Injustice stuff?
« Last Edit: April 15, 2013, 20:56 by sh0ck1 » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7927



View Profile WWW
Re: Injustice - Gods Among Us file format
« Reply #26 on: April 15, 2013, 21:01 »

Hi,
Sorry, I know nothing about patches and DLCs in Unreal engine.
Logged
warrantyvoider
Full Member
***
Posts: 109


View Profile
Re: Injustice - Gods Among Us file format
« Reply #27 on: April 16, 2013, 21:26 »

dlcs are compressed archives, that (at least for mass effect series) contain a mount.dlc file, which contains a hash, that is generated at setup time, f.e. with information from your hardware (so its unique). The exe then checks the dlc on startup, generates the hash and compares it with the one in the dlc, you can either try to reproduce the hashing algorithm or crack the exe and skip the check. You can see such an algorithm here, but it seems its different between games, so you will have to reverse engineer it from the exe...

http://me3explorer.freeforums.org/me2-dlc-hashes-t242.html

greetz
Logged
mkhacker
Newbie
*
Posts: 13


View Profile
Re: Injustice - Gods Among Us file format
« Reply #28 on: April 17, 2013, 21:24 »

Just wondering if someone can compile the xb360_injustice.cpp unix script into a .exe for me. (g++ xb360_injustice.cpp -o igau) I don't have any of the windows SDK's and I did install Cygwin and G++ but then it kept asking for missing .h / .hpp files. I downloaded most of them but it kept going on and on, without know WHAT SDK's I needed I gave up. Please help. I just want access to the Injustice Textures.

Logged
howfie
Newbie
*
Posts: 34


View Profile
Re: Injustice - Gods Among Us file format
« Reply #29 on: April 18, 2013, 01:11 »

i havent gotten to the textures yet, so no need to compile anything yet. as you can see from code repo i work on a lot of games and have temporarily switched to an easier game Cheesy. ill come back to this if gildor or warrany cant get to it. but those two guys have more exp. with unreal so ill leave it to them if they want it Smiley.
Logged
Jump to:  

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