Difference between revisions of "Criteria and KillCriteria Details"

From UFOpaedia
Jump to navigation Jump to search
(Details on commendation criteria and killCriteria fields.)
 
(Convert a list into a table with better documentation, in preparation of updating the ruleset page.)
Line 4: Line 4:
 
''Scalar Criteria'' depend only on one number, and are generally the number of times some specific event has occured in a soldier's career:
 
''Scalar Criteria'' depend only on one number, and are generally the number of times some specific event has occured in a soldier's career:
  
* totalKills
+
 
* totalMissions
+
 
* totalWins
+
{| class="wikitable" width="100%"
* totalScore
+
! width="150"| Value
* totalStuns
+
! width="*"  | Description
* totalDaysWounded
+
! width="80" | Default
* totalBaseDefenseMissions
+
|-
* totalTerrorMissions
+
| '''totalKills'''
* totalNightMissions
+
| Total number of kills earned by the soldier.
* totalNightTerrorMissions
+
| -
* totalMonthlyService
+
|-
* totalFellUnconcious
+
| '''totalMissions'''
* totalShotAt10Times
+
| Total number of missions in which the soldier participated.
* totalHit5Times
+
| -
* totalFriendlyFired
+
|-
* total_lone_survivor
+
| '''totalWins'''
* totalIronMan (unit was solo)
+
| Total number of missions in which the soldier victorious.
* totalImportantMissions (any non-ufo crash recovery mission)
+
| -
* totalLongDistanceHits (shots from more than 30 tiles away)
+
|-
* totalLowAccuracyHits (shots where the firing accuracy is less than the tile distance of the shot)
+
| '''totalScore'''
* totalReactionFire
+
| Total score earned by the soldier.
* totalTimesWounded
+
| -
* totalDaysWounded
+
|-
* totalValientCrux (missions with civilians where no civilians died, and the mission was a success)
+
| '''totalStuns'''
* isDead
+
| Total number of hostile enemies stunned by the soldier.
* totalTrapKills
+
| -
* totalAlienBaseAssaults
+
|-
* totalAllAliensKilled
+
| '''totalBaseDefenseMissions'''
* totalAllAliensStunned
+
| Total number of base defense missions in which the soldier was victorious.
* totalWoundsHealed
+
| -
* totalAllUFOs
+
|-
* totalAllMissionTypes
+
| '''totalTerrorMissions'''
* totalStatGain
+
| Total number of terror missions in which the soldier was victorious.
* totalRevives
+
| -
* totalSoldierRevives
+
|-
* totalHostileRevives
+
| '''totalNightMissions'''
* totalNeutralRevives
+
| Total number of night missions in which the soldier was victorious. (Excludes base defense missions and alien base missions.)
* totalWholeMedikit (smallest of total heal / total stim / total PK uses.)
+
| -
* totalBraveryGain
+
|-
* bestOfRank
+
| '''totalNightTerrorMissions'''
* bestSoldier
+
| Total number of night terror missions in which the soldier was victorious.
* isMIA
+
| -
* totalMartyrKills
+
|-
* totalPostMortemKills
+
| '''totalMonthlyService'''
* globeTrotter
+
| Total number of months served by the soldier.
* totalSlaveKills (killing mind-controlled dudes)
+
| -
 +
|-
 +
| '''totalFellUnconcious'''
 +
| Total number of missions in which the soldier has fallen unconcious.
 +
| -
 +
|-
 +
| '''totalShotAt10Times'''
 +
| Total number of times a soldier was shot at in a mission, counted 10 at a time.
 +
 
 +
Example: On mission 1, the soldier was shot at 23 times; this increments the total twice. On mission 2, the soldier was shot at 18 times; this increments the total once. The total is three, not four, despite being shot at 41 times.
 +
| -
 +
|-
 +
| '''totalHit5Times'''
 +
| Total number of times a soldier was hit in a mission, counted 10 at a time.
 +
 
 +
Example: On mission 1, the soldier was shot 8 times; this increments the total once. On mission 2, the soldier was shot 4 times; this does not increment the total. The total is one, not two, despite being shot 12 times.
 +
| -
 +
|-
 +
| '''totalFriendlyFired'''
 +
| Total number of times this soldier was shot by a friendly soldier. Does not count if the soldier is KIA or MIA.
 +
| -
 +
|-
 +
| '''total_lone_survivor'''
 +
| Total number of missions in which a soldier was the only survivor.
 +
 
 +
Only awarded if this soldier was deployed with other soldiers, and that this soldier did not kill any friendly soldiers.
 +
| -
 +
|-
 +
| '''totalIronMan'''
 +
| Total number of missions this soldier has done alone.
 +
| -
 +
|-
 +
| '''totalImportantMissions'''
 +
| Total number of non-UFO crash recovery missions in which the soldier was victorious.
 +
| -
 +
|-
 +
| '''totalLongDistanceHits'''
 +
| Total number of shots by the soldier that hit a target that was more than 30 tiles away.
 +
| -
 +
|-
 +
| '''totalLowAccuracyHits'''
 +
| Total number of shots by the soldier that hit a target who was futher away than the weapon's firing accuracy.
 +
| -
 +
|-
 +
| '''totalReactionFire'''
 +
| Total number of kills earned by the soldier that occured on the hostile turn, where the weapon was not a grenade or a proximity grenade.
 +
| -
 +
|-
 +
| '''totalTimesWounded'''
 +
| Total number of missions in which the soldier was wounded.
 +
| -
 +
|-
 +
| '''totalDaysWounded'''
 +
| Total number of days the soldier spent wounded.
 +
| -
 +
|-
 +
| '''totalValientCrux'''
 +
| Total number of missions in which the soldier was victorious, saved at least one civilian, and lost no civilians.
 +
| -
 +
|-
 +
| '''isDead'''
 +
| Total number of missions in which the soldier died.
 +
| -
 +
|-
 +
| '''totalTrapKills'''
 +
| Total number of kills earned by the soldier that occured on the hostile turn, where the weapon was a grenade, a proximity grenade, or a weapon with no BattleType.
 +
| -
 +
|-
 +
| '''totalAlienBaseAssaults'''
 +
| Total number of alien base missions in which the soldier was victorious.
 +
| -
 +
|-
 +
| '''totalAllAliensKilled'''
 +
| Total number of missions in which the soldier was victorious and the soldier killed every alien that died (at least one), and stunned every alien that was stunned.
 +
| -
 +
|-
 +
| '''totalAllAliensStunned'''
 +
| Total number of missions in which the soldier was victorious and the soldier stunned every alien that was stunned (at least one), and no aliens were killed.
 +
| -
 +
|-
 +
| '''totalWoundsHealed'''
 +
| Total number of times the soldier applied healing in the medikit.
 +
| -
 +
|-
 +
| '''totalAllUFOs'''
 +
| Value is 1 if the soldier participated in a mission against a UFO of each type.
 +
| -
 +
|-
 +
| '''totalAllMissionTypes'''
 +
| Value is 1 if the soldier participated in a mission of each type.
 +
| -
 +
|-
 +
| '''totalStatGain'''
 +
| Sum of all stat gains for the soldier. Bravery stat gains are divided by 10.
 +
| -
 +
|-
 +
| '''totalRevives'''
 +
| Total number of times this soldier revived another unit. The unit can hostile, friendly or neutral.
 +
| -
 +
|-
 +
| '''totalSoldierRevives'''
 +
| Total number of times this soldier revived another unit that started as friendly.
 +
| -
 +
|-
 +
| '''totalHostileRevives'''
 +
| Total number of times this soldier revived another unit that started as hostile.
 +
| -
 +
|-
 +
| '''totalNeutralRevives'''
 +
| Total number of times this soldier revived another unit that started as neutral.
 +
| -
 +
|-
 +
| '''totalWholeMedikit'''
 +
| Total number of times this soldier used one of each medikit functions.
 +
 
 +
Example: If in a single mission the soldier healed wounds 3 times, applied stimulant 2 times, and applied painkillers 4 times, then the total would increment by 2.
 +
| -
 +
|-
 +
| '''totalBraveryGain'''
 +
| Sum of all bravery stat gains for the soldier. The stat is not divded by 10 here.
 +
| -
 +
|-
 +
| '''bestOfRank'''
 +
| If, upon death, this soldier had the highest score of any dead soldier of the same rank, the value of bestOfRank is equal to the score of the dead soldier. Otherwise it is 0.
 +
| -
 +
|-
 +
| '''bestSoldier'''
 +
| If, upon death, this soldier had the highest score of any dead soldier, the value of bestSoldier is True. Otherwise it is False.
 +
| -
 +
|-
 +
| '''isMIA'''
 +
| Total number of missions in which the soldier was left behind.
 +
| -
 +
|-
 +
| '''totalMartyrKills'''
 +
| Total number of kills earned by the soldier that occured on the same turn that the soldier killed him or herself, to a maximum of 10 per mission.
 +
| -
 +
|-
 +
| '''totalPostMortemKills'''
 +
| Total number of kills earned by the soldier that occured after the soldier died.
 +
| -
 +
|-
 +
| '''globeTrotter'''
 +
| Value is True is the soldier has participated in a mission that occured in each country.
 +
| -
 +
|-
 +
| '''totalSlaveKills'''
 +
| Total number of kills earned by the soldier via mind-control of another unit.
 +
| -
 +
|-
 +
|}
 +
 
  
 
