Users browsing this thread: 1 Guest(s)
Patch: allowing use of "reserved" palette colors for player characters

#29
Posts: 45
Threads: 4
Thanks Received: 7
Thanks Given: 1
Joined: Jul 2013
Reputation: 4
Status
None
So, an update.

I am working on a new version of the patch that will fix some nitpickey but surprisingly difficult bugs, having to do with the appearance of characters on the save and load game screen, shop screen, and party-change screen.

While doing that, I have also been automating my process of creating and applying modifications. In the next distribution, I'll include the ASM files along with a .bat file that will 1. not only assemble the code for you (once you've downloaded the assembler for free), but also 2. create an IPS patch for you based on the new version of the code.

This will allow you to modify the code in any way, including but not limited to relocating it to your chosen location. The custom-created IPS patch will automatically update all the pointers: both the ones within the code, and the ones that point into the new code from the old functions. This will make the patch very easy to use for people who want to relocate it because they are using it along with other patches. You will not have to know very much about hexes, and you won't really have to know anything about ASM. Just enter the desired ROM locations when prompted by the script.

I did this to make things easier for myself. I'm modifying the game a lot, and I'm ending up making tons of tiny little changes to little pointers here and there. Having an automated process helps me, and ensures I don't make some dumb copy-and-paste mistake that breaks the ROM (this recently happened to me). As a side-effect of creating this for myself, I can also give it to people who download my patch.

The save/shop menu stuff is 90% done, and the custom IPS patch thing is 100% done. I'm using it myself.

So why don't I just release the final patch? I may do that. But I'm thinking of making some more ambitious changes first.

While in the process of ironing out these little bugs, I got a PM from Gi Nattak. He asked me about an issue where characters using palette 6 don't display correctly in the save window, party-select window, and so on.

By amazing coincidence (as I told him), I knew exactly what the issue was, because I had just been ironing out bugs with palettes and sprites in that very same section of code.

And, as I told him, making palette 6 display correctly is probably possible to do with some minor drawbacks. And I know how to do it.

I hadn't thought about allowing an extra palette for PCs, because I assumed it would be impossible. But, looking into it, it might be less problematic than I thought. Although it would have limitations.

Here are the issues:

In battle:

There is no problem with using extra palettes for battle. Each of the four characters who appear in battle has his own palette anyway, even if they "share" a palette. The palette is duplicated in palette memory. This is so the game can apply status effects. For instance, if both Edgar and Sabin appear in battle, the game has to modify Edgar's palette to show that he has haste, or poison, or whatever. You don't want to modify Sabin's at the same time. So, each has his own copy. You could give every character a unique palette and it would cause no problems in battle. On the world map is a different story.

Out of battle / world map / towns:

Now, there are a total of 8 palettes stored in palette memory at once. Each sprite must have one of these, and it can only have colors from its own assigned palette.

In towns and dungeons, 6 of the 8 palettes always loaded are those used by PCs and also most NPCs. All of them are loaded at all times.

Palette #6 is a "placeholder" palette. Its selection of colors changes based on the need. In most maps it is not used. The main things it is used for, I think, are: cranes in a couple maps, and a treasure chest in one map. This is partly based on what Gi Nattak told me.

Gi Nattak is trying to use this as a standard palette for PCs in his hack. He's told me he hasn't totally been able to eliminate the problem of this palette being modified. Whenever it's modified, in order to be used by a sprite that has special color needs, the PC will look wrong.

I think this palette is also used for special effects in a few other cases. It might be used for the fire encounter sprites you run into in the burning house in Thamsa, though I'm not sure about that. Maybe also for the tentacle things in Figaro in WoR. Maybe for random lightning bolts and things like that.

Anyway, ways I can think of to solve this:

1. eliminate everything that uses/modifies palette #6. This would be hard to do without significantly modifying the game's events.

2. Make a custom palette that happens to have a selection of colors that can do a decent representation of the cranes and chests and fire and so on. But can simultaneously be used for a PC. Some modification of the sprites would be required. They wouldn't look exactly the same, but they could probably look "OK". The PC would have to use the same selection of colors. They would have to be grays, browns, and reds, and so on.

3. Similar to #2, you could modify all the sprites that currently use palette #6 to use a variety of standard palettes. All of them don't necessarily have to use #6. For instance, you could make the flames use Kefka's & Strago's & Relm's palette, which includes reds and oranges. They might not look exactly the same, but they might look good enough. And, again, you probably wouldn't be able to just switch the palette, because it would probably not use the right palette indices, and would initially appear green and white, or something. You would have to edit the sprite, keeping it the same shape, but changing the color indices.

OK, now. There's also a palette #7. Which actually seems like a more promising choice to me, for an additional palette to enable for PCs.

Palette #7 is always loaded and never changed, I think. It is used only for magitek armor and chocobos, I think.

It is filled with a lot of yellows, browns and grays. Currently, it is not set up well for PCs. For instance, the colors that are hard-coded to be "skin color" are yellow-orange, and don't look good as skin.

But, this could look pretty good on a PC/NPC if you swapped the colors around. You could give characters a brownish skin color (which no human characters in the game have currently) and they would have brown, yellow and gray colors to choose from for hair and clothes.

You would also have to alter the chocobo and magitek sprites, switching around their colors so they look the same as they used to, even though their palette indices have been juggled. After that, there would be no visible difference in-game.

You would not be able to alter the selection of colors in the palette, unless you're OK with also altering the appearance of chocobos and mtek.

I think I should be able to enable one or both of these palettes for PCs.

Making palettes 6 and 7 look right on the save/load screen, shop screen, and party select screens might require some work-arounds or trade-offs. But should be doable.

A few things that might be required:

1. Remove the character face portraits that are shown when you select a character in the party-change screen.

2. Eliminate the brown/sepia color that characters appear in when you're loading or saving a game, when they're in the save file not currently selected.

3. Make the cursor on these screens into a simpler, two-color cursor, rather than the hand cursor. This allows it to easily share a palette with a PC without demanding the PC "loan" any colors.

4. Disable expanded colors (13-16) for PCs who use palettes 6 or 7.

5. In the worst case, we could always just make all characters appear sepia or grayscale on those screens.

By choosing a couple of those drawbacks (not all of them -- just a subset) I can allow PCs to use palette 6 AND/OR palette 7, and have them appear right on all screens, including the maps, battle, and other screens.

So, that's the exciting thing I may include with the next version of the patch. Depending on how long it takes, I may release a version with bugfixes but without the extra palettes enabled. Or, the next version may have the extra palettes enabled.

A note: If I enable palette #6, I'm not going to do all the work of making it always look right. That will require changing a lot of scripts and sprites. I'll make the game's code handle it, but if you want to actually make it work, you will have to do all those alterations yourself.
  Find
Quote  
[-] The following 1 user says Thank You to Eggers for this post:
  • SSJ Rick (08-22-2013)



Messages In This Thread
RE: Patch: allowing use of "reserved" palette colors for player characters - by Eggers - 08-21-2013, 11:19 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite