Romhacking => Newcomer's Board => Topic started by: caminopreacher on August 09, 2016, 07:32:02 pm

Title: Assigning Palettes
Post by: caminopreacher on August 09, 2016, 07:32:02 pm
Hello all,

Could anyone give a rundown of how to "split" (I guess) a palette that is shared between two weapons and give them each a distinct palette? Specifically, in Castlevania Aria of Sorrow, the Balmung Sword shares a palette with the Claimh Solais and a few other weapons. I want the Balmung to have specific colors the other weapons do not. I have tile molester, a hex editor, tile layer pro, yy-chr (my preference). I see the weapons in yy-chr and the palettes are different locations, I just don't know how to separate them. Sorry for the rambling, but that's pretty much it. Thanks much!
Title: Re: Assigning Palettes
Post by: FAST6191 on August 10, 2016, 03:19:31 am
So you are playing on the GBA then. Unlike some older systems there is no hardware assigned one and it is all software. There can be varying amounts of palettes the GBA can store depending upon the graphics mode but assuming you have a 16 colour selection then
When the sprite is in memory the OAM will hold the selection of palette.
How the GBA assigns an individual palette to an individual sprite is up to the game. It could be a individual palette pointer for every weapon sprite, it could be a shared palette for a lot of weapons, it could be some high level XML ish thing within the game, it could be something a bit more traditional as far as binary tables go, it could be some assembly driven monstrosity (especially in the case of palette driven animations -- if you have a glowing/pulsing or colour cycling animation then it is probably that).

The cheating method is not all games will use all colours so if you want to redo the sprite to use later colours/unused colours then that results in something having different colours. It can be annoying but less so than playing with the stuff already mentioned. If you are in single palette/256 colour mode then it gets a bit easier as most non video things don't even come close to using all the colours in my experience.

Short version. Other than the cheat method above then while finding and editing palettes is easy the assigning a new and unique palette for an individual sprite can be quite hard.
Title: Re: Assigning Palettes
Post by: caminopreacher on August 10, 2016, 05:59:06 am
It is GBA. I've used APE to change colors a lot.
But what you've said makes sense. I ise OAM and palette viewer to find specific colors, I just need to brush up on reading code. Thanks!