Lanceinthepants
Smash Lord
Guide to Changing Color Effects in Melee!
Hey everybody! For a long time, changing the colors of different effects has been knowledge sought after by a lot of people. Many people probably cracked the formats far earlier then I (nube and matoooya) and I had some direct help (Mr. H) and some indirect help (Steelia, Zyx, many many others), so I decided to create a comprehensive guide about everything I have found. The guide may look long-winded, especially for experienced melee hackers, but I am prioritizing user friendliness. I want everyone to be able to create a melee ISO with changes very specific to them.
Programs Needed:
1. Hex Editor (I use HxD)
2. GCTool/GCRebuilder (to import/export dat files)
3. Dolphin (to look at your altered ISO)
Knowledge Needed:
1. Basic use of the programs above
2. RR BB GG color format
All the programs and the knowledge needed above can be found in Melee, Hacks, and You!: http://www.smashboards.com/showpost.php?p=8256444&postcount=1
Also you can play around with RR BB GG color format here (use the color wheel at the bottom): http://www.2createawebsite.com/build/hex-colors.html
Helpful Knowledge:
1. Decimal to Hexadecimal conversion
2. Familiarity with dat files
Important Notes:
1. At the end of the guide I have a list of offsets for a number of color effects in the game. This list is nowhere near complete and I encourage others to use this knowledge to find these offsets for the rest of the community!
2. Not every "special effect" is covered by these formats. Some effects are _8 or _9 textures, or some could be in a different format. If there is something specific you want to change, don't give up! Feel free to post in this thread of PM me for help!
3. If you do end up searching for different offsets, remember just because you found a 07 07 07, 98 00 ## ##, or 42 48 in the dat file does not mean it is always fits these formats. Make sure it fits the formats outlined in the guide before changing values!
4. This guide is not all encompassing. There may be other color formats out there I am not aware of. Anyone with additional information, I encourage you to post it.
Introduction:
There are 4 formats to changing color effects in Melee that I have found. The 07 07 07 format, the 98 ## ## ## format, the 42 48 format, and the CF ## format. I will also outline a section with the random offsets me and others have found that also change color.
1. 07 07 07 format
Step one: Understanding the format!
I feel this is probably the easiest format so I will start with it first. You will find this format in your specific dat file starting with the hex code 07 07 07 (hence the name) and after it will follow a specific pattern (pictured below).
Figure 1 - Breakdown of 07 07 07 format
Format Header - This corresponds to the values 07 07 07 in this format. These are the values you should search for in your dat file when looking for specific offsets.
Transparency Control - This value controls the transparency of your effect. I have found changing this value either will crash your game or make the effect disappear completely, so I always leave it alone.
Color 1 - This color controls the first color of the effect. RR GG BB format
Color 2 - This color controls the second color of the effect. RR GG BB format
Step two: Changing the colors!
Now that you know the boring stuff, let's change some colors. I will do a step by step 070707 color change on Pikachu's Down B lightning!
I decided I want color 1 to be Magenta (FF 00 FF) and color 2 Black (00 00 00). So first I will open PlPk.dat in my hex editor and go to the offset C354 (locations of color offsets and files can be found at the end of the guide). This offset is the one picture above. I find that originally Color 1 is FF FF FF (White) and Color 2 is FF FF 00 (Yellow). Looking at Dolphin I see that the colors correspond to the figure below.
Figure 2 - Color breakdown of Pikachu's down B
So I insert the two colors I want into their corresponding places. FF 00 FF will replace FF FF FF and 00 00 00 will replace FF FF 00. I saved my dat file and using GCTool/GCR, I import my PlPk.dat file into the proper place. I start up Dolphin and below is the result.
Figure 3 - Altered Pikachu down B
That is all you need to understand the 07 07 07 format, let's keep moving!
2. 98 00 ## ## format ("Matrix" format)
Step one: Understanding the format!
IMPORTANT NOTE (PLEASE READ):
There are many other things in the dat file that use the 98 index to mark the head of a grouping of code. When searching for 98 format that corresponds to color, be confident that the data you are changing is color code and not some other type of code. Repeated values will be the tell tale sign, but most of the 98 indexes will not control color!
This format is definitely more tricky than the 07 07 07 format, because it can come in 2 different variations and it doesn't use the common RRGGBB color code. This format will always start with 98 and then the next 3 bytes (6 values) will vary. This information isn't too important to change the color so when searching for these "matrices" in the search for "98 00". After these first 4 bytes is where you will be able to format the color. This color code contains 2 bytes and is much different from RRGGBB. In this guide I will be referring to this 2 byte color code as RG BY (values listed below). Remember how I said there was 2 variations? The bytes in between the first color (byte 5) and the second color will be either 2 or 3 bytes. These matrices correspond to 2D and 3D objects in the game, so the number of bytes in between each color represent the vertices (or the face) that this object has. 2D objects have 2 bytes between each color (X and Y vertices) and 3D have 3 (X, Y, and Z vertices). This is important to remember, because this information can be helpful when looking for untexturable 2D or 3D objects in the dat file. Both formats are shown below.
Figure 4 - Matrix with 3 vertices in between each color
Figure 5 - Matrix with 2 vertices in between each color
Primitive Flag ("Matrix Index") - This indicates the start of the matrix. Use this number to search for matrices in your dat file and use it for finding the relative locations of your color format.
Index Count - This will show you how many indexes (number of faces and number of colors) that will be in the matrix. Since we aren't too worried about faces we can use this number to tell us how many colors we can edit. According to Figure 4 there will be 25 indexes, but this number is in hexadecimal so converting it to decimal yields 37 color indexes, which is indeed correct.
Color - This corresponds to the individual color of each face. It can be hard to tell what changes what, especially on larger matrices, so I would advise solid color changes across the board. Below is a nice breakdown of how the shine matrix works. Colors are in the RGBY format.
Figure 6- Breakdown of shine matrix, showing face and corresponding color values (Thanks to Unlucky XIII)
Step two: Changing the colors
Changing the colors of a matrix is quite similar to the 07 07 07 format, except that there are many more colors to change. I definitely encourage experimentation with what colors change what faces, which can create some awesome effects (Like the rainbow shine in Figure 6).
RG BY Value List
Thanks to Mr. H for the list!FC 00 = Red
FC 1F = Magenta
0F F0 = Green
00 10 = Black
FF FF = White
00 FF = Blue
0F 0F = Turquoise
99 F0 = Light Brown
B1 00 = Redish Orange
FC FF = Light Purple
5D 88 = Grey
BF 00 = Dim Yellow
C8 F5 = Dark Pink
D2 3B = Pink
BB B1 = Yellow
4C 22 = Maroon
A5 0F = Purple
0A 60 = Dark Green
Also, check out SypherPhoenix's guide to creating your own 16bit colors - http://www.smashboards.com/showpost.php?p=14871954&postcount=114
3. 42 48 format
Step one: Understanding the format!
The 42 48 format is also more tricky then the 070707 format and is not quite straightforward as the "matrix" format. Like the 070707 format though, it uses RR GG BB color format and they are quite easy to find. 42 48 will always be directly after the values being changed, unlike the other 2 formats. It will follow the pattern seen below.
Figure 7- Breakdown of 42 48 format
Color 1 - This color controls part of effect being changed. It is based off of the colors in Color 2 (more info below). Follows RR GG BB format
Color 2 - This color controls part of the effect being changed. Controls the colors that can be used by Color 1. Follows RR GG BB format
Transparency Control - These 8 values control the transparency for the effect. Changing these values, may create some interesting effects, but may also cause game crashes or the effect to disappear. I usually leave these values alone.
This format is a little bit trickier because the second color's RR GG BB values constrain what can be used in the first color. If the 2nd color is FF FF FF (white) then this allows the first color to be anything within range of colors, which is every color in the RR GG BB spectrum. If the 2nd color was 00 00 FF (blue) and the 1st color was set to FF 00 00 (red) the first color would show up black (00 00 00), because the RR part of the 2nd color was set to 00. This means that the color you choose for Color 2 has a big impact on the colors that can be used for the effect. If you want the effect to be a solid color, then change both Color 1 and Color 2 to the same values.
Step two: Changing the color!
Here is the process applied to the Ice Climber's Up B Rope.
I found the offset for Up B in PlPp.dat at offset E84C. I found Color 1 is the back of the rope and Color 2 is the front of the rope. I want to change the rope to green and black. I realize for part of the rope to be Black, then that must be Color 1, and green must be Color 2. Changing Color 1 to black (00 00 00) and Color 2 to green (00 FF 00) I get the result showed below.
Figure 8 - Color Changed Ice Climber Rope.
4. CF ## Format
Step one: Understanding the format!
This format is very similar to the 07 07 07 format and is quite simple to understand. This format is found at the very beginning of effect dat files. It has two types of formats though, one in which it has 1 RRGGBB color or 2 RRGGBB colors. Both formats are described below. You will know the difference between the 2 formats by the values in the middle. The format with 2 colors will have 4 bytes between the two colors. The 2 bytes before the Color 2 will be "DF ##" with "##" being the same value as the byte after "CF".
Figure 9 - Breakdown of CF format with 1 Color
Format Header - This corresponds to the values CF ##. The ## varies between a number values, most commonly 00. Use these values to search for these offsets.
Color - This color controls the color of the effect. RR GG BB format.
Figure 10 - Breakdown of CF format with 2 Colors
Format Header - This corresponds to the values CF ##. The ## varies between a number values, most commonly 00. Use these values to search for these offsets.
Color 1 - This color controls the first color of the effect. RR GG BB format.
Color 2 - This color controls the first color of the effect. RR GG BB format. The 2 bytes before the Color 2 will be "DF ##" with "##" being the same value as the byte after "CF".
Step two: Changing the color
Here is the process applied to Pikachu's Aerial Neutral B.
I found the middle of Pikachu's Neutral B was found at 166 of EfPkData.dat. I changed Color 1 to Black (00 00 00) and Color 2 to Red (FF 00 00). I get the result below.
Figure 11 - Color Changed Pikachu's Aerial Neutral B
5. Random Offsets (Sword Swing and Game and Watch Color)
These are the offsets that are very specific to certain files, instead of being a universal format across the dat files. While changing the color of the Sword Swing (or Sword Trail) does follow a format, it only applies for a very small subsection of characters/items (only Marth, Roy, Link, Young Link, and Beam Swords). I don't think Game and Watch's colors follow any format you will see for any other character.
Sword Swing
The offset for character's sword swing follows a specific format that starts with FF 00. Zyx outlined this format in Marth's dat file.
Figure 12 - Format to changing a character's sword swing (thanks to Zyx!)
Color 1 - Controls the color of the major part of the sword swing. RR GG BB format.
Color 2 - Controls the color of the minor part of the sword swing. RR GG BB format.
Figure 13 - Color breakdown of Marth's Sword Swing
Game and Watch Color
Game and Watch cannot be textured hacked, and thanks to Steelia's findings his different colors can be controlled with the RR BB GG format in the his dat file (PlGw.dat) at the offset 379C. This is pictured below.
Figure 14 - Color Breakdown of Game and Watch
Based on this offset, Color 1 controls his neutral color (Black), Color 2 controls his red color, Color 3 controls his blue color, and Color 4 controls his green color.
Other Important Color Changing Posts/Guides:
Cosmetic Hitbox Element Guide by Lanceinthepants - http://www.smashboards.com/showpost.php?p=13605606&postcount=14
Charging Smash Attacks Effects Guide by Lanceinthepants - http://www.smashboards.com/showpost.php?p=13616960&postcount=23
Formatting of RGBY Colors by SypherPhoenix - http://www.smashboards.com/showpost.php?p=14871954&postcount=114
Structure of Texture and Material Color Data Structure by Revel8n - http://smashboards.com/threads/melee-dat-format.292603/
Texture Hacking Effects by DRGN - http://smashboards.com/threads/hacking-effects.369294/
Helpful Tools
MasterHand: http://www.smashboards.com/showthread.php?t=313930
DRGN's Texture Hacking Tools: http://smashboards.com/threads/new-tools-for-texture-hacking.373777/
Final Comments:
Shoutouts to all the people who are still doing Melee hacking, there is still a ton of potential here. Any questions or feedback you have about this guide, feel free to let me know.
Last edited: