Melee Toolkit - NOW AVAILABLE (v1.03 Alpha)

Status
Not open for further replies.
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#1
Melee Toolkit
v1.03 Alpha
NOTE: This program is no longer in development and has been deprecated by DAT Texture Wizard

Download!
Source Code!

To-Do List
NOTE: This program is in alpha.
Please back up any files before modifying!

[collapse="Screenshot 1"]

[/collapse]
[collapse="Screenshot 2"]

[/collapse]
[collapse="Screenshot 3"]

[/collapse]
[collapse="Screenshot 4"]

[/collapse]
[collapse="Screenshot 5"]

[/collapse]
[collapse="Changelog"]
Changelog

v1.03
* You can now edit certain values in .dat files using the node value table.

v1.02
* CToolsWii was re-introduced because LibWiiSharp cannot convert to CMPR. It is used only for converting to CMPR and nothing else.
* Editable node values are dynamic and displayed in bold. However, editing these values still does nothing.

v1.01
* Fully migrated from CToolsWii to LibWiiSharp. All texture formats are now supported for extract/replace. Replacing an indexed texture is limited to as many colors as was used in the original texture.
* Bug fixes

v1.00
* Initial release
[/collapse]



Hello, hackers!

Introducing a new program: Melee Toolkit. This program will provide easy and automatic .dat and .iso editing.

Features (for first release):
  • Export and replace textures in .png format
  • Load and save directly to .iso, plus export files
  • Edit .dat node values on the fly
  • Patch .iso between v1.00 and v1.02 (future release)
Functionality is somewhat limited for the time being. You can export/replace files from a disc image and export/replace character textures, and that's about it. Not all texture formats are yet supported.

Please report bugs!

I'm providing an early release so I can hopefully catch some bugs early before going crazy with features.
 
Last edited by a moderator:

Theftz22

