I'm really really stuck on making a cool spell idea I have, I don't even know where to begin. It's for a multiplayer game, 1v1/2v2/FFA. The spell works as follows:
Enemy, friendly and neutral units are all targetable. The spell caster puts a shell around a unit, which stuns the unit (or makes it unable to move and use abilities) until the shell is destroyed. Sometimes it would beneficial to do this on a friendly unit to save it, and then kill the shell later, while other times you can do it to crowd-control an enemy unit. So when someone targets the unit encased in the shell they will actually be targeting the shell, this would be true for both friendly and enemy units of the unit. For friendly units to attack it I guess you would have to manually press attack and then the unit in the shell, but I would also like the unit to stop attacking it after the shell is destroyed (so it doesn't take any unnecessary damage from the friendly-fire.
I tried making dummy-units for the shells to "absorb" the damage, but I can't make it work...
Any ideas on how to make something like this? :) If it's not possible in the data editor, tips for the trigger editor (or a mix of both) are also welcome!
Make your ability add a Buff behaviour to the target which stuns and also has the Combat - Damage Response - Modify Fraction field set to 0 and the Combat - Damage Response - Modify Limit field set to however much damage you want the shell to absorb before dying. The first field modifies the amount of damage the unit takes to 0% and the second is the life of the shell. For stopping the attack if it's a friendly unit you might be able to use an Issue Order effect in the Combat - Damage Response - Exhausted field which proper targeting.
Spoolofwhool is correct, however there is one additional detail, that often will be overlooked. The Modify Limit simply controls how much damage is modified by the damage response. So for example, if you have a limit of 100, with a modify fraction of 0 and the unit with the behavior takes 200 damage, it will only be modified down to 100 (first 100 is reduced to 0, and the rest is ignored). The behavior flag called "Remove Exhausted Damage Response" is what causes the behavior to be removed/destroyed when the damage reaches the Modify Limit. By default, it is enabled, but do keep that in mind. If it is unchecked, the behavior will remain even after the modify limit is reached. Furthermore, when the modify limit is reached is when the Exhausted effect runs.
One thing I am unsure of is if the modify limit is cumulative or is per damage instance.
You can use lots of lesser attacks to trigger the modify limit. I'm not sure whether it will keep triggering if you uncheck the flag you mentioned. Will test.
Thanks Spoolofwhool! I got it to work, but I had to check the flag 'modify minimum damage'. No idea why though, but before I checked that one it would let some damage pass through, even with modify fraction 0.
In the game data, there is a field that control the absolutely minimum damage a unit will take, regardless of modification via armor or damage responses. When the modify minimum damage flag is set, it will permit the damage response to modify even the minimum damage (so in the case with modify fraction 0, with the flag set, it will truly reduce the damage to 0).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi!
I'm really really stuck on making a cool spell idea I have, I don't even know where to begin. It's for a multiplayer game, 1v1/2v2/FFA. The spell works as follows: Enemy, friendly and neutral units are all targetable. The spell caster puts a shell around a unit, which stuns the unit (or makes it unable to move and use abilities) until the shell is destroyed. Sometimes it would beneficial to do this on a friendly unit to save it, and then kill the shell later, while other times you can do it to crowd-control an enemy unit. So when someone targets the unit encased in the shell they will actually be targeting the shell, this would be true for both friendly and enemy units of the unit. For friendly units to attack it I guess you would have to manually press attack and then the unit in the shell, but I would also like the unit to stop attacking it after the shell is destroyed (so it doesn't take any unnecessary damage from the friendly-fire. I tried making dummy-units for the shells to "absorb" the damage, but I can't make it work... Any ideas on how to make something like this? :) If it's not possible in the data editor, tips for the trigger editor (or a mix of both) are also welcome!
Make your ability add a Buff behaviour to the target which stuns and also has the Combat - Damage Response - Modify Fraction field set to 0 and the Combat - Damage Response - Modify Limit field set to however much damage you want the shell to absorb before dying. The first field modifies the amount of damage the unit takes to 0% and the second is the life of the shell. For stopping the attack if it's a friendly unit you might be able to use an Issue Order effect in the Combat - Damage Response - Exhausted field which proper targeting.
Spoolofwhool is correct, however there is one additional detail, that often will be overlooked. The Modify Limit simply controls how much damage is modified by the damage response. So for example, if you have a limit of 100, with a modify fraction of 0 and the unit with the behavior takes 200 damage, it will only be modified down to 100 (first 100 is reduced to 0, and the rest is ignored). The behavior flag called "Remove Exhausted Damage Response" is what causes the behavior to be removed/destroyed when the damage reaches the Modify Limit. By default, it is enabled, but do keep that in mind. If it is unchecked, the behavior will remain even after the modify limit is reached. Furthermore, when the modify limit is reached is when the Exhausted effect runs.
One thing I am unsure of is if the modify limit is cumulative or is per damage instance.
@ArcaneDurandel: Go
You can use lots of lesser attacks to trigger the modify limit. I'm not sure whether it will keep triggering if you uncheck the flag you mentioned. Will test.
Thanks Spoolofwhool! I got it to work, but I had to check the flag 'modify minimum damage'. No idea why though, but before I checked that one it would let some damage pass through, even with modify fraction 0.
In the game data, there is a field that control the absolutely minimum damage a unit will take, regardless of modification via armor or damage responses. When the modify minimum damage flag is set, it will permit the damage response to modify even the minimum damage (so in the case with modify fraction 0, with the flag set, it will truly reduce the damage to 0).