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

DeathAnims: Difference between revisions

From ModEnc
Jump to navigation Jump to search
No edit summary
Testid123 (talk | contribs)
mNo edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:


{{Flag
{{Flag
|values={{values|stringlist|[[Animations]]}}
|name=DeathAnims
|files={{Categ|Rules(md).ini}}
|values=Animations
|default=none
|types={{Categ|InfantryTypes}}
|ra=no
|cs=no
|am=no
|ts=no
|fs=no
|ets=no
|ra2=yes
|yr=yes
|ares=yes
}}
}}
Defines what animation sequences should be used when this InfantryType is killed. This is used because InfantryTypes cannot have an Explosion= defined. The animation sequence must be listed in the [Animations] section of RULES.INI and defined in ART.INI.  
Defines which animation sequence should be used when this InfantryType is killed. This is used because InfantryTypes cannot have an Explosion= defined. The animation sequence must be listed in the [Animations] section of RULES.INI and defined in ART.INI. Note that this will over-ride the InfDeath= logic on any Warhead= that kills this unit as this animation will always be displayed when the unit is killed regardless of the type of death that has been inflicted.


==How it works==
==Example==
Specifies a list of [[Animations]] from which an animation can be selected for creation on the death of an [[InfantryType]] by a warhead with {{f|InfDeath|X|link}} set (where {{tt|X}} is the list index (zero-based) of the [[Animations]] from {{f|DeathAnims|link}}).If "InfDeath" is not set, default to "InfDeath=0",just like the original set. If no animation is connected to the InfDeath, the first one in the list will be used instead.
[InfantryType]
...
DeathAnims=Anim0,Anim1,Anim2,Anim3......
...
Each elements in this sequence corresponds to the assignment of [Warhead] > InfDeath=<int>
like
InfDeath=0 → Anim0,  
InfDeath=3 → Anim3
 
If InfDeath= is too large, there is no corresponding element, then, the last one in the list will be played. So you can enjoy using InfDeath=114514 or other, As long as its corresponding element is still within the upper character reading limit of DeathAnims=.
 
*DeathAnims=none will disable this logic and use the settings in [AudioVisual] as before.


==Example==
If you want a sequence similar to the original effect, you can try this one:
<tt>
  [InfantryType]
  [INFEXAMPLE]
  ...
  ...
  DeathAnims=DIEANI0,DIEANI1,DIEANI2,DIEANI3,DIEANI4,DIEANI5,DIEANI6,DIEANI7,DIEANI8
  DeathAnims=dummy,<die1>,<die2>,S_BANG34,FLAMEGUY,ELECTRO,YURIDIE,NUKEDIE,VIRUSD,GENDEATH,BRUTDIE
  ...
  ...
</tt>
 
If the Infantry above is killed by a "InfDeath=2" warhead, animation "DIEANI2" will be played.<br>
{{bugs}}
If the Infantry above is killed by a "InfDeath=9" or above warhead, animation "DIEANI0" will be played. <br>
'''Please note that!!!'''
However, all of the original animations defined by InfDeath will be override, including "Die1" and "Die2" in the infantry image in ART.INI.(Maybe this is the reason why it is not used in Red Alert 2 even though it is new to the game engine.)<br>
Because DeathAnims can only fill in Animations, the corresponding animation will also be played for InfDeath1 and InfDeath2, instead of [InfantrySequence] > Die1=<sequence> and Die2=<sequence>
----
 
