• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Melee Toolkit - NOW AVAILABLE (v1.03 Alpha)

Status
Not open for further replies.

danny135

Smash Apprentice
Joined
Jul 25, 2012
Messages
150
Location
Puerto Rico
Being able to open .dat or .iso files in the program would be convenient, instead of having to open the program and load the file from inside the program.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
holy [censord] this is awesome =D
how the heck have I not seen this!

/hopes I can compile in SharpDevelop
(Visual Studio expired for me, but SD is just as good)
 

Tiberious

Smash Journeyman
Joined
Jun 5, 2009
Messages
250
Bug report time again:

Attempted to open TyMMario.dat (Metal Mario's trophy) to see once and for all what his environment texture really is, but it shows this:


************** Exception Text **************
System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at libWiiSharp.TPL.ConvertFromTextureMelee(ImageHeader imageHeader, PaletteHeader paletteHeader, Int32& imageSize)
at MeleeToolkit.TextureListObject..ctor(UInt32 imageHeaderOffset, TextureNode node)
at MeleeToolkit.DatFile.BuildTextureNodes(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.button5_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
Strange, I was able to open the file just fine with the current release. Here is the texture in question:

 

danny135

Smash Apprentice
Joined
Jul 25, 2012
Messages
150
Location
Puerto Rico
You know what would be useful, a feature to port textures from one file to another. (Or at least export all and import all buttons)

Some guy made a spiderman sheik recently, and it was for the red sheik, but my favorite sheik texture was already on the red costume. So I used this to export all the textures from spiderman sheik and put them in the blue sheik file. Very useful program, would've taken hours to do without it (probably never would've done it).
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
You're right, I didn't mean to say it wouldn't be. Next time I touch this program I'll probably add support for that.
 

Tiberious

Smash Journeyman
Joined
Jun 5, 2009
Messages
250
Ah. I must've been using 1.02 still. Sorry. I grabbed 1.03 to make sure, and it opened.

But, TyStand.dat (the trophy base file) does still cause an error:

************** 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.Values.ReadUInt32(Byte[] data, Int32 startIndex)
at MeleeToolkit.Values..ctor(String name, UInt32 location, Int32 offset, Types type, Boolean isEditable, Byte[] file)
at MeleeToolkit.MaterialNode..ctor(Byte[] file, 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.button5_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)
 

shuall

Smash Apprentice
Joined
Jun 26, 2013
Messages
155
Location
Philly
Darn, I started on something like this, but I couldn't find a lot of literature on dat files. Working on decompiling dols instead. Do you have the source for this? I'd love to try to make a command line version, or maybe port it to Qt so I won't have to use wine/mono. Or would you rather not release it?
 

God with a Wavebird

Smash Apprentice
Joined
Apr 10, 2012
Messages
107
Location
Eugene, OR
I decided to try this program out to edit PlLgWh.dat but it didn't load all the textures. I think it only left out these textures: eye closed, eye half closed, eye hurt, eye looking left, and eye looking right.

Other than that I really like this program, it's going to save mondo time
 

danny135

Smash Apprentice
Joined
Jul 25, 2012
Messages
150
Location
Puerto Rico
I decided to try this program out to edit PlLgWh.dat but it didn't load all the textures. I think it only left out these textures: eye closed, eye half closed, eye hurt, eye looking left, and eye looking right.
This happened to me with PlZdRe.dat, it didn't load all of the eye textures.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Those textures are probably in some node structure that I haven't yet mapped, since they're not the default model textures but applied only in special scenarios.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
you know... resizing the DAT isn't all that hard :/
you just have to change the pointers that link to data after the affected (resized) portion of the DAT.

you can easily use the pointer table to figure out the locations of every valid pointer and where they point to so you change them appropriatly ;)
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
you know... resizing the DAT isn't all that hard :/
you just have to change the pointers that link to data after the affected (resized) portion of the DAT.

you can easily use the pointer table to figure out the locations of every valid pointer and where they point to so you change them appropriatly ;)
I know. I just haven't gotten to implementing it yet.
 

Kadano

Magical Express
Joined
Feb 26, 2009
Messages
2,160
Location
Vienna, Austria
It would be great if you could add stage texture support! More specifically, I need it for FD. That white phase sucks and everyone hates it, so I want to create a fix.
 

Viceversa96

Banned via Warnings
Joined
Jun 18, 2012
Messages
413
Melee Toolkit
v1.03 Alpha

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.
How do you edit move properties? Like the power of a move like BKB and KBG
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
How do you edit move properties? Like the power of a move like BKB and KBG
This program is currently not capable of doing that, as most node information for character .dat files has not been added. If somebody would like to add this functionality, I'm willing to help (though this is a backburner project so I won't be adding it myself anytime soon).
 

