Author Topic: [Suggestion] The soldier skills button is always displayed  (Read 448 times)

Offline Kozinsky

  • Colonel
  • ****
  • Posts: 120
  • Sorry for my bEd English
    • View Profile
[Suggestion] The soldier skills button is always displayed
« on: August 21, 2024, 01:06:39 pm »
Since the discussion of this problem in the related thread ([Documentation] Soldier Skill Menu) was lost in time, I decided to move it here:

I have a problem: the soldier's skills button is displayed even when the soldier currently has no skills, but may have them in the future.
My idea is this: a soldier has many skills, but each particular skill requires the soldier to have certain transformation bonuses or medal bonuses.  And in the case where the soldier does not have any of the bonuses that the skills require, the skills button is displayed, but nothing happens when you click on it. Is it possible to not display it? Or am I doing something wrong?

The simplest example of my rullset:
Code: [Select]
soldiers:
  - update: STR_SOLDIER
    skills:
      - STR_SKILL_1
      - STR_SKILL_2
skills:
  - type: STR_SKILL_1
    requiredBonuses:
      - STR_MEDIC_TRANSFORMATION_BONUS
      - STR_MEDAL_MEDIC_3
  - type: STR_SKILL_2
    requiredBonuses:
      - STR_MEDIC_TRANSFORMATION_BONUS
      - STR_MEDAL_MEDIC_4
soldierTransformation:
  - name: STR_MEDIC_TRANSFORMATION
    allowedSoldierTypes:
      - STR_SOLDIER
    requiredCommendations:
      STR_MEDAL_MEDIC: 1
    soldierBonusType: STR_MEDIC_TRANSFORMATION_BONUS
commendations:
  - type: STR_MEDAL_MEDIC
    soldierBonusTypes: [STR_MEDAL_MEDIC_1, STR_MEDAL_MEDIC_2, STR_MEDAL_MEDIC_3, STR_MEDAL_MEDIC_4, STR_MEDAL_MEDIC_5]
    criteria:
      totalWoundsHealed: [5, 10, 20, 30, 50]
soldierBonuses:
  - name: STR_MEDIC_TRANSFORMATION_BONUS
    stats:
      melee: 2
      tu: 1
  - name: STR_MEDAL_MEDIC_1
    stats:
      bravery: 10
  - name: STR_MEDAL_MEDIC_2
    stats:
      bravery: 20
  - name: STR_MEDAL_MEDIC_3
    stats:
      bravery: 30
  - name: STR_MEDAL_MEDIC_4
    stats:
      bravery: 40
  - name: STR_MEDAL_MEDIC_5
    stats:
      bravery: 50

So, when a soldier has only the first level of medal "- {commendationName: STR_MEDAL_MEDIC, decorationLevel: 0}" and has no transformation bonus "STR_MEDIC_TRANSFORMATION_BONUS", he logically should not have access to any of the skills, but the skills button is still shown to the player.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8889
    • View Profile
Re: [Suggestion] The soldier skills button is always displayed
« Reply #1 on: August 25, 2024, 10:08:42 am »
Why was this under Bugs?
There's nothing wrong with it, it works as documented.


Moved to Suggestions.