''Noun Criteria'' function like scalar criteria, but keep separate tallies for each noun
 
''Noun Criteria'' function like scalar criteria, but keep separate tallies for each noun

Revision as of 13:50, 3 December 2020

Commendation criteria are controlled by SoldierDiary.cpp, and function by iterating over the game's record of every takedown a soldier has performed. There are three types of criteria: Scalar Criteria, Noun Criteria, and Kill Criteria

Scalar Criteria depend only on one number, and are generally the number of times some specific event has occured in a soldier's career:


Value Description Default
totalKills Total number of kills earned by the soldier. -
totalMissions Total number of missions in which the soldier participated. -
totalWins Total number of missions in which the soldier victorious. -
totalScore Total score earned by the soldier. -
totalStuns Total number of hostile enemies stunned by the soldier. -
totalBaseDefenseMissions Total number of base defense missions in which the soldier was victorious. -
totalTerrorMissions Total number of terror missions in which the soldier was victorious. -
totalNightMissions Total number of night missions in which the soldier was victorious. (Excludes base defense missions and alien base missions.) -
totalNightTerrorMissions Total number of night terror missions in which the soldier was victorious. -
totalMonthlyService Total number of months served by the soldier. -
totalFellUnconcious Total number of missions in which the soldier has fallen unconcious. -
totalShotAt10Times Total number of times a soldier was shot at in a mission, counted 10 at a time.

