OpenXcom Bug Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report #1148  -  Incorrect totals when number of countries > 16
Posted Dec 24, 2015 - updated Apr 11, 2019
icon_info.png This issue has been closed with status "Fixed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Fixed
  • Assigned to
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     Meridian
  • Owned by
    Not owned by anyone
  • Category
    Not determined
  • Resolution
    RESOLVED
  • Priority
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Nightly / Git version
    icon_customdatatype.png oxce 2.5b
  • Platform
    icon_customdatatype.png Win 7
  • Master Game
    icon_customdatatype.png Not determined
  • Mods
    icon_customdatatype.png x-piratez 0.97b (download link: http://openxcom.org/forum/index.php/topic,3626.0.html)
Issue description
Although this probably doesn't apply to vanilla OpenXcom (and as such gets a lower priority?), the Total values for: 1. Xcom Activity in Countries 2. UFO Activity in Countries 3. Income ... are wrong if the number of countries is > 16.
Steps to reproduce this issue
Unfortunately, I can't provide easy reproduction steps, because you need to mod in more than 16 countries.

(I found it on OXCE 2.5 with X-PirateZ 0.97b)

But I saw in the source code that OpenXcom supports more than 16 countries (i.e. it is not a special feature of OXCE), so I reported it here.

PS: also the colors are weird when scrolling in the list of countries (buttons get different colors when scrolling and graph doesn't upgrade accordingly; also the colors themselves after 16th are not very nice)

#2
Comment posted by
 SupSuper
Jan 04, 22:12
I've fixed the totals. However, the 16+ country support has always been a big "hack" because there are only 16 colors in the graphs palette, and only room for 16 buttons, so anything past that is basically garbage.

Clearly it's not that popular a feature because nobody ever complained before. :P What would you suggest for a "fix"? Just repeat the same 16 colors? Only show at most 16 colors at once?
#3
Comment posted by
 Meridian
icon_reply.pngJan 04, 22:25, in reply to comment #2
I would use only the 16 available color combinations. I.e. 17th country would have same color as 1st, 18th as 2nd, 19th as 3rd, etc.

Most important is that they don't change when scrolling... so if a country gets yellow, then it has yellow all the time. If multiple countries get yellow, it's OK... the user has to manually enable them (if he knows how) and sees that they are both yellow.

PS: nobody reported it because probably nobody knows you can scroll down by mouse... I also learned it only from watching DracoGriffin's LP... I wouldn't have guessed it myself smileys/2.png
#4
Comment posted by
 Meridian
Jan 04, 22:48
Also, I am not even sure how it works now:

1/ I assumed you show all countries on the chart, even if 16+. You just don't see the button, but everything else works.

2/ Or are the countries, whose button you don't see anymore also not shown at all?

Depending on which solution is our target I would have different recommendation how to deal with 16+ countries.
#5
Comment posted by
 SupSuper
icon_reply.pngJan 05, 00:18, in reply to comment #3
Turns out none of the 16+ code actually worked the way it was supposed to!!! The colors bugged up, the graph colors didn't match the button colors, and all kinds of nonsense. I wonder if even the contributor actually tested any of this stuff (clearly I didn't when I merged it in, I don't care for mods :P).

Anyways it works like this now, hope that's what you wanted: http://puu.sh/mjRfN/f689464cc0.png http://puu.sh/mjRco/1ca03cdf81.png (colors loop around, graph shows everything even if there's repeat colors)

Meridian wrote:
I would use only the 16 available color combinations.
I.e. 17th country would have same color as 1st, 18th as 2nd, 19th as 3rd,
etc.

Most important is that they don't change when scrolling... so if a country
gets yellow, then it has yellow all the time.
If multiple countries get yellow, it's OK... the user has to manually
enable them (if he knows how) and sees that they are both yellow.

PS: nobody reported it because probably nobody knows you can scroll down by
mouse... I also learned it only from watching DracoGriffin's LP... I
wouldn't have guessed it myself