OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Meridian on October 03, 2018, 06:57:41 pm

Title: [DONE] [Suggestion] Unhardcode recovery dividers for special items
Post by: Meridian on October 03, 2018, 06:57:41 pm
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
Title: Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
Post by: Nord 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.
Title: Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
Post by: Meridian on October 07, 2021, 12:05:00 pm
No, only integer values are possible at the moment.
Title: Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
Post by: Nord on October 07, 2021, 04:45:23 pm
Understood. Then i can add one more item, which will then "disassembled" via manufacturing.
Title: Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
Post by: Meridian 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`?
Title: Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
Post by: Nord 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...
Title: Re: [DONE] [Suggestion] Unhardcode recovery dividers for special items
Post by: Meridian 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