Why the Health Bar is wrong and how to fix it

In the file "unit-flags.js" ( ... \steamapps\common\Sid Meier's Civilization VII\Base\modules\base-standard\ui\unit-flags.js ), there is a section that calculates the width of the health bar. It looks like this:

if (this.unitHealthBarInner) {
this.unitHealthBarInner.style.widthPERCENT = utils.clamp(damage, 0, 1) * 100;
}
This calculates the width percentage of the health bar based on the damage the unit has taken.

Now, my best guess is that while the calculated percentage is correct, only 86% of the health bar is actually displayed in-game. Because when you change the number 100 to 86, the health bar now shows the correct value. I could be wrong—but it works.

So, all you have to do is change 100 to 86, like this:

Response:-

This piece of css in units-flags.scss

.unit-flag__healthbar-inner {
background-color: rgb(155, 211, 113);
top: pixels(2);
bottom: pixels(2);
left: pixels(2);
right: pixels(2);
max-width: 89%;
}
may be the reason. ;)
 
All I know is that, ever since the 1.1.1 patch, I’ve been losing a ton of scouts because their damage bar doesn’t display. I don’t know if it’s a universal issue, or just a personal issue due to my particular mod cocktail.
 
All I know is that, ever since the 1.1.1 patch, I’ve been losing a ton of scouts because their damage bar doesn’t display. I don’t know if it’s a universal issue, or just a personal issue due to my particular mod cocktail.
In my games scout health bars are showing correctly. Probably mods
 
Back
Top Bottom