Example: On mission 1, the soldier was shot at 23 times; this increments the total twice. On mission 2, the soldier was shot at 18 times; this increments the total once. The total is three, not four, despite being shot at 41 times.

-
totalHit5Times Total number of times a soldier was hit in a mission, counted 10 at a time.

Example: On mission 1, the soldier was shot 8 times; this increments the total once. On mission 2, the soldier was shot 4 times; this does not increment the total. The total is one, not two, despite being shot 12 times.

-
totalFriendlyFired Total number of times this soldier was shot by a friendly soldier. Does not count if the soldier is KIA or MIA. -
total_lone_survivor Total number of missions in which a soldier was the only survivor.

Only awarded if this soldier was deployed with other soldiers, and that this soldier did not kill any friendly soldiers.

-
totalIronMan Total number of missions this soldier has done alone. -
totalImportantMissions Total number of non-UFO crash recovery missions in which the soldier was victorious. -
totalLongDistanceHits Total number of shots by the soldier that hit a target that was more than 30 tiles away. -
totalLowAccuracyHits Total number of shots by the soldier that hit a target who was futher away than the weapon's firing accuracy. -
totalReactionFire Total number of kills earned by the soldier that occured on the hostile turn, where the weapon was not a grenade or a proximity grenade. -
totalTimesWounded Total number of missions in which the soldier was wounded. -
totalDaysWounded Total number of days the soldier spent wounded. -
totalValientCrux Total number of missions in which the soldier was victorious, saved at least one civilian, and lost no civilians. -
isDead Total number of missions in which the soldier died. -
totalTrapKills Total number of kills earned by the soldier that occured on the hostile turn, where the weapon was a grenade, a proximity grenade, or a weapon with no BattleType. -
totalAlienBaseAssaults Total number of alien base missions in which the soldier was victorious. -
totalAllAliensKilled Total number of missions in which the soldier was victorious and the soldier killed every alien that died (at least one), and stunned every alien that was stunned. -
totalAllAliensStunned Total number of missions in which the soldier was victorious and the soldier stunned every alien that was stunned (at least one), and no aliens were killed. -
totalWoundsHealed Total number of times the soldier applied healing in the medikit. -
totalAllUFOs Value is 1 if the soldier participated in a mission against a UFO of each type. -
totalAllMissionTypes Value is 1 if the soldier participated in a mission of each type. -
totalStatGain Sum of all stat gains for the soldier. Bravery stat gains are divided by 10. -
totalRevives Total number of times this soldier revived another unit. The unit can hostile, friendly or neutral. -
totalSoldierRevives Total number of times this soldier revived another unit that started as friendly. -
totalHostileRevives Total number of times this soldier revived another unit that started as hostile. -
totalNeutralRevives Total number of times this soldier revived another unit that started as neutral. -
totalWholeMedikit Total number of times this soldier used one of each medikit functions.

