OpenXcom Forum

Modding => OpenXcom Extended => OXCE Support => Topic started by: The Martian on June 23, 2021, 10:53:45 am

Title: [Solved] Need help with startingConditions: & armorTransformations:
Post by: The Martian on June 23, 2021, 10:53:45 am
I've been making a mod to display firing animations in TFTD (https://openxcom.org/forum/index.php/topic,9761.msg139530.html#msg139530).

So far the unit sprite sheets are finished but now I need the land variants to be worn by X-Com when not underwater.

The solution to this I'm attempting is to use startingConditions: & armorTransformations: to swap the X-Com soldier's armor for their land versions when engaging in the Base Defence (https://www.ufopaedia.org/index.php/Base_Defense_(TFTD)), Port attacks (https://www.ufopaedia.org/index.php/Port_Attack), Island attacks (https://www.ufopaedia.org/index.php/Island_Attack) and Ship attack (https://www.ufopaedia.org/index.php/Shipping_Lane_Mission) missions.

Unfortunately my attempts to use startingConditions: have not yielded results.


In the current version of my mod when the aliens attack a surface city X-Com soldier's armor is not transformed into the variant without a helmet.


Here is the code involving the transformation.
Code: [Select]
# [====]  Alien Deployments [====]
alienDeployments:

# [=] Island Terror Mission [=]
  - type: STR_ISLAND_TERROR
    startingCondition: STR_LAND_MISSION_HELMETS_OFF

# [=] Port Terror Mission [=]
  - type: STR_PORT_TERROR
    startingCondition: STR_LAND_MISSION_HELMETS_OFF

# [=] Cargo Ship Mission (Part 1) [=]
  - type: STR_CARGO_SHIP_P1
    startingCondition: STR_LAND_MISSION_HELMETS_OFF

# [=] Cargo Ship Mission (Part 2) [=]
  - type: STR_CARGO_SHIP_P2
    startingCondition: STR_LAND_MISSION_HELMETS_OFF

# [=] Cruise Ship Mission (Part 1) [=]
  - type: STR_CRUISE_SHIP_P1
    startingCondition: STR_LAND_MISSION_HELMETS_OFF

# [=] Cruise Ship Mission (Part 2) [=]
  - type: STR_CRUISE_SHIP_P2
    startingCondition: STR_LAND_MISSION_HELMETS_OFF
   
# [=] Base Defence Mission [=]
  - type: STR_BASE_DEFENSE
    startingCondition: STR_LAND_MISSION_HELMETS_OFF
   

# [====] Starting Conditions [====]
startingConditions:
  - type: STR_LAND_MISSION_HELMETS_OFF
    armorTransformations:
      STR_NONE_UC: STR_NONE_UC_LAND
      STR_PLASTIC_AQUA_ARMOR_UC: STR_PLASTIC_AQUA_ARMOR_UC_LAND
      STR_ION_ARMOR_UC: STR_ION_ARMOR_UC_LAND
      STR_MAGNETIC_ION_ARMOR_UC: STR_MAGNETIC_ION_ARMOR_UC_LAND



I've also attached the mod directly to this post as well for convenience:
. Firing Animation for TFTD (V0-4) (https://openxcom.org/forum/index.php?action=dlattach;topic=9762.0;attach=54298)
Title: Re: Need help with startingConditions: & armorTransformations:
Post by: Buscher on June 23, 2021, 06:41:24 pm
I think armorTransformations is part of enviroEffects: (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Battle_Enviro_Effects) and not startingConditions:
Title: Re: Need help with startingConditions: & armorTransformations:
Post by: The Martian on June 24, 2021, 09:02:21 am
Thank you very much Buscher, that fixed it. (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)

I was using the coding example found 'here (https://openxcom.org/forum/index.php/topic,4444.msg61196.html#msg61196)' however judging by 'this (https://openxcom.org/forum/index.php/topic,9637.msg138164.html#msg138164)' post by Solarius Scorch I found while searching for enviroEffects: it appears that the code structure has changed since it was made.
Perhaps it's related to the separation of startingConditions from enviroEffects in the code? They used to be rolled into startingConditions before.