OpenXcom Forum

Modding => Help => Topic started by: Docent on September 10, 2019, 11:39:16 pm

Title: Palettes
Post by: Docent on September 10, 2019, 11:39:16 pm
I've tried. I rummaged through the entire forum. I tried different tools. But the result is poor quality. How, how to bring colors in pictures to the required palettes ?! I tried Photoshop and the palettes from the forum, it turns out in half the cases and so-so (examples in the attachment, I'm not sure that I'm doing everything right, because I'm not a Photoshop specialist). I tried to use the Falko's online tool, it doesn’t work out at all, maybe I'm doing something wrong? Please explain step by step if there is a way to quickly and efficiently convert the colors of the picture to the required? If possible, then on a concrete example: there are pictures of armor, everywhere everything is fine, but not in ufopedia. How to fix?
Title: Re: Palettes
Post by: The Martian on September 11, 2019, 12:22:50 am
I tried it on Falko's Palette tool (https://falkooxc2.pythonanywhere.com/spritepalette#) and I think it worked.

Make sure to set it to fix-palette (ufo-battlescape).

Also be aware that the resulting image will be a .png file.

From what I've read some OS have trouble with .gif when using OpenXcom so perhaps .png will serve you better?

EDIT:
everywhere everything is fine, but not in ufopedia. How to fix?
The ufopedia has a different pallete I think.

But if it is an Armor display I believe there is a special command you can give it that loads it differently along with displaying the armors stats... which you appear to have already done and it is giving you the error.

Try loading the image as a .png and see if that changes anything?

EDIT:
Disregard my above comments, I just tried viewing the .png and I'm also seeing the corruption.
Title: Re: Palettes
Post by: Meridian on September 11, 2019, 08:50:17 am
The battlescape palette: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLESCAPE_SAFE.pal

The battle-pedia palette: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLEPEDIA_SAFE.pal

As you can see they differ in last 16 colors.
Therefore for things, which appear both in battlescape and in ufopedia (like bigobs and paperdolls), use the common palette: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLE_COMMON_SAFE.pal
Title: Re: Palettes
Post by: Docent on September 19, 2019, 01:43:58 pm
Thanks, now it’s getting better.
Title: Re: Palettes
Post by: wcho035 on September 22, 2019, 06:56:26 am
Hi Meridian, is there a better palette for TFTD battlescape closer to the vanilla TFTD version you know of? Like someone is experimenting? Aside from those packaged with OXCE?
Title: Re: Palettes
Post by: Meridian on September 22, 2019, 07:58:25 am
Hi Meridian, is there a better palette for TFTD battlescape closer to the vanilla TFTD version you know of? Like someone is experimenting? Aside from those packaged with OXCE?

The ones packaged with OXCE are the vanilla TFTD palettes.

If you want to experiment, OXCE allows you to use any custom 8bit palette.
Title: Re: Palettes
Post by: wcho035 on September 22, 2019, 08:14:45 am
As always, thanks for the info Meridian.
Title: Re: Palettes
Post by: Skybuck on May 14, 2022, 07:11:31 pm
The battlescape palette: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLESCAPE_SAFE.pal

How come the first color is 0, 255, 0 ? and not 0, 0, 0 ? transparent ?

Oh never mind, it seems, index 15 is zero, zero, zero ?

Or am I reading this palette the wrong way around ?:

https://openxcom.org/forum/index.php?topic=5021.0

https://www.ufopaedia.org/images/2/2c/Palette.gif

(https://www.ufopaedia.org/images/2/2c/Palette.gif)

This image/palette.gif does not match the values posted on that github link...
Title: Re: Palettes
Post by: Yankes on May 14, 2022, 07:23:26 pm
"color" of first index do not matter, for most of OXC and all OXCE index 0 is consider a transparent color.
Another thing this palettes are for graphic programs as at least OXCE use only indexes and ignore palettes given in file.
Title: Re: Palettes
Post by: Skybuck on May 14, 2022, 08:06:32 pm
"color" of first index do not matter, for most of OXC and all OXCE index 0 is consider a transparent color.
Another thing this palettes are for graphic programs as at least OXCE use only indexes and ignore palettes given in file.

The values posted here:

https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLESCAPE_SAFE.pal

Are they used in OpenXcom vanilla as well ? Or are these values totally different in vanilla in battlescape ?
Title: Re: Palettes
Post by: Meridian on May 14, 2022, 08:30:40 pm
The actual palette used in "OpenXcom vanilla" (and also in OpenXcom Extended) is this one: https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC/PAL_BATTLESCAPE.pal

It differs from https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/bin/common/Palettes/UFO-JASC-SAFE/PAL_BATTLESCAPE_SAFE.pal
only in the first index (index 0)

The "real" one has [0,0,0] as first index (index 0), the "safe" one has [0,255,0] as first index (index 0)... to make it clearer and easier for modders.

As Yankes already said, the color of the first index (index 0) doesn't matter at all, because it is completely ignored and considered transparent.
So you can put any color there as you want.
I chose bright green so that it doesn't get confused with (non-transparent) black, which is already present at index 15.