OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: Alpha Centauri Bear on October 23, 2020, 05:09:28 am

Title: Incorrectly calculated stats
Post by: Alpha Centauri Bear on October 23, 2020, 05:09:28 am
I observed this in vanilla too many years ago. Just curious whether it can be fixed in openxcom. I guess this is the reason my statstrings for this soldier (TU >= 70) doesn't trigger.

You see the TU, energy, reaction bar borders are incorrectly drawn. They are too short. Other stats borders are fine.
Title: Re: Incorrectly calculated stats
Post by: Alpha Centauri Bear on October 23, 2020, 05:54:08 am
Never mind. These are armor modifiers sticking out.

Then I have another question. I understand border outlines max value. How value possible can get out of max one? Should it be corrected?

Look at the code here.
https://github.com/OpenXcom/OpenXcom/blob/02bac59cb8c83b367d8ae659513c437f4f56b8c9/src/Basescape/SoldierInfoState.cpp#L350
It clearly picks the min of initial and withArmor. Shouldn't max value be an actual max of current and withArmor?
Title: Re: Incorrectly calculated stats
Post by: Meridian on October 23, 2020, 09:38:12 am
Sorry, I don't understand what you're saying.

Everything looks fine.
Title: Re: Incorrectly calculated stats
Post by: Alpha Centauri Bear on October 23, 2020, 06:12:47 pm
I am saying the inner bar should not get out of the border.
Title: Re: Incorrectly calculated stats
Post by: Meridian on October 23, 2020, 06:27:34 pm
why not?
that's completely intended and expected.

border outline shows the current stat
the inner bar shows current stat + armor
the alt color of inner bar shows initial stat

if armor adds +10 strength for example, it inner bar will get 10 pixels out of the border...
Title: Re: Incorrectly calculated stats
Post by: Alpha Centauri Bear on October 23, 2020, 07:28:32 pm
Thank you for explanation. I understand how it is implemented. I am just thinking maybe we can alter it. Inner bar sticking out of border is aesthetically not pleasing. Besides, it overlay the border so the actual border value line for max stat is not visible. Would it be more logical to do it other way around - border for current + armor, while value 1 is for current. Then they won't overlap.
Title: Re: Incorrectly calculated stats
Post by: Meridian on October 23, 2020, 07:32:17 pm
I don't have any strong opinion on that.

My only concern is to keep it the same way as in OXC.
Other than that, whatever people want...
Title: Re: Incorrectly calculated stats
Post by: Alpha Centauri Bear on October 23, 2020, 11:51:54 pm
Isn't it the thread for both OCX and OCXE? Whom to bother from OCX for that?