TPL Hacks - CI4/CI8 (8, 9)
TEXTURE HACKS : +1 and +2 FILES
The following is a thorough take on the skipped explanation of + textures... Now you see why I was afraid to make a GUIDE. @_@
Hope this is helpful to some people. If I omitted ANYthing, or if there's something that is confusing/you still need help with... PLEASE do not hesitate to ask. I will be more than happy to help, and hopefully update my mini-guide here in the process.
Cheers!
~Continuation of file types~
More Common TYPE Textures
As already explained by GodFed, the "TYPE" of a texture depends on the last digits of the ripped file. In GodFed's examples, he used "_14.tga" as the example, where 14 is TYPE "CMPR".
Other noteworthy TYPEs are as follows:
_##.tga = TYPE
_0.tga = I4
_1.tga = I8
_2.tga = IA4
_3.tga = IA8
~The textures above are generally black-and-white files, so keep an eye out for that.~
_4.tga = RGB565
_5.tga = RGB5A3 (can normally be made transparent)
_6.tga = RGBA8
_14.tga = CMPR
_8.tga = Will be covered below.
_9.tga = Will be covered below.
NOTE: I WILL BE USING PHOTOSHOP AS THE PRIMARY TEXTURE EDITING EXAMPLE FOR THIS POST.
To briefly cover transparency, you can tell whether a texture is transparent or not by going to their "Alpha Layer". Alpha Layer can generally be located in the "Layer" tab at the bottom-right of Photoshop. You will see 5 layers - RGB, R, G, B, and Alpha. If the alpha layer is solid white, the texture normally cannot be made transparent (unless it is a _5.tga texture). If, however, the texture has black in the white, that means transparency!
Textures With Palettes
No need to fret; don't let the word "palette" scare you. It only means the texture's slightly unusual when compared to the other textures.
There are only 2 types of palette textures to look out for:
_8.tga
_9.tga
If your character/stage has either one of those... get ready for some fun.
WARNING!! To point out, do NOT edit _8 and _9 textures until you know how big their Index are! Will be covered shortly. Just don't touch them yet if you're new to this!
For starters, you will still have to create a .TCS file for the texture. However, it uses a slightly different format than the previous:
file 0 = [full location of .tga]
image 0 = 0, x, TYPE
palette 0 = 0, type2
texture 0 = 0, 0
Note how it has an extra line, "palette", required to make an appropriate conversion.
Here is the key to filling in the TYPE and type2:
_#.tga = TYPE / type2
_8.tga = CI4 / RGB565 OR RGB5A3
_9.tga = CI8 / RGB565 OR RGB5A3
For both _8 and _9, "type2" depends on the Alpha Layer of the texture you want to make the .TCS file for.
So, do a quick check in Photoshop!
Check the Alpha layer of the texture. If it has no transparency (completely white box), then the type2 is "RGB565".
However, if there IS transparency (white box, with some black), then the type2 is "RGB5A3".
Without Transparency
If the texture has NO TRANSPARENCY (meaning, the alpha is a solid white color), then all you have to do is Index the texture. To do this in Photoshop?
Uppermost toolbar -> Image -> Mode -> Indexed Color...
A small window should open. Make sure the box meets the following requirements:
Palette: [Exact] OR [Local (Perceptual)] options chosen
Colors: [Set number] if Exact; enter [256] if Local (Perceptual)
Forced: [None]
Transparency box is UNCHECKED.
Options~
Matte: [None]
Dither: [None]
Amount: [None]%
Preserve Exact Colors box is UNCHECKED.
NOTE: All we're messing with here is the top-half of the window.
Press OK, as soon as you see your texture meets the requirements.
Now Save the texture (it will likely ask you to save a "copy" of the texture, so simply choose .TGA format and replace the texture you were working on), and your texture has now been Indexed! Not too bad, eh?
With Transparency
If the texture HAS TRANSPARENCY (meaning, the alpha layer is a white color with some black), then you have to go a slightly longer route.
First, go to the Alpha Layer of the file.
Second, select the black parts of the file with a Selection tool (whatever you prefer).
Third, click the "RGB" layer so that you return to the normal texture and off the Alpha Layer. You should see the parts you selected from the Alpha Layer visible on the texture.
Now... it's time to Index! However, compared to the format above, you have to do things a little differently...
Uppermost toolbar -> Image -> Mode -> Indexed Color...
A small window should open. Make sure the box meets the following requirements:
Palette: [Exact] OR [Local (Perceptual)] options chosen
Colors: [Set number BELOW 256] if Exact; enter [255] if Local (Perceptual), or if Exact is bigger than 256
Forced: [None]
Transparency box is UNCHECKED.
Options~
Matte: [None]
Dither: [None]
Amount: [None]%
Preserve Exact Colors box is UNCHECKED.
NOTE: All we're messing with here is the top-half of the window.
Press OK, as soon as you see your texture meets the requirements.
If you've messed with non-transparent textures, you may notice that you need only Colors: 255 instead of Colors: 256. This will be explained.
With the texture still having the parts selected, head:
Uppermost toolbar -> Image -> Mode -> Color Table
You should now see a new window with a bunch of small squares, each containing the individual colors of the texture.
IF YOUR TEXTURE WAS
EXACT COLORS BELOW 256 COLORS, simply click in one of the uncolored/dotted squares, and enter
ff00ff
as the # value.
NOTE: Alternatively, you can enter
R: 255
G: 0
B: 255
in the respective places, if you prefer that.
IF YOUR TEXTURE HAD TO BE
EDITED WITH Local (Perceptual) AND IS 255 COLORS, simply click the very last unfilled/dotted box in the window (the bottom-most-right box), and fill it with either
#: ff00ff
or R: 255 G: 0 B: 255 as sampled above.
The "ff00ff" value is a MAGENTA color. It will be needed for transparency, at least in this guide. (It could be any other color if you like, but it's the easiest example as there aren't too many characters with magenta colorations.)
Once you've filled in the box in the Color Table, click OK.
Now, if it isn't already selected, make ff00ff one of your colors to color with (the two color boxes at the bottom-left of Photoshop)... and, simply color inside the selected areas in the texture with the magenta coloration. Note how the magenta'd parts are coloring in the spaces of the textures that WOULD have been transparent.
Now, you can Save the file... and it's time for conversion!
From TCS to TPL
If you haven't already, you can create the TCS file with the requirements at the top of this post.
It is HIGHLY RECOMMENDED that you have made TCS files for all the other textures of your character/stage/edit of choice, as you need to find out where everything else other than _8 and _9 textures go.
Once your TCS file has been converted to TPL, it's time to see just WHERE your texture goes.
Open up your .DAT file with the Hex Editor of your choice (I go with Hex Editor Neo), and seek the spot where the texture may go (if you have written down the locations of where the files are placed, this should be much easier).
Once you have found the spot, open your newly-converted palette TPL file. GO TO LINE 00000260 AND COPY THE DATA FROM THAT LINE DOWN FIRST. Then paste that data into the DAT file, where it would go.
32 Lines
Followed shortly after the pasted data in the DAT file should be some extra lines. Count how many lines there are before they hit the next texture in the file. There should be a MAXIMUM of 34 lines.
32 of those lines are the "color" (palette) lines; the last 2 lines are skipped and are left as space between textures/other palette lines.
*Please be wary that if you are editing multiple _8 and _9 textures in a row, that the main texture data may be back-to-back just like the regular files (CMPR, etc.), but after the textures have ended will appear the 32 lines, each 32 lined palette being separated by 2 lines.
If you are unsure... Experiment!*
For non-transparent
Once you reach the palette lines in the DAT file, head back to your TPL file and Deselect the selection you had earlier. Now head to the very top of the file. Starting from the top, SKIP 2 LINES, then start copying down until you have selected 32 lines of data. Copy those 32 lines, head back to the DAT file, paste them just below the texture, and bam! You've done non-transparent.
For transparent
Once you reach the palette lines in the DAT file, head back to your TPL file and Deselect the selection you had earlier. Now head to the very top of the file. Now you must search for the following value in your texture (should ONLY appear once, and in the 32 lines):
FC 1F
This value is the magenta coloring from earlier! You need to get rid of it. And to do that, simply replace the value with "00 00", Save, and... it's gone!
Now, starting from the top, SKIP 2 LINES, then start selecting downwards until you have selected 32 lines of data. Copy those 32 lines, head back to the DAT file, paste them just below the texture, and bam! You've done transparent textures.
NOTE: These methods and the mentioned can be used for edited textures, too, not just to find where the placements of textures are.
Less Than 32 Lines ( _8 )
A lot of palette textures have 32 lines. But, in some cases, the DAT file will have LESS lines than normal.
In this instance, it's not too big of a problem. If the texture is _8, it's pretty smooth sailing.
Count how many lines the DAT file has. (I'll use 10 lines as an example.)
So the DAT file has 10 lines... but the texture you have, may have 32 lines! So what do you do? You simply need to drop the quality of the texture -- that's it!
To know the EXACT/maximum number of colors you can have:
32 - 10 = 22
22 * 8 = 176
256 - 176 = 80
Bam. You can have up to 80 colors MAX in your texture.
~To find out how many colors your texture has, just replace the 10 from the problem above with whatever number of lines the DAT file has (ALWAYS even numbers, like 2, 4, 22, 30, etc.), multiply by 8, and subtract that number from 256 to get your max colors.
Once you've found the max colors/dropped the quality of your texture, simply do the same process as above, but THIS time ONLY copy the same number of lines as the DAT file has, instead of copying 32 lines. (Takes a little diligence on your part to find where the lines may start, if they're all periods.)
And with that... _8 textures are through!!
Less than 32 Lines ( _9 )
A lot of palette textures have 32 lines. But, in some cases, the DAT file will have LESS lines than normal. This, is not so much harder... Just longer, and a tad more annoying. Hope you like math!
Count how many lines the DAT file has. (I'll use 20 lines as an example this time.)
So the DAT file has 20 lines... but the texture you have, may have 32 lines! So what do you do? You must not only drop the quality of the texture... but you must also SUBTRACT a value FROM the texture as well.
But, let's start it off. Using the example above to find out the max colors of your texture:
32 - 20 = 12
12 * 8 = 96
256 - 96 = 160
Bam. Max number of colors is 160. BUT, this time you will NEED some of the numbers from this equation... so keep it in mind!
Having found the max colors/dropped the quality of your texture, you must now open the TPL file in a Hex Editor (I'd HIGHLY recommend Hex Workshop as your subtractor, with Hex Editor Neo being your inserter program).
Once you've opened up the file [in Hex Workshop], find line 00000260 and select ALL the data from there down.
*IF THIS IS YOUR FIRST TIME USING HEX WORKSHOP... YOU MAY NEED TO ADJUST THE NUMBER OF COLUMNS. Simply drag the columns at the top of the screen to the left via the small separation line-boxes, so that they "fuse", and then shrink the values of the left-most numbers on the screen by dragging the vertical separation bar to the left. The numbers will change, until you get numbers ending in nothing but "0". That is what you want.*
Once you've selected the entire file from x260 down, head to
Uppermost toolbar -> Tools -> Operations -> Subtract...
A box, "Subtract Operation", should open. And make sure it looks something like this:
Description: Blahblahblah
Operand~
Treat Data As: [8 bit Unsigned Byte]
Byte Ordering: [Little Endian (e.g. Intel)]
Value:
[X]Decimal [ ]Hex
Apply On~
[X]Selection [ ]Entire File
The "Decimal" and "Selection" buttons should be pressed.
Once they are, you must now enter the value...
But, what do you enter?
That's where your equation from earlier comes in handy!
To find what the VALUE is, you must follow the first two steps of the equation - subtracting 32 from the # of palette lines, and multiplying that resulting number by 8. As I was following a 20 palette line example:
32 - 20 = 12
12 * 8 = 96
While 160 colors was the MAX colors... the VALUE is 96. So as noted in this example, in the VALUE, you insert "96"... and press OK.
The values of the selected data should change, sometimes drastically.
Then Save. (The program will ask if you would like to create a .BAK back-up file; say YES if you want to.)
Now your texture has adjusted to the newer, smaller palette size.
Now simply copy-paste the x260 data into the DAT file, and copy the same number of lines as the DAT file has in your TPL file, instead of copying 32 lines. (Takes a little diligence on your part to find where the lines may start, if they're all periods.)
And with that... _9 textures are through!!
Congrats! You've conquered the + textures of Melee.