Viceversa96

Banned via Warnings
Joined
Jun 18, 2012
Messages
413
This program is currently not capable of doing that, as most node information for character .dat files has not been added. If somebody would like to add this functionality, I'm willing to help (though this is a backburner project so I won't be adding it myself anytime soon).
Is there a program that can do that?
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
I believe the program known as Master Hand will show you many move properties as well as the file offset, but you must edit them yourself in a hex editor.
 

the wizard howl

Smash Apprentice
Joined
Sep 24, 2013
Messages
123
Location
WI
Is there a reason audio replacement is so low on the list? 'cause I do it more often than anything else and it takes forever.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Is there a reason audio replacement is so low on the list? 'cause I do it more often than anything else and it takes forever.
Mainly because the format is not fully understood, so it would take a ton of work for a flawless implementation. I highly doubt it will happen unless someone else decides to contribute to this project.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
UGC is planned to convert audio and video, but that's a future project of UMC...

so unfortunately, Melee audio hacking wont happen any time soon, unless another programmer makes it easier...

EDIT:
also, here's something I've worked on to help out with what's known about the DAT format:
http://wiki.tockdom.com/wiki/HAL_DAT_(File_Format)
^I've written it to describe much of the format at a level for people who know how to hex a file.
(kinda noob level, but kinda basic level as well)
 
Last edited:

OninO

Smash Journeyman
Joined
May 19, 2014
Messages
289
Hmm, I just found the link to this thread. I'll checkout the source tonight and see what can be done about maybe getting an editor for move stat values up and running. Caveat: I've never worked in C# before (only python/C/Matlab) so it will take me a while to figure out how anything is done.

@ Dan Salvato Dan Salvato Could you please create a git repo of the source for the Melee Toolkit?
 
Last edited:
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Hmm, I just found the link to this thread. I'll checkout the source tonight and see what can be done about maybe getting an editor for move stat values up and running. Caveat: I've never worked in C# before (only python/C/Matlab) so it will take me a while to figure out how anything is done.

@ Dan Salvato Dan Salvato Could you please create a git repo of the source for the Melee Toolkit?
The repo is currently public on Google Code. The link is in the OP. Unless you were specifically asking for a git repo as opposed to the current one?
 

OninO

Smash Journeyman
Joined
May 19, 2014
Messages
289
Hi Internet, I was, I use git and for some reason I get "bad url" when trying to use git-svn with that repo link.
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Hi Internet, I was, I use git and for some reason I get "bad url" when trying to use git-svn with that repo link.
Okay, I imported the existing repo into a new BitBucket repo and we'll use that one from now on. I prefer BitBucket anyway and maybe now you can branch/merge instead of fork, since I'm working on some stuff as well. If you PM me account info I'll add you to the project.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
@ OninO OninO : when getting an SVN from Google, I usually view a raw file and copy the URL, then delete what's after /trunk before importing.

I use Tortise SVN, it's really good ;)


on a side note:
IE, how could you do me like this >3< (Project M Dev Team)
everyone knows I hate PM, mainly for it's horrid ledge grabbing and Pika's B-air.
lol
 

Luddoj

Smash Journeyman
Joined
Jun 20, 2014
Messages
204
Location
Lima - Perú
NNID
Luddoj
I hope this amazing tool continues to be developed. The amount of things simplified by this is ASTOUNDING, with texture hacking now basically converted to a matter of editing your textures and then just choosing them to replace in-game files. This is what the Melee hacking community has been needing for quite some time, and, after testing it myself, it works perfectly, not only for textures but also for replacing pre-made files (like the ones with .dat) easily just by right clicking them.

So yeah, I'm definetely happy this exists, and after watching the amazing job they did with the custom Melee used for BEAST 5, I feel even more inspired to focus on Melee Modding.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
last I talked to IE, he had to take a break...

I havn't stopped working on the format though, and I have a near final pathfinder built for entry into the file data (of ANY HAL-formatted file)
reference: http://wiki.tockdom.com/wiki/HAL_DAT_(File_Format)

as noted on the page, the pathfinder works with more than just Melee files:


though it currently doesn't test if a pointer is valid in the relocation table...
it only tests to make sure that a pointer is smaller than the file size, and offsets to a structure.

so yea, TODO:
if ptroffset in relocations: # test struct size
elif pointer: # invalid pointer
 
Last edited:
Status
Not open for further replies.
Top Bottom