• 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!

Important Melee, Hacks, and You -- New Hackers Start Here, in the OP!

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
I use 3089 (the only one that doesn't run at 2.0 FPS (if at all))
with 3460's controller plugin (can't find another one that loads)

and I compress the GCM to a GCZ (runs faster)
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
@HS:
Really O.o
I didn't know that...
then again, I've never felt a need to use the data :/

and note, the memorycard's in dolphin are .raw files (A and B)

and don't forget, I have a gcm in a 7z on my old site ;)
I'd post the link, but I'd get in troble... :/

anyone want a PM :af:

I honestly don't see anything wrong with distributing content (iso's)...
shoot, there's even a forum loaded with GCN, Wii, Xbox, PS2, etc... iso's
I'm smelling paranoia here... o_o
 

Hydro_Smasher

Smash Journeyman
Joined
Jan 24, 2009
Messages
357
Location
Seaside, CA
@Tcll

Because distributing warez, copyright'd material, or pretty much anything you need to have purchased isn't really good for smash board's rep.

Btw, is there a reason my signature isn't showing up? >_>
It fits the limits and everything.

tecedit: You didn't hit the show sig box lol
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
@Tcll

Because distributing warez, copyright'd material, or pretty much anything you need to have purchased isn't really good for smash board's rep.

Btw, is there a reason my signature isn't showing up? >_>
It fits the limits and everything.
try checking your post length...
my sig doesn't show unless I type like 8-10 lines...

and wait wut...
how would posting ISO's and such lower their rep :/
I'd say it'd raise it if they allowd it :/

I allow it on my forum :/
shoot... anything you post there must be free actually... (as stated in my rules)
but yea... I know that's my forum and not here...
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
hey guys...

I need info on the tpl header real quick...

I've found REFT files contain images that may compair to the tpl format
 

Hydro_Smasher

Smash Journeyman
Joined
Jan 24, 2009
Messages
357
Location
Seaside, CA
*types 8-10 lines*

Well, considering

You own

your forum,

you get to

make the rules

and your not

bound to any legal laws

its your own business

but swf is owned by mlg.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
*types 8-10 lines*

Well, considering

You own

your forum,

you get to

make the rules

and your not

bound to any legal laws

its your own business

but swf is owned by mlg.
DANG IT!
I hate it when people point out the facts...
I knew that already... :glare:
it's my forum and not here...

and odd :/
my sig isn't even of length (it's over)
but hmm...
try editing it again...
it could be a software glitch :/
 

Hydro_Smasher

Smash Journeyman
Joined
Jan 24, 2009
Messages
357
Location
Seaside, CA
This is racism. I make signatures for a life, and I can't even show mine on the forum I'm most active on. >_>
*smogon doesn't allow sigs*
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
Lol, The signature thing happens. You have to post quite a bit of text, a solid paragraph or so. It seems to post sigs when it feels like it. :\
(Oh, and you'll get better results if you use the Add Reply button versus the Quick Reply box. :) )

Anyway, Happy New Years, all. Hope all's going well.
And nube, where's that CLR0 thing you were talking about? D':
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
hey guys...

I need info on the tpl header real quick...

I've found REFT files contain images that may compair to the tpl format
i kinda need this guys...
anyone have anything??

or better yet...

is this a tpl header:
00 00 00 00 00 20 00 20 00 00 04 00 01 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
image data below this (in I8 format)
 

Cobalt

Smash Journeyman
Joined
Aug 22, 2007
Messages
448
Location
Pittsburgh, PA
Hydro_Smasher and Rykard, thanks for the tips with the movie editing. Got it all working nearly-perfectly, the only problem being that my original source video is at a different frame rate from how the opening movie plays, so it gradually desyncs with the audio slightly as the opening goes on.

For anyone else attempting to do this, ffmpeg and Irfanview are -great- tools. The former allows command-line .jpg exportation of anything using the MPEG codec using whatever naming scheme you want. Irfanview has batch renaming/resizing to get the exported pictures to a THP/MTH-compatible size (I used 640x352). Just make sure that before you do the batch resizing (that is, if you have to do any batch resizing), you find the points in the video where it plays at double speed (see SleepyK's tutorial). For a 720p .mp4 downloaded from YouTube, this was almost exactly between frames 1250 and 1650. So just copy frames 1250-1450 (not 1650) and repaste them right in the folder; Windows will name them by default to something that allows Irfanview's sorting to work with them correctly.

Hell, I've worked with this enough now that I'd feel comfortable writing a guide on exactly how I did it, if anyone would find it useful.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
i kinda need this guys...
anyone have anything??

or better yet...

is this a tpl header:
00 00 00 00 00 20 00 20 00 00 04 00 01 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
image data below this (in I8 format)
nvm guys...
I finally got my answer...
had to search the tex0 format to find it -.-

it's not nearly a tpl header, but contains the same exact data

the header above:
0x00(4): unk
0x04(2): width
0x06(2): height
0x08(4): data len
0x0C(4): format (little endian)
0x10(16): padding

yea I know I'm talking about brawl in a melee thread -.-
but now that I've figured out what I wanted, I don't have to anymore :)

EDIT:
ffmpeg... as a tool...
I've only seen it as a dll... :/
didn't know it was an actual tool you could use...
 

Cobalt

Smash Journeyman
Joined
Aug 22, 2007
Messages
448
Location
Pittsburgh, PA
Alright, I'll write up a guide. I'll try to make it so that it assumes as little hacking or computer knowledge as possible, so it might sound a bit juvenile, but bear with me.

Opening Movie Hacking For Dummies

Tools you'll need:
FFmpeg - For exporting your video as a series of .jpg files. If you're on Windows, you can get everything that you'll need from here: Download. Note that this will only work for videos that use an MPEG codec (these will almost always end in .mp4, .mpg, or .mpeg).
You can also use VirtualDub if you're familiar with how to work it, but I'm not, so I can't say much about it. It's probably easier to work with if you don't like using the command line, so if that section of the guide seems daunting, go ahead and fiddle with VirtualDub to see if you can't find out how to use it.

Irfanview - To resize and/or rename each of the .jpg files that you'll create.

mth_make.exe - Provided by GodFed, this turns your series of .jpg files into the exact file you need to replace in your ISO, with no work from you. Massive thanks to him.

THPConv.exe - It comes from the Wii SDK.

These are all that you need to actually create your movie file. But to put your file into the game, you'll want these tools:

GC Rebuilder - To rebuild your ISO after replacing the opening movie file.

GC-Tool - To extract the contents of your ISO to your computer, so you can manually replace the files.

You might be able to do all of this with just one of these, but I found it easier to use both of them together, so it's up to you.

Before you start
Big reminder: Movie files do not have audio associated with them. To add in the audio from your video to the opening theme, you'll need to extract that audio somehow and hack it in separately. The file you want to replace is in audio/opening.hps. You can follow the other guides for how to do that.

Somewhere on your computer, make a new folder to store all of your work. Having a nicely-organized environment is going to make this about ten times easier, so be sure to keep everything tidy. Additionally, you'll want to keep backups of everything you're using in case something goes wrong. From here, go ahead and download everything I linked above and put them in that folder somewhere. But other than that, just make sure you have a video file, preferably using the MPEG codec, put it into your working folder, and you're good to go!

1) Extracting the video frames
If you used the link above to download FFmpeg, extract the contents of it and find ffmpeg.exe inside. Remember where this file is in relation to your working folder. For example, maybe it's MovieHacking\ffmpeg-0.5\ffmpeg.exe, where MovieHacking is your working folder. In that case, just write down "ffmpeg-0.5\ffmpeg.exe" somewhere. Now make sure your video is in your working folder itself, not in any sub-folders. Open up a command prompt (Start > Run > cmd on XP, Start > type "cmd" into the search bar on Vista/7). You should start in C:\Users\YourUserName. Navigate to your working directory from here. Type "cd foldername" without the quotes to go into a folder from where you're currently at, and type "cd .." to go up one level. For example, from C:\Users\YourUserName to just C:\Users. Just find your working directory so that it says something like this:

