Soldiers can now collect bonuses.
Bonuses can be
manually awarded by the player via soldier transformations; or
automatically awarded together with a soldier commendation/medal.
Bonuses of the same name/type
don't stack.
(Different bonuses changing the same attributes
do stack.)
Bonuses can improve
soldier stats (even over any maximum),
regeneration of resources every turn and
visibility at dark (until global maximum).
Since OXCE 7.1.4 also
armor values can be modified.
Here is an example of a very long bonus:
soldierBonuses:
- name: STR_FIRST_TEST
visibilityAtDark: 20 # +20 tiles
stats:
tu: 99 # +99 TUs
stamina: 0
health: 99
bravery: 0
reactions: 0
firing: 0
throwing: 0
strength: 99
psiStrength: 0
psiSkill: 0
melee: 0
mana: 0
recovery:
time:
flatOne: -10
energy:
flatOne: 100
morale:
flatOne: -15 # -15 morale per turn
health:
flatOne: -5
mana:
flatOne: -1
stun:
flatOne: 4
These bonuses can be assigned to soldiers via transformations:
soldierTransformation:
- name: STR_TEST_TRANSFORM
keepSoldierArmor: true
createsClone: false
allowsDeadSoldiers: false
allowsLiveSoldiers: true
allowsWoundedSoldiers: true
allowedSoldierTypes:
- STR_SOLDIER
cost: 0
recoveryTime: 1
# flatOverallStatChange:
# tu: 99
# health: 99
# strength: 99
reset: false # don't reset previous transformations or previous bonuses
soldierBonusType: STR_FIRST_TEST # bonus to assign
lowerBoundAtMinStats: true
upperBoundAtMaxStats: false
upperBoundAtStatCaps: true
# requiredItems:
# STR_UNIQUE_ITEM: 1
The
reset flag can be used to clear the bonuses gained by previous transformations. It also clears the list of previously performed transformations.
For example:
1. you train karate and gain a bonus
2. then you transform the guy into a MEC and want to lose all the previous bonuses (since MECs can't benefit from karate training... I hope)
Note: stats gained by "classic" transformations (i.e. those that are NOT bonuses) will
NOT be reset; only bonuses can be reset
Or via commendations:
commendations:
- type: STR_MEDAL_ALIENS_KILLED
description: STR_MEDAL_ALIENS_KILLED_DESCRIPTION
sprite: 1
soldierBonusTypes: [STR_KILL1, STR_KILL2, STR_KILL3, STR_KILL4] # various bonuses for various decoration levels
criteria:
killsWithCriteriaCareer: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
killCriteria:
-
- [1, ["STATUS_DEAD", "FACTION_HOSTILE"]]
Bonuses are defined
per decoration level.
You don't need to define all decoration levels... if a soldier has higher decoration level than defined, the
highest available is used.
Test build:
https://lxnt.wtf/oxem/builds//Extended/Extended-5.6.4-c50d95558-2019-09-15-win64.7z