Author Topic: Failing to convert an image to be compatible with the UFOpaedia  (Read 3677 times)

Offline obsidian_razor

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Hi, I've looked at the tutorials and tried to convert a PNG to use in the UFOpedia, but even after importing the palette as per the tutorial, I can't seem to get it to work.

I'm attaching the file I'm trying to convert.

Perhaps I'm missing something?

Thanks!

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #1 on: July 15, 2021, 02:41:00 am »
First you need shrink image to 320x200 resolution.
Then to convert image into 256 colors palette.
You can use standart ufopedia palette, or choose your own. In second case you will need to rename file, adding "_CPAL", so OXCE will understand that is a custom palette.

Like that:
« Last Edit: July 15, 2021, 02:52:23 am by Nord »

Offline obsidian_razor

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #2 on: July 15, 2021, 09:09:02 am »
Thank you so much, though I'm afraid it still doesn't work :(

This is what the pic looks in game, even after using the one you provided.

Very strange :(

EDIT: I stand corrected, the first IMG, the non-custom one works. Which palette you imported? I was importing the UFOpedia palette using Irfranview as per the tutorial and getting the result below still :(
« Last Edit: July 15, 2021, 09:16:25 am by obsidian_razor »

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #3 on: July 16, 2021, 04:19:28 am »
You forget to name your rule for image with _CPAL, like:
Code: [Select]
         
  - typeSingle: INTERCEPTOR_CPAL.SPK
    fileSingle: Resources/Ufopedia/Concept_-_Raven_CPAL.png

Offline Pandemonium

  • Sergeant
  • **
  • Posts: 26
  • Evil round every corner Careful not to step in any
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #4 on: August 05, 2021, 10:56:43 pm »
...
need to rename file, adding "_CPAL", so OXCE will understand that is a custom palette.

You forget to name your rule for image with _CPAL, like:
Code: [Select]
         
  - typeSingle: INTERCEPTOR_CPAL.SPK
    fileSingle: Resources/Ufopedia/Concept_-_Raven_CPAL.png

Does this process work for replacing existing UFOpedia entries?

Example:
Code: [Select]
  - type: UP003.SPK
    singleImage: true
    width: 320
    height: 200
    files:
      0: Resources/Lightning/Custom_Lightning_CPAL.png

Offline Juku121

  • Commander
  • *****
  • Posts: 1799
  • We're all mad here.
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #5 on: August 05, 2021, 11:39:31 pm »
Not directly, unless you use the default palette for the image, but the same process works.
Code: [Select]
  - type: UP003_CPAL.SPK
    singleImage: true
    width: 320
    height: 200
    files:
      0: Resources/Lightning/Custom_Lightning_CPAL.png
[/quote]
Code: [Select]
  - id: STR_LIGHTNING
    type_id: 1
    section: STR_XCOM_CRAFT_ARMAMENT
    requires:
      - STR_NEW_FIGHTER_TRANSPORTER
    image_id: UP003_CPAL.SPK
...

Offline Pandemonium

  • Sergeant
  • **
  • Posts: 26
  • Evil round every corner Careful not to step in any
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #6 on: August 06, 2021, 12:04:41 am »
Thanks Juku121!

Now, does anyone have a save from late game so I can test things?

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #7 on: August 06, 2021, 04:20:12 am »
Press "u" in quick battle or use config file option "debug: true", then go to debug mode by pressing "ctrl+d" on geoscape.

Offline Pandemonium

  • Sergeant
  • **
  • Posts: 26
  • Evil round every corner Careful not to step in any
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #8 on: August 06, 2021, 04:41:50 am »
You guys are all so helpful! Thanks! I'm obviously new to modding X-Com. I try to find answers on my own as much as possible to avoid flooding the forums. Thanks again!

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: Failing to convert an image to be compatible with the UFOpaedia
« Reply #9 on: August 06, 2021, 10:52:50 am »
You guys are all so helpful! Thanks! I'm obviously new to modding X-Com. I try to find answers on my own as much as possible to avoid flooding the forums. Thanks again!
Dont forget to use ufopedia:
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)
and Falco Tools:
http://falkooxc2.pythonanywhere.com/