Mutation
Mutation is the effect caused by the Yuri Superweapon, the Genetic Mutator. In game, the superweapon changes any normal infantry in its radius of effect (which is the largest of the minor superweapons) into Brutes, which are somewhat modelled in the Incredible Hulk. Code wise, the effect is created by the use of the MakeInfantry tag on the death animation the superweapon uses to kill its targets.
MakeInfantry (tutorial by Marshall)
1. You can have only one* infantry type that isn't neutral that has been created from MakeInfantry logic. But you can have any number of infantry types that are neutral.
The place that determines the infantry type(s) created from MakeInfantry logic is in rulesmd.ini
AnimToInfantry=BRUTE
That flag accepts a comma seperated list of infantry types. You can change/add whatever infantry types you like.
Later, we will refer to this list by an index number.
For example: AnimToInfantry=BRUTE,NEWUNIT1,GHOST
Then; BRUTE=0, NEWUNIT=1, GHOST=2
2. To make the MakeInfantry unit player-owned, you must use InfDeath=9 on the weapon's warhead.
MutateWarhead= and MutateExplosionWarhead= are used by the Genetic Mutator Superweapon and have no bearing on this logic.
The animation used by InfDeath 9 is determined by the global flag InfantryMutate=GENDEATH
You can change that animation to something else (but remember to parse any new animation in the [Animations] list).
3. In artmd.ini, find [GENDEATH]
The key part of this animation is the flag MakeInfantry=0
Use this flag on your animation and set it to the index number of the infantry type from AnimToInfantry=
Note: You can create neutral infantry by not using an InfDeath=9 weapon (this includes using an animation that is not caused by a weapon:
E.G. Giving [E1] the flag DeathAnims=GENDEAT2 and [GENDEAT2] MakeInfantry=0 would cause the GI to turn into a neutral Brute when the GI dies.
i.e. You can create multiple weapons that result in the same effect as the Genetic Mutator as long as they all use InfDeath=9, resulting in a player-owned Brute by default, but there is no reason why you cannot change this to a different infantry unit.
Applications:
You could have a GM superweapon, a mutation point-sniper, and an area effect mutation with them all resulting in Brutes or an other infantry of your choice. You could also use the animation to generate neutral infantry opponents from any event that generates an animtion such as crate pickups or a building anim.
Important note about mutation weapons: Do not use an area effect weapon if paratroopers are not immune to it - it will cause an Internal Error if a falling paratrooper is killed by an area effect mutation weapon (point based mutation deaths seem to be okay and just result in the paratrooper exploding).
The GM superweapon seems to have special coding to prevent it causing an error however.
You can have a different player-owned infantry type in different game modes. But only ever one player-owned infantry type in each game mode.
Now that you have read and understood the above, I can provide one last bit of information:
You can actually have a second infantry-type that isn't neutral!
To make the second mutated unit player-owned, you must use InfDeath=8 on the weapon's warhead.
The animation used by InfDeath 8 is determined by the global flag InfantryVirus=VIRUSD
The only difference between InfDeath 8 and InfDeath 9 is that InfDeath 8's animation will not use the remapable player colours.
[When genetically mutated, the animation that creates the Brute will display the Brute in the player colours of the player the Brute will soon belong to before the Brute is actually created. With InfDeath 8 this doesn't happen and the remapable colours remain red.]
So, InfDeath 8 can create a fully functional player owned infantry with remapped colours. Only the 'conversion animation' isn't rempabale.
I have not tested all the other InfDeaths, but the ones I have tested will only yield neutral infantry. Given the comments in the rulesmd.ini file, it is safe to assume that only InfDeaths 8 and 9 can be made to work.
Finally, an important note about InfDeath 9:
The animation associated with this InfDeath MUST HAVE a MakeInfantry=X line.
- [Actually, it doesn't have to have a MakeInfantry=X line IF it has instead a Next= line so that the last animation of a sequence of animations invoked by InfDeath 9 does have a MakeInfantry=X line.]
If it doesn't, then the animation will not play at all. You cannot convert InfDeath 9 into a non-mutation InfDeath.
InfDeath 9 is hardcoded to use the unit palette instead of the animation palette for the animation.
InfDeath 8 obviously doesn't have the above attributes.
Note: If you are using PD's enhanced functionality patch, the above also applies to InfDeaths 11-99 (the NewInfMutations). However, in addition: ALL mutation InfDeaths (9, 11-99) must result in a MakeInfantry call, otherwise NONE of the mutation InfDeaths will work and may even cause Internal Errors.