Author Topic: Problem with converting spritesheet to PCK  (Read 2747 times)

Offline Nikita1221

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Problem with converting spritesheet to PCK
« 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?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Problem with converting spritesheet to PCK
« Reply #1 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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8595
    • View Profile
Re: Problem with converting spritesheet to PCK
« Reply #2 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.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Problem with converting spritesheet to PCK
« Reply #3 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!

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: Problem with converting spritesheet to PCK
« Reply #4 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 :)

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8595
    • View Profile
Re: Problem with converting spritesheet to PCK
« Reply #5 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

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: Problem with converting spritesheet to PCK
« Reply #6 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

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8595
    • View Profile
Re: Problem with converting spritesheet to PCK
« Reply #7 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)
« Last Edit: May 09, 2022, 12:43:57 am by Meridian »

Offline Nikita1221

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: Problem with converting spritesheet to PCK
« Reply #8 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.