lushen124 / Universal-FE-Randomizer

Properly universal this time.
MIT License
98 stars 28 forks source link

Palette assignment rework #431

Open Vennobennu opened 11 months ago

Vennobennu commented 11 months ago

This pull request resolves two issues with how Yune handles palette transfer during class randomization:

  1. Because Yune does not repoint existing palettes (or expand the palette table), not all characters and bosses will receive all the palettes they are meant to have. I have made the palette mapper repoint palette data for existing indices when no other option remains. Additionally, the palette mapper no longer uses internal free space unnecessarily.
  2. The default palette colour brightness comparator is too simplistic and often fails to sort palettes properly, particularly for bluish colours. I have added one that calculates luminosity and achieves much more consistent and expected results.

I also added some logic for smoothing out palette ramps when reducing colours.

Also some updates to the palette mappings for individual classes to fix some improperly assigned palettes, add some secondary/tertiary palette mappings where appropriate, and sync up mappings for classes whose palettes are the same across the GBA games.

lushen124 commented 8 months ago

This is great! I'm not that knowledgable about color theory, so I don't know how to best generate colors when needed. My initial logic was just based on intuition more than anything else lol 😅