Author Topic: [DONE] [Suggestion] Starting conditions, environmental effects  (Read 33002 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #45 on: August 22, 2022, 09:17:17 pm »
Yes it is, the solution Dioxine suggested is temporary as it doesn't really allow swapping vehicles.

Well, there are two options, please consider which is easier:

Option 1) Enable this formula in the mapScripts:

Code: [Select]
    - type: addCraft
      craftName: STR_SUBMARINE

Just like it works for UFOs with the addUFO command.

Option 2) Allow swapping the landed craft according to enviros, exactly like armours now:

Code: [Select]
startingConditions:
  - type: STR_UNDERWATER_GEAR
    craftTransformations:
      STR_SKYRANGER: STR_SUBMARINE

Either of these would work for me, but I think the second option (with startingConditions) would be more useful in general.

Option 2 now added.

If both options are defined, option 2 has priority over option 1.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11726
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [DONE] [Suggestion] Starting conditions, environmental effects
« Reply #46 on: August 22, 2022, 10:04:31 pm »
Thank you! I can't express my joy well enough. :)

Offline zee_ra

  • Colonel
  • ****
  • Posts: 213
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #47 on: April 10, 2023, 10:40:51 am »
INFO: There will be a breaking change in the next version.

Default armor will be a weighted list, instead of just a single entry:

Old syntax:

Code: [Select]
    defaultArmor:
      STR_SOLDIER: STR_SPACE_SUIT_UC

New syntax:

Code: [Select]
    defaultArmor:
      STR_SOLDIER:
        STR_SPACE_SUIT_UC: 50 # 50% space suit
        STR_ANNIHILATOR_ARMOR_UC: 25 # 25% annihilator suit
        noChange: 25 # 25% to keep whatever you have on

Is there a way to have an agent removed if a desired armor type is not available for him in the inventory?  A possible case is to require diving suits to be in inventory before they could be used in an underwater mission.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #48 on: April 10, 2023, 11:09:27 am »
Is there a way to have an agent removed if a desired armor type is not available for him in the inventory?  A possible case is to require diving suits to be in inventory before they could be used in an underwater mission.

For the start of the mission, no.
If the armor is not allowed, it will be replaced by a default armor.

For later stages of a multi-stage mission, yes: https://openxcom.org/forum/index.php/topic,10194.msg149818.html#msg149818