Author Topic: [DONE][Suggestion] Commendation for participation in special mission.  (Read 3042 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1625
  • The Gate is open.
    • View Profile
How about commendation, given for certain alienDeployment? Like "these veterans was in a battle of Cydonia! Oh, oh..." :-)
« Last Edit: December 19, 2021, 02:44:55 pm by Meridian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] Commendation for participation in special mission.
« Reply #1 on: December 05, 2021, 12:24:22 pm »
Seconded. It would be really useful.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: [Suggestion] Commendation for participation in special mission.
« Reply #2 on: December 06, 2021, 03:30:27 pm »
OpenXcom doesn't remember alienDeployment at the end of the mission/debriefing.
Not to mention there can be multiple alien deployments (multi-stage missions).

But maybe we can do something based on the `markerName` or mission `type`... check the `missionStatistics:` in your saved games and propose what could be used in your case.

Example of missionStatistics:

Code: [Select]
missionStatistics:
  - id: 0
    markerName: STR_LANDING_SITE_
    markerId: 1
    time:
      second: 20
      minute: 59
      hour: 6
      weekday: 5
      day: 2
      month: 1
      year: 2601
    region: STR_EUROPE
    country: STR_UNKNOWN
    type: STR_UFO_GROUND_ASSAULT
    ufo: STR_VESSEL_AIRBUS
    success: true
    score: 55
    rating: STR_MS_RATING_0
    alienRace: STR_SECTOID_NONCOM
    daylight: 15
    lootValue: -200
  - id: 1
    markerName: STR_MARKER_DISTRESS_BUNKER
    markerId: 1
    time:
      second: 10
      minute: 54
      hour: 18
      weekday: 1
      day: 5
      month: 1
      year: 2601
    region: STR_SOUTH_EAST_ASIA
    country: STR_CHINA
    type: STR_LOC_DISTRESS_BUNKER_TEMPERATE
    ufo: NO_UFO
    success: true
    score: 69
    rating: STR_MS_RATING_0
    alienRace: STR_MONSTER_RACE
    daylight: 15
    lootValue: -200

Offline Nord

  • Commander
  • *****
  • Posts: 1625
  • The Gate is open.
    • View Profile
Re: [Suggestion] Commendation for participation in special mission.
« Reply #3 on: December 06, 2021, 04:39:38 pm »
... check the `missionStatistics:` in your saved games and propose what could be used in your case.
As i can see, "type:" in the missionStatistics is exactly an alienDeployment name. It will fit perfectly.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] Commendation for participation in special mission.
« Reply #4 on: December 06, 2021, 04:41:21 pm »
What is "type" actually? It appears to be the same as the alien deployment, but the exact differences aren't clear to me.
If that's it, then I would also go with mission type.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: [Suggestion] Commendation for participation in special mission.
« Reply #5 on: December 06, 2021, 04:51:58 pm »
As i can see, "type:" in the missionStatistics is exactly an alienDeployment name. It will fit perfectly.

It's not always the same.

For example for UFO missions the `type` is `STR_UFO_GROUND_ASSAULT`, but `alien deployment` would be `STR_MEDIUM_SCOUT`.

And there are probably other differences too.

What is "type" actually? It appears to be the same as the alien deployment, but the exact differences aren't clear to me.
If that's it, then I would also go with mission type.

`Type` is, I believe, what you see on the (first) Briefing screen.
Not sure.

Offline Nord

  • Commander
  • *****
  • Posts: 1625
  • The Gate is open.
    • View Profile
Re: [Suggestion] Commendation for participation in special mission.
« Reply #6 on: December 06, 2021, 06:51:20 pm »
For example for UFO missions the `type` is `STR_UFO_GROUND_ASSAULT`, but `alien deployment` would be `STR_MEDIUM_SCOUT`.
Still good enough.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] Commendation for participation in special mission.
« Reply #7 on: December 07, 2021, 08:04:12 pm »
To voice an opinion, I'd need to learn more about type. Is it a closed list, just like mission objective? If not and it's a mostly open list (except that all UFOs are grouped together), then I am also fine with that.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: [Suggestion] Commendation for participation in special mission.
« Reply #8 on: December 19, 2021, 02:44:38 pm »
Added filters "missionMarkerFilter" and "missionTypeFilter".

Only one filter can be active at a time.
If both filters are used, "missionTypeFilter" is considered and "missionMarkerFilter" is ignored.

Only successful missions (victories) count.

Only affects the "totalMissions" criteria.

Examples:

Code: [Select]
commendations:
  - type: STR_MEDAL_TOTAL_MISSION_COUNT
    description: STR_MEDAL_TOTAL_MISSION_COUNT_DESCRIPTION
    sprite: 54
    criteria:
      totalMissions: [1,2,3,4,5,6,7,8,9,10]    # all missions, also unsuccessful !

Code: [Select]
  - type: STR_MEDAL_TOTAL_UFOS_COUNT
    description: STR_MEDAL_TOTAL_UFOS_COUNT_DESCRIPTION
    sprite: 54
    missionMarkerFilter: ["STR_LANDING_SITE_", "STR_CRASH_SITE_"]
    criteria:
      totalMissions: [1,2,3,4,5,6,7,8,9,10]    # successful missions with marker = "STR_LANDING_SITE_" or "STR_CRASH_SITE_"

Code: [Select]
  - type: STR_MEDAL_TOTAL_TERROR_MISSION_COUNT
    description: STR_MEDAL_TOTAL_TERROR_MISSION_COUNT_DESCRIPTION
    sprite: 54
    missionTypeFilter: ["STR_TERROR_MISSION"]
    criteria:
      totalMissions: [1,2,3,4,5,6,7,8,9,10]    # successful missions with type = "STR_TERROR_MISSION"

Offline Nord

  • Commander
  • *****
  • Posts: 1625
  • The Gate is open.
    • View Profile
Re: [DONE][Suggestion] Commendation for participation in special mission.
« Reply #9 on: December 21, 2021, 09:29:10 am »
This is great. Thank you.