Hello,
I'm modding this game wanted to add the ability for zombies to zombify infantry. Essentially what needs to happen is when a unit dies to a zombie specifically, it becomes a zombie. I am not sure how and to scared to mess with the C# and add any traits like SpawnActorOnZombieDeath, which was my first idea. I would also settle for when a unit is hit by a zombie, though it is not prefereable.
How can I make this work?
Question about modding
-
- Posts: 12
- Joined: Mon May 15, 2023 12:58 pm
Re: Question about modding
To start, ^Infantry is defined in OpenRA/mods/ra/rules/defaults.yaml and the various types of infantry share it. The map-specific rules in rules.yaml add a SpawnActorOnDeath trait to it.
Code: Select all
^Infantry:
SpawnActorOnDeath@SPAWNZOMBIE:
Actor: Zombie
OwnerType: Killer
DeathType: ZombieDeath
Next, the Claw weapon from mods/ra/weapons/other.yaml is tweaked, by adding another rule through the map's weapons.yaml.
Code: Select all
Claw:
Warhead@1Dam: SpreadDamage
DamageTypes: Prone50Percent, TriggerProne, DefaultDeath, ZombieDeath