C:\Users\YourUserName\My Documents\MovieHacking

Now this part is a little bit tricky. Remember what you wrote down earlier, about where ffmpeg.exe was? Type that, in between quotes, followed by the phrase -i movie.mp4 %d.jpg, where "movie.mp4" is the name of your video file. So your command prompt should look something like this:

C:\Users\YourUserName\My Documents\MovieHacking>"ffmpeg-0.5\ffmpeg.exe" -i movie.mp4 %d.jpg

Hit Enter. This will make a series of .jpg files in your folder numbered starting from 1, up until the last frame of your video. Go ahead and make a new folder here, call it "jpgs" or something, and move all of those .jpg files into that folder. There, now the toughest part is done. You don't have to do anything else on the command line, so pat yourself on the back!

2)Copying and resizing to fit
Now here's where you're going to have to make a judgment call. At a certain point in the opening movie, the game plays the movie at double speed. For a 720p .mp4 file downloaded from YouTube, this occurs approximately between frames 1250 and 1650. To compensate for this, you can go into your folder of jpgs, highlight everything from 1250.jpg to 1450.jpg (NOT 1650), and copy/paste them right again in that folder. Windows will automatically create copies of these files called 1250 - Copy.jpg, etc. From here, you're good. However, if your video has a vastly different frame rate, it will play at a different speed than what you expect, either slower or faster depending on whether the original frame rate was slower or faster. You can still copy frames 1250 to 1450, which will keep this odd speed constant throughout the opening video, but it's something to be aware of.

Now fire up Irfanview. Go to File > Batch Conversion/Rename. In the top left of this new window, you'll see a box labeled "Work as:", with three options. Pick the last one: "Batch conversion - Rename result files". Now in the top-right, where you see your familiar folder structure, go into the folder where you put all those jpgs, so that the files inside are 1.jpg, 2.jpg, etc. At the bottom, hit the button "Add all". You probably see them in an order you don't want: 1.jpg, 10.jpg, 100.jpg, etc. Don't worry! This is normal and expected. Hit "Sort files" and pick "by Name (ascending, XP style)". It's the second option. Now they should be correct.

Over on the left, in the box labeled "Batch conversion settings:", check to make sure that "Output format" is set as "JPG - JPG/JPEG Format". Check the box below it that says "Use advanced options (for bulk resize...)" and hit the Advanced button next to it.

In this new dialog box that pops up, place a checkmark in the box labeled "RESIZE:". In here, select "Set new size:", "Set one or both sides to:", and "pixels". Here's the important part. The video format used by Melee only allows videos up to 672 pixels wide, and both the width and height must be divisible by 16. Additionally, I've found that with a width greater than 640, the display screws up and doesn't work properly. So go ahead and set your width to 640. Now go to google and type in "(h / w) * 640", where h and w are the height and width of your original video, respectively. Take the result and find the closest multiple of 16--it should be less than 640 in almost all circumstances, since videos tend to be wider than they are tall. Anyway, plug that value into the "height" box in Irfanview. You don't need to mess with anything else in here, so hit OK at the bottom-right.

