OpenXcom Forum

Modding => Help => Topic started by: Nikita1221 on May 08, 2022, 07:11:45 pm

Title: Problem with converting spritesheet to PCK
Post by: Nikita1221 on May 08, 2022, 07:11:45 pm
For some reason, when i'm opening spritesheet (attachement 1) with PckView, some random pixels turning into blue (attachment 2).
I used InfranView convert all colours to battlescape palette, which comes with openxcom.
What may cause this problem?
Title: Re: Problem with converting spritesheet to PCK
Post by: Solarius Scorch on May 08, 2022, 07:49:18 pm
This definitely isn't the battlescape palette - it's some random colours.
Not sure what is wrong with your process, but first you should address this problem.
Title: Re: Problem with converting spritesheet to PCK
Post by: Meridian on May 08, 2022, 08:01:59 pm
For some reason, when i'm opening spritesheet (attachement 1) with PckView, some random pixels turning into blue (attachment 2).
I used InfranView convert all colours to battlescape palette, which comes with openxcom.
What may cause this problem?

The attached image is not in the Battlescape palette, it is in the Basescape palette.
Big difference.
Title: Re: Problem with converting spritesheet to PCK
Post by: Solarius Scorch on May 08, 2022, 08:20:34 pm
The attached image is not in the Battlescape palette, it is in the Basescape palette.
Big difference.

Damn Meridian, you have good memory. I couldn't recognise most X-Com palettes by sight... Impressive!
Title: Re: Problem with converting spritesheet to PCK
Post by: kevL on May 08, 2022, 10:46:46 pm
For some reason, when i'm opening spritesheet (attachement 1) with PckView, some random pixels turning into blue (attachment 2).
I used InfranView convert all colours to battlescape palette, which comes with openxcom.
What may cause this problem?

i think you need a better sprite editor
https://openxcom.org/forum/index.php/topic,7781.0.html

It looks like irfanview 'optimized' the palette (hint: don't use an editor that figures it knows what it's doing with the palette ... it doesn't, this is XCOM, we use our own palettes here. )

2nd, the spritesheet didn't preserve transparency for palette id #0 -- and we like our 0 ids to be transparent :)
Title: Re: Problem with converting spritesheet to PCK
Post by: Meridian on May 08, 2022, 11:46:11 pm
i think you need a better sprite editor
https://openxcom.org/forum/index.php/topic,7781.0.html

irfanview is not a sprite editor

it's just an image processor and works VERY well for openxcom purposes

It looks like irfanview 'optimized' the palette

nope, it didn't, the palette used is not optimized

(hint: don't use an editor that figures it knows what it's doing with the palette ... it doesn't, this is XCOM, we use our own palettes here. )

that's EXACTLY why I use irfanview for years now, almost exclusively (besides Photoshop)
it doesn't "figure it knows", it does ONLY what you tell it to do

2nd, the spritesheet didn't preserve transparency for palette id #0 -- and we like our 0 ids to be transparent :)

that's also not an issue with irfanview, it was the user's decision... as said above irfanview doesn't "figure it knows", it asks you for input
Title: Re: Problem with converting spritesheet to PCK
Post by: kevL on May 08, 2022, 11:50:15 pm
regardless, here's a better list of spite editors

https://openxcom.org/forum/index.php/topic,2676.0.html
Title: Re: Problem with converting spritesheet to PCK
Post by: Meridian on May 08, 2022, 11:58:00 pm
I would still recommend using Irfanview for any conversion job... just use `PAL_BATTLESCAPE.pal` (or `PAL_BATTLESCAPE_SAFE.pal`) instead of `PAL_BASESCAPE_SAFE.pal`.

(I'm sure it was just a misclick on the user's side)
Title: Re: Problem with converting spritesheet to PCK
Post by: Nikita1221 on May 09, 2022, 09:10:50 am
The attached image is not in the Battlescape palette, it is in the Basescape palette.
Big difference.
Yup, that was the problem. Somehow, i kept reading "Basescape" as "Battlescape". Thank you for answer.

2nd, the spritesheet didn't preserve transparency for palette id #0 -- and we like our 0 ids to be transparent :)
Didn't know that. It seems that InfranView didn't either. Thank you for hint — i'd probably wouldn't even notice that until i've seen black squares in MapView.