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

Guide How to Hack Any Texture

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
Texture Hack Guide Title.png

For too long, has the knowledge of Melee texture hacking been prize only to those scroungers and scavengers of forum tidbits.


--------------- ------------------------------------------ ---------------
IMPORTANT!: I wrote this guide before DAT Texture Wizard hit v3+, and texture hacking has since become much easier. This thread now really only relates to the 'Manual Placement' tab within that program (explained in more detail below). What that means though is that for most textures (there are some exceptions), this thread isn't needed. The first three spoilers in the "Pre-Guide Basics" section are still highly recommended though, to give you a brief introduction to what you're doing. After you've looked at that, go to DTW's thread and check out that program. It's pretty easy to use, and it also comes with a ReadMe file that explains the details and special cases. The Advanced Texture Hacking section here, and This thread can also help with some more advanced things.
--------------- ------------------------------------------ ---------------​


This guide is something I've felt has been needed for a while now, especially recently, since there have been a few new additions to the "technology" of texture hacks, and the full processes have yet to be fully and properly laid out. At the time of this writing, most -if not all- of the current Melee texture hacking gurus have learned by reading countless pages of threads, and posting many questions. This guide aims to condense that into an easy-to-follow walkthrough for even complete beginners. I know it looks really long, but that’s only so things are [hopefully] more understandable. And there are several parts you can probably skip if you already have some experience.

This guide will show you how to change individual textures in the game. But if you just want to know how to load a pre-hacked file into your game, such as a character costume or hacked stage, you should be able to just look at Lessons 1 & 2 in the Pre-guide Basics and then jump to step 6 of the guide.

I'd also like to continue to help gather more of the resources out there into one place. So if you know of some good ones relating to texture hacking, let me know.


Table of Contents:​

I) Pre-Guide Basics​
II) Guide to Hack Any Texture​
III) Advanced Texture Hacking​
----------------------
I) Pre-Guide Basics:
----------------------



Feel free to skip any of these sections if you're already familiar with these things.

As you probably already know, GameCube/Wii games come in the form of .gcn or .iso disc image files. (Please don't ask about providing these, because that is against the rules here since it’s copyrighted content.) These are essentially file archives, like a zip file, and in the same sense can be opened up to reveal the internal data files that make up the game. The usual files that you'll find textures in are .dat and .usd files. (You can read about the different files you can expect to find and their purpose here.) These files are basically binary files, so the best way to "read" them is to use a hex (hexadecimal) editor. With a hex editor, you'll see the data as one continuous chain of numbers and letters, where every two characters is a byte of data (each individual character is a nibble (4 binary bits), or half a byte). However, with this new method of texture hacking you likely won't be needing to do any manual hex editing yourself, so I won't be going deeper into explaining how hex works. But if you’d like, you can check out the wiki page on it.

An "offset" is an important term to know pertaining to these data files. It's used to describe an exact place in a file (or chunk of data), relative to the beginning of the file (or chunk of data). So, for example, a file offset of zero would be at the very beginning of the file. This is measured in bytes (again, seen as two-character pairs in your hex editor). So in the following example, the blue 5F is at offset 3, and the green 41800000 is at offset 3C:

Fig.1.PNG
Fig.1

And just like the data is in hex, so is the offset. To prevent confusion between something written in hex or something written in standard decimal (important because, for example, 100 in hex is not the same as 100 in standard decimal), you may see “0x” preceding the hex number. e.g. 0x40.

Often you’ll find offsets within a file that point to other places in the file (so they may be called pointers in these cases). However they are typically relative to the data block that they’re in, rather than the file as a whole, meaning they’re not counting the file’s header data. The Master Hand tool (described below, so if you don’t know what this is don’t worry about it) doesn’t count the header either.The file header afaik is always 0x20. If you look back at Fig.1 above, the first two lines are the file header. So if you found an offset to the green 41800000 above in a file, it would actually read 1C.
DAT Texture Wizard - This is used to take your new/edited textures and write them into your .DAT or .USD file (if you don’t know the purpose of this, don’t worry, it’s explained in the guide below). The old method of texture hacking involved opening everything in a hex editor, then manually copying certain sections of data from each of the texture files to the .DAT/.USD file. And only with textures in TPL format, so they all would have to be converted first. DAT Texture Wizard (DTW) accepts both TPLs and PNGs, converting the PNGs automagically and performing all of the hex editing for all of the textures in just a couple of mouse clicks.

Dolphin - The great emulator used to run GameCube and Wii games on PC. It also has a ton of built-in features useful to game hacking. Even if you have this already, you may want to visit their download page anyway, considering how often new, improved versions are released. Check out this September progress report on performance boosts covering just a two-month span.

GCRebuilder - Used to export/import files from a game ISO. .Net Framework 3.5 or higher is required for it run; you can find that free from Microsoft here.

GIMP - A free alternative to Photoshop. It can do most, if not all, that Photoshop can, although it works a little bit differently and usage may seem peculiar in some ways to newcomers. It can also do some things that Photoshop cannot, including easy alpha layer manipulation, easy plug-in creation, and even the ability to work from command line (Hello, Automation!). You can use pretty much any image editor (as long as it can work with palettes if you’re doing a paletted texture) to create/edit your textures though (but I’d still recommend something better than Paint).

HxD - There are many hex editors out there, offering the same basic functionality. So choosing one of these is typically personal preference, usually based on the extra features that make certain tasks quicker & easier. HxD is a good, free hex editor that many of us use to open up .dat, .usd, or other files for manual editing or searching. It's very useful, but you may not need this depending on what you're doing. Another one you may want to consider is 010 Editor. Although the latter is not free, it does have the additional feature of templates, which can highlight different areas of the file as you're viewing it, to make them easier to read. A template for some of Melee's files was created by revel8n, and can be found here.

Melee Toolkit - A tool created by Dan Salvato for working on texture hacks for characters. It allows for easy replacement and extraction of textures, directly all the way to the ISO, and supports PNG images. It handles a lot of the processes of texture hacking for you and makes things very simple and easy. The downside is that it can’t be used for all textures.

PNG to-from TPL - This is for converting textures between PNG and TPL file formats, in either direction. This is a fairly new script that’s not only faster and easier for a single texture than the old methods, but can easily do large batches of images all at once. You might not need this though since DAT Texture Wizard can convert textures as well, but there are still a few good uses for having a TPL copy of your texture, which are covered in the guide below. Note that if you open it in a text editor, you’ll find a few options in the beginning of the file that you can change.
Images in Melee are stored in "TPL" format, which is a proprietary image format used by Nintendo for other GC/Wii Games as well. The main thing to know about these textures is that there are several different types of TPL image. Some are only black and white, some support transparency, some use what's called a "palette", and others have different combinations of these attributes. (Technically speaking, these image types vary by how much data is available per pixel, and how that data is represented.) You can tell a texture's type by looking at the end of the file name. For example, the texture named "GALE01_58408ead_3.tpl" is a type _3. You can see all of the different types here:

Type: | Encoding: | The Basics:
_0 | I4 | grayscale
_1 | I8 | grayscale
_2 | IA4 | grayscale w/ transparency
_3 | IA8 | grayscale w/ transparency
_4 | RGB565 | color
_5 | RGBA3 | color w/ transparency
_6 | RGBA32 (RGBA8) | color w/ transparency
_8 | C4 (CI4) | uses a palette
_9 | C8 (CI8) | uses a palette
_10 (a.k.a. _a) | C14X2 (CI14x2) | uses a palette
_14 (a.k.a. _e) | CMPR | uses many tiny palettes

Normally, each pixel in an image has its own color data. Those with a “palette” instead have a list or table of colors (stored separate from the image data) that are referenced throughout the image. Each pixel then has an index number that points to a certain position/color in the palette (which is why you may also see these referred to as “indexed images”). This way, there isn’t any redundant data when more than one pixel has the same color. Though it also means it has a reduced set of colors, since each pixel’s color can no longer be anything and instead must exist in the palette, which is typically a relatively small pool of 256 colors or less. The point of this is to save space with some of the game’s [relatively] large color images. Wiki page here if you want to read more.

The most common place paletted images are encountered is with Character Select Portraits (CSPs), which are the previews you see when choosing a costume color at the Character Select Screen (CSS). Those are _9 textures. An example of _8 textures would be the stage icons on the Stage Select Screen (SSS). The big difference between these two different sets is that the CSPs use transparency in their images, whereas the stage icons do not. An important note on this is that if you want to convert the stage icons, or any other paletted textures that don’t have transparency, to TPL format using the PNG to-from TPL script, there’s an option within the script that you need to set. You can easily find the option, called ‘sourceHasTransparency’ by opening the script in notepad or another text editor, in the beginning portion of the file.
This is a quick and simple process, useful primarily for getting a copy of original textures so you can edit them.

To begin, start up Dolphin and click on the button labeled "Graphics" (or go to Options -> Graphics Settings). Go to the Advanced tab, and in the Utility section look for and select the "Dump Textures" checkbox. Start up the game, and now, all textures that the game loads will also be dumped to a folder, typically set to be in with your documents at 'C:\Users\<your_user_name_here>\Documents\Dolphin Emulator\Dump\Textures\GALE01'. This folder will fill up rather quickly as the game runs, so the best way to hone in on the specific texture(s) you're looking for is to first get the game to a point right before it would load up and display the texture(s) you want, then go to the texture dumps folder and delete everything in there. Now, return to the game and continue on to the point where the texture(s) load. When you go back to the texture dumps folder it will be much easier to look through to find what you want. (You might want to remember to uncheck the Dump Textures checkbox in the options once you're done.) Note that if you have Dolphin configured to use Direct3D11 in the graphics settings, you will get PNG images, and if you use OpenGL it will dump TGA images. I recommend using PNGs, which are compatible with most of the current texture hacking programs.

