aliens

Author Topic: [DONE] [Suggestion] Unhardcode recovery dividers for special items  (Read 5089 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9055
    • View Profile
Request by Solarius Scorch.

Special items, like for example Alien Alloys / Aqua Plastics are not recovered in full amount.
On UFO missions, you recovered 10-times less than what map contains, on alien base attack 150-times less.
Bigger mods have more such special items, and also need more options to configure the dividers.

Now, it is possible to add this behavior to every item with specialType > 1.
There are 3 levels of assignment:
1. assignment per deployment
2. assignment per mission type (4 fixed types)
3. global default
Level 1 overrides level 2, which overrides level 3.

Ruleset explanation:

Code: [Select]
items:
  - type: STR_ALIEN_ENTERTAINMENT
    recoveryDividers:
#level 1
      STR_MEDIUM_SCOUT: 5        # overrides for specific alien deployments
      STR_TERROR_MISSION: 5
#level 2
      STR_UFO: 5                 # represents any mission started on geoscape as a crashed/landed UFO
      STR_MISSION_SITE: 5        # represents any mission started on geoscape as a mission site
      STR_BASE: 5                # represents any xcom base defense mission
      STR_ALIEN_BASE: 5          # represents any alien base attack mission
#level 3
      STR_OTHER: 5               # is used when everything else fails

Real sample for alien alloys:

Code: [Select]
items:
  - type: STR_ALIEN_ALLOYS
    recoveryDividers:
      STR_UFO: 10
      STR_OTHER: 150
« Last Edit: October 03, 2018, 07:02:05 pm by Meridian »

Offline Nord

  • Commander
  • *****
  • Posts: 1744
  • The Gate is open.
    • View Profile
Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
« Reply #1 on: October 07, 2021, 09:23:19 am »
Hello.
Can divider be less than 1? For multiple items, recovered from one box. Like books from bookshelf?
Thanks.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9055
    • View Profile
Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
« Reply #2 on: October 07, 2021, 12:05:00 pm »
No, only integer values are possible at the moment.

Offline Nord

  • Commander
  • *****
  • Posts: 1744
  • The Gate is open.
    • View Profile
Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
« Reply #3 on: October 07, 2021, 04:45:23 pm »
Understood. Then i can add one more item, which will then "disassembled" via manufacturing.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9055
    • View Profile
Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
« Reply #4 on: October 07, 2021, 06:47:21 pm »
I could add also `recoveryMultipliers`, similar to `recoveryDividers`.

Btw. do you need to recover these as special items? Because if it can be normal items, you could also just use `recoveryTransformations`?

Offline Nord

  • Commander
  • *****
  • Posts: 1744
  • The Gate is open.
    • View Profile
Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
« Reply #5 on: October 07, 2021, 09:59:31 pm »
Btw. do you need to recover these as special items? Because if it can be normal items, you could also just use `recoveryTransformations`?
Oh, yes, really forgot about this. OXCE now posess more possibilities than can be remembered. :-)
Thank you.

Upd.:
recoverTransformations does not work with specialItems...
« Last Edit: October 08, 2021, 05:09:57 pm by Nord »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9055
    • View Profile
Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
« Reply #6 on: December 23, 2021, 11:01:17 am »
Since OXCE 7.2, you can use also negative values, which will work as multipliers.

Example for dividers:

Code: [Select]
items:
  - type: STR_ALIEN_ALLOYS
    recoveryDividers:
      STR_UFO: 10
      STR_OTHER: 150

Example for multipliers:

Code: [Select]
items:
  - type: STR_ALIEN_ALLOYS
    recoveryDividers:
      STR_UFO: -10
      STR_OTHER: -150