Author Topic: Globe background and night missions  (Read 3843 times)

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Globe background and night missions
« on: October 26, 2014, 10:48:01 am »
I changed the globe background color via ruleset with the following:

Code: [Select]
interfaces:
  - type: geoscape
    elements:
      - id: globe
        color: 145

Due to this, it seems that all missions on the globe became night missions.

Why do night missions depend on the globe background color and can this be changed somehow in the ruleset? 


Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Globe background and night missions
« Reply #1 on: October 26, 2014, 12:52:23 pm »
You need probably define `color2` too. This is only thing that could break code.
Additional `color` need be power of 16 and `color2` be bigger by 16 to work correctly.
« Last Edit: October 26, 2014, 12:56:21 pm by Yankes »

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: Globe background and night missions
« Reply #2 on: October 26, 2014, 01:48:25 pm »
You need probably define `color2` too. This is only thing that could break code.
Additional `color` need be power of 16 and `color2` be bigger by 16 to work correctly.

What is the meaning of 'color2' ?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Globe background and night missions
« Reply #3 on: October 26, 2014, 03:16:01 pm »
ocean colors have 32 different values, ground have 16:
https://www.ufopaedia.org/index.php?title=File:1_GeoScapePal.Png
If you leave `color2` its stay 0 and algorithm miss represents its as ocean, this cause when you compute shade of battlescape its send unused color in globe (0) to function and if this color is miss represents and function return wrong value.

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: Globe background and night missions
« Reply #4 on: October 26, 2014, 03:47:16 pm »
Thanks for the help Yankes!

It seems to work now.