Here’s a breakdown of the file name that Dolphin generates:

GALE01_a2621911_9.png

Game ID, texture ID, image type

If you want to rename the file to help you know what it is, just change the GALE01 part. You’ll want to keep the texture ID (texID) and the image type intact, because some of the programs you’ll be using read those to determine what the texture is.

The texture ID for individual textures will be unique for whatever settings you have in Dolphin. So there are some settings that you can change that will cause Dolphin to dump textures with different texIDs.


-----------------------------------
II) Guide to Hack Any Texture
-----------------------------------




0 | Testing and Methodology

Hacking your texture into the game would of course be a great way to see how it looks. But for the purposes of just testing it out, there is a more efficient way than going through all of the work of putting the texture into the game iso. Dolphin has a feature called 'Load Custom Textures’, which allows you to have an image that’s just sitting in a folder show up in-game as a texture! You can toggle the feature on and off, and make tweaks and edits to the texture in-between, to see the changes in real time while the game stays running! To enable this, click on the button labeled "Graphics" in Dolphin (or go to Options -> Graphics Settings), then go to the Advanced tab and you’ll see a checkbox for the option in the Utility section. Once enabled, Dolphin will try to look in this folder for textures: ‘C:\Users\<your_user_name_here>\Documents\Dolphin Emulator\Load\Textures\GALE01’ (you’ll need to create the GALE01 folder). Put your texture into there, and then you just need to name it the same as what Dolphin uses for the original of that texture. To find what Dolphin uses, you need to dump the original texture in Dolphin and check the file name it generated (check Lesson 4 in the Pre-Guide Basics to learn how to do this).

You may see many grayscale images (types _0 to _3) show up with color in-game. In these cases, the textures get their color from other parts of the game’s code. This is done so that the textures can be reused in different places throughout the game, but with different colors. The place in code that defines these colors can of course be changed. So you can follow this guide to modify the base image, and then in order to find out the places you need to change to color your texture, you’ll want to visit this thread: Changing Color Effects in Melee! Check out the second post for some specific textures/moves. You can also check out this thread for locations of many common textures like these.


1 | The New Texture

Once you've decided what texture you want to change, you need to get a hold of the original image so you can edit it. You could of course create a new image from scratch instead, but you’ll still need to know the width, height, and type of image of what you're replacing (which will have to be the same, unless you get into more advanced hacks, which are talked about in the Advanced Hacks section). And chances are you'll be wanting to use the original image as a starting point of your editing anyway, so you'll probably want to grab that. You can get a copy of the original texture one of two ways:

1a | Method 1: Dump the texture from Dolphin
How to do this is explained in Lesson 4 of the Pre-Guide Basics. Just remember that if you want to change the file name, keep the texture ID and image type as they are. But you can change what comes before that if you want.​

1b | Method 2: Download from a texture pack
Years ago, one of the great texture pioneers, Steelia, put together downloads for most of the game's textures. I'll include the links here for convenience, while the original post can be found here, along with a list of character costume colors and the files that contain them.​
- Stages
- Miscellaneous (Character Select and Stage Select images)​
- Stock Icons (These are found in IfAll.usd. Data offsets located here. Provided by CeLL.)​
- Universe Insignias (from the CSS. Also in IfAll.usd. Provided by me.)​


If you download a pack from above, you’ll find all the images in subfolders after you unzip the download. If you want to work on multiple textures for a whole character or whole stage, then leave the images in the folders as you go. What I mean is, even as you go through and edit the textures, leave your new textures in the same folder as their original file. This isn’t actually mandatory, as you don’t need a particular folder structure, but this will make things more convenient later. However, if you’re collecting/dumping the images yourselves and not using one of the packs, then you can go ahead and just put all of your images into one folder.

Important!: As mentioned in Lesson 4, the last part of the file name should be the image type. So if you have a file from one of Steelia’s packs named “tex#00_09+2.tga”, for example, you’ll need to rename it to “tex#00_9.tga”.

