HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Another damage-detection system

10-31-2008, 06:32 AM#1
dead_or_alivex
So, I was thinking of another implementation for a damage-detection framework. The ideas are as yet sketchy, which is why they're just ideas for now.

Basically, this involves triggering everything. 'Damage' wouldn't be dealt via UnitDamageTarget(), but by simply subtracting amounts of HP. Armour and all damage-reducing abilities (Hardened Skin, magic immunity, Anti-magic Shell, triggered shields, to name a few) would also have to be triggered.

Advantages

There are a few: firstly, complete, utter control over damage. Reduction of lethal damage would no longer have to be done with abilities, and unit deaths could be prevented and only happen when allowed to. There would be lots of possibilities: custom types of reduction, custom damage types (like those in Rising_Dusk's existing system), control over what kinds of reduction/damage would take priority, bypass other types, and so on.

There would also be no more problems with dynamic triggers or event-leaking.

Disadvantages

Extra overhead, I guess, since we would no longer be using the natives. And redundancy, since a lot of it is already handled well by said natives, and the whole system rewrites a lot of that just to add new functionality (something like PandaMine's AMHS, with the custom shadows and stuff).

Other than those, I doubt there are many disadvantages system-wise. A lot of stuff could be automated/fixed, since everything is triggered.

Other Stuff

The bounty system could be rewritten, or normal UnitDamageTarget()-Chaos/Universal damage could be used to kill. The former option gives much more control, but much more overhead, since there aren't as many potential benefits.

Also, attacks. These would have to be triggered as well, which could cause problems. Since the aim is to cut out EVENT_UNIT_DAMAGED, it could be hard to detect attacks - I was thinking along the lines of a damage point/IAS calculation, but that'd be really excessive. Any ideas here? Perhaps attacks could be triggered as well, done via an additional custom ability? Meaning, the unit's damage wouldn't be shown.

---

Of course, not every map needs such control, which is why there are alternatives, like ADamage and Rising_Dusk's system. I aim for mine to be an alternative; if it ever gets created, that is.
10-31-2008, 10:34 AM#2
the-thingy
Quote:
'Damage' wouldn't be dealt via UnitDamageTarget(), but by simply subtracting amounts of HP
Then you'd have bounty and experience issues (and I doubt people would want to create a bounty AND experience system just so that they could use a damage detection system), right?

Quote:
Other than those, I doubt there are many disadvantages system-wise. A lot of stuff could be automated/fixed, since everything is triggered.
Well, if everything isn't included from the beginning (damage reduction, amplification(?), death prevention, amongst other things), then there would be the disadvantage of the end-user having to do it themselves

The idea itself seems good (I thought of doing something like this before, except I was planning to include everything that had the slightlest association with combat :P), but if you do use custom abilities for unit damage, then the system would be quite limited since most players would be relying on an accurate indication of damage dealt
10-31-2008, 11:59 AM#3
moyack
My personal opinion is that total control is overrated. End user don't want over complicated stuff just for a total control that won't be used totally. We must prioritize in using native in a better way than replacing them.

In general, a system must offer more benefits than disadvantages. If your system can offer this, then it really has future, otherwise... it would be a nice, but end-user useless programming experience.
10-31-2008, 12:13 PM#4
Rising_Dusk
The thing about my system is that it's expandable to do all of the things you suggest. With some (rather simple) extra libraries that require it, it can do everything you suggest while still being the simplest thing on God's green earth to code up for the user.

The only real add-ons I'd like to create sometime are the Shield Add-on and the Priority Add-on, since both serve great use.
Quote:
Originally Posted by dead_or_alivex
There would also be no more problems with dynamic triggers or event-leaking.
The nice thing about using the damage event is that it gives you control over everything. If it weren't for attacks, your method of cutting out the event would obviously be the best, but that isn't the case. A damage point and IAS calculation is something the user would have to hardcode for every unit in their game since they'd have to supply damage points with hard code. That's impractical and removes much of the versatility of such a system.

The beauty with abusing the damage event like I did in my system is that detecting attacks becomes a joke. That's one of the most pivotal points of my system, especially considering that it can (easily) be expanded to do all of the other cool stuff you mentioned in this post (and I did afterwards).

Just my thoughts, anyways.
10-31-2008, 01:48 PM#5
Captain Griffen
If you don't have the damage event, then you don't have a damage detection system. Simple as that... Dusk's system already does what you seem to want, but without needing you to recode the whole of WC3 (since you'd need to recode attack damage without knowing when attacks happen...).
11-01-2008, 05:15 AM#6
dead_or_alivex
Quote:
Originally Posted by the-thingy
Then you'd have bounty and experience issues (and I doubt people would want to create a bounty AND experience system just so that they could use a damage detection system), right?
Yeah. I'll probably be using UnitDamageTarget() to kill units.

Quote:
Well, if everything isn't included from the beginning (damage reduction, amplification(?), death prevention, amongst other things), then there would be the disadvantage of the end-user having to do it themselves

The idea itself seems good (I thought of doing something like this before, except I was planning to include everything that had the slightlest association with combat :P)
I'll try to add as many features as possible. If, of course, this takes off.

Heh, I know the feeling.

Quote:
but if you do use custom abilities for unit damage, then the system would be quite limited since most players would be relying on an accurate indication of damage dealt
Sorry, don't really understand this part. Custom abilities meaning non-triggered ones? A system like this would require every ability to go through it to deal damage - that's how the detection functions.

Quote:
Originally Posted by moyack
My personal opinion is that total control is overrated. End user don't want over complicated stuff just for a total control that won't be used totally. We must prioritize in using native in a better way than replacing them.

In general, a system must offer more benefits than disadvantages. If your system can offer this, then it really has future, otherwise... it would be a nice, but end-user useless programming experience.
Yeah, you're right. Thing is, the ways in which natives can be used creatively have pretty much already been exhausted - there are lots of similar DD systems around, with similar-yet-different implementations. I considered this idea for a while, and I couldn't think of any method that hadn't been covered already.

At the moment, all this is just a WIP proof-of-concept - there are some kinks that haven't been worked out, with both the implementation and the methods used.

And, a system must always offer more benefits than disadvantages.

Quote:
Originally Posted by Rising_Dusk
The thing about my system is that it's expandable to do all of the things you suggest. With some (rather simple) extra libraries that require it, it can do everything you suggest while still being the simplest thing on God's green earth to code up for the user.

The only real add-ons I'd like to create sometime are the Shield Add-on and the Priority Add-on, since both serve great use.
Mm, I suppose so. I took a look at your system again, and it indeed covers quite a lot. Oh well, I didn't think of that angle before.

Quote:
The nice thing about using the damage event is that it gives you control over everything. If it weren't for attacks, your method of cutting out the event would obviously be the best, but that isn't the case. A damage point and IAS calculation is something the user would have to hardcode for every unit in their game since they'd have to supply damage points with hard code. That's impractical and removes much of the versatility of such a system.

The beauty with abusing the damage event like I did in my system is that detecting attacks becomes a joke. That's one of the most pivotal points of my system, especially considering that it can (easily) be expanded to do all of the other cool stuff you mentioned in this post (and I did afterwards).
Yeah, I can see how you used it, and to what effect. Creative. I'll probably use it.

I've pretty much given up the idea of a damage point/IAS calculation for every unit. It'd be a bit too excessive, besides being a pain to configure.

Quote:
Just my thoughts, anyways.
Appreciate you giving them.

Quote:
Originally Posted by Griffen
If you don't have the damage event, then you don't have a damage detection system. Simple as that... Dusk's system already does what you seem to want, but without needing you to recode the whole of WC3 (since you'd need to recode attack damage without knowing when attacks happen...).
Hmm, guess so.

---
At the moment, I'm still trying to figure out methods with which I can detect attacks, like buffs, Hardened Skin, etc. Not so optimistic about doing it without the damage event, however. If there really isn't any other way, I guess I'll leave it at that - I suppose my system could still be useful for complicated stuff not directly involving attacks (spell-exclusive maps, for example).

Thanks for the feedback, everyone.
11-01-2008, 07:34 AM#7
zen87
impractical...

imagine the work load increases to the programmers...