Back in the Batch conversion window, Towards the bottom-left you'll see a box labeled "Name pattern:". Just type four # signs into it, overwriting whatever is already there. Immediately below that, click "Browse" and select the directory to put these resized pictures in. Since you don't want to overwrite your originals in case something goes wrong, I created another folder called "resized" and had it put them there. Double check to make sure all of these settings are correct, then hit "Start Batch" and wait a while. Once it's done, go check out your new pictures and make sure they look okay. They should now be named "0001.jpg", "0002.jpg", etc. This is necessary for the next step.

3) Making the MTH file
From here on is smooth sailing. Copy THPConv.exe and mth_make.exe to the folder containing your resized jpgs. Go in that folder and just double-click mth_make.exe. You'll get a command prompt that goes through all the .jpgs and makes your shiny new .mth file. However, you might get an error. It may say something about "Maximum supported is 672 dots in a line." That means your width is greater than 672, so go back into Irfanview and resize again. Good thing you didn't resize over your backups, huh? If it says "X resolution is not divisible by 16", then your width isn't a multiple of 16, and if it says the same thing for Y, then it means your height isn't a multiple of 16. In both cases, go back and resize, being careful to make sure all of these requirements are met.

But if it doesn't give you any errors, congrats! Your .mth file is done and ready to replace back into Melee. It'll be called temp.mth. Go ahead and copy this out somewhere so you don't lose it.

4) Replacing MvOpen.mth
You might as well go ahead and rename your new .mth file "MvOpen.mth", since you'd need to do that later anyway. So now that you've got your file, you need to know what to do with it. You'll want to take your ISO and extract its contents, since you won't really be able to replace it the way you can replace texture or audio files. So open up GC-Tool and go to File > Open GC-Iso. Navigate to the folder your iso is in. If you don't see it, at the bottom of the window, change "Files of type" to "All files" and it'll be there. Open it. Now go to Extract > whole ISO. Click the "Choose Dir" button and find a nice place to put all of this, then check the box labeled "Also Extract Header, AppLoader, DOL and TOC", and hit Extract. This could take a very long time and the program may seem like it's frozen, but don't worry, just give it a while and it'll finish. You're done in GC-Tool now, so go ahead and close it down.

Back in your normal Windows environment, navigate to where you extracted your ISO and you'll see a new folder named "root". If you go inside, you'll see the same files that you saw in GC-Tool. Find MvOpen.mth and copy it back out to somewhere safe, this is the original that you're going to use as your backup if something goes horribly wrong. Now, take your -new- MvOpen.mth and copy it back into this folder. Windows should ask you if you want to overwrite the MvOpen.mth that's already there. And since you backed it up (you DID back it up, right?), go ahead and do so.

Now, open GCRebuilder. At the top, click Root > Open. Find the root folder you were in earlier and hit OK. Now go back and hit Root > Save, name it whatever you want and save it either as a .iso or .gcm. I use .iso since I have the disk space. Now go back into Root and you'll see the Rebuild button is available. Click it and wait for GCRebuilder to work its magic. When it's done, you'll have a new image, hopefully playable on Dolphin and your Wii! I never did get an error in this step, so hopefully you won't have any problems. But one thing that I could see being an issue is the files being too big to make an ISO. That means your new movie file is bigger than the one you replaced, to the point where your data doesn't actually fit in the size restraints imposed on the image. SleepyK's ISO rebuilding tutorial videos can help you get around this; watch them here and here.

But if you don't get any errors, you should be good. For reference, my ISO is 1,425,760KB in size according to Windows, as is the case with the original ISO I used, provided by SleepyK. If yours matches in size, test it out on Dolphin and your Wii, and if it works, congrats! If not, try it anyway and maybe it'll work, maybe it won't. I don't even know if it's possible to make something of another size, so hey, maybe it isn't. But after this, you'll probably still want to hack in your audio, so go check out another guide for how to edit and replace opening.hps!

oh god something went wrong what do i do
First of all, don't panic! You have backups for a reason. In the absolute worst case, you just purge your working folder and forget all of this ever happened, because everything is backed up however it was before you started working on it, somewhere else.

If your ISO isn't booting in Dolphin or is just incredibly messed up, just go and put the old MvOpen.mth back in. Test it again to make sure that it's been fixed, and retry creating the MTH file. If that doesn't fix it, copy your original ISO into your working folder again, over top of the one you've been working with, and make sure that works with Dolphin before restarting. If you ever make any updates, just keep backups of the old stuff so you can replace them if something goes wrong. The bottom line here is: keep backups of everything. If you do this, absolutely no error is irreparable. Just keep calm, and start working backward to find out where the error occurred.

Anyway, that should do it. Using this method I successfully replaced the Melee opening with the opening to Blazblue: Continuum Shift. You can download the .mth and .hps files I used for that here: Download

Those familiar with that opening will notice that it goes out of sync with the audio as the video goes on. This is due to the frame rate issue I mentioned earlier. The original video I had did not perfectly match the frame rate at which the .mth file plays, so by exporting every frame as a .jpg, the movie plays at a slightly-incorrect speed, but it's still easily close enough that I'm okay with it. Also, the audio loops again once you reach the start screen for a reason I'm not entirely sure of, but I think that sounds cooler anyway so I never tried to fix it.
 