However you get your image(s), you’ll want to save your completed, edited texture in PNG format. (If you're working on many CSPs and using GIMP, you might find this script useful.) If you want to share it as a TPL file, you can do so using the PNG to-from TPL script. Note that if you’re converting a paletted texture that doesn’t use transparency to TPL, you’ll need to change the “sourceHasTransparency” option to “no” within the script. To do that, just open it up in a text editor like notepad and look toward the beginning of the file. The option will be easy to find. You don’t need the TPL to continue with hacking though, a PNG will be fine.

Next, we'll get the file that you’ll be putting your texture(s) into.


2 | The Destination File

As described in Lesson 1, the game disc image (.iso/.gcn file) is actually many files packaged together. What you need now is the file in the disc that the texture belongs in (the file where the original texture resides).

If you downloaded one of Steelia’s texture packs, then it should have also come with the .dat or .usd file that the textures go in. In that case, you have the file you need and you can skip the rest of this section.

If you don’t have the .dat/usd file, then this is where GCRebuilder comes in. Navigate to your ISO/GCN disc image and open it with GCRebuilder. (It would probably be handy for you to set GCRebuilder as your default program for opening these kinds of files.) On the right hand side, you'll see the file tree of everything in the disc. To figure out which file you need for your texture(s), you can refer to one of these:

[Courtesy Steelia (source)]

Captain Falcon
PlCaBu - Blue
PlCaGr - Green
PlCaGy - Grey
PlCaNr - Captain Falcon (Default)
PlCaRe - Red
PlCaWh - Pink-and-white

Young Link
PlClBk - Black
PlClBu - Blue
PlClNr - Young Link (Default)
PlClRe - Red
PlClWh - White

Donkey Kong
PlDkBk - Black
PlDkBu - Blue
PlDkGr - Green
PlDkNr - Donkey Kong (Default)
PlDkRe - Red

Dr. Mario
PlDrBk - Black
PlDrBu - Blue
PlDrGr - Green
PlDrNr - Dr. Mario (Default)
PlDrRe - Red

Falco
PlFcBu - Blue
PlFcGr - Green
PlFcNr - Falco (Default)
PlFcRe - Red

Roy
PlFeBu - Blue
PlFeGr - Green
PlFeNr - Roy (Default)
PlFeRe - Red
PlFeYe - Yellow-and-white

Fox
PlFxGr - Green
PlFxLa - Blue/Lavender
PlFxNr - Fox (Default)
PlFxOr - Orange

Ganondorf
PlGnBu - Blue
PlGnGr - Green
PlGnLa - Purple/Lavender
PlGnNr - Ganondorf (Default)
PlGnRe - Red

Mr. Game & Watch
PlGw - All Colors

Kirby
PlKbBu - Blue
PlKbBuCpDk - Blue Donkey Kong cap
PlKbBuCpFc - Blue Falco cap
PlKbBuCpMt - Blue Mewtwo cap
PlKbBuCpPr - Blue Jigglypuff cap
PlKbGr - Green
PlKbGrCpDk - Green Donkey Kong cap
PlKbGrCpFc - Green Falco cap
PlKbGrCpMt - Green Mewtwo cap
PlKbGrCpPr - Green Jigglypuff cap
PlKbNr - Kirby (Default)
PlKbNrCpDk - Donkey Kong cap (Default)
PlKbNrCpFc - Falco cap (Default)
PlKbNrCpMt - Mewtwo cap (Default)
PlKbNrCpPr - Jigglypuff cap (Default)
PlKbRe - Red
PlKbReCpDk - Red Donkey Kong cap
PlKbReCpFc - Red Falco cap
PlKbReCpMt - Red Mewtwo cap
PlKbReCpPr - Red Jigglypuff cap
PlKbWh - White
PlKbWhCpDk - White Donkey Kong cap
PlKbWhCpFc - White Falco cap
PlKbWhCpMt - White Mewtwo cap
PlKbWhCpPr - White Jigglypuff cap
PlKbYe - Yellow
PlKbYeCpDk - Yellow Donkey Kong cap
PlKbYeCpFc - Yellow Falco cap
PlKbYeCpMt - Yellow Mewtwo cap
PlKbYeCpPr - Yellow Jigglypuff cap

PlKbCpCa - Captain Falcon cap
PlKbCpCl - Young Link cap
PlKbCpDk - Donkey Kong cap (alternate)
PlKbCpDr - Dr. Mario cap
PlKbCpFc - Falco cap (alternate)
PlKbCpFe - Roy cap
PlKbCpFx - Fox cap
PlKbCpGn - Ganondorf cap
PlKbCpGw - Mr. Game & Watch cap
PlKbCpKp - Bowser cap
PlKbCpLg - Luigi cap
PlKbCpLk - Link cap
PlKbCpMr - Mario cap
PlKbCpMs - Marth cap
PlKbCpMt - Mewtwo cap (alternate)
PlKbCpNs - Ness cap
PlKbCpPc - Pichu cap
PlKbCpPe - Peach cap
PlKbCpPk - Pikachu cap
PlKbCpPp - Ice Climbers cap
PlKbCpPr - Jigglypuff cap (alternate)
PlKbCpSk - Sheik cap
PlKbCpSs - Samus cap
PlKbCpYs - Yoshi cap
PlKbCpZd - Zelda cap

Bowser
PlKpBk - Black
PlKpBu - Blue
PlKpNr - Bowser (Default)
PlKpRe - Red

Luigi
PlLgAq - Blue/Aquamarine
PlLgNr - Luigi (Default)
PlLgPi - Pink
PlLgWh - White-and-green

Link
PlLkBk - Black
PlLkBu - Blue
PlLkNr - Link (Default)
PlLkRe - Red
PlLkWh - White

Mario
PlMrBk - Brown-and-white
PlMrBu - Blue/Jumpman
PlMrGr - Green
PlMrNr - Mario (Default)
PlMrYe - Yellow

Marth
PlMsBk - Black
PlMsGr - Green
PlMsNr - Marth (Default)
PlMsRe - Red
PlMsWh - White

Mewtwo
PlMtBu - Blue
PlMtGr - Green
PlMtNr - Mewtwo (Default)
PlMtRe - Red

Nana (Ice Climbers)
PlNnAq - Orange costume [with Light Blue Popo]
PlNnNr - Nana (Default)
PlNnWh - Red costume [with White Popo]
PlNnYe - Yellow/Tan

Ness
PlNsBu - Blue
PlNsGr - Green
PlNsNr - Ness (Default)
PlNsYe - Yellow-and-black

Pichu
PlPcBu - Blue [goggles]
PlPcGr - Green [backpack]
PlPcNr - Pichu (Default)
PlPcRe - Red [bandana]

Peach
PlPeBu - Blue
PlPeGr - Green
PlPeNr - Peach (Default)
PlPeWh - White
PlPeYe - Daisy [yellow]

Pikachu
PlPkBu - Blue [party hat]
PlPkGr - Green [cowboy hat]
PlPkNr - Pikachu (Default)
PlPkRe - Red [trainer hat]

Popo (Ice Climbers)
PlPpGr - Green
PlPpNr - Popo (Default)
PlPpOr - Light Blue costume [with Orange Nana]
PlPpRe - White costume [with Red Nana]

Jigglypuff
PlPrBu - Blue [bow]
PlPrGr - Green [headband]
PlPrNr - Jigglypuff (Default)
PlPrRe - Red [flower]
PlPrYe - Yellow [crown]

Sheik
PlSkBu - Blue
PlSkGr - Green
PlSkNr - Sheik (Default)
PlSkRe - Red
PlSkWh - White-and-black

Samus
PlSsBk - Brown
PlSsGr - Green
PlSsLa - Purple/Lavender
PlSsNr - Samus (Default)
PlSsPi - Pink

Yoshi
PlYsAq - Light Blue/Aquamarine
PlYsBu - Dark Blue
PlYsNr - Yoshi (Default)
PlYsPi - Pink
PlYsRe - Red
PlYsYe - Yellow

Zelda
PlZdBu - Blue
PlZdGr - Green
PlZdNr - Zelda (Default)
PlZdRe - Red
PlZdWh - Light Blue/White
[Courtesy Steelia (source)]
Code:
GrBB = Big Blue

GrCn = Corneria

GrCs = Princess Peach's Castle

GrEF1 = Figure?1
GrEF2 = Figure?2
GrEF3 = Figure?3

GrFs = Fourside

GrFz = Flat Zone

GrGb = Great Bay (Termina)

GrGd = Garden (Jungle Japes)

GrGr = Green Greens

GrHe = Heal (All-Star)

GrHr = Homerun Contest

GrI1 = Mushroom Kingdom

GrI2 = Mushroom Kingdom II (Subcon)

GrIm = Icicle Mountain

GrIz = Izumi (Fountain of Dreams)

GrKg = Kongo Jungle

GrKr = Kraid (Brinstar Depths)

GrMc = Mute City

GrNBa = Battlefield
GrNBr = F-Zero adventure mode stage
GrNFg = Figure Get (Falling trophy stage)
GrNKr = Mushroom Kingdom adventure mode stage
GrNLa = Final Destination
GrNPo = Pushon?
GrNSr = Hyrule Castle chasm (adv. mode stage)
GrNZr = Zebes (Brinstar); "DANGER"?

GrOk = Kongo Jungle (N64)

GrOp = Dream Land (N64)

GrOt = Onett

GrOy = Yoshi's Story (N64)

GrPs = Pokemon Stadium
GrPs1 = Pokemon Stadium {Fire}?
GrPs2 = Pokemon Stadium {Grass}?
GrPs3 = Pokemon Stadium {Water}?
GrPs4 = Pokemon Stadium {Rock}?

GrPu = Pura (Poke Floats)

GrRc = Rainbow Cruise

GrSh = Hyrule Temple

GrSt = Yoshi's Story

GrTCa = Captain Falcon Target Test (TT)
GrTCl = Young Link TT
GrTDk = Donkey Kong TT
GrTDr = Dr. Mario TT

GrTe = "TEST"

GrTFc = Falco TT
GrTFe = Roy TT
GrTFx = Fox TT
GrTGn = Ganondorf TT
GrTGw = Mr. Game & Watch TT
GrTIc = Ice Climbers TT
GrTKb = Kirby TT
GrTKp = Bowser TT
GrTLg = Luigi TT
GrTLk = Link TT
GrTMr = Mario TT
GrTMs = Marth TT
GrTMt = MewtWo TT
GrTNs = Ness TT
GrTPc = Pichu TT
GrTPe = Peach TT
GrTPk = Pikachu TT
GrTPr = Jigglypuff TT
GrTSk = Sheik TT (scrapped)
GrTSs = Samus TT
GrTYs = Yoshi TT
GrTZd = Zelda TT

GrVe = Venom

GrYt.dat - Yoshi's Island

GrZe = Brinstar (Planet Zebes)

Melee Files and their Purpose

If you're still not sure where your texture is from, you can try to find the original location yourself by searching for the original image data in various files. If the texture you’re looking for does not have a palette (all image types besides _8, _9, _a, _10, or _14), then you can follow these steps:

1) Dump the texture you want to find using Dolphin, as a PNG.
2) Convert the unmodified PNG to TPL format using the ‘PNG to-from TPL’ script found here. You’ll now have a copy of the original TPL data, as it exists in the game.
3) Open the TPL in a hex editor.
4) Starting at offset 0x40, copy the contents of the file to your clipboard (so you should be copying all but the first four lines).
5) Open up (also in the hex editor) an unmodified version of the .dat file that you suspect the texture to be in.
6) Run a search (ctrl + F) in the .dat, using the data you copied from the .tpl

