aliens

Author Topic: [Solved] spawnUnit: prevents autoSurrender: live unit items recovery  (Read 1493 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
OpenXcom Extended 7.5.7 (v2022-03-07)

I've noticed that if in units: the alien makes use of spawnUnit: and also has been setup to auto-surrender no live alien items are recovered in mission end loot screen if that alien auto-surrenders.

At least that appeared to be the case when I tested it in using the "New Battle" feature from the main menu.

Code: [Select]
    spawnUnit: STR_UNIT_NAME
    capturable: true
    canSurrender: true
    autoSurrender: true

Example:
Code: [Select]
# [====] Items [====]
items:


# [=] Alien Corpse [=]
  - type: STR_AQUATOID_CORPSE
    size: 0.4
    costSell: 20000
    weight: 30
    bigSprite: 46
    floorSprite: 42
    invWidth: 2
    invHeight: 3
    recoveryPoints: 5
    battleType: 11
    armor: 26
    listOrder: 901776
    recoveryTransformations:
      STR_AQUATOID_CORPSE: [1]
      STR_SONIC_BLASTA_RIFLE: [1]


# [=] Live Alien #1 [=]
  - type: STR_ALIEN_UNIT_1
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 40000
    recoveryTransformations:
      STR_AQUATOID_CORPSE: [1]
      STR_SONIC_BLASTA_RIFLE: [1]


# [=] Live Alien #2 [=]
  - type: STR_ALIEN_UNIT_2
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 40000
    recoveryTransformations:
      STR_AQUATOID_CORPSE: [1]
      STR_SONIC_BLASTA_RIFLE: [1]



# [====] Units [====]
units:


# [=] Alien Template [=]
  - &STR_AQUATOID_TEMPLATE_UNIT
    type: STR_AQUATOID_TEMPLATE_UNIT
    race: STR_AQUATOID
    rank: STR_LIVE_SOLDIER
    stats:
      tu: 54
      stamina: 90
      health: 30
      bravery: 80
      reactions: 63
      firing: 52
      throwing: 58
      strength: 30
      psiStrength: 35
      psiSkill: 0
      melee: 76
    armor: AQUATOID_ARMOR0
    standHeight: 16
    kneelHeight: 12
    value: 10
    deathSound: 50
    intelligence: 3
    aggression: 2


# [=] Alien Unit #1 [=]
  - type: STR_ALIEN_UNIT_1
    refNode: *STR_AQUATOID_TEMPLATE_UNIT
    armor: AQUATOID_ARMOR0
    spawnUnit: STR_ALIEN_UNIT_2
    stats:
      mana: 90
      tu: 90
      stamina: 90
      health: 90
      bravery: 90
      reactions: 90
      firing: 90
      throwing: 90
      strength: 90
      psiStrength: 90
      psiSkill: 0
      melee: 90
    capturable: true
    canSurrender: true
    autoSurrender: true
    builtInWeaponSets:
      - - STR_SONIC_BLASTA_RIFLE
        - STR_BLASTA_POWER_CLIP
      - - STR_SONIC_BLASTA_RIFLE
        - STR_BLASTA_POWER_CLIP
      - - STR_SONIC_BLASTA_RIFLE
        - STR_BLASTA_POWER_CLIP


# [=] Alien Unit #2 [=]
  - type: STR_ALIEN_UNIT_2
    refNode: *STR_AQUATOID_TEMPLATE_UNIT
    armor: AQUATOID_ARMOR0
    builtInWeaponSets:
      - - STR_SONIC_BLASTA_RIFLE
        - STR_BLASTA_POWER_CLIP
      - - STR_SONIC_BLASTA_RIFLE
        - STR_BLASTA_POWER_CLIP
      - - STR_SONIC_BLASTA_RIFLE
        - STR_BLASTA_POWER_CLIP

« Last Edit: February 12, 2023, 01:17:31 pm by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9077
    • View Profile
Re: [BUG] spawnUnit: prevents autoSurrender: live unit items recovery
« Reply #1 on: December 01, 2022, 02:00:59 pm »
That's a feature.
Units with spawnUnit (i.e. zombies) can NEVER be killed, stunned, captured, surrendered or anything like that.

Depending on the use case, it's either prevented/ignored/impossible; or should it still happen, the zombie will be converted into its spawnUnit instead.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [BUG] spawnUnit: prevents autoSurrender: live unit items recovery
« Reply #2 on: December 01, 2022, 02:50:13 pm »
In that case don't worry about it.

I'm glad to hear it is working as intended.