Dekar289

Smash Hero
Joined
Feb 20, 2007
Messages
6,306
great guide, thank you very much.
frame-rate desynch issue is an easy fix, before doing anything else simply edit it in something like sony vegas, export at desired framerate.
 

Cobalt

Smash Journeyman
Joined
Aug 22, 2007
Messages
448
Location
Pittsburgh, PA
great guide, thank you very much.
frame-rate desynch issue is an easy fix, before doing anything else simply edit it in something like sony vegas, export at desired framerate.
Yeah, it would be an easy fix if I knew what the actual framerate was, but to be honest it just doesn't bug me enough to find out, haha.
 

Rykard

Smash Ace
Joined
Feb 1, 2008
Messages
797
Location
Poughkeepsie, NY
i think i remember sleepy saying that there is one part of the opening movie that plays sped up or something so when he made the silence thing he had to edit it so that it fit. not sure exactly where that occurs though
 

MuraRengan

Banned via Warnings
Joined
Mar 22, 2007
Messages
1,510
Location
New Orleans
Cobalt, you should get GodFed to add your guide into the OP, or I can add it in my second post (quoted of course.)
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
Awesome guide, Cobalt. Great work. I'm glad my program helped : )

I've been thinking about the first post for a while now, and I finally decided what I'm going to do about it. It's large and disorganized, which I don't like, so I'm going to clean it up. I plan to move all the guides in there to their own separate posts, and then link to them. So the first post will basically be a list of links to guides, informational posts, helpful posts, etc., so that people who are looking for information have easy access to it. It'll be more organized and a lot smaller.

I'd link to stuff like my guides, Steelia's texture page in this thread, Magus's posts, nube's and nuro's posts on Falco and Fox, Cobalt's MTH guide, some youtube links, all that jazz.

I'm going to start using the next few posts as space for my guides that are now located on the first page. Just so you guys know. It'll span a few days so I don't get in trouble for multi-posting.
 
Joined
Aug 6, 2008
Messages
19,345
Is it possible to have homebrew run texture and audio hacks for melee using a regular melee disk? Or do I have to use some sort of burnt disk?
 

GawdImFoxy

Smash Journeyman
Joined
Jul 6, 2007
Messages
262
Location
West Frankfort, IL
I have the CIOS screen up on my Wii, but it says to select which IOS version I have. Following the advice of the OP's, I decided to select the initial option. It tells me to press "A." What do I press "A" on? My Wiimote desyncs and won't reconnect.

Edit: Also, the MIOS just freezes the Wii. What do?

Edit2: I have HomeBrew, etc. My internet settings are all cleared, and I don't know what else to try. Maybe the fact that I'm on 4.2 is an issue?
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
Is it possible to have homebrew run texture and audio hacks for melee using a regular melee disk? Or do I have to use some sort of burnt disk?
Gecko OS - MOD is out... (kinda old actually)
and I'm trying to figure out how to dev an FRC for it...

@GawdImFoxy:
you're prbly installing on IOS249...
mine does the same thing...
IOS250 is basically a copy of IOS249