(If you're using HxD, you'll need to change the datatype for the search to "Hex-values". And as I mentioned, this method doesn't work for images with palettes. Reason being can be found here.)

If you get a match, it means the texture is in that file. And you'll also be able to see where the match starts, which is the texture’s file offset. If you don't get a match, your princess image might be in another castle file.

Or if the texture you’re looking for does use a palette, then you can try the Texture Finder program made by CeLL. However, it currently doesn’t support _14 textures.

If the above doesn’t work, you could try searching around the boards for the answer. Or, finally, if you still can't figure out which file the original texture is in, you can try posting in this thread or the Melee, Hacks, and You thread and ask if others might know where it's at.

Once you know the file, look for it in GCRebuilder's file tree. (The files are in alphabetical order, and if, for example, you hit ‘m’ on your keyboard, you’ll jump to the files starting with M.) Right-click on the file, and hit "Export...". Save it to the folder or destination where you're keeping your texture. If you’re using one of those texture packs with lots of subfolders/textures, just save it to the main folder that contains the subfolders. It’s not required to save this anywhere in particular, but putting it here will make things easier later. Also, you can just leave GCRebuilder open, since you’re going to have to come right back to this program and spot in the file tree later.


3 | The Offset

In order to overwrite a texture in the game, you have to know where in the game data it's located. Which means you need to know which file the image is stored in, and where it is in that file, i.e. the offset (referring to Lesson 1 here). Usually you can look up the offset in a text file that comes in Steelia’s texture packs linked to in step 1. In the unzipped download, look for a file called something like “Placements.txt”, or “offsets.txt”.

When you open up the placements file, you’ll see something like this:

01 - 00021060
45 - 00021460
46 - 00021c60
49 - 00022c60
48 - 00024c60
47 - 00025c60
52 - 00026c60
50 - 00028c60
51 - 0002ac60
02 - 0002cc60
03 - 0002ec60
….


The number on the left corresponds to the subfolders in the download (e.g. 01Belt, 02BootEagle, etc.), and the number on the right is the offset for the texture in that folder.

As for the other files in there (the TCS files, templates, and such), you can just look at them and be glad you don’t have to use the old methods of converting texture formats.

If you’re looking for a common gameplay effect like wind, dust/smoke, flashes, sparkles, particles, electric effects, or other effects/graphics that would be shared by many characters, then chances are that it’s in EfCoData (Effects Common Data). You can find offsets for some of those textures and some examples here.

If you can’t find the offset recorded somewhere, and the texture(s) you’re looking for don’t use a palette, then you can try the method described in step 2, in the spoiler labeled “Manual texture searching”. And if you still can’t find the offset, then you can try posting to see if others know where the texture is.

Sometimes you can get away with not having to deal with offsets at all. This is in cases where you have a Placements text file to go along with your destination file, such as with some of the texture pack downloads. I’ll go over this more in a bit.


4 | Loading the files into DAT Texture Wizard

At this point you should have your new/edited texture(s), the file to put them in, and knowledge of where they go in the file, i.e. their offset. From here, you have a few options to get them into DAT Texture Wizard (DTW).

4a | If your textures and the destination file are all in the same folder, select all of the files (your texture(s) and the .dat or .usd file), and then drag-and-drop them onto the program icon for DAT Texture Wizard (the .exe file). Or if you have the program installed to Window’s right-click context menu, then you can select the files like you did before, but then instead just right-click on them and select ‘Send to -> DAT Texture Wizard’. This second method is a little bit easier since you don’t have to open up the folder where the program is and arrange the two windows for the drag-and-drop. (Just check the program’s thread if you don’t know how to install it; it’s quick and easy.)​
4b | If you downloaded one of Steelia’s texture packs, and still have the images in their own folders: select just the placements text file in the download and the destination file (assuming you put it into the same folder), then drag-and-drop or right-click/send-to, as described above, to open the files in DTW. Now, click the button on the right that says, “Scan folder structure.” The folder you just selected the other files from should already be selected by default, since it was the last folder you loaded files from. So you should be selecting the texture pack’s root folder (the folder containing the subfolders). This function will look through the folders, find all .png and .tpl files you’ve made in them, and add them into DTW.​
4c | The alternative to the above methods is of course to open DTW directly, and then use the ‘Select DAT/Select TXT/Select Textures’ buttons. This way is slower, but could be useful for a few situations, such as if you have your files in multiple different places. You could also directly copy/paste or write in the filepaths yourself (just be sure to keep it one filepath per line). You can even use relative filepaths if you wanted to for some reason.​


5 | Setting the Offsets in DAT Texture Wizard

Besides loading your files into DTW, you need to tell it where to write the texture(s) into the dat/usd file, by giving it the offset(s). This is done in the text field for the texture filepaths (“Source Textures”), by writing an arrow (like this: “-->”) followed by the offset. For example, a line with a full filepath and an offset of “BAD60” would look like this:

D:\images\example Folder\GALE01_58408ead_3.tpl --> BAD60

Fig.2.png Fig.2 <-- This is typically all you really need.

(You’ll see the arrow change to green, helping it stand out, and indicating that it’s recognized. The spaces are optional.)

Extra stuff:
You are also able to overwrite the same image into multiple different locations if you'd like. This can be useful if you want to replace a group of images used as an animation for one static image. To do this, write all of the offsets after the arrow ("-->"), separated by commas. For example:

C:\example Folder\image_123456_1.png --> BAD60, ABCF, 00123
There are a few rare paletted textures (typically only relating to some eye textures) that do not follow the standard method for where their palettes are placed in the dat/usd file. Normally, the palette data is placed right after the image data, but sometimes they're in separate locations. One way to know if you’re dealing with a texture like this are from notes in Steelia’s placements files. Another, is if you look at the space available between textures, and notice that there's actually no space for a palette to follow directly afterward. I'll give you an example. Say you have a _9 type texture at offset 0x1000, and you know the image data is 0x500 bytes long. But you know there's another texture's image data that starts at 0x1500. That means there's no extra space where palette data could fit in there with it before the next texture.

If you find yourself working with an image like this, you'll need to know the offset for where the image data goes, as well as the offset for the palette data. This can be tricky to find unless you know a little bit about the structures of these files and have an idea of what you're doing. You can read about a method for finding palette offsets in a discussion that starts in this thread around here, and then you might also like to read this post.

Thankfully at least once you have this information, setting these offsets is simple; simply write the image data offset, followed by a colon (":"), followed by the palette data offset. For example:

C:\example Folder\palettedImage_123456_8.tpl --> 0123F:3210F

In this case, the image data will be written to 0123F, and the palette will go to 3210F.

Like I said, it’s not very common that you’ll run into this sort of case, so you most likely don’t need to worry about it.

If you used one of the texture packs and the placements file that came with it, you probably noticed that the offsets were all automatically set for you. In that case you’d just click “Write textures into DAT” and be done. Pretty handy, eh? So if you don’t feel like writing those offsets into DTW manually each time, you can easily create your own placements file and make things easier for yourself or others later.

First I'll explain Steelia's placements files that come with his texture packs (found here) which should work with the 'Scan folder structure' feature. His placements files were created for his folder structures, which relate a folder to an offset. Here's an example line in the placements file:

28 - 00064c60

The 28 is the numeric ID of the folder that the image is in. For example in this case it represents the texture in the folder "28HelmetEmblem" in Captain Falcon's pack. The 00064c60 is the offset where the texture is to be overwritten into your DAT or USD file. The two points of data are then separated by a dash (spaces are optional).

You can also write a placements file for images without any special folder structure. This is done by using the texture IDs (texIDs) of the textures, which are found in the file names. For example, the file "GALE01_58408ead_3.png" has a texID of _58408ead. So if you wanted to associate the above example with the offset 00064c60, the simplest working line would be:

00064c60 - _58408ead

Since DTW is looking for that texID in the file name, you’ll need to keep that intact (don’t forget to leave the image type intact too). So if you want to rename the file, just change the GALE01 part.

You could do all of this in a new file, or you could instead just add the texID to the line in Steelia’s placement file (so then the same placements file can be used for his folder structures OR textures by themselves); just add the texID to the respective line with another dash separator. More texIDs could be tacked onto there too if you want, to associate them all to one offset. And the order of all of these parts doesn't matter. So you could have, for example:

28 - 00064c60 - _58408ead - _00652a3b

You can load the placements file at any time. If you do it before loading your textures (or simultaneous via the drag-and-drop or context-menu methods) then the textures will have their offsets set automatically. If you set your placements file afterwards, then you can click “Scan for offsets” at any time to update your textures with offsets.

Once all the files are in DTW and the offsets are set, you can go ahead and click the button that says “Write textures into DAT” in the far bottom-right of the program. It will find the appropriate sections in each texture file (converting to TPL first, if need be) to write into the .dat/.usd destination file.


6 | Writing Your Files Into the ISO

Once you’re done overwriting your texture(s) into to the destination file, it’s time to put that file back into the ISO. This is done with GCRebuilder very similarly to how you extracted the file.

(If you had your hacked file already and just skipped to this step, all you need to do is open your game ISO with GCRebuilder. You'll see a list of the files your disc contains on the right.)

Find the file in the file tree, right-click on it, select “Import…”, and navigate to your file with the hacks. Once you’ve imported it, you’re done! You can close GCRebuilder and boot up your ISO with Dolphin to check your work.



----------------------------------
III) Advanced Texture Hacks:
----------------------------------



To start with, here’s a visual introduction to a texture in TPL file format that uses a palette: Breakdown of paletted TPL files (_8, _9, _a & _10). The other image types are very similar, but with no palette data and no palette header; they have a header of 0x40, and the rest from there is all image data. Click here to go deeper into what is in each of those color coded sections. However, that is all about TPLs as you would see them if you were to open it up as a file (for example if you converted your PNG texture to a TPL using the ‘PNG to-from TPL’ script). The data is laid out differently when in the game’s dat and usd files.

In the data file (one of the .DATs or .USDs), the header data is often separate from the image data. You’ll typically find the image data for many textures back-to-back in the file, as if they’re all part of a spritesheet. Every so often there is a small bit of data in-between such chunks, which may be header data. In the cases of paletted images, the palette data typically follows directly after the image data (although the palette data is totally separate in some rare cases).

The data file has a tree-like hierarchy that begins with the Relocation Table (RT), which acts as an index to everything else in the file. The table contains the offsets of all of the file’s pointers, in the order that they appear in the file. Know that you'll need to add 0x20 to the pointers you find, because they are relative to the start of the data block, not the start of the file (so it's excluding the file header, which is 0x20 long). The pointers that the RT offsets point to may point to more pointers. But at some point (usually after one or two pointers), if you’re following the hierarchy of a texture, you’ll get to a texture’s header, which contains the image’s width, height, image type, and also another pointer to the texture’s actual image data.

