WizzardMaker / S4GFX

A tool to extract Settlers 4 assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to add palette colors

WizzardMaker opened this issue · comments

new images or changed images have different colors than the palette would support.

We need to be able to add colors to the palette, without interrupting other images.

We need to keep JIL in mind though!

  • check if image has more than 253 colors - the game cannot support more than that

  • the palette has many "dead" colors, they are unused, but sprinkled all over the palette. Check if they can be used without disrupting other graphics

  • check if we can push graphics out of their old JIL/DIL and into a new, at the end of the list. We have to assign connected images a new JIL aswell. Check the Palette offset too -> this would atleast give us true 253 colors that we don't need to share with other images

    1. Go through each pixel of the image and count unique colors
    1. Get the palette offset of the image that we want to change, and go through each index, from offset to offset of the next JIL
    1. Get DIL if it exists, if not then ignore this step, just modify the Palette offset. Check if we have a unique JIL -> currently needed, we can later add support to just change single animation sprites