Here's the code that currently determines which particle system is used on hit (in mission.cs):
It's not very modder friendly (especially since HitParticleResultData is Internal). Ideally, it would be nice to override which particle system is used at the agent level or maybe even in xml. The use cases would be having black blood for uruk-hai, a fiery effect for a balrog, etc. Might also be useful for a gore mod ?
C#:
private void DecideAgentHitParticles(
Blow blow,
Agent victim,
ref AttackCollisionData collisionData,
ref HitParticleResultData hprd)
{
if (victim == null || blow.InflictedDamage <= 0 && (double) victim.Health > 0.0)
return;
if (!blow.WeaponRecord.HasWeapon() || blow.WeaponRecord.WeaponFlags.HasAnyFlag<WeaponFlags>(WeaponFlags.NoBlood) || collisionData.IsAlternativeAttack)
{
hprd.StartHitParticleIndex = ParticleSystemManager.GetRuntimeIdByName("psys_game_sweat_sword_enter");
hprd.ContinueHitParticleIndex = ParticleSystemManager.GetRuntimeIdByName("psys_game_sweat_sword_enter");
hprd.EndHitParticleIndex = ParticleSystemManager.GetRuntimeIdByName("psys_game_sweat_sword_enter");
}
else
{
hprd.StartHitParticleIndex = ParticleSystemManager.GetRuntimeIdByName("psys_game_blood_sword_enter");
hprd.ContinueHitParticleIndex = ParticleSystemManager.GetRuntimeIdByName("psys_game_blood_sword_inside");
hprd.EndHitParticleIndex = ParticleSystemManager.GetRuntimeIdByName("psys_game_blood_sword_exit");
}
}
It's not very modder friendly (especially since HitParticleResultData is Internal). Ideally, it would be nice to override which particle system is used at the agent level or maybe even in xml. The use cases would be having black blood for uruk-hai, a fiery effect for a balrog, etc. Might also be useful for a gore mod ?