For a more in-depth explanation on the Relocation Table (where it is, its length, etc.) and the rest of the structure of a DAT, here are a few great resources you can take a look at:

HAL DAT file format (Mario Kart wiki)
Post by GodFed on Relocation Tables
Melee dat format… (thread by revel8n)

(Not all .dat or .usd files are the same, however, so it might still take a bit of comparison to figure out the one you’re looking at.)

At 1166B0 in EfCoData.dat, you'll find this, which is a texture’s header:



The highlighted part is: pointer to the image data (4 bytes), width (2 bytes), height (2 bytes), image type (4 bytes). 0x80 = 128, so the image's dimensions are 128x128, and the image type is 3. Unfortunately, I don’t think it’s known what more of these values are. You might also notice that there's a pointer in there that points to this header (00116690), which is likely the end of the image header. I'm not quite sure why a pointer points to one place, just to direct you to another slightly different place.

If you’d like some more examples of using the relocation table and following pointers, I have some of my own here. Scroll down on the EfCoData tab and you'll find a little section called "Following a few offset trails...".

Since these pointers dictate where everything is, they are also what determines how much space is allotted to each texture. Although I haven’t tested it, you could theoretically increase or decrease the resolution or quality of a texture if you then adjust every pointer in the file following it (both in and out of the RT). So far, successful resolution increases have been achieved by placing a single texture at the end of the file, and changing the necessary pointers, image header data, and file size values (this way, not ALL of the pointers needed modifying).