Smash Lord
Joined
Mar 21, 2008
Messages
1,030
Location
Hopewell, NJ
#3
This is desperately needed, making a good melee ISO from scratch takes obscenely long. Mostly I think somehow the CSP making process needs to be automated, since that takes FOREVER. It would cool if there was a program where you upload an image you want as the CSP and it spits out a TPL and then automatically inserts the TPL code into MnSlChr. That would be the greatest thing ever (it took around 20 mins per CSP to do these without automation, that's at least 1 hour 20 mins per character, usually more -_-).

Not saying that automating DOL mods and such wouldn't be helpful, but they are probably the least time-consuming part of the melee hacking process.
 

fatman667

Smash Journeyman
Joined
May 30, 2011
Messages
364
Location
4S Ranch, San Diego, CA
#4
Hello, hackers!

I would like to let everyone know that I've started work on a new program: Melee Toolkit. This program will provide easy and automatic .dol and .iso editing.

Features (for first release):
  • Automatically patch .dol files with most AR codes
  • Load and save directly to .iso
  • Patch .iso between v1.00 and v1.02
I can't say how much more I'll add to this program, nor can I provide any sort of ETA, but this is the information I have so far. I'd love to incorporate easy texture patching later on, but I can't even say I'll get around to it, because this is no more than a small side project.

In any case, I hope people find utility in this, and I look forward to the future growth and accessibility of Melee hacking!
This seems promising, also yay for patching v1.00.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#5
I put some work into this recently. The program can now load a Melee .iso and view/export files. Soon it should be able to read .dat files, or at least everything we know about them, possibly including textures.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#9
The program might support models if I collaborate with revel8n who already has the format figured out. And yes, this program uses the proper method of locating textures (through the file's node structure) so it should find all existing textures in the file.
 

Tiberious

Smash Journeyman
Joined
Jun 5, 2009
Messages
250
#10
I'd love to see it. Game needs a good exporter for it out in the wild. And yes, by good, I mean can extract with weighting and joint positions. Better still if it's a format that Blender can import.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#11


I added a "Textures" tab which enables easy viewing without having to travel through a tree of nodes. Sometimes multiple nodes point to the same image data, so I consolidate those automatically. Soon we'll be able to extract and replace textures either from a .dat file or even directly to/from a .iso file.

By the way, shoutouts to CToolsWii for providing an image conversion library! It was designed by someone much smarter than me and this likely wouldn't have been possible without it.
 

Lukahn

Smash Apprentice
Joined
May 5, 2010
Messages
148
Location
Dijon, France
#14
C# is great. This is the language I'm currently using at work.
Plus Visual Studio's really esay to hadle, even for first timers.

I was just asking out of curiosity, thanks for your work !
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#16
I'm just about finished with all the core functionality needed for the first release. I need to finish up some stuff with the interface, then I'll update the OP with a download.

Remember that this is the first build of the program, and there WILL be bugs. You could easily corrupt your .dat file or your disc image, so please only work with backup copies! I also look forward to everyone helping me find bugs.

By the way, the first release will be limited to parsing joint nodes in character and trophy files. This means that you will only be able to replace textures in character and trophy files, because they are currently the only file formats the program understands enough to find textures.
 

Lukahn

Smash Apprentice
Joined
May 5, 2010
Messages
148
Location
Dijon, France
#21
Gonna test now.

Edit : Something I can already ask before touching it.
Can you replace files in the iso with larger ones ?
If no, maybe you should add support for root folder ?
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#22
Gonna test now.

Edit : Something I can already ask before touching it.
Can you replace files in the iso with larger ones ?
If no, maybe you should add support for root folder ?

That's not yet possible, because doing so requires rebuilding the entire filesystem. I will add support for that in the future.
 

Lukahn

Smash Apprentice
Joined
May 5, 2010
Messages
148
Location
Dijon, France
#23
Okay.
So I tested it, (I didn't have much time so it's probably just taking a look lol)

I find the DAT File texture exporting easy and well done.
The rest of the software features are exactly as you described, and no bug for now.
So it's good.

Some suggestions.
Adding support for drag and drop from explorer to your toolkit. It find the file name, and replace it in the iso.
Adding support for multiple file importing.

Anyway, once again, good job.


In case you're interested , there are some clue on how to implement a drag and drop in c#. I'm also kinda sure (kindaaaaa) you can handle it from the windows designer. Like linking a listener (I think there is a drag one) to your file list and all.
http://stackoverflow.com/questions/8550937/c-sharp-drag-and-drop-files-to-form
http://stackoverflow.com/questions/68598/how-do-i-drag-and-drop-files-into-a-c-sharp-application
 

danny135

Smash Apprentice
Joined
Jul 25, 2012
Messages
150
Location
Puerto Rico
#24
Are you going to work on adding support for all the kinds of textures next?


Also error:
Code:
Index was out of range. Must be non-negative and less than the size of the collection.
Paramater name: startIndex
 
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
 
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
  at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
  at System.BitConverter.ToInt32(Byte[] value, Int32 startIndex)
  at MeleeToolkit.DatFile.ReadUInt32(UInt32 startIndex)
  at MeleeToolkit.DatFile.BuildMaterialColorNodes(TreeNode parent, UInt32 offset)
  at MeleeToolkit.DatFile.BuildMaterialNodes(TreeNode parent, UInt32 offset)
  at MeleeToolkit.DatFile.BuildJointDataNodes(TreeNode parent, UInt32 offset)
  at MeleeToolkit.DatFile.BuildJointNodes(TreeNode parent, UInt32 offset)
  at MeleeToolkit.DatFile.BuildRootNodes()
  at MeleeToolkit.DatFile.OpenDatFile(Byte[] inFile, String inFileName, ListBox& texList)
  at MeleeToolkit.MainWindow.OpenDatFileAndUpdateWindow(Byte[] file, String fileName)
  at MeleeToolkit.MainWindow.Button_Open_Click(Object sender, EventArgs e)
  at System.Windows.Forms.Control.OnClick(EventArgs e)
  at System.Windows.Forms.Button.OnClick(EventArgs e)
  at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ButtonBase.WndProc(Message& m)
  at System.Windows.Forms.Button.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
 
************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
MeleeToolkit
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Danny/Documents/Melee%20Hacks/MeleeToolkit/MeleeToolkit.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1002 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
 
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
 
For example:
 
<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>
 
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 

Tiberious

Smash Journeyman
Joined
Jun 5, 2009
Messages
250
#26
I also got an error when attempting to export the textures from PlBoNr.dat (Male Wireframe):

Code:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
  at MeleeToolkit.FileHandler.ExportImage(Image image, SaveFileDialog dialog)
  at MeleeToolkit.MainWindow.button1_Click(Object sender, EventArgs e)
  at System.Windows.Forms.Control.OnClick(EventArgs e)
  at System.Windows.Forms.Button.OnClick(EventArgs e)
  at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ButtonBase.WndProc(Message& m)
  at System.Windows.Forms.Button.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#28
I'll take a look at that file format, it could be designed differently from other dat files. If you can find a pattern in which files it occurs with, that would be helpful.
 

danny135

Smash Apprentice
Joined
Jul 25, 2012
Messages
150
Location
Puerto Rico
#29
Here's a pattern:
GmTtAll.dat
GmTtAll.usd
MnExtAll.dat
MnExtAll.usd
MnMaAll.dat
MnMaAll.usd

And also happens with any file that isn't .dat or .usd, since they aren't the same kind of file.

It doesn't to happen with IfAll.dat or IfAll.usd, though.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
#30
Man, this is awesome. I haven't textured anything in a very long time, but I'll let you know if I run into any bugs or such whenever I use... :)

Also, does anyone know what file(s) the character stock icons are stored in?
IfAll.usd

Stock icons are located all over the place. The ones in IfAll.usd are the "Melee" icons, but there are ones for Adventure Mode, Choose Your Character, and other such places.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#32
v1.01 Update:

* Fully migrated from CToolsWii to LibWiiSharp. All texture formats are now supported for extract/replace. Replacing an indexed texture is limited to as many colors as was used in the original texture.
* Bug fixes
 

danny135

Smash Apprentice
Joined
Jul 25, 2012
Messages
150
Location
Puerto Rico
#33
Works great. Hopefully this will soon be able to edit textures that no one has found, because I've pretty much replaced everything I could find.
 

Tiberious

Smash Journeyman
Joined
Jun 5, 2009
Messages
250
#34
Would like to be able to get colors from the CI4 images (even if it's a list in the editor). That, or be able to export them as TGA.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#37
v1.02 Update:

* CToolsWii was re-introduced because LibWiiSharp cannot convert to CMPR. It is used only for converting to CMPR and nothing else.
* Editable node values are dynamic and displayed in bold. However, editing these values still does nothing.


This release is mainly for the purpose of fixing the CMPR replacement I broke in the last version, but there are a couple other minor enhancements.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#40
You need to save the .dat file after editing the values. To make sure this isn't a bug, can you verify that the values did or didn't change by opening up the saved .dat in a hex editor and going to the location of the node you changed? You should hopefully see your changes reflected there.

As for the files you mention, we need to figure out the node structure of those files before supporting them. I have some other things to focus on before getting to that, but I hope to support that reasonably soon.
 
Status
Not open for further replies.
Top