OpenXcom Forum

Modding => Released Mods => Topic started by: Buscher on March 22, 2021, 10:28:04 pm

Title: [Showcase] Hatching Chryssalids and Tentaculats
Post by: Buscher on March 22, 2021, 10:28:04 pm
This is a show case for scripting. I will probably put some more proof of concepts on the forum at some point.

I have found this setSpawnUnit command in the scripting API so I wanted to do something with it.
One of the results is this mod "Hatching Chryssalids and Tentaculats" which handles zombification with scripting alone. The weapon of the Chryssalids and Tentaculats do not zombify in this mod.
Instead they infect soldiers with parasites which essentially is a tag used to determine damage per turn and whether soldiers should become zombies or not. Of course it's possible to spawn different units depending on the tag. So this means curses and such are also possible.

Of course anyone can use all the scripting of the mod. Feel free to do so. Some credit would be appreciated.

If you are curious you can find the mod on on mods.io (https://openxcom.mod.io/hatching-chryssalids-and-tentaculats)

Code: [Select]
Features:
- Chryssalids and Tentaculats infect soldiers
- Infected soldiers turn to zombies whether by the infection itself or by any other damage
- Infected soldiers are indicated with a green color as visible feedback
- Medi-Kit can cure infections (previous painkiller position)
- Cure charges are dependent on research. The more research is done on Chryssalids and Tentaculats the more charges a Medi-Kit gets
- Infected surviving soldiers will be wracked by the parasite. This means that they will lose stats when finishing a mission still infected.
- Depending on research the stats loss will be reduced to 0.

A lot of thanks goes to Yankes who updated OXCE so this mod was possible.
As a consequence this requires the bleeding edge version of OXCE.

Required version:  Extended-7.0-ea2092bc5-2021-03-22.
You can find a download here (https://openxcom.org/forum/index.php/topic,5258.0.html)

I hope you enjoy and any feedback would be appreciated.
Title: Re: [Showcase] Hatching Chryssalids and Tentaculats
Post by: pWWWa on February 27, 2025, 02:58:25 pm
Dear Buscher,

great thanks for that amazing mod. I slightly surprised why so fancy multinational script is so underrated by community :-)

Also, please, check some feedback:
- infected unit became orange, but not green in TFTD. Perhaps, it happens as planned, but if no -> please, replace COLOR_X1_PURPLE0 with COLOR_X1_GRAY;
- PSIed/MCed Chryssalids and Tentaculats also able to infect any alien unit, include zombies too. It can to occur "funny" endless transformation cycles, where 2 opposing"infectors" permanently generates yourself during hit exchanging (also infected zombie will spawn zombie again). I used my poor knowledge in y-script and particularly solved it via faction restricting:
    damageUnit:
      - offset: 22 # infect unit
        code: |
          var ptr RuleArmor armorRule;
          var ptr RuleItem itemRule;
          var int temp;
          var int infectionDamage;
          var int side1;

          weapon_item.getRuleItem itemRule;
          itemRule.getTag infectionDamage Tag.CAN_DO_INFECTION_DAMAGE;

          if eq infectionDamage 0; # can't infect
            return;
          end;

          unit.getRuleArmor armorRule;
          armorRule.getSize temp;

          if eq temp 2; # don't affect tanks
            return;
          end;
          unit.getFaction side1;
          if eq side1 1; # don`t infect units at alien side <c> pWWWa
            return;
          end;

          if gt to_health 0; # only if pierced
            unit.setTag Tag.CURRENT_INFECTION_DAMAGE infectionDamage;
          end;

          return;
but I suppose, that correct solution for that issue is restriction for infecting exact units (especially STR_ZOMBIE), isn`t it ?
- it will be great, if incendiary / phosphor  damage type will able to remove infection from units too (based on comments in script code).
Title: Re: [Showcase] Hatching Chryssalids and Tentaculats
Post by: Buscher on May 04, 2025, 05:42:44 pm
Hey,

thanks for the feedback. Frankly I am rather surprised that there is a lot of interest in this mod (2k downloads as of now). Apparently people really hate Chryssalids/Tentaculats :p.

I usually don't play with Player Psi anymore as it usually breaks the game IMO. I added your fix to the github version (1.01)
The orange for TFTD is intended behaviour as you can see from the screenshots. Of course you can pick another color if you want.

I have uploaded a new version to mod.io which will allow incendiary/phosphor weapons to stop the transformations.
Also zombies have a chance to hatch each turn. This chance increases with each turn after becoming a zombie.