One last note: keep in mind that not every surface has a texture; some things are just an object with a color or gradient fill. If you want to check for this, or see what image type a specific texture is in the game, there is an alternative to dumping and looking for the texture. Dolphin has a neat feature called ”Texture Format Overlay” (found under Graphics -> Advanced -> Debugging), which, as shown below, shows you what each texture’s type is in-game:

Fig.3.png
Fig.3


That's all for now. :)

Hopefully by making all of this easier and more well-known, the community will be seeing all kinds of new and amazing textures, costumes, and designs!
 
Last edited:

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
All of the links are prefaced with http://xn--http-u96a// which makes them not work for me unless I change it.
That was weird. I originally wrote this in Google Docs, so it must have added them for some reason. I've fixed them now. Thanks.

I also collapsed the Pre-Guide Basics section, which helped a lot on the wall-of-text intimidation factor. But hopefully if people get into it they'll quickly realize it's long because it's thorough, but not difficult. Really, there are a lot less steps/actions than what it looks like.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
This is exactly what we needed. Thank you so much DRGN. Such a well written and well structured post.

By the way, add GrYt.dat - Yoshi's Island to your stage file name list.
 
Last edited:

fatman667

Smash Journeyman
Joined
May 30, 2011
Messages
364
Location
4S Ranch, San Diego, CA
This tutorial definitely helps. I'll probably put this tutorial in mind next time I do some texture hacks that the Melee ToolKit can't handle. I think what would also really help would be a video tutorial to go along with this, and especially a tutorial that covers textures with palettes since those can prove to be most confusing, but this is your choice then again. Either way, thanks for the tutorial, hopefully we'll get new texture modders in the community.
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
This is exactly what we needed. Thank you so much DRGN. Such a well written and well structured post.

By the way, add GrYt.dat - Yoshi's Island to your stage file name list.
Thanks. Added.

This tutorial definitely helps. I'll probably put this tutorial in mind next time I do some texture hacks that the Melee ToolKit can't handle. I think what would also really help would be a video tutorial to go along with this, and especially a tutorial that covers textures with palettes since those can prove to be most confusing, but this is your choice then again. Either way, thanks for the tutorial, hopefully we'll get new texture modders in the community.
Yeah, I debated between doing a text tutorial vs. video tutorial. I can do video editing, but this was just easier for a few reasons.

And this tutorial does cover textures with palettes. It covers all types.
 

Palic3

Smash Rookie
Joined
Feb 10, 2015
Messages
1
Does this work for USB loading Melee onto a wii? I have a 20xx hack pack and want these skins but unsure if i am able to or how I go about doing so. So does this work on wii and where can i ook to just swap the skins i downloaded and put them on my files to be transfered to my wii.
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
Does this work for USB loading Melee onto a wii? I have a 20xx hack pack and want these skins but unsure if i am able to or how I go about doing so. So does this work on wii and where can i ook to just swap the skins i downloaded and put them on my files to be transfered to my wii.
Yeah, it does.

If you just have a few hacked files by themselves, like costumes or stages, all you need to do is open your game ISO with GCRebuilder. You'll see a list of the files your disc contains in the file tree on the right. Find the same, original file, right-click on it, select “Import…”, and navigate to your file with the hacks.

But if you want to install the whole 20xx pack, you should go to the thread for that and follow the instructions there.
 

CaptainJazz

Smash Cadet
Joined
Oct 1, 2014
Messages
42
Location
Mute City
I wish you were 100% true to your title.

There are SOOO many textures I wish I could find and replace on the Melee.iso:
  • Title Screen
  • Stage Select Screen
  • Menu Screen
  • Stock Icons
  • The Emblems behind the CSPs (Ex. , the mushroom behind mario in a CSP)
I know some of these textures have guides around the forums, but you said:

For too long, has the knowledge of Melee texture hacking been prize only to those scroungers and scavengers of forum tidbits.

This guide is something I've felt has been needed for a while now, especially recently, since there have been a few new additions to the "technology" of texture hacks, and the full processes have yet to be fully and properly laid out. At the time of this writing, most -if not all- of the current Melee texture hacking gurus have learned by reading countless pages of threads, and posting many questions
Do you plan on adding guides to these lesser known / lesser valued textures?
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
I wish you were 100% true to your title.

There are SOOO many textures I wish I could find and replace on the Melee.iso:
  • Title Screen
  • Stage Select Screen
  • Menu Screen
  • Stock Icons
  • The Emblems behind the CSPs (Ex. , the mushroom behind mario in a CSP)
I know some of these textures have guides around the forums, but you said:



Do you plan on adding guides to these lesser known / lesser valued textures?
They shouldn't need individual guides, since the process of inserting them is the same for all. And they should be able to be found using this guide (step 2). But I agree it would be a lot better if more of them were already found, so less common textures wouldn't have to be searched for as the guide says. As more are found and/or organized into download packs (like the recently uploaded stock icons), I'll include more links to them in the guide under step 1.

CeLL and I are both working on ways to make finding and replacing textures much easier. Also, if there are specific parts of the guide that are confusing or that you're stuck on, post your specific problem and maybe we can help and/or I can try to make the guide clearer.
 
Last edited:

CaptainJazz

Smash Cadet
Joined
Oct 1, 2014
Messages
42
Location
Mute City
I really really appreciate your work, mate. Once my modded version is up for grabs, ill be praising both of your names, as well as all of the people who are constantly helping me get on my feet with this stuff. I have 0 programming experience, so I appreciate your support, effort and patience.
 

BSeeD

Smash Journeyman
Joined
Mar 10, 2007
Messages
281
I wish you were 100% true to your title.

There are SOOO many textures I wish I could find and replace on the Melee.iso:
  • Title Screen
  • Stage Select Screen
  • Menu Screen
  • Stock Icons
  • The Emblems behind the CSPs (Ex. , the mushroom behind mario in a CSP)
I know some of these textures have guides around the forums, but you said:



