Author Topic: UFO and TFTD in the single sequential campaign  (Read 2279 times)

Offline Yankes

  • Commander
  • *****
  • Posts: 1998
    • View Profile
Re: UFO and TFTD in the single sequential campaign
« Reply #30 on: October 10, 2018, 10:47:55 pm »
Thanks. I see that it also allows changing "countryColor", "cityColor", "baseColor" and "lineColor". How is it written in the YAML file?


best look at TFTD ruleset that did that, overall as I said before: "`oceanPalette` in `globe`"
This mean
Code: [Select]
globe
  oceanPalette: 160

But I was asking how to change the whole Geoscape palette.
Here is something to replace the whole GEODATA/PALETTES.DAT: https://github.com/SupSuper/OpenXcom/blob/0854dec7da01a14503f750aecaf6c624df33859a/src/Mod/Mod.cpp#L2508
Here is something to read palettes from *.rul files:
https://github.com/SupSuper/OpenXcom/blob/0854dec7da01a14503f750aecaf6c624df33859a/src/Mod/Mod.cpp#L591
https://github.com/SupSuper/OpenXcom/blob/0854dec7da01a14503f750aecaf6c624df33859a/src/Mod/Mod.cpp#L602
But what is the syntax? I can't quite figure it from the C++ code.
 I can try it when I have time. This weekend, probably. Just swap "UFO" and "TFTD" in the paths for the 2nd script.
I do not mess with palettes swapig I do not recall where is exacly and how loaded. This function you link aren't directly responsible for loading palettes, only for internal use to copy palettes to other surfaces.


I still don't understand how exactly the shade is drawn. Does the engine check each pixel of the globe if it's in "ocean palette" and change its colour accordingly?

Exactly, this color can be on texture and it will be changed too. This is unused in UFO where sea ice texture have colors from ocean.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1122
    • View Profile
Re: UFO and TFTD in the single sequential campaign
« Reply #31 on: October 10, 2018, 11:27:04 pm »
But I was asking how to change the whole Geoscape palette.
You don't want to change the palette. You want to change all of the incorrect ocean indexes to match the correct position on the palette. If you change the palette, you might fix the ocean but you'll break the images in other parts of the game which use the same colors.

Offline tkzv

  • Captain
  • ***
  • Posts: 447
    • View Profile
Re: UFO and TFTD in the single sequential campaign
« Reply #32 on: October 11, 2018, 02:02:27 pm »
You don't want to change the palette. You want to change all of the incorrect ocean indexes to match the correct position on the palette. If you change the palette, you might fix the ocean but you'll break the images in other parts of the game which use the same colors.
Moving ocean colour definitions isn't very useful if palettes don't change. Of course, changing palettes, will require changing textures accordingly, and the work amount may avalanche. I wanted to avoid that, but I already started with the 2nd script.

Geoscape palette is only used for viewing the globe. As long as I don't touch interface colours, change textures and remember to change city/border/etc colours, everything will stay fine.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 4423
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: UFO and TFTD in the single sequential campaign
« Reply #33 on: October 11, 2018, 02:40:22 pm »
Geoscape palette is only used for viewing the globe.

Geoscape palette is also used for anything related to geoscape:
- dogfights
- geoscape GUIs and popups
- some Ufopedia articles
- and even some non-geoscape GUIs, for example Debriefing GUI, etc.

I would not recommend any non-cosmetic changes to geoscape palette... but if you want, you can change it completely in OXCE using custom palettes: https://openxcom.org/forum/index.php/topic,4187.msg88361.html#msg88361

Example:

Code: [Select]
customPalettes:
  - type: PAL_GEOSCAPE_NEW
    target: PAL_GEOSCAPE
    file: Resources/Palettes/test.pal       # JASC-PAL format, all 256 colors are mandatory
« Last Edit: October 11, 2018, 02:42:19 pm by Meridian »

Offline tkzv

  • Captain
  • ***
  • Posts: 447
    • View Profile
Re: UFO and TFTD in the single sequential campaign
« Reply #34 on: October 12, 2018, 01:06:47 am »
Geoscape palette is also used for anything related to geoscape:
- dogfights
- geoscape GUIs and popups
- some Ufopedia articles
- and even some non-geoscape GUIs, for example Debriefing GUI, etc.

I would not recommend any non-cosmetic changes to geoscape palette... but if you want, you can change it completely in OXCE using custom palettes: https://openxcom.org/forum/index.php/topic,4187.msg88361.html#msg88361

Example:

Code: [Select]
customPalettes:
  - type: PAL_GEOSCAPE_NEW
    target: PAL_GEOSCAPE
    file: Resources/Palettes/test.pal       # JASC-PAL format, all 256 colors are mandatory
Thanks! I was asking about just that.

The R-G-B colour components in PALETTE.DAT are in the range 0-63 and are multiplied by 4 for displaying. Do I understand correctly that palettes in the "palette" tag or JACS-PAL file should be in the range 0-255 and are not multiplied?

If I specify the palette for PAL_GEOSCAPE, will it be used for Ufopedia and debriefing? Or did you separate them?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 4423
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: UFO and TFTD in the single sequential campaign
« Reply #35 on: October 12, 2018, 09:11:07 am »
Yes 0-255 and are not multiplied.
It will be used on all places as before.