aliens

Author Topic: [RESOLVED] Having trouble with Chryssalid variant  (Read 3610 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[RESOLVED] Having trouble with Chryssalid variant
« on: September 05, 2018, 08:02:55 am »
In my mod I have a variant of the Chryssalid which is supposed to turn soldiers into a variant of the zombie which then can be killed to spawn the chryssalid variant. The problem is that the chryssalid variant spawns just a regular zombie.

Code: [Select]
units:
  - type: STR_CHRYSSALID_TERRORIST_C
    race: STR_CHRYSSALID
    rank: STR_LIVE_TERRORIST
    armor: CHRYSSALID_ARMOR_C
    livingWeapon: true
  - type: STR_ZOMBIE_C
    race: STR_ZOMBIE
    rank: STR_LIVE_TERRORIST
    armor: ZOMBIE_ARMOR_C
    spawnUnit: STR_CHRYSSALID_TERRORIST_C
    livingWeapon: true
armors:
  - type: CHRYSSALID_ARMOR_C
    spriteInv: CHRYSSALID_C
    spriteSheet: CHRYSSALID_C.PCK
    corpseBattle:
      - STR_CHRYSSALID_C_CORPSE
  - type: ZOMBIE_ARMOR_C
    spriteInv: ZOMBIE_C
    spriteSheet: ZOMBIE_C.PCK
items:
  - type: CHRYSSALID_C_WEAPON
    fixedWeapon: true
    zombieUnit: STR_ZOMBIE_C


edit: I determined that the STR_CHRYSSALID_C is apparently using STR_CHRYSSALID_WEAPON instead of STR_CHRYSSALID_C_WEAPON, which I tested by trying to change the bullet sprite on a different alien variant. What I don't understand is how the game determines that the alien should use STR_CHRYSSALID_WEAPON, as I have not told it at any point in the ruleset which weapon to use.
« Last Edit: September 06, 2018, 01:38:32 pm by The Reaver of Darkness »

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: Having trouble with Chryssalid variant
« Reply #1 on: September 05, 2018, 03:02:06 pm »
By race?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Having trouble with Chryssalid variant
« Reply #2 on: September 05, 2018, 08:50:30 pm »
That's probably it!

But how do I make new races? There's nothing for that in the completely unrelated alienRaces: section.

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: Having trouble with Chryssalid variant
« Reply #3 on: September 05, 2018, 09:22:54 pm »
Just use your own descriptor. Like "STR_CUSTOM_CHRYSSIE" :-)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Having trouble with Chryssalid variant
« Reply #4 on: September 06, 2018, 01:38:03 pm »
That will get it to stop using the wrong weapon, but it won't get it using the right weapon.

I figured it out. Well, I checked and found a similar alien in X-Com Files. You can set the weapon with the following command:
Code: [Select]
    livingWeapon: true
    builtInWeapons:
      - STR_CHRYSSALID_C_WEAPON
You must also change its race.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [RESOLVED] Having trouble with Chryssalid variant
« Reply #5 on: September 10, 2018, 08:18:46 pm »
Actually the race is irrelevant. You just don't need the "livingWeapon: true" line - then the game won't assign the unit any weapon except what you manually set with builtInWeapons.