Do you plan on adding guides to these lesser known / lesser valued textures?
I came here to talk about the Title Screen XD
So, I found almost every Title Screen image by dumping the textures in Dolphin and using the Melee Files doc ;)

Most of them are in GmTtAll.usd (or .dat for Japan)

I used the 20XX iso, caught the "20xx" image on the title screen


(it's a _0 image, so supposedly grayscale)

I had a friend modify it


(as you can see, transparency is still there, and it's grayscale)

I then modified the .usd with DAT Texture Wizard using the offset I found by ctrl+f the image file starting at 0x40 (I used the exact offset where I found the hex values in the .usd), replaced it in the 20XX iso with GC Rebuilder and started it on Dolphin, here's what I got :
The image I extracted, tracked in the hex editor and my modified image have the exact same size.

Can someone help me here ? I'm pretty sure I missed a basic step but I can't get a grip on it...

I turned my modified image into a TPL using your PNG to TPL stuff, then turned the tpl back into a png, it gave me this :



Don't know if it's relevant in any way, but just in case :p
 
Last edited:

Doq

Smash Lord
Joined
Dec 28, 2012
Messages
1,037
Location
The Lab, Sweet Home, OR
I came here to talk about the Title Screen XD
So, I found almost every Title Screen image by dumping the textures in Dolphin and using the Melee Files doc ;)

Most of them are in GmTtAll.usd (or .dat for Japan)

I used the 20XX iso, caught the "20xx" image on the title screen


(it's a _0 image, so supposedly grayscale)

I had a friend modify it


(as you can see, transparency is still there, and it's grayscale)

I then modified the .usd with DAT Texture Wizard using the offset I found by ctrl+f the image file starting at 0x40 (I used the exact offset where I found the hex values in the .usd), replaced it in the 20XX iso with GC Rebuilder and started it on Dolphin, here's what I got :


The image I extracted, tracked in the hex editor and my modified image have the exact same size.

Can someone help me here ? I'm pretty sure I missed a basic step but I can't get a grip on it...

I turned my modified image into a TPL using your PNG to TPL stuff, then turned the tpl back into a png, it gave me this :



Don't know if it's relevant in any way, but just in case :p
In I4 (or I8? let's just call it _0) format, transparency and black do the opposite ingame.
 

Anutim

Smash Apprentice
Joined
Oct 22, 2013
Messages
185
I came here to talk about the Title Screen XD
So, I found almost every Title Screen image by dumping the textures in Dolphin and using the Melee Files doc ;)

Most of them are in GmTtAll.usd (or .dat for Japan)

I used the 20XX iso, caught the "20xx" image on the title screen


(it's a _0 image, so supposedly grayscale)

I had a friend modify it


(as you can see, transparency is still there, and it's grayscale)

I then modified the .usd with DAT Texture Wizard using the offset I found by ctrl+f the image file starting at 0x40 (I used the exact offset where I found the hex values in the .usd), replaced it in the 20XX iso with GC Rebuilder and started it on Dolphin, here's what I got :


The image I extracted, tracked in the hex editor and my modified image have the exact same size.

Can someone help me here ? I'm pretty sure I missed a basic step but I can't get a grip on it...

I turned my modified image into a TPL using your PNG to TPL stuff, then turned the tpl back into a png, it gave me this :



Don't know if it's relevant in any way, but just in case :p
Dolphin dumps this file as well as several other Menu images with a transparent BG while it's actually supposed to be a black BG. PNG-to-TPL.bat seems to get confused because of this and makes most of the "unused" space white (because of white being the lowest value (00) in hex, I guess?). I'm not very technical about this stuff, so I'm gonna stop making theories. :p

Simple fix: Add a black BG to your PNG before making it into a .tpl/inserting it into your .dat via DTW.
 
Last edited:

FruitNukes

Smash Rookie
Joined
Nov 8, 2014
Messages
12
Awesome guide, it really helped me get some ideas out of my head and into some new costumes. Very straightforward and fairly simple to understand. :)
 

bilf

Smash Rookie
Joined
Feb 3, 2014
Messages
9
Location
UUUURrrrvine
how do I find the offset for a texture that I dumped from dolphin?
im modifying textures for yoshis story so i know Im supposed to use grst.dat
but i dont have any way of finding the offset
I have melee toolikit
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
how do I find the offset for a texture that I dumped from dolphin?
im modifying textures for yoshis story so i know Im supposed to use grst.dat
but i dont have any way of finding the offset
I have melee toolikit
DRGN gives the download link to Steelia's stage files on the main post. Every stage texture has the offset mapped in a "placements" text file within those downloads.
 

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
Hey, I was wondering if I could get some help with this cos it's been driving me up the wall (I hope this is the right place to ask).

I'm using an older method of hacking as I need to edit a .ukd file, not a .usd

I'm trying to edit the Stage Select portrait textures, which are _9 textures with no transparency.



The problem is, after I save the image with Photoshop CS6 as Indexed, .tga, the Alpha channel isn't saved. I've tried tons of alternatives, but after I open the .tga file afterwards, it's channels ALWAYS look like this:


No pure white alpha channel

The only way I can get the Alpha to save is if I don't index the Targa before I save it. But then the converter throws an error that the palette is missing.

Has anyone had this problem before?
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
Hey, I was wondering if I could get some help with this cos it's been driving me up the wall (I hope this is the right place to ask).

I'm using an older method of hacking as I need to edit a .ukd file, not a .usd

I'm trying to edit the Stage Select portrait textures, which are _9 textures with no transparency.



The problem is, after I save the image with Photoshop CS6 as Indexed, .tga, the Alpha channel isn't saved. I've tried tons of alternatives, but after I open the .tga file afterwards, it's channels ALWAYS look like this:


No pure white alpha channel

The only way I can get the Alpha to save is if I don't index the Targa before I save it. But then the converter throws an error that the palette is missing.

Has anyone had this problem before?
You can use DTW for ukd's. It just doesn't have them in the filetypes list. So you have to open DTW, then select DAT, then start typing the filename of your ukd, and it should appear in the drop down menu. Click that and click okay.

I can't help you with CS6 but you can convert the PNG to a CI8 with BrawlBox and it does a really good job indexing imo.
 
Last edited:

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia


I tried it. Very convenient... but no palette despite Brawl Box saying it has one.
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington


I tried it. Very convenient... but no palette despite Brawl Box saying it has one.
Oh no, grab a TPL and open it with BrawlBox, then replace the texture in the TPL with yours (just right click on it and hit replace). Idk why BrawlBox doesn't have an option to make a new TPL. The encoding for the SSS icons is CI8 with RGB565 palette.
 
Last edited:

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
It worked! Thank you so much! I've spend days on this.

Just so you know, if you give a PNG to DTW, it will create a palette for it before putting into the dat (or ukd). Though I'm guessing you might be trying to do this because of the warning it gives about better image quality. In that case, you can also create a palette for an image very easily in GIMP, like this:

1. Open the image in GIMP
2. In the menubar, go to Image -> Mode -> Indexed
3. Select "Generate optimum palette" and tell it how many colors to give the image
4. Click "Convert". And that's it, you're done. Go to File -> Export to save it as different image types

GIMP calls palettes "colormaps". You can add a tab or window to one of the dockable dialog boxes/toolboxes if you often want to be able to easily look at or edit image palette (I don't think they're included in the windows by default). To add it, in the menubar go to Windows -> Dockable Dialogs -> Colormaps.


Also, a big thing I want to point out is that you can use the PNG to-from TPL.bat script for these icons too. You might have tried it, but it didn't work. That's because there's an option you need to change in the script. Open it in a text editor and look near the top of the file for a option called "sourceHasTransparency", and change it to no. This is necessary because there's no reasonable way for the batch file to read and determine whether the source has transparency. There's no reason I can think of to need the old, slow TexConv. :p With the PNG to-from TPL converter installed in your context menu, it's as easy as right-clicking the PNG file(s) you want to convert (it can do multiple at once), then "Send to" the converter, and it will give you a TPL for each file.
Contextmenuexample_zpsc22627f4.png

And it works both ways of course, so you can give it TPLs and it will give you back PNGs. The same rules apply for palettes as with DTW. Meaning you can give it PNGs both with or without palettes, but in the end you'll have a better quality image in some cases if your PNGs had palettes already, i.e. from within your image editor of choice.
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
Just so you know, if you give a PNG to DTW, it will create a palette for it before putting into the dat (or ukd). Though I'm guessing you might be trying to do this because of the warning it gives about better image quality. In that case, you can also create a palette for an image very easily in GIMP, like this:

1. Open the image in GIMP
2. In the menubar, go to Image -> Mode -> Indexed
3. Select "Generate optimum palette" and tell it how many colors to give the image
4. Click "Convert". And that's it, you're done. Go to File -> Export to save it as different image types

GIMP calls palettes "colormaps". You can add a tab or window to one of the dockable dialog boxes/toolboxes if you often want to be able to easily look at or edit image palette (I don't think they're included in the windows by default). To add it, in the menubar go to Windows -> Dockable Dialogs -> Colormaps.


Also, a big thing I want to point out is that you can use the PNG to-from TPL.bat script for these icons too. You might have tried it, but it didn't work. That's because there's an option you need to change in the script. Open it in a text editor and look near the top of the file for a option called "sourceHasTransparency", and change it to no. This is necessary because there's no reasonable way for the batch file to read and determine whether the source has transparency. There's no reason I can think of to need the old, slow TexConv. :p With the PNG to-from TPL converter installed in your context menu, it's as easy as right-clicking the PNG file(s) you want to convert (it can do multiple at once), then "Send to" the converter, and it will give you a TPL for each file.
View attachment 45128

And it works both ways of course, so you can give it TPLs and it will give you back PNGs. The same rules apply for palettes as with DTW. Meaning you can give it PNGs both with or without palettes, but in the end you'll have a better quality image in some cases if your PNGs had palettes already, i.e. from within your image editor of choice.
I've tried a couple of images with BrawlBox and Wimgt and I've found I like BrawlBox's algorithm for indexing better. Maybe it's just in my head though. Of course it wouldn't matter if I wasn't too lazy to index them my self lol
 
Last edited:

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
I've tried a couple of images with BrawlBox and Wimgt and I've found I like BrawlBox's algorithm for indexing better. Maybe it's just in my head though. Of course it wouldn't matter if I wasn't too lazy to index them my self lol
Nah, I don't think it's in your head. Cases where there isn't a whole lot of color variation (like a CSP of Pikachu for example, being pretty much all one color) seem to come out fine, but I've seen cases with more colors/details where wimgt isn't too great at it too. I haven't tried BrawlBox for indexing since I have GIMP, but it sounds interesting.

Maybe we can find the functions or plug-ins it uses. If you want to try adapting their indexing algorithms to work in python, I'll could work on including it in DTW3. Hm, now that I think about it, I wonder if PIL can index.
 

SLUGS

Smash Apprentice
Joined
Jun 29, 2014
Messages
81
Location
Texas
Every time I've used DTW , it never comes out with the right color.. it's always some odd color. Idk what I'm doing wrong.. I'm pretty sure I'm using the right offsets and image types and indexing everything right.. Yet Kirby's blink STILL won't work (has been giving me fits for awhile) and nothing I've tried for dreamland will work either.
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
Can this work for people who have 20XX on their wii? if so how do we do it?
Which one?

20XX Training Hack Pack: Yes. See guide in OP (and/or be more specific with what your stuck on).

20XXTE: No. It works off of a memory card using Gecko codes, and can't [reasonably] do image/file replacements.
there is no fountain of dreams code listed???
Huh?

Every time I've used DTW , it never comes out with the right color.. it's always some odd color. Idk what I'm doing wrong.. I'm pretty sure I'm using the right offsets and image types and indexing everything right.. Yet Kirby's blink STILL won't work (has been giving me fits for awhile) and nothing I've tried for dreamland will work either.
Kirby's blinking is probably a completely different texture than when he's not blinking. Not everything shows up in the Melee Toolkit. You might have to wait for DTW3 if the texture/offset isn't in Kirby's download or placement file.
 

SillyGoose

Master of QWOP
Joined
Nov 4, 2012
Messages
145
Location
Walnut Creek, CA / Chicago
I've been trying to load certain costumes onto MeleeToolkit, but I've been getting the message "Index was outside the bounds of the array" - specifically for peach and zelda skins. Anyone know if there's a way to fix this or a workaround?
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
I've been trying to load certain costumes onto MeleeToolkit, but I've been getting the message "Index was outside the bounds of the array" - specifically for peach and zelda skins. Anyone know if there's a way to fix this or a workaround?
You could dump all the images from the skin with Dolphin, load up a vanilla Peach/Zelda skin in Melee Toolkit, then import each of the dumped textures individually to create a new alt. costume file.
 

SLUGS

Smash Apprentice
Joined
Jun 29, 2014
Messages
81
Location
Texas
Which one?

20XX Training Hack Pack: Yes. See guide in OP (and/or be more specific with what your stuck on).

20XXTE: No. It works off of a memory card using Gecko codes, and can't [reasonably] do image/file replacements.

Huh?


Kirby's blinking is probably a completely different texture than when he's not blinking. Not everything shows up in the Melee Toolkit. You might have to wait for DTW3 if the texture/offset isn't in Kirby's download or placement file.
Got it.. So do you know what it means when you have steelia's placement files and it has a (2) by the offset? 2 lines?
 

IAmProPAGANda

Smash Cadet
Joined
Feb 28, 2014
Messages
31
Location
Maryland
Was wondering if anyone had any insight to the bar behind the tags the users enter? It doesn't seem to be a texture but an object that appears when users have a tag. I'm hoping to either extend it or remove it all together. The short bars become very noticeable when using the 8 letter mod


Can't figure out how to post a damn picture so here's a link to what I'm talking about
http://imgur.com/PqiKGxT
 
Last edited:

SillyGoose

Master of QWOP
Joined
Nov 4, 2012
Messages
145
Location
Walnut Creek, CA / Chicago
I'm attempting to edit a skin using DAT Texture Wizard for the first time - I tried to replace Crown Jiggs Half-Closed Eyes and Closed Eyes textures with appropriate ones by following the guide as best I could and using Steelia's offsets

These are the textures I used, dumped from Dolphin:



This was the result:
GALE01-4.png


What obvious mistake did I make?

Thanks for the help, I'm having a lot of fun with this stuff anyway
 

Attachments

Last edited:
Top Bottom