Guide - How to Hack Any Texture (2022)

Guide - How to Hack Any Texture (1)


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:

Guide - How to Hack Any Texture (2)

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

(Video) Texture Hacking Guide for Brawl

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)]

Guide - How to Hack Any Texture (3)

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

Guide - How to Hack Any Texture (4)

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

Guide - How to Hack Any Texture (5)

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

Guide - How to Hack Any Texture (6)

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

Guide - How to Hack Any Texture (7)

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

Guide - How to Hack Any Texture (8)

(Video) Seamless Texture Hack with Blockbench

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

Guide - How to Hack Any Texture (9)

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

Guide - How to Hack Any Texture (10)

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

Guide - How to Hack Any Texture (11)

Mr. Game & Watch
PlGw - All Colors

Guide - How to Hack Any Texture (12)

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

Guide - How to Hack Any Texture (13)

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

Guide - How to Hack Any Texture (14)

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

Guide - How to Hack Any Texture (15)

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

Guide - How to Hack Any Texture (16)

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

Guide - How to Hack Any Texture (17)

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

Guide - How to Hack Any Texture (18)

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

Guide - How to Hack Any Texture (19)

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

Guide - How to Hack Any Texture (20)

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

Guide - How to Hack Any Texture (21)

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

Guide - How to Hack Any Texture (22)

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

Guide - How to Hack Any Texture (23)

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

Guide - How to Hack Any Texture (24)

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

Guide - How to Hack Any Texture (25)

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

Guide - How to Hack Any Texture (26)

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

Guide - How to Hack Any Texture (27)

(Video) [UNDECTED] EFT HACK STATS 🔴 FREE EFT HACK 🔴 ESCAPE FROM TARKOV HACK

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

Guide - How to Hack Any Texture (28)

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

Guide - How to Hack Any Texture (29)

Zelda
PlZdBu - Blue
PlZdGr - Green
PlZdNr - Zelda (Default)
PlZdRe - Red
PlZdWh - Light Blue/White

[Courtesy Steelia (source)]

Code:

GrBB = Big BlueGrCn = CorneriaGrCs = Princess Peach's CastleGrEF1 = Figure?1GrEF2 = Figure?2GrEF3 = Figure?3GrFs = FoursideGrFz = Flat ZoneGrGb = Great Bay (Termina)GrGd = Garden (Jungle Japes)GrGr = Green GreensGrHe = Heal (All-Star)GrHr = Homerun ContestGrI1 = Mushroom KingdomGrI2 = Mushroom Kingdom II (Subcon)GrIm = Icicle MountainGrIz = Izumi (Fountain of Dreams)GrKg = Kongo JungleGrKr = Kraid (Brinstar Depths)GrMc = Mute CityGrNBa = BattlefieldGrNBr = F-Zero adventure mode stageGrNFg = Figure Get (Falling trophy stage)GrNKr = Mushroom Kingdom adventure mode stageGrNLa = Final DestinationGrNPo = Pushon?GrNSr = Hyrule Castle chasm (adv. mode stage)GrNZr = Zebes (Brinstar); "DANGER"?GrOk = Kongo Jungle (N64)GrOp = Dream Land (N64)GrOt = OnettGrOy = Yoshi's Story (N64)GrPs = Pokemon StadiumGrPs1 = Pokemon Stadium {Fire}?GrPs2 = Pokemon Stadium {Grass}?GrPs3 = Pokemon Stadium {Water}?GrPs4 = Pokemon Stadium {Rock}?GrPu = Pura (Poke Floats)GrRc = Rainbow CruiseGrSh = Hyrule TempleGrSt = Yoshi's StoryGrTCa = Captain Falcon Target Test (TT)GrTCl = Young Link TTGrTDk = Donkey Kong TTGrTDr = Dr. Mario TTGrTe = "TEST"GrTFc = Falco TTGrTFe = Roy TTGrTFx = Fox TTGrTGn = Ganondorf TTGrTGw = Mr. Game & Watch TTGrTIc = Ice Climbers TTGrTKb = Kirby TTGrTKp = Bowser TTGrTLg = Luigi TTGrTLk = Link TTGrTMr = Mario TTGrTMs = Marth TTGrTMt = MewtWo TTGrTNs = Ness TTGrTPc = Pichu TTGrTPe = Peach TTGrTPk = Pikachu TTGrTPr = Jigglypuff TTGrTSk = Sheik TT (scrapped)GrTSs = Samus TTGrTYs = Yoshi TTGrTZd = Zelda TTGrVe = VenomGrYt.dat - Yoshi's IslandGrZe = 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 (

Ef

fects

Co

mmon

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 <-- 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:

(Video) How to Super Smash Bros Brawl Texture Hack using 3DS Max Tutorial/Guide

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:

Guide - How to Hack Any Texture (31)

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:

Guide - How to Hack Any Texture (32)

(Video) FINALLY! A Better Way to Create This Classic Graphic Style in Photoshop

Fig.3

That's all for now. Guide - How to Hack Any Texture (33)

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!

Videos

1. How To Make a Pokemon Rom Hack GBA Part 1 ⚙ A Rom Hack Tutorial Where You Can Play As a Gym Leader
(RetroTK2)
2. Geometry Dash's WORST "Hackers"
(Lemoncak3)
3. How to... [Dissidia Texture Hack Tutorial]
(RelmsPortfolio)
4. i found the best minecraft hacked client...
(Tubbo)
5. Viewing .hack Models & Textures in StudioCCS Tutorial
(dothacknetwork)
6. i hacked onto the roblox account
(highlywanted)

You might also like

Latest Posts

Article information

Author: Roderick King

Last Updated: 08/23/2022

Views: 6134

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Roderick King

Birthday: 1997-10-09

Address: 3782 Madge Knoll, East Dudley, MA 63913

Phone: +2521695290067

Job: Customer Sales Coordinator

Hobby: Gunsmithing, Embroidery, Parkour, Kitesurfing, Rock climbing, Sand art, Beekeeping

Introduction: My name is Roderick King, I am a cute, splendid, excited, perfect, gentle, funny, vivacious person who loves writing and wants to share my knowledge and understanding with you.