Example: If in a single mission the soldier healed wounds 3 times, applied stimulant 2 times, and applied painkillers 4 times, then the total would increment by 2.

-
totalBraveryGain Sum of all bravery stat gains for the soldier. The stat is not divded by 10 here. -
bestOfRank If, upon death, this soldier had the highest score of any dead soldier of the same rank, the value of bestOfRank is equal to the score of the dead soldier. Otherwise it is 0. -
bestSoldier If, upon death, this soldier had the highest score of any dead soldier, the value of bestSoldier is True. Otherwise it is False. -
isMIA Total number of missions in which the soldier was left behind. -
totalMartyrKills Total number of kills earned by the soldier that occured on the same turn that the soldier killed him or herself, to a maximum of 10 per mission. -
totalPostMortemKills Total number of kills earned by the soldier that occured after the soldier died. -
globeTrotter Value is True is the soldier has participated in a mission that occured in each country. -
totalSlaveKills Total number of kills earned by the soldier via mind-control of another unit. -


Noun Criteria function like scalar criteria, but keep separate tallies for each noun

  • totalKillsWithAWeapon - noun is weapon
  • totalMissionsInARegion - noun is region
  • totalKillsByRace - noun is race
  • totalKillsByRank - noun is rank

Kill Criteria commendations take a killCriteria data structure:

  • killsWithCriteriaCareer
  • killsWithCriteriaMission
  • killsWithCriteriaTurn

`criteria` entries are AND grouped, so failing one criteria match fails the entire commendation match.

The killCriteria data structure has the following shape:

killCriteria => [ orCriteria* ] (Outer list of conditions is or-ed together)
orCriteria   => [ andCriteria* ]  (Inner list of conditions is and-ed together)
andCriteria  => [count, [ detail* ]] (A condition is a list of and-ed details)

Where count is the number of matching entries required to trigger the commendation All details in the detail list must match for a kill to be considered matched.

Valid details:

  • BattleTypes: BT_NONE, BT_FIREARM, BT_AMMO, BT_MELEE, BT_GRENADE, BT_PROXIMITYGRENADE, BT_MEDIKIT, BT_SCANNER, BT_MINDPROBE, BT_PSIAMP, BT_FLARE, BT_CORPSE (Type of item that killed the unit)
  • DamageTypes: DT_NONE, DT_AP, DT_IN, DT_HE, DT_LASER, DT_PLASMA, DT_STUN, DT_MELEE, DT_ACID, DT_SMOKE, DT_10, DT_11, DT_12, DT_13, DT_14, DT_15, DT_16, DT_17, DT_18, DT_19 (Type of damage that killed the unit)
  • Unit Rank: units.rank (Victim unit's rank)
  • Unit Race: units.race (Victim unit's race)
  • Weapon Name: items.type (item used)
  • Weapon Ammo: items.type (item used)
  • Kill Status String: STR_KILLED, STR_STUNNED, STR_PANICKED, STR_MINDCONTROLLED (For non-friendly units)
  • Unit Status String: STATUS_DEAD, STATUS_UNCONSCIOUS, STATUS_PANICKING, STATUS_TURNING (For friendly units)
  • Unit Faction String: FACTION_PLAYER, FACTION_HOSTILE, FACTION_NEUTRAL
  • Unit Side String: SIDE_FRONT, SIDE_LEFT, SIDE_RIGHT, SIDE_REAR, SIDE_UNDER (ie, for commending backstabs)
  • Body Part String: BODYPART_HEAD, BODYPART_TORSO, BODYPART_RIGHTARM, BODYPART_LEFTARM, BODYPART_RIGHTLEG, BODYPART_LEFTLEG