OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: clownagent on October 26, 2014, 10:48:01 am

Title: Globe background and night missions
Post by: clownagent 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? 

Title: Re: Globe background and night missions
Post by: Yankes 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.
Title: Re: Globe background and night missions
Post by: clownagent 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' ?
Title: Re: Globe background and night missions
Post by: Yankes 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.
Title: Re: Globe background and night missions
Post by: clownagent on October 26, 2014, 03:47:16 pm
Thanks for the help Yankes!

It seems to work now.