aliens

Author Topic: [Suggestion] add transformations to statstrings conditions  (Read 1612 times)

Offline Alex_D

  • Colonel
  • ****
  • Posts: 498
    • View Profile
Case in point. Currently statstrings add flags to the soldier name based on a set of stats conditions. However, other special bonuses or transformations aren't tracked and need to be manually recorded.

So if we want to automate this a bit, I'd like to propose to include also transformations as conditions for applying the flag to the name. For example:
Code: [Select]
soldiers:
  - type: STR_SOLDIER_DAMSEL
    statStrings:
    - string: "P"
      psiStrength: [60, ~]
      soldierBonuses: #or transformationBonuses: ?
        STR_NIGHTSHADE: 1
        STR_HEROIC: 1
This way, the player could track soldiers that received bonuses that aren't specific stats thresholds but things like special recovery bonuses or night vision.

Offline Kozinsky

  • Colonel
  • ****
  • Posts: 153
  • Sorry for my bEd English
    • View Profile
Re: [Suggestion] add transformations to statstrings conditions
« Reply #1 on: December 13, 2024, 12:34:40 pm »
I support this suggestion. But, in my opinion, it would be enough that when checking the stat value for being within the specified limits for statStrings, this stat value already takes into account all the bonuses from transformations, as well as from commendations.

Offline psavola

  • Commander
  • *****
  • Posts: 911
    • View Profile
Re: [Suggestion] add transformations to statstrings conditions
« Reply #2 on: December 14, 2024, 07:47:00 am »
I don't think Kozinsky's suggestion would be workable for those statstrings whose purpose (or at least one purpose) is to show if soldiers can still be trained on the field (all of them?).

Let's say a soldier type has health stat cap at 50 and there are transformations that don't change the soldier type but give a bonus (say +10) to the stat cap.

Now if the statstrings code would just check if the stat is at 50 (including bonuses), it would show that the transformed soldier has reacted maximum health even when the real health is at 40, even though it could still be improved in the field.

While you can work around this by defining different statstrings with transformations that change the soldier type, with other bonuses you could not AFAIK (also applies to commendations). So some additional logic would be needed.