Author Topic: [Solved] Mana pool bar not drawn with correct color  (Read 5042 times)

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
[Solved] Mana pool bar not drawn with correct color
« on: August 31, 2019, 06:38:18 pm »
I always have mana bar displayed as empty, even though it's not (see the screenshot). Does anyone else have this problem?

Game version is 5.6.1 (v2019-08-03).
« Last Edit: February 11, 2023, 06:32:05 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #1 on: August 31, 2019, 09:58:21 pm »
Even when you start a new game?

Also, you didn't share with us any of the settings you're using.

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #2 on: August 31, 2019, 11:20:49 pm »
Well, I simply copied the options from here https://openxcom.org/forum/index.php?topic=7241.0 like this:

Code: [Select]
mana:
  enabled: true
  battleUI: true
  trainingPrimary: false
  trainingSecondary: false
  replenishAfterMission: true
statGrowthMultipliers:
  mana: 0

extraStrings:
  - type: en-US
    strings:
      STR_MANA: "MANA"
      STR_MANA_POOL: "MANA POOL"
      STR_MANA_MISSING: "MANA MISSING"
      STR_MANA_RECOVERY: "MANA RECOVERY> {ALT}{0}"
      STR_NOT_ENOUGH_MANA: "Not Enough Mana!"
      STR_MANA_ABBREVIATION: "MAN"
      STR_MANA_CURRENT: "CURRENT MANA"
      STR_MANA_NORMALIZED: "NORMALIZED MANA"
      STR_COST_MANA: "mana"
      manaExperience: "Mana experience"
      manaRequired: "Mana required?"
      ToMana: "Mana dmg multiplier"
      RandomMana: "Mana dmg RNG?"
      mana: "Mana"
      manaRecoveryPerDay: "Mana per day"

And of course, I also gave soldiers "mana: 100" in minStats/maxStats/statCaps. I simply wanted to first see it work before I have any ideas what I can use it for :) So at first I only saw it in New Battle, but after your question I started a new game, and yes, I see it in this new game too.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #3 on: August 31, 2019, 11:32:39 pm »
just tried your code, works fine for me

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #4 on: August 31, 2019, 11:40:18 pm »
I see you have version 5.6.2, I'll try updating tomorrow.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #5 on: August 31, 2019, 11:45:00 pm »
I see you have version 5.6.2, I'll try updating tomorrow.

Mana feature was a single commit, there were no bugfixes.

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #6 on: September 01, 2019, 09:55:06 am »
I deleted the options.cfg, so that the next time I launched the game it was created anew, with default settings. In settings I changed only resolution and enabled one mod, the one that adds mana. To avoid interference, it's a single rul file, with the changes to soldiers reduced to only adding mana. The whole code is this:

Code: [Select]
# General settings
mana:
  enabled: true
  battleUI: true
  trainingPrimary: false
  trainingSecondary: false
  replenishAfterMission: true
statGrowthMultipliers:
  mana: 0

extraStrings:
  - type: en-US
    strings:
      STR_MANA: "MANA"
      STR_MANA_POOL: "MANA POOL"
      STR_MANA_MISSING: "MANA MISSING"
      STR_MANA_RECOVERY: "MANA RECOVERY> {ALT}{0}"
      STR_NOT_ENOUGH_MANA: "Not Enough Mana!"
      STR_MANA_ABBREVIATION: "MAN"
      STR_MANA_CURRENT: "CURRENT MANA"
      STR_MANA_NORMALIZED: "NORMALIZED MANA"
      STR_COST_MANA: "mana"
      manaExperience: "Mana experience"
      manaRequired: "Mana required?"
      ToMana: "Mana dmg multiplier"
      RandomMana: "Mana dmg RNG?"
      mana: "Mana"
      manaRecoveryPerDay: "Mana per day"

soldiers:
  - type: STR_SOLDIER
    minStats:
      mana: 100
    maxStats:
      mana: 100
    statCaps:
      mana: 100

But the bar is still displayed empty.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #7 on: September 01, 2019, 10:34:46 am »
You must have more ruleset enabled somewhere... for example the GUI colors are completely different. Maybe the bar is drawn with transparent color in your case.
Turn everything else off and try again.