try installing on that... :/
(not garunteed it'll work)
^very few things work for me when doing that...
but yours might be one of the few :D

EDIT:
I have 4.2 as well...
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
Well I'm in the process of restoring trucha bug or whatever and ran into another problem there. :\ Wish I wasn't such a fail. >.<
so you did that too...
I think that might be what's causing the prob on my wii...

I've tried replacing 249 with an installer...
that didn't work...
(froze on 249 (the ine it's supposed to fix)) D:<

uugh...
what can I freakin do to fix this dang thing...
 

GawdImFoxy

Smash Journeyman
Joined
Jul 6, 2007
Messages
262
Location
West Frankfort, IL
So uhh... on the MIOS, it says something about IOS257 metadata: ..File fat:/0000001/0000001/v5/tmd.5 not found. Is there something else I'm missing?
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
hmm...
havn't looked to see if that's included...
IDK that one :/

those 2 are the only 2 I know by heart...
(next to IOS36)
 

GawdImFoxy

Smash Journeyman
Joined
Jul 6, 2007
Messages
262
Location
West Frankfort, IL
I think the problem is that I live in a small town that doesn't have high speed interwebs. So I tether my phone and my Wii isn't connected to the internet. I think that's my biggest issue.

Done. Got the Backup Launcher to work. Just one more question... Can it run DVD+R's?
 

Little England

Smash Master
Joined
Jan 14, 2008
Messages
3,148
Location
Purdue, W Lafayette IN Rancho Cucamonga, SoCal
song requests

I have some music requests. I'd like these songs to be applied to sleepyk's NTSC melee iso with 15 min songs on stages please. I downloaded the songs already and I've uploaded them. ;) edit/sensible loops please

link: http://www.megaupload.com/?d=1OW0A1P7

Whoever can do this for me, I'd really appreciate it.
I posted here because this thread seems to get more traffic than the Audio thread.
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
TPL Hacks - CMPR (14)

TEXTURE HACKS : CMPR (14)
Introduction:
So. Melee Texture Hacks. They've been around since summer of '09, when S. of Stack Smash first discovered them. S. is known as 'Steelia' here on SWF, and has given a lot of help and info on the topic. S. posted his discoveries on the Stack Smash site, and I tried the stuff out myself - it worked, amazingly.

So I asked S. if I could write this up for anyone interested in the melee community, and he said he "wouldn't mind at all". S. is a nice fellow.

A few examples for you all:
-C. Falcon: Pinstripe BAIR
-C. Falcon: Pinstripe PAWNCH
-Mario: yeah, him, too
-Pikachu: Black electrititay
-Multiple ones
Also...Stack Smash, for smash related texture hacks, including melee.


Basic Texture Hacking:
What you need:
--a Melee .gcn/.iso (GALE01, GALP01, etc)
--GC-Tool or Gamecube Rebuilder (to get at the individual Player files, and repackage the edited ones)
--a hex editor such as Frhed or Hex Workshop
--a text editor such as Notepad
--an image editor such as GIMP or Photoshop
--TexConv.exe (Wii SDK - get it on your own)
--Dolphin emulator (to dump textures)


What to do:
NOTE: This is the basic stuff - with all dumped files that end in "_14". All the +1 and +2 files are explained by S. in the second half of this post. However, it gets kind of complicated. I'll try to give an example at the end, step by step, to make it a bit clearer. Hope it isn't too hard to follow. Also, it's manual texture hacking. Without too many automated steps (in other words, it's not like Brawl's ASH). I divided it up into the hacking process of when we first started (Old School), and what's easier nowadays (New School).

0. Before you do stuff
Get yourself the Melee iso image, by whatever means necessary. Google how if you don't know. If you want to get your own textures, too, you'll also need to have the Dolphin emulator working on your computer. Some people can't get it to work on their computer, for whatever reason. I don't know of an alternative to dumping the textures (I haven't looked, honestly). Also, rip the files from the .iso with GC-Tool. It's pretty user friendly, so I'm not going to hold your hand here. The ones we're mainly interested in are going to be the Pl****.dat files, but this also applies to stage files, and the character and stage selection screens, among other things.

1. Get some textures.
Old School: Run Dolphin, click on Gfx>Advanced>Dump textures (I'm using build 3661 with OpenGL), then Close back to the Dolphin main screen. Now, when you run your .iso with Dolphin, every single image that loads is dumped into a folder; for me it's ..User\Dump\Textures\GALE01. The dumped images are targa files (extension .tga). Not all of the textures you want will dump until you make them. e.g - When you play as Jigglypuff, you have to have her take damage and show her "crying" eyes in order for those eye textures to dump. Hope that makes sense....but you have to try everything with the characters to get all of their hard-to-find textures to dump.
New School: If you don't want to use Dolphin, you don't have to. Steelia has very kindly made texture packages for many of the characters, menu screens, etc. You can check those out right HERE.

2. Organize them.
Old School: I figure you have something in mind, like dark Peach, or Ronald McFalcon, so play with those characters on Dolphin to get their textures. It's tough to sort through them, since they have weird names, but Windows users can organize icons by "Modified" to sort them by the exact order that they were created. Put the textures you want into a folder and name it something.
New School: Steelia's textures are already organized in folders and numbered very conveniently for you. Say thanks to him for that.

3. Name them.
Old School: Try to figure out what each texture is, to help with keeping track of them later. The important part here isn't accuracy, but simplicity. You're going to be converting these with TexConv, and that's a lot of typing. Typing GALE01_ab121f_14.tga isn't fun. Just make sure that you keep whatever the number at the end is. That's important for keeping track of what type the TGA is. (you know, _14, _9, _8, _0)
New School: As easy as this sounds, don't worry about naming the textures. Steelia already has them organized into folders with the right names.

4. Make TCS files for each texture.
TexConv works in a specific way. You write a script file (a TCS file) that has specific data about the TGA you want to hack. TexConv reads the TCS, and then reads the TGA based on what the TCS says. Then it spits out a TPL file. Sorry, it's technical....Just go with it for a bit, hopefully it'll become clearer through experience. Here's the format for your basic TCS file.
file 0 = C:\ fullfilepathhere\name.tga
image 0 = 0, 0, TYPE
texture 0 = 0, x
The TYPE depends on the last number of the file. So "_14" means that it is a CMPR type file. The x is just an unused value, specifically for palettes, which gets more complicated. That's covered in the Advanced Texture Hacking section.
Old School: Write this up in Notepad, and save it as "filename.tcs" with whatever name you want. Make sure to NOT save it as a .txt file by mistake.
New School: Many of Steelia's texture packs come with TCS files for you, which is a big lifesaver. Some don't, though, and for those, there is a convenient batch program that Milun made, which you can find in the Links section above.

5. TexConv.exe
Old School:Drag TexConv into the folder with all your textures and TCS files. Run it. The way it works is ...
-type in the TCS file name (filename.tcs)
-type "y" to confirm, "n" to retry
-type in the TPL you want to make(filename.tpl)
-type "y" to confirm, "n" to retry"
This spits out a TPL file for you, which is Nintendo's special texture format.
NOTE: for big batch TexConv action, with many TCS files, and many TPL files to make, you can copy command prompt into the folder, and when you run it, type "TexConv filename.tcs filename.tpl", where the first parameter is TexConv, the second is the TCS file, and the third is the output TPL name...if you're interested. It speeds things up a bit, and does the same thing. Either post or ignore this if you don't understand this part.
New School: Steelia rises again. He put batch files in the texture packs called "TexConv.bat". When you double click, it'll run TexConv.exe for each texture and make TPLs for all of them. A nice time saver.

6. Hack
Old School:Open, with your hex editor, the Pl****.dat files that I mentioned earlier. (eg - modifying black mario means opening up PlMrBk.dat). Open up the TPL with the hex editor, too. The first four lines (64 bytes, I think) of the TPL that you might see are info about the file, not stuff that you need to really concern yourself with. Everything after that is character data, such as models, bones, and textures. Soooo. Use a search function to search for matching sets of hex data between the two files. If you think you have a matching area (one that has sort of the same letters and numbers, and the same patterns) then note where it is in the Pl****.dat file by its offset number (the number at the side, like the line numbers). Now, every time you edit this one texture file, you can recreate the TPL and copy/paste over the original data. This will change the texture to the one you edited. Then you can save the DAT file somewhere else for safekeeping.
New School: Steelia has a file called Placements.txt in every texture pack. It tells you where every texture is located in the DAT files. There you go. Another step made easier. So, edit the textures, save them 32 bits per pixel (that's with Photoshop, dunno about GIMP), and then run TexConv on them.

7. GC-Tool it up
Use GC-Tool to replace the old DAT file with you new edited one. It might be a good idea to have a backed up ISO just in case something screws up this one that you mess with....That's it for now, you can pop it into Dolphin and check out your work/art/genius/godliness/whatever on display as a texture hack.


EXAMPLE: Editing Mario's M on his hat.
This is Old School, all the way. It was my very first texture hack, actually. So it basically details all the stuff I did, with the nitty gritty work involved.
1. I dumped Mario's textures from Dolphin, with his neutral color and all. So he's red. The one I want to modify is the M, which looks like a half circle with a half M on it, since it mirrors itself in-game.

2/3. It's caled GALE01_0e9c9903_14.tga. I rename it to hatM_14.tga and move it to C:\Mario nr\hatM_14.tga.

4. My TCS looks like this:
file 0 = C:\Mario nr\hatM_14.tga
image 0 = 0, 0, CMPR
texture 0 = 0, x
nice and easy. :)
it's called hatM_14.tcs

5. I run TexConv.exe, and I type
hatM_14.tcs [Enter]
y [Enter]
hatM_14.tpl [Enter]
y [Enter]
conveniently, I had my TPL named the same as my TCS and TGA files.

6. I open PlMrNr.dat with the hex editor, and I match a few bytes to determine that it's at offset 0x00035c00, or 220,160 for decimal notation. Great! I open the TGA in Photoshop, do whatever, and save it as hatM_14.tga, selecting "32 bits per pixel" when it asks. This overwrites the original TGA, but not the TPL. So, I run TexConv again, using the same TCS, since it points to the same TGA, and spit myself out then new TPL. Now I copy the hex data from this new TPL starting from the 5th line down, and copy it to PlMrNr.dat at offset 0x00035c00, overwriting the data. Save!

7. GC-Tool, open the iso, select the file PlMrNr.dat, right click, select "Replace file", replace it with my own, close iso, yaddayadda.

8. Play it, maybe? on Dolphin. OR, burn it and play it on your Wii!

*********
That's all there is for CMPR TPL hacks right now. I'll update this with other things eventually, once I get this all sorted together.
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
TPL Hacks - CI4/CI8 (8, 9)

TEXTURE HACKS : +1 and +2 FILES

The following is a thorough take on the skipped explanation of + textures... Now you see why I was afraid to make a GUIDE. @_@

Hope this is helpful to some people. If I omitted ANYthing, or if there's something that is confusing/you still need help with... PLEASE do not hesitate to ask. I will be more than happy to help, and hopefully update my mini-guide here in the process.
Cheers!

~Continuation of file types~

More Common TYPE Textures
As already explained by GodFed, the "TYPE" of a texture depends on the last digits of the ripped file. In GodFed's examples, he used "_14.tga" as the example, where 14 is TYPE "CMPR".
Other noteworthy TYPEs are as follows:
_##.tga = TYPE

_0.tga = I4
_1.tga = I8
_2.tga = IA4
_3.tga = IA8
~The textures above are generally black-and-white files, so keep an eye out for that.~
_4.tga = RGB565
_5.tga = RGB5A3 (can normally be made transparent)
_6.tga = RGBA8
_14.tga = CMPR

_8.tga = Will be covered below.
_9.tga = Will be covered below.

NOTE: I WILL BE USING PHOTOSHOP AS THE PRIMARY TEXTURE EDITING EXAMPLE FOR THIS POST.
To briefly cover transparency, you can tell whether a texture is transparent or not by going to their "Alpha Layer". Alpha Layer can generally be located in the "Layer" tab at the bottom-right of Photoshop. You will see 5 layers - RGB, R, G, B, and Alpha. If the alpha layer is solid white, the texture normally cannot be made transparent (unless it is a _5.tga texture). If, however, the texture has black in the white, that means transparency!


Textures With Palettes
No need to fret; don't let the word "palette" scare you. It only means the texture's slightly unusual when compared to the other textures.
There are only 2 types of palette textures to look out for:
_8.tga
_9.tga
If your character/stage has either one of those... get ready for some fun.
WARNING!! To point out, do NOT edit _8 and _9 textures until you know how big their Index are! Will be covered shortly. Just don't touch them yet if you're new to this!

For starters, you will still have to create a .TCS file for the texture. However, it uses a slightly different format than the previous:
file 0 = [full location of .tga]
image 0 = 0, x, TYPE
palette 0 = 0, type2
texture 0 = 0, 0
Note how it has an extra line, "palette", required to make an appropriate conversion.
Here is the key to filling in the TYPE and type2:
_#.tga = TYPE / type2

_8.tga = CI4 / RGB565 OR RGB5A3
_9.tga = CI8 / RGB565 OR RGB5A3

For both _8 and _9, "type2" depends on the Alpha Layer of the texture you want to make the .TCS file for.
So, do a quick check in Photoshop!
Check the Alpha layer of the texture. If it has no transparency (completely white box), then the type2 is "RGB565".
However, if there IS transparency (white box, with some black), then the type2 is "RGB5A3".


Without Transparency
If the texture has NO TRANSPARENCY (meaning, the alpha is a solid white color), then all you have to do is Index the texture. To do this in Photoshop?

Uppermost toolbar -> Image -> Mode -> Indexed Color...
A small window should open. Make sure the box meets the following requirements:

Palette: [Exact] OR [Local (Perceptual)] options chosen
Colors: [Set number] if Exact; enter [256] if Local (Perceptual)
Forced: [None]
Transparency box is UNCHECKED.

Options~
Matte: [None]
Dither: [None]
Amount: [None]%
Preserve Exact Colors box is UNCHECKED.

NOTE: All we're messing with here is the top-half of the window.
Press OK, as soon as you see your texture meets the requirements.
Now Save the texture (it will likely ask you to save a "copy" of the texture, so simply choose .TGA format and replace the texture you were working on), and your texture has now been Indexed! Not too bad, eh?

With Transparency
If the texture HAS TRANSPARENCY (meaning, the alpha layer is a white color with some black), then you have to go a slightly longer route.

First, go to the Alpha Layer of the file.
Second, select the black parts of the file with a Selection tool (whatever you prefer).
Third, click the "RGB" layer so that you return to the normal texture and off the Alpha Layer. You should see the parts you selected from the Alpha Layer visible on the texture.

Now... it's time to Index! However, compared to the format above, you have to do things a little differently...

Uppermost toolbar -> Image -> Mode -> Indexed Color...
A small window should open. Make sure the box meets the following requirements:

Palette: [Exact] OR [Local (Perceptual)] options chosen
Colors: [Set number BELOW 256] if Exact; enter [255] if Local (Perceptual), or if Exact is bigger than 256
Forced: [None]
Transparency box is UNCHECKED.

Options~
Matte: [None]
Dither: [None]
Amount: [None]%
Preserve Exact Colors box is UNCHECKED.

NOTE: All we're messing with here is the top-half of the window.
Press OK, as soon as you see your texture meets the requirements.

If you've messed with non-transparent textures, you may notice that you need only Colors: 255 instead of Colors: 256. This will be explained.
With the texture still having the parts selected, head:

Uppermost toolbar -> Image -> Mode -> Color Table

You should now see a new window with a bunch of small squares, each containing the individual colors of the texture.

IF YOUR TEXTURE WAS EXACT COLORS BELOW 256 COLORS, simply click in one of the uncolored/dotted squares, and enter
ff00ff
as the # value.

NOTE: Alternatively, you can enter
R: 255
G: 0
B: 255
in the respective places, if you prefer that.

IF YOUR TEXTURE HAD TO BE EDITED WITH Local (Perceptual) AND IS 255 COLORS, simply click the very last unfilled/dotted box in the window (the bottom-most-right box), and fill it with either
#: ff00ff
or R: 255 G: 0 B: 255 as sampled above.

The "ff00ff" value is a MAGENTA color. It will be needed for transparency, at least in this guide. (It could be any other color if you like, but it's the easiest example as there aren't too many characters with magenta colorations.)

Once you've filled in the box in the Color Table, click OK.
Now, if it isn't already selected, make ff00ff one of your colors to color with (the two color boxes at the bottom-left of Photoshop)... and, simply color inside the selected areas in the texture with the magenta coloration. Note how the magenta'd parts are coloring in the spaces of the textures that WOULD have been transparent.

Now, you can Save the file... and it's time for conversion!


From TCS to TPL
If you haven't already, you can create the TCS file with the requirements at the top of this post.
It is HIGHLY RECOMMENDED that you have made TCS files for all the other textures of your character/stage/edit of choice, as you need to find out where everything else other than _8 and _9 textures go.

Once your TCS file has been converted to TPL, it's time to see just WHERE your texture goes.
Open up your .DAT file with the Hex Editor of your choice (I go with Hex Editor Neo), and seek the spot where the texture may go (if you have written down the locations of where the files are placed, this should be much easier).
Once you have found the spot, open your newly-converted palette TPL file. GO TO LINE 00000260 AND COPY THE DATA FROM THAT LINE DOWN FIRST. Then paste that data into the DAT file, where it would go.


32 Lines
Followed shortly after the pasted data in the DAT file should be some extra lines. Count how many lines there are before they hit the next texture in the file. There should be a MAXIMUM of 34 lines.
32 of those lines are the "color" (palette) lines; the last 2 lines are skipped and are left as space between textures/other palette lines.

*Please be wary that if you are editing multiple _8 and _9 textures in a row, that the main texture data may be back-to-back just like the regular files (CMPR, etc.), but after the textures have ended will appear the 32 lines, each 32 lined palette being separated by 2 lines.
If you are unsure... Experiment!*

For non-transparent
Once you reach the palette lines in the DAT file, head back to your TPL file and Deselect the selection you had earlier. Now head to the very top of the file. Starting from the top, SKIP 2 LINES, then start copying down until you have selected 32 lines of data. Copy those 32 lines, head back to the DAT file, paste them just below the texture, and bam! You've done non-transparent.

For transparent
Once you reach the palette lines in the DAT file, head back to your TPL file and Deselect the selection you had earlier. Now head to the very top of the file. Now you must search for the following value in your texture (should ONLY appear once, and in the 32 lines):
FC 1F
This value is the magenta coloring from earlier! You need to get rid of it. And to do that, simply replace the value with "00 00", Save, and... it's gone!
Now, starting from the top, SKIP 2 LINES, then start selecting downwards until you have selected 32 lines of data. Copy those 32 lines, head back to the DAT file, paste them just below the texture, and bam! You've done transparent textures.

NOTE: These methods and the mentioned can be used for edited textures, too, not just to find where the placements of textures are.


Less Than 32 Lines ( _8 )
A lot of palette textures have 32 lines. But, in some cases, the DAT file will have LESS lines than normal.
In this instance, it's not too big of a problem. If the texture is _8, it's pretty smooth sailing.

Count how many lines the DAT file has. (I'll use 10 lines as an example.)
So the DAT file has 10 lines... but the texture you have, may have 32 lines! So what do you do? You simply need to drop the quality of the texture -- that's it!
To know the EXACT/maximum number of colors you can have:
32 - 10 = 22
22 * 8 = 176
256 - 176 = 80
Bam. You can have up to 80 colors MAX in your texture.
~To find out how many colors your texture has, just replace the 10 from the problem above with whatever number of lines the DAT file has (ALWAYS even numbers, like 2, 4, 22, 30, etc.), multiply by 8, and subtract that number from 256 to get your max colors.

Once you've found the max colors/dropped the quality of your texture, simply do the same process as above, but THIS time ONLY copy the same number of lines as the DAT file has, instead of copying 32 lines. (Takes a little diligence on your part to find where the lines may start, if they're all periods.)
And with that... _8 textures are through!!


Less than 32 Lines ( _9 )
A lot of palette textures have 32 lines. But, in some cases, the DAT file will have LESS lines than normal. This, is not so much harder... Just longer, and a tad more annoying. Hope you like math!

Count how many lines the DAT file has. (I'll use 20 lines as an example this time.)
So the DAT file has 20 lines... but the texture you have, may have 32 lines! So what do you do? You must not only drop the quality of the texture... but you must also SUBTRACT a value FROM the texture as well.
But, let's start it off. Using the example above to find out the max colors of your texture:
32 - 20 = 12
12 * 8 = 96
256 - 96 = 160
Bam. Max number of colors is 160. BUT, this time you will NEED some of the numbers from this equation... so keep it in mind!

Having found the max colors/dropped the quality of your texture, you must now open the TPL file in a Hex Editor (I'd HIGHLY recommend Hex Workshop as your subtractor, with Hex Editor Neo being your inserter program).
Once you've opened up the file [in Hex Workshop], find line 00000260 and select ALL the data from there down.

*IF THIS IS YOUR FIRST TIME USING HEX WORKSHOP... YOU MAY NEED TO ADJUST THE NUMBER OF COLUMNS. Simply drag the columns at the top of the screen to the left via the small separation line-boxes, so that they "fuse", and then shrink the values of the left-most numbers on the screen by dragging the vertical separation bar to the left. The numbers will change, until you get numbers ending in nothing but "0". That is what you want.*

Once you've selected the entire file from x260 down, head to
Uppermost toolbar -> Tools -> Operations -> Subtract...

A box, "Subtract Operation", should open. And make sure it looks something like this:

Description: Blahblahblah

Operand~
Treat Data As: [8 bit Unsigned Byte]
Byte Ordering: [Little Endian (e.g. Intel)]
Value:
[X]Decimal [ ]Hex

Apply On~
[X]Selection [ ]Entire File

The "Decimal" and "Selection" buttons should be pressed.
Once they are, you must now enter the value...
But, what do you enter?
That's where your equation from earlier comes in handy!
To find what the VALUE is, you must follow the first two steps of the equation - subtracting 32 from the # of palette lines, and multiplying that resulting number by 8. As I was following a 20 palette line example:
32 - 20 = 12
12 * 8 = 96
While 160 colors was the MAX colors... the VALUE is 96. So as noted in this example, in the VALUE, you insert "96"... and press OK.
The values of the selected data should change, sometimes drastically.
Then Save. (The program will ask if you would like to create a .BAK back-up file; say YES if you want to.)

Now your texture has adjusted to the newer, smaller palette size.
Now simply copy-paste the x260 data into the DAT file, and copy the same number of lines as the DAT file has in your TPL file, instead of copying 32 lines. (Takes a little diligence on your part to find where the lines may start, if they're all periods.)
And with that... _9 textures are through!!

Congrats! You've conquered the + textures of Melee.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
well I see someone's been busy :D

my REFT program is almost finished (for v0.1a)


just have to figure out how to read the formats...
(why I ask'd you, and a bunch of others early)
^guess I'll have to try harder next time...

I'm not just asking around...
I've been looking as well with little results :/

apperently there's not very good documentation on the formats :/
 

GawdImFoxy

Smash Journeyman
Joined
Jul 6, 2007
Messages
262
Location
West Frankfort, IL
I'm audio modding right now and as I'm starting with menu01.hps. The song I'd like to use 195.239 seconds but I can only make it last 55.210. Is there any way I can make that longer?

Edit because I'm a noob: The first attempt I made, I settled for the shortened version of the song. I forgot to make loop points on my Mono R part of the hps_insert and it would cause dolphin to freeze instead of loop. Is that what the issue was?
 
Top Bottom