Uh... hi. Sorry to revive a dead thread, but I'm having the problem too (and I'm trying to use the old-fashioned method).
I'm trying to do Grey Shiek's eyes. I got it working on default (ignore the torso, that was me trying to brute force it):
But then when I attempt to change the other eye frames, I get the usual:
I'm doing it the copy-paste .tpl method, and I had always assumed the way it worked was:
29 - 00043a20 * - EyeL_Half
30 - 00045e20 * - EyeL-Close
31 - 00048220 * - EyeL_HURT
32 - 0004a620 * - EyeL_Left
33 - 0004ca20 * - EyeL_Right
^ And then directly after the last one, paste in the palette data (32 lines) which is used for all of the above.
No such luck. I prefer the old fashioned method for things like this, (I didn't have the best of luck with the Wizard). I recall a while back I did a Dr. Mario hack, and I'm pretty sure this is what I did and it worked? I'm sorry for asking a redundant question (I can model and stage hack, but _9 has tortured me from the very start), but I'd really appreciate it. It's for a birthday present.
np, that's what this thread is for!
For future reference, for anyone looking for eye palettes, there's discussion on how to find these earlier in this thread, starting around
here.
First of all, the palette is not shared by all of the textures; they each have their own.
Judging from the colors, I think you mean her white costume, PlSkWh. Regardless, here are all of the offsets for her White, Blue, and Neutral costumes:
# (by file order):
|
Eye state:
|
Image Data offset:
|
Palette Data offset:
1 | Open (left eye) | 0x34920 | 0x38920
2 | Open (right eye) | 0x38b40 | 0x3cb40
3 | Half-open (left eye) | 0x43a20 | 0x4ee20
4 | Closed (left eye) | 0x45e20 | 0x4f040
5 | Hurt (left eye) | 0x48220 | 0x4f260
6 | Looking Left (left eye) | 0x4a620 | 0x4f480
7 | Looking Right (left eye) | 0x4ca20 | 0x4f6a0
8 | Half-open (right eye) | 0x4f8c0 | 0x5acc0
9 | Closed (right eye) | 0x51cc0 | 0x5aee0
10 | Hurt (right eye) | 0x540c0 | 0x5b100
11 | Looking Left (right eye) | 0x564c0 | 0x5b320
12 | Looking Right (right eye) | 0x588c0 | 0x5b540
For her Green costume, subtract 0x60 from each offset.
For her Red costume, subtract 0xA0 from each offset.
All of these may have up to 256 colors.
(Odd fact: two of her eyes are at 128x128 in size, while the rest are 96x96.)
You can read about the method I used to find these by following along the discussion that I linked to above, but some more examples might still do some good, so here are some notes I took while making the above table, with some explanation added.
First, I found a few image data headers. Subtract 0x20 from these and then search for them in the dat, and you'll find that there's a place where several of them are grouped together. These are basically a table of pointers, common for eye textures. This is the hex of that header-pointer table in the dat (@ 0x43240):
00 04 31 90 00 04 31 A8 00 04 31 C0 00 04 31 D8
00 04 31 F0 00 04 32 08 00 03 CD 20 00 05 AE A0
00 05 B0 C0 00 05 B2 E0 00 05 B5 00 00 05 B7 20
00 00 00 00 00 00 00 00 00 04 31 28 00 04 32 20
00 04 32 38 00 06 00 06
I don't recall these being documented anywhere, but they're basically structured like this:
object: | length in bytes: | type of data:
image header addresses
| 0x4 x n | pointer
palette header addresses
| 0x4 x n | pointer
padding? (all 00) | 0x8 |
start of this data structure? | 0x4 | pointer
addr of first image header | 0x4 | pointer
addr of first palette header | 0x4 | pointer
# of image headers | 0x2 | int
# of palette headers | 0x2 | int
( @
Tcll
)
I don't know how much of what comes before or after this is actually part of the same structure, but I think the headers that come before it might be part of it. It's really weird, and doesn't follow the normal pattern you'd see for any other texture structures.
Anyway, when you lay out the pointers (shown below on the left) with the
respective headers that they point to (shown below on the right), in order, you get a set of 6 for the image headers, followed by a set of 6 for the palette headers:
00 04 31 90 - 00 03 8B 20 00 80 00 80 00 00 00 09
00 04 31 A8 - 00 04 F8 A0 00 60 00 60 00 00 00 09
00 04 31 C0 - 00 05 1C A0 00 60 00 60 00 00 00 09
00 04 31 D8 - 00 05 40 A0 00 60 00 60 00 00 00 09
00 04 31 F0 - 00 05 64 A0 00 60 00 60 00 00 00 09
00 04 32 08 - 00 05 88 A0 00 60 00 60 00 00 00 09
00 03 CD 20 - 00 03 CB 20 00 00 00 01 00 00 00 00 01 00
00 05 AE A0 - 00 05 AC A0 00 00 00 01 00 00 00 00 01 00
00 05 B0 C0 - 00 05 AE C0 00 00 00 01 00 00 00 00 01 00
00 05 B2 E0 - 00 05 B0 E0 00 00 00 01 00 00 00 00 01 00
00 05 B5 00 - 00 05 B3 00 00 00 00 01 00 00 00 00 01 00
00 05 B7 20 - 00 05 B5 20 00 00 00 01 00 00 00 00 01 00
As whoever's reading this may or may not know, the first 4 bytes of each image header or palette header is a pointer which goes to the actual image data or palette data (remember to add 0x20 to account for the file header offset). So there you have the offsets of the palette data for 6 of Sheik's eye textures. These are all for the right eye. Then there's another pointer table for the left eye.
The first pointer of the image headers corresponds to the first pointer of the palette header, the second pointer of the image headers corresponds to the second pointer of the palette header, etc. You can compare the offsets you see for the image data with Steelia's placements files to check which texture is which (otherwise you'd have to manually build a tpl and convert it to see what it is).
Hopefully this helps to make things clearer. You'll still probably need to have read
this or
this first, and some of the discussion I linked to.