PS: you don't need translations, they are included in OXCE
« Last Edit: September 01, 2019, 10:43:51 am by Meridian »

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #8 on: September 01, 2019, 11:32:31 am »
These weird GUI colors are not connected to rulesets :) It is a glitch in the Linux CLI tool "xwd" with which I take screenshots. Though until now I saw this yellow tint only in screenshots taken from Dosbox, while from OXCE xwd usually grabbed normal-colored screenshots. But anyway, in the game itself the colors are normal, this tint is observed only in screenshots, so it's definitely a glitch in xwd or in window manager.
« Last Edit: September 01, 2019, 11:37:59 am by Kzer-Za »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #9 on: September 01, 2019, 11:45:32 am »
OK, please zip your entire installation of OXCE with absolutely everything and upload it here.

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #10 on: September 01, 2019, 12:02:10 pm »
I'm uploading the game directory. It's kept separately from the OXCE engine (the latter is in my home directory), while the game directory is on a separate drive for games. I launch it as this:

Code: [Select]
sh -c "/home/denis/opt/OXCE/openxcom -data /mnt/Data/Games/XCOM -user /mnt/Data/Games/XCOM"

I think there is no need to upload the engine? I did not make any changes to it before compilation, just followed the instructions from here: https://openxcom.org/forum/index.php/topic,7048.0.html

Edit by Meridian: attached file removed
« Last Edit: September 01, 2019, 01:10:55 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #11 on: September 01, 2019, 01:06:45 pm »
The -data parameter seems wrong to me... it should point to where your common/standard directories are (same as executable normally).

This is where the game looks for various files on your system:

Code: [Select]
[01-09-2019_11-48-32] [INFO] OpenXcom Version: Extended 5.6.2 (v2019-08-28)
[01-09-2019_11-48-32] [INFO] Platform: Linux
[01-09-2019_11-48-32] [INFO] Data folder is: /usr/share/openxcom/
[01-09-2019_11-48-32] [INFO] Data search is:
[01-09-2019_11-48-32] [INFO] - /mnt/Data/Games/XCOM/
[01-09-2019_11-48-32] [INFO] - /home/denis/.local/share/openxcom/
[01-09-2019_11-48-32] [INFO] - /usr/local/share/openxcom/
[01-09-2019_11-48-32] [INFO] - /usr/share/openxcom/
[01-09-2019_11-48-32] [INFO] - /usr/local/share/openxcom/
[01-09-2019_11-48-32] [INFO] - /usr/share/openxcom/
[01-09-2019_11-48-32] [INFO] - ./
[01-09-2019_11-48-32] [INFO] User folder is: /mnt/Data/Games/XCOM/
[01-09-2019_11-48-32] [INFO] Config folder is: /mnt/Data/Games/XCOM/

Code: [Select]
[01-09-2019_11-48-32] [INFO] Data folder is: /usr/share/openxcom/
[01-09-2019_11-48-32] [INFO] User folder is: /mnt/Data/Games/XCOM/
[01-09-2019_11-48-32] [INFO] Config folder is: /mnt/Data/Games/XCOM/


Can you check if you have the "standard" directory on path "/usr/share/openxcom/" and if yes, please upload the entire content of that "standard" directory?
My assumption is that you have this directory there... and it is old... i.e. not from OXCE 5.6.2, but probably something much older... and the color definitions would be missing...
« Last Edit: September 01, 2019, 01:15:16 pm by Meridian »

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #12 on: September 01, 2019, 01:42:13 pm »
Ah, yes, at first I installed the OXCE from AUR (version 5.5.2), and did not uninstal it when I started using a more fresh version, compiled manually. I thought specifying "-data" in command line would be enough. I'm uploading the "standard" diretory from there. I suppose, if I uninstall this old version, it should fix it?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #13 on: September 01, 2019, 01:53:41 pm »
So, first of all, this confirms my assumption, it is the old interfaces.rul file that is causing your issue.

As for how to fix it... there are several options, I don't know which one you would prefer.

I would do it as follows:
1/ use only -user and -config parameters, don't use -data parameter at all
2/ -config path will contain your options.cfg file
3/ -user path will contain your mods, savegames, screenshots, etc.
4/ -data path will be resolved automatically to your executable path and you should have the latest executable and latest common/standard dirs there
5/ the UFO and TFTD files you can put either on your -data path or on your -user path... I usually have them either on -user path or just on both paths

Once configured, start the game and check the log file if all 3 paths were resolved correctly.

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Mana pool bar not drawn with correct color
« Reply #14 on: September 01, 2019, 02:22:18 pm »
Thanks!!!