aliens

Author Topic: [SOLVED] Y-scripts modifying stats and causing stat display issues  (Read 158 times)

Offline Aldorn

  • Commander
  • *****
  • Posts: 784
    • View Profile
Hi all,

I have a display issue due to soldierBonuses

It's not a big issue, as I can play with it, it is just "cosmetic"

This is about the progression bar, whose extremity does not include bonuses, as shown in the attached JPG

Here is the corresponding code
Code: [Select]
soldierBonuses:
  - name: STR_SB_MEDAL_ALIENS_KILLED1
    stats:
      stamina: 1
  - name: STR_SB_MEDAL_ALIENS_KILLED2
    stats:
      stamina: 2
  - name: STR_SB_MEDAL_ALIENS_KILLED3
    stats:
      stamina: 3
  - name: STR_SB_MEDAL_ALIENS_KILLED4
    stats:
      stamina: 4

I tried that, without success
Code: [Select]
soldierBonuses:
  - name: STR_SB_MEDAL_ALIENS_KILLED1
    stats:
      stamina: 1
    statCaps:
      stamina: 1

Does anyone have any idea how to fix this?
« Last Edit: March 31, 2025, 11:15:19 pm by Aldorn »

Offline Aldorn

  • Commander
  • *****
  • Posts: 784
    • View Profile
Apparently Meridian noticed the same issue here
https://openxcom.org/forum/index.php?topic=7405.msg116841#msg116841
But I can't find any fix in the thread

Offline Juku121

  • Commander
  • *****
  • Posts: 1847
  • We're all mad here.
    • View Profile
But your stamina bar actually is a little bit over the cap, as the bonus indicates? What happens if you  make the value into 99, like in Meridian's example? Should shoot to the right like a battering ram and leave your 'natural maximum bar' behind.

Offline Aldorn

  • Commander
  • *****
  • Posts: 784
    • View Profile
But your stamina bar actually is a little bit over the cap, as the bonus indicates? What happens if you  make the value into 99, like in Meridian's example? Should shoot to the right like a battering ram and leave your 'natural maximum bar' behind.

Good idea

Let me first switch to english :P

Then, I replaced small bonuses with 99, now it's more obvious

I don't understand in Meridian's thread if this is an issue and if it has been solved, or if it's just expected.


I asked Chat GPT: OMG  :o he knows a lot about OpenXcom and modding  ;D
He made some misunderstanding between soldierBonuses, soldierTransformations and commendations, but he proposed several solutions that could have worked
« Last Edit: March 31, 2025, 11:07:18 pm by Aldorn »

Offline Juku121

  • Commander
  • *****
  • Posts: 1847
  • We're all mad here.
    • View Profile
What precisely is your issue here? This is how the stat bar works: initial value, trained value, 'cap', then overflow from armours and bonuses.

Offline Aldorn

  • Commander
  • *****
  • Posts: 784
    • View Profile
What precisely is your issue here? This is how the stat bar works: initial value, trained value, 'cap', then overflow from armours and bonuses.
Ok, so if armours and bonuses are considered as an overflow, that explains

I wanted just these bonuses to be included in the light part, but not overflowing (from a cosmetic point of view: my cosmetic point of view ;))
Cf. attached image for Strength as an example

So thank you very much Juku121

I close this thread
« Last Edit: March 31, 2025, 11:15:59 pm by Aldorn »