OpenXcom Forum

Modding => Help => Topic started by: The Reaver of Darkness on September 05, 2018, 08:02:55 am

Title: [RESOLVED] Having trouble with Chryssalid variant
Post by: The Reaver of Darkness 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.
Title: Re: Having trouble with Chryssalid variant
Post by: Nord on September 05, 2018, 03:02:06 pm
By race?
Title: Re: Having trouble with Chryssalid variant
Post by: The Reaver of Darkness 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.
Title: Re: Having trouble with Chryssalid variant
Post by: Nord on September 05, 2018, 09:22:54 pm
Just use your own descriptor. Like "STR_CUSTOM_CHRYSSIE" :-)
Title: Re: Having trouble with Chryssalid variant
Post by: The Reaver of Darkness 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.
Title: Re: [RESOLVED] Having trouble with Chryssalid variant
Post by: Solarius Scorch 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.