Author Topic: Cloning Celatids  (Read 431 times)

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Cloning Celatids
« on: August 10, 2019, 10:22:20 pm »
I'm thinking of making the Celatids clone themselves, like it's said in the Ufopaedia. Probably I'm going the wrong way about how to do it, but here's what I made up so far:

Code: [Select]
items:
  - type: STR_CELATID_GEMMA1
    size: 0.1
#    costSell:
    weight: 3
#    bigSprite:
#    floorSprite:
    power: 0
    damageType: 0
    battleType: 4
    armor: 1
    blastRadius: 0

    fixedWeapon: true
    fuseType: 3
    isExplodingInHands: true
    spawnUnit: STR_CELATID_YOUNG
    spawnUnitFaction: 1

units:
# Cloned unit
  - type: STR_CELATID_YOUNG
    race: STR_CELATID
    rank: STR_LIVE_TERRORIST
    stats:
      tu: 50
      stamina: 70
      health: 40
      bravery: 50
      reactions: 40
      firing: 70
      throwing: 0
      strength: 40
      psiStrength: 40
      psiSkill: 0
      melee: 80
    armor: CELATID_ARMOR
    standHeight: 12
    kneelHeight: 12
    floatHeight: 6
    value: 10
    deathSound: 7
    moveSound: 16
    intelligence: 3
    aggression: 2
    energyRecovery: 30
    builtInWeapons:
      - CELATID_YOUNG_WEAPON
# Primary unit
  - type: STR_CELATID_TERRORIST
    specab: 1
    power: 1
    blastRadius: 1
#    builtInWeaponSets:

STR_CELATID_GEMMAx is a grenade that inflicts no damage and just spawns a clone. There will be six of them, and they must be identical except in the time they go off. STR_CELATID_GEMMA1 would go off on the third turn (fuseType: 3), the next on the sixth, and so on. They have "isExplodingInHands: true" so that they "explode" while the Celatid is carrying them, so the clone appears next to the "parent". The problem: I don't know how to make the grenades be primed right at the moment the Celatid is spawned.

The unit spawned from the grenade is not a Celatid, but a weaker version (STR_CELATID_YOUNG), it can't clone itself and has lower characteristics. The problem: how do I give it a weaker weapon? Get rid of "livingWeapon: true" and give it a "builtInWeapons"?
Upd. This seems to be correct.

To prevent these "grenades" from going off after the Celatid is dead (since it is supposed to clone itself only while alive), they are given "armor: 1" and the Celatid has "specab: 1" with "power: 1", so that it has a weak explosion when it dies, just strong enough to destroy these grenades. I see no problem here.

Finally, how do I give the Celatid these grenades? I suppose it is with "builtInWeaponSets", but https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom) does not specify the syntax of this parameter. What exaclty should it look like, "builtInWeaponSets: ..."?
« Last Edit: August 11, 2019, 08:32:48 am by Kzer-Za »

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Cloning Celatids
« Reply #1 on: August 13, 2019, 08:19:47 am »
So, can anybody please tell me if it is possible to prime grenades carried by a specific type of unit (in this case, Celatid) at the mission start?