Kitty Corp Meow Mix Forums

Super Smash Bros. Brawl Hacking => General Hacking Discussion => Topic started by: dark sonic 19 on August 24, 2010, 11:20:05 PM



Title: Wario Land: Shake It mdl0 Discussion
Post by: dark sonic 19 on August 24, 2010, 11:20:05 PM
i know this mite get lock fast i post this way? a Discussion how to get mdl0s form Wario Land: Shake It
think about it we can get mdl0s form other game. hears what it said on smashboards:

Wario Land: Shake It/The Shake Dimension
- (The files need to be extracted from the game's GFA files. Looking into how to do so right now. Also unconfirmed for the moment.)

how are we going to get the model form the game?! [not asking for help]


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: Quanno on August 25, 2010, 06:51:02 AM
Isn't that actually useless? It's a 2d game with almost no 3d models (i think)
Correct me if wrong.


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: dark sonic 19 on August 25, 2010, 11:50:16 AM
 it is on list of games that you use mdl0 but we do not know how to export them


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: Quanno on August 25, 2010, 02:12:25 PM
Then how do they know it uses .mdl0?


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: dark sonic 19 on August 25, 2010, 02:45:35 PM
see for your self http://www.smashboards.com/showthread.php?t=263127


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: Quanno on August 25, 2010, 02:58:56 PM
...I know that they know it...

My question was, how do they know it if they can't find any way to extract it?


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: dark sonic 19 on August 25, 2010, 03:04:28 PM
ho know it is possble to get the models it just it format is odd to export them


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: RandomTBush on August 26, 2010, 06:42:51 PM
As far as I know, there are GFA and GFO3 files in the game's data, which are compressed and need to be extracted with these QuickBMS scripts:

Code:
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
# Wario Land: The Shake Dimension GFA

Endian little

# Main header
IDString "GFAC"
Get HEADER_1_1 long
Get HEADER_1_2 long
If HEADER_1_1 != 1
   Print "Strange HEADER_1_1 = %HEADER_1_1%, may crash..."
EndIf
If HEADER_1_2 != 1
   Print "Strange HEADER_1_2 = %HEADER_1_2%, may crash..."
EndIf
Get FILE_TABLE_OFFSET long
Get FILE_TABLE_SIZE long
Get DATA_OFFSET long
Get DATA_SIZE long

# Read compressed data header
GoTo DATA_OFFSET

IDString "GFCP"
Get HEADER_1_1 long
Get CTYPE long
If HEADER_1_1 != 1
   Print "Strange GFCP HEADER_1_1 = %HEADER_1_1%, may crash..."
EndIf
If CTYPE == 1
   ComType bpe
ElseIf CTYPE == 2
   ComType lz77wii_raw30
Else
  Print "Unknown compression %CTYPE%"
  Exit
EndIf

Get RAW_DATA_SIZE long
Get COMPRESSED_DATA_SIZE long

Set CDATA_OFFSET DATA_OFFSET
Math CDATA_OFFSET + 0x14

# Decompress
Clog MEMORY_FILE CDATA_OFFSET COMPRESSED_DATA_SIZE RAW_DATA_SIZE

# Extract files
GoTo FILE_TABLE_OFFSET
Get FILE_COUNT long
SavePos READ_OFFSET

For I = 0 < FILE_COUNT
   GoTo READ_OFFSET

   # Read the file entry
   Get CRC32 long # guess
   Get NAME_OFFSET long
   Get FILE_SIZE long
   Get FILE_OFFSET long

   SavePos READ_OFFSET

   Math FILE_OFFSET - DATA_OFFSET

   GoTo NAME_OFFSET
   Get FILE_NAME string

   Log FILE_NAME FILE_OFFSET FILE_SIZE MEMORY_FILE
Next I

and

Code:
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
# Wario Land: The Shake Dimension .gfo3

Endian Big

# Just pull out the GTEX elements for now
FindLoc OFFSET string "GTEX"
If OFFSET == ""
Exit
Endif

GoTo OFFSET
IDString "GTEX"
Get GTEX_SIZE long
Get COUNT1 short
Get COUNT2 short

SavePos READ_OFFSET

For I = 0 < COUNT1

Set FILENAME "pal"
String FILENAME + I

GoTo READ_OFFSET
Get FILE_OFFSET long
SavePos READ_OFFSET
GoTo FILE_OFFSET

Get VAL_1 short
Get VAL_2 short
If VAL_1 != 0
  Print "VAL_1 == %VAL_1%, possible error"
EndIf
If VAL_2 != 0
  Print "VAL_2 == %VAL_2%, possible error"
Endif

Math FILE_OFFSET + 4

Log FILENAME FILE_OFFSET 0x200

Next I
For I = 0 < COUNT2

Set FILENAME "tex"
String FILENAME + I

GoTo READ_OFFSET
Get FILE_OFFSET long
SavePos READ_OFFSET
GoTo FILE_OFFSET

# width x height?
Get VAL_1 short
Get VAL_2 short

Get VAL_3 long
If VAL_3 != 1
  Print "VAL_3 == %VAL_3%, possible error"
Endif

Get TEX_SIZE long

Math FILE_OFFSET + 12

# GFCP
Endian Little
IDString "GFCP"
Get HEADER_1_1 long
Get CTYPE long
If HEADER_1_1 != 1
   Print "Strange GFCP HEADER_1_1 = %HEADER_1_1%, may crash..."
EndIf
If CTYPE == 1
   ComType bpe
ElseIf CTYPE == 2
   ComType lz77wii_raw30
Else
  Print "Unknown compression %CTYPE%"
  Exit
EndIf

Get RAW_DATA_SIZE long
Get COMPRESSED_DATA_SIZE long
Math TEX_SIZE - 0x14
If TEX_SIZE != COMPRESSED_DATA_SIZE
  Print "TEX_SIZE (%TEX_SIZE%) != COMPRESSED_DATA_SIZE (%COMPRESSED_DATA_SIZE), may crash"
Endif

Endian Big

Set CDATA_OFFSET FILE_OFFSET
Math CDATA_OFFSET + 0x14

# Decompress
Clog FILENAME CDATA_OFFSET COMPRESSED_DATA_SIZE RAW_DATA_SIZE

Next I

I'm gonna extract a few files from the game myself, but using one of the *.GFA files that had been supplied on the website I got those scripts from, I was able to preview this from one of the BRRES files that was extracted:

(http://img.photobucket.com/albums/v336/RandomTalkingBush/WLSI-MDL0Proof.png)

So it does have MDL0, but they're not very usable MDL0s...


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: Ninka_kiwi on August 26, 2010, 07:06:45 PM
isnt that a 2D sprite O.o
wow thats impressive.


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: RandomTBush on August 26, 2010, 07:38:35 PM
isnt that a 2D sprite O.o
wow thats impressive.
Surprisingly, there are a few things that are actually 3D, such as the stars circling this enemy's head. Not sure I can capture the "3D" effect with just two pictures, but...

(http://img.photobucket.com/albums/v336/RandomTalkingBush/WLSI-MDL0Proof-2a.png) (http://img.photobucket.com/albums/v336/RandomTalkingBush/WLSI-MDL0Proof-2b.png)


Had to use a different MDL0-viewing program, as that one didn't want to work in BrawlBox for some unknown reason.


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: dark sonic 19 on August 26, 2010, 07:54:53 PM
RandomTBush you are the greatest! :) :o


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: libertyernie on August 27, 2010, 07:02:58 PM
So they used 3D for the stars! That's a nice trick so they don't need to store more sprites.


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: dark sonic 19 on September 06, 2010, 10:43:00 PM
im happy that this game uses mdl0 files


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: irishladdie727 on September 10, 2010, 07:09:53 PM
Wario over G&W anyone?  Not to mention the numerous 2D assist trophies.  THINK OUTSIDE THE BOX HERE PEOPLE!


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: Friedslick6 on September 13, 2010, 06:41:42 AM
Surely there's something usable over the Excite Bike assist trophy, with a bit of tweaking.


Title: Re: Wario Land: Shake It mdl0 Discussion
Post by: dark sonic 19 on September 30, 2010, 08:33:22 AM
well like irishladdie727 sayed we can get rid mr. GW with 2d wario