ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Mutation: Difference between revisions

From ModEnc
Jump to navigation Jump to search
rw
Marshall (talk | contribs)
moving MakeInfantry stuff to its own page
Line 1: Line 1:
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 {{TTL|MakeInfantry}} tag on the death animation the superweapon uses to kill its targets.  
Mutation is the effect caused by Yuri's minor super weapon, the Genetic Mutator. In-game, the super weapon changes any normal infantry within its area of effect (which is the largest of the minor super weapons) into Brutes, which are somewhat modelled on the Incredible Hulk.


== MakeInfantry (tutorial by Marshall) ==
The effect is achieved using [[MakeInfantry]] logic with the warhead that the super weapon uses to kill its targets.


1. '''You can have only one* [[InfantryTypes|InfantryType]] that isn't neutral that has been created from MakeInfantry logic. But you can have any number of InfantryTypes that are neutral.'''
=See also=
 
*{{TTL|MakeInfantry}}
The place that determines the InfantryType(s) created from MakeInfantry logic is in the [{{TTL|General}}] section of [[rules]]md.ini
AnimToInfantry=BRUTE
That flag accepts a comma seperated list of infantry types. You can change/add whatever infantry types you like.<br>
Later, we will refer to this list by an index number.<br>
For example:
AnimToInfantry=BRUTE,NEWUNIT,GHOST
Then;
BRUTE=0, NEWUNIT=1, GHOST=2
 
2. To make the MakeInfantry unit player-owned, you must use {{TTL|InfDeath|9}} on the weapon's {{TTL|Warhead}}.<br>
{{TTL|MutateWarhead}} and {{TTL|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 {{TTL|InfantryMutate|GENDEATH}}<br>
You can change that animation to something else (but remember to parse any new animation in the [{{TTL|Animations}}] list).
 
3. In {{Tt|[[art]]md.ini}}, find <tt>[GENDEATH]</tt><br>
The key part of this animation is the flag <tt>MakeInfantry=0</tt><br>
Use this flag on your animation and set it to the index number of the infantry type from {{TTL|AnimToInfantry}}.
 
Note: You can create [[neutral]] infantry by not using an {{TTL|InfDeath|9}} weapon (this includes using an animation that is not caused by a weapon:<br>
E.G. Giving <tt>[E1]</tt> the flag <tt>[[DeathAnims]]=GENDEAT2</tt> and <tt>[GENDEAT2] MakeInfantry=0</tt> 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 <tt>InfDeath=9</tt>, resulting in a player-owned Brute by default.
 
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. <br>
 
Important note about mutation weapons: Do not use an area effect weapon if [[paradrops|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). <br>
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 mode]]s. But only ever one player-owned infantry type in each [[game mode]].
 
<hr>
 
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 {{TTL|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.
 
InfDeath 8 uses the animation palette by default, unlike InfDeath 9 which uses the unit palette.
 
Setting {{TTL|AltPalette|yes}} on InfDeath 8's animation has a strange result:
The animation works fine and is drawn in the unit palette, however the remappable colours are remapped to the wrong side! I was Purple. My opponent was Green, the remappable parts of the animation were Orange!
You can use {{Tt|AltPalette&#x3d;yes}} if you want, just don't use the remappable colours.
 
 
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 a version of the RockPatch earlier than version 1.08, the above also applies to InfDeaths 11-100 (the NewInfMutations). However, in addition: ALL mutation InfDeaths (9, 11-100) must result in a MakeInfantry call, otherwise NONE of the mutation InfDeaths will work and may even cause Internal Errors.
If you are using RockPatch 1.08 or higher, a new InfDeath system has been implemented which auto-detects Mutation/non-Mutation InfDeaths and so this is not an issue (see the RockPatch InfDeath tutorial for more information). However, even in RockPatch 1.08 and higher, InfDeath 9 must always result in a MakeInfantry call.
 
[[Category:RA2/YR Tutorials]]

Revision as of 19:48, 14 April 2008

Mutation is the effect caused by Yuri's minor super weapon, the Genetic Mutator. In-game, the super weapon changes any normal infantry within its area of effect (which is the largest of the minor super weapons) into Brutes, which are somewhat modelled on the Incredible Hulk.

The effect is achieved using MakeInfantry logic with the warhead that the super weapon uses to kill its targets.

See also