Necessary to add despite lack of rewrite:<br>
*Of course, you can solved this problem by using MakeInfantry to make another infantry die together with the original infantry.The effect looks good.(See the [https://t.bilibili.com/680975431479853076 fourth item] in See also for details)
 
DeathAnims has some other effects:
*First, you can add death animation without any extension patch, such as Ares.
*For InfDeath=5, the old theory was that the game would always use the second one in the [Animations] list, rather than using statements like [AudioVisual] > InfantryNuked=<animation> (unless you use Ares. Ares can allow you to use the [AudioVisual] > InfantryElectrocuted=<animation>).
However, if you use DeathAnims, it will normally use the sixth item in this list instead of the second item in the [Animations] list, that is, you can define ElectrocutedDeath through DeathAnims!
 
*With my great effort, any infantry death from any warhead with '''InfDeath=8''' can be remapped correctly by faction.
 
Without changing the animation in the [[InfantryVirus]] section, such as '''InfantryVirus=GENDEATH1'''
 
Use [[DeathAnims]] to assign death patterns to infantry+my efforts.
 
'''[InfantryType]'''
 
'''DeathAnims=dummy,<die1>,<die2>,S_BANG34,FLAMEGUY,ELECTRO,YURIDIE,NUKEDIE,GENDEATH2,GENDEATH,BRUTDIE'''
 
When an infantryman dies So I know Infantry mutations always use '''InfDeath=9(GENDEATH)''' ignoring mutations from '''InfDeath=8(GENDEATH2)'''.
 
This is because infantry can remap colors correctly. Regardless of infantry death from weapons with '''InfDeath=9''' from any party '''Brute''' caused by mutation It will always belong to that side.
 
'''(My infantry (green) uses mutated weapons. Kill the Red Army soldiers. "Brute" caused by killing By the skill of the Green Army soldiers. will always belong to the red side)'''
 
*The animations generated by DeathAnims all have their owner. They can remap their owner colors like InfDeath9, and generate BRUTE with their owner House.
**However, DeathAnims will use the owner of the dead Infantry, that is, the Infantry you generate through DeathAnims belongs to the original owner of the dead Infantry, so it cannot complete replace the original InfDeath9. Of course, maybe this is just right to meet your design needs.
***If you use Ares, you can add MakeInfantryOwner=killer on animation to solve this problem, so that the generated infantrytype belongs to the house of the killer.
 
{{Automatictypelist|Animations|Animations}}
{{Automatictypelist|Animations|Animations}}
==See also==
*[[InfDeath]]
*[[Sequence]]
*[[MakeInfantry]]

Latest revision as of 14:37, 26 June 2024

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: DeathAnims
File(s): Rules(md).ini
Values: Animations
Default: none
Applicable to: InfantryTypes


Defines which animation sequence should be used when this InfantryType is killed. This is used because InfantryTypes cannot have an Explosion= defined. The animation sequence must be listed in the [Animations] section of RULES.INI and defined in ART.INI. Note that this will over-ride the InfDeath= logic on any Warhead= that kills this unit as this animation will always be displayed when the unit is killed regardless of the type of death that has been inflicted.

Example

[InfantryType]
...
DeathAnims=Anim0,Anim1,Anim2,Anim3......
...

Each elements in this sequence corresponds to the assignment of [Warhead] > InfDeath=<int> like InfDeath=0 → Anim0, InfDeath=3 → Anim3

If InfDeath= is too large, there is no corresponding element, then, the last one in the list will be played. So you can enjoy using InfDeath=114514 or other, As long as its corresponding element is still within the upper character reading limit of DeathAnims=.

  • DeathAnims=none will disable this logic and use the settings in [AudioVisual] as before.

If you want a sequence similar to the original effect, you can try this one:

[InfantryType]
...
DeathAnims=dummy,<die1>,<die2>,S_BANG34,FLAMEGUY,ELECTRO,YURIDIE,NUKEDIE,VIRUSD,GENDEATH,BRUTDIE
...

Bugs/Side-Effects/Unexpected Limitations

Please note that!!! Because DeathAnims can only fill in Animations, the corresponding animation will also be played for InfDeath1 and InfDeath2, instead of [InfantrySequence] > Die1=<sequence> and Die2=<sequence>

  • Of course, you can solved this problem by using MakeInfantry to make another infantry die together with the original infantry.The effect looks good.(See the fourth item in See also for details)

DeathAnims has some other effects:

  • First, you can add death animation without any extension patch, such as Ares.
  • For InfDeath=5, the old theory was that the game would always use the second one in the [Animations] list, rather than using statements like [AudioVisual] > InfantryNuked=<animation> (unless you use Ares. Ares can allow you to use the [AudioVisual] > InfantryElectrocuted=<animation>).

However, if you use DeathAnims, it will normally use the sixth item in this list instead of the second item in the [Animations] list, that is, you can define ElectrocutedDeath through DeathAnims!

  • With my great effort, any infantry death from any warhead with InfDeath=8 can be remapped correctly by faction.

Without changing the animation in the InfantryVirus section, such as InfantryVirus=GENDEATH1

Use DeathAnims to assign death patterns to infantry+my efforts.

[InfantryType]

DeathAnims=dummy,<die1>,<die2>,S_BANG34,FLAMEGUY,ELECTRO,YURIDIE,NUKEDIE,GENDEATH2,GENDEATH,BRUTDIE

When an infantryman dies So I know Infantry mutations always use InfDeath=9(GENDEATH) ignoring mutations from InfDeath=8(GENDEATH2).

This is because infantry can remap colors correctly. Regardless of infantry death from weapons with InfDeath=9 from any party Brute caused by mutation It will always belong to that side.

(My infantry (green) uses mutated weapons. Kill the Red Army soldiers. "Brute" caused by killing By the skill of the Green Army soldiers. will always belong to the red side)

  • The animations generated by DeathAnims all have their owner. They can remap their owner colors like InfDeath9, and generate BRUTE with their owner House.
    • However, DeathAnims will use the owner of the dead Infantry, that is, the Infantry you generate through DeathAnims belongs to the original owner of the dead Infantry, so it cannot complete replace the original InfDeath9. Of course, maybe this is just right to meet your design needs.
      • If you use Ares, you can add MakeInfantryOwner=killer on animation to solve this problem, so that the generated infantrytype belongs to the house of the killer.

Automatic List Inclusion

Animations used as values for this flag are automatically listed under the internal [Animations] array. However no harm can be done by listing them manually.

See also