Author Topic: NPC Palette Data?  (Read 2204 times)

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
NPC Palette Data?
« on: September 30, 2012, 08:55:02 PM »
Hey-
Anybody have any insight about where to find/edit NPC palettes? (I mean the palettes for TRULY non-playable characters)
I know how to tell the ROM which palette to use, but I'm still trying to figure out where the data is stored that determines which colors are in those palettes...

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: NPC Palette Data?
« Reply #1 on: October 01, 2012, 05:25:25 AM »
I know almost nothing about any of the palette information in this game. Even the menu colors in the editor are my best guess and not actually being read from the rom.

I'm also very interested in the answer to this, and if possible, the palette information for other things like spell animations, weapon animations, battle characters, even things like map tile palettes...
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: NPC Palette Data?
« Reply #2 on: October 01, 2012, 07:26:15 AM »
Hmm... I recall that JCE's older editor has a palette option for spells so you can see what colors are contained in each palette. Since there 0-63 of them, there's a possibility that all of the palette data is actually contained therein.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: NPC Palette Data?
« Reply #3 on: October 01, 2012, 09:29:42 AM »
battle characters, as in Cecil & co's battle sprite palettes?
Phoenix posted the location of that data here:
http://slickproductions.org/forum/index.php?topic=1242.0

I have a theory about how I might be able to find some other palette data.  I'll let y'all know if it works.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: NPC Palette Data?
« Reply #4 on: October 01, 2012, 10:44:08 AM »
OK, well after a little trial and error, I figured it out.
Now that I've figured it out, I kinda wanna kick myself that it took as much trial and error as it did.

We know, by what's already been documented, that Overworld Character Palettes are located from 68200-6823F.
It took a little more searching to find the document, but I found a compilation of data by JCE3000GT from ~2003 that says the next four lines are vehicle palettes (68240-6827F).
Well, from there, all I had to do was scroll down a few lines, because then you've got four lines of FFs, then 24 lines of palettes, which belong to NPCs (they're easy to spot because they're 3BP, and therefore often start with 00 00 00 00).

Anyway, since NPC palettes are harder to define (they're more interchangeable than character or vehicle palettes, so you can't just say "it's Cid's daughter's palette," because she shares a palette with so many other characters), it takes me a combination of a screenshot, Tile Layer, and Yousei's SNESPal to zero in on exactly which palette I'm looking for:
1. take screenshot of an NPC that uses the palette you want to edit
2. find the corresponding sprite in tlp
3. use eyedropper on the first non-black color in the palette (as shown from left to right in tlp)
4. "edit colors/define custom colors" to grab the rgb value, and plug those into tlp to make that color the correct color
5. perform the same actions for the next five colors
6. jump to 682C0 (the first NPC palette) in SNESPal
7. scroll through the palettes until you find the one that matches the one replicated in tlp

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: NPC Palette Data?
« Reply #5 on: October 01, 2012, 10:49:05 AM »
also, it's probably worth mentioning to anyone who doesn't already know, that only four of the 24 NPC palettes are usable per map.  I'm sure there must be a way to determine which palettes are available where, and subsequently EDIT which palettes are available where, but I haven't figured that out yet.  For what I'm doing right now, it's not necessary (yet), so it may be a while before I decide to open that book...

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: NPC Palette Data?
« Reply #6 on: October 01, 2012, 11:43:34 PM »
Good work! Using reasoning and available info. to search for what you need is at times more valuable than how to find the matter from scratch.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: NPC Palette Data?
« Reply #7 on: October 02, 2012, 12:52:51 AM »
You know, Pinkpuff, I just had a thought - these may very well be the same palettes used by spell animations. Can't test the theory because I'm not home right now, but I'm pretty sure spell sprites are 3BP, and the npc palettes seem to often use many shades of the same color, as is common with spells...