A hit detection system. Could this idea work?

Discussion in 'Programming' started by Khristophoros, Apr 22, 2012.

  1. doomsheep

    doomsheep Well-Known Member

    mixed damage that is blocked by pipe is magic damage. instances where you lose the buff by becoming magic immune would have the shield recast.

    there are a ton of heroes that use unreliable hit detection.

    DK can simply detect the frost buff. what else is there, just luna?

    sorry. what was your point, then?
  2. MauranKilom

    MauranKilom Well-Known Member

    Read again.
    I said being magic immune while taking mixed damage will make the system think you took magic damage.
    But that's nonsense, because you wouldn't take magic damage if you are magic immune.
    (Mixed damage gets blocked by shield but not by magic immunity, also see below.)

    And what's the problem? I mean, what problem is there that would justify recoding all orbs etc.?

    Level 2 dragon form will be awesome for detecting the frost buff. Oh wait...
    Also, how do you recode critical strikes on ranged units? How do you recode quelling blade (aka demolish)? Split Shot?

    My point was simply that your system is f'ed by mixed damage. Detecting/correcting it simply fails this way.

    More precisely, i wanted to emphasize how dealing magic damage to a unit that took mixed damage (recognized as magic damage by the shield) surprisingly doesn't work against magic immune units (see above) or deals too much damage against high armor targets.
    I didn't want to continue on that point (because the -1 damage part is kinda irrelevant), but you simply provoked it right there.
  3. doomsheep

    doomsheep Well-Known Member

    it's a damage type that gets detected by the system, so durr.

    anyway, most applications of it could just check for magic immunity.

    it is inaccurate and limiting.

    the whole point is to remove the dummy buff so level 2 dragon form could simply be exactly the same as level 3 dragon form. does level 2 dragon even obstruct orbs?

    the goal is to detect the primary attack, not split shots.

    you recode quelling blade by amplifying damage if the target is a creep.

    again, there are much bigger inaccurarcies.
  4. MauranKilom

    MauranKilom Well-Known Member

    It doesn't. That's the point. It gets detected as magic damage, which is straight up wrong.

    When was the last time in a serious game when you thought "oh man, that on-attack proc is so screwed up, it needs to be remade"? And what's the limiting point on things like impetus and arcane orb (aside from them being orb effect buff placers)?

    What dummy buff are you talking about? And why should lvl 2 be exactly the same as lvl 3? Doesn't make sense.
    Also, http://www.playdota.com/mechanics/Orb_Effects
    You start to annoy me here by not eving trying to understand the interactions we are talking about. Then ofcourse you won't get what i mean.
    So please, read up on that, then reread my post and then try again.

    The demolish modifier is accounted for before any kind of reductions, whereas your idea would only apply after all reductions.
    So you introduce another inaccuracy? Sounds like a great to fix an inaccuracy.

    Oh btw, you'll face the same problems with critical strike. Just to get you started. And that problem will be a major inaccuracy.
  5. doomsheep

    doomsheep Well-Known Member

    it gets detected as "damage that is blocked by anti-magic shell".

    unreliable hit detection is only used for things it's not a big deal for because it's lacking. it doesn't affect the game in big ways but it's still inaccurate a lot of time. something that would need to be accurate couldn't use it.

    impetus and arcane orb effectively already use the system.

    you detect level 3 dragon form attacks by removing the frost buff and reapplying something that does exactly the same. you can detect level 2 dragon form by giving it that frost orb and removing the buff.

    that's interesting. i know how most things work but i'm not an expert.

    according to that defend is calculated at the same time. that can be used, can't it?

    i always thought criticals stacked with deso for some reason. that actually does make this unviable unless there's a way around it.
  6. MauranKilom

    MauranKilom Well-Known Member

    I just wanted to mention that i don't want Khristophoros to feel insulted or anything. It's perfectly fine to suggest ideas and discuss about wc3 mechanics that make them less useable.

    My debate with doomsheep here is/was just going on because i felt like pointing out (and making him understand) diverse flaws of the system he defends so much. I'm enough of a mechfag for that. Even if he tries to insult me for true statements.
  7. Khristophoros

    Khristophoros Well-Known Member

    Sorry for the late reply. I forgot about the thread. :blushing:

    Cleave should still work normally right? It doesn't interfere with buff placers or orb effects, and it will not deal damage to the the unit that you attacked which has the marker buff. I don't understand how Cleave is a problem.

    For bouncing glaives you would have a dummy unit attack the other units and treat it as an attack from Luna, so the damage would have to be based on the actual damage she dealt with her first attack. It would be a balance change for Luna but I don't think it would be a problem. The numbers would have to be changed a little bit.

    Isn't there a buff placer that ignores it? Like Skadi?

    He's done harder stuff in the past. This would be easy compared to some of the big system changes he's done.

    I think it has to be done eventually unless he plans on making WC3 DotA deprecated and moves on to focus completely on DotA 2.
  8. MauranKilom

    MauranKilom Well-Known Member

    I take that with magic immunity back, most buff placers affect magic immune units.

    But go ahead and explain how to recode crits.
    Basically, for on-hit-stuff to work, you'd need to find out the damage before reductions. WC3 only gives you the damage after reductions.
    Same problems with missed splash attacks btw.
    Last edited: May 10, 2012
  9. Deaod

    Deaod Well-Known Member

  10. Khristophoros

    Khristophoros Well-Known Member

    The only problem with using post-reduction damage for crits is Damage Block.

    However, you can recode Damage Block too. As long as you can get the damage before any flat reduction such as Damage Block it will work.

    Missed splash attacks? Not sure what you're talking about. Please explain in more detail.
  11. MauranKilom

    MauranKilom Well-Known Member

    You won't see Icefrog including 16 libraries into this map when he never used any before.

    Currently, wc3 does damage block -> armor reduction.
    If you want to softcode damage block, you'll have to do armor reduction -> damage block, which obviously makes damage block a lot better.

    Now you could say you could reverse-calculate all armor reductions. But you'll probably see that you want to fix a small inconsistency like issues with Lanaya's spilling or Jinada procs or the buff-placing aspect of stuff like Impetus and Arcane Orb. Recoding half the map for this (or introducing heavier implications on gameplay as with critical strikes/damage block) isn't worth the benefit.

    If you miss a splash attack, the projectile will move to the location the target was in, and do a percentage of its damage (in DotA it's 50%, but that constant can be changed).
    The frost buff is also applied to all targets in the aoe (even if you missed), so your system would detect that as a hit, too (although missed attacks shouldn't really proc stuff).
    Last edited: May 10, 2012
  12. doomsheep

    doomsheep Well-Known Member

    more of a problem would be showing the before reduction critical numbers like it does now and remaking the PRD it uses (then again why not be canon with dota 2?). it would probably be doable to make it with defend, anyway.

    splash attacks that miss will throw the attack to the point where the unit was without following it and hit stuff there. (for half the damage?) it's a relatively rare case though. there's also weaver's and luna's passives that require the before-reduction damage for further attacks and don't allow buff placers.

    i've been thinking about this some more and it might actually be a better idea to just detect every non-attack damage event. it's simple for triggered spells and hardcoded ones can just be modified to be cast by dummy units to detect the damage source. some things like radiance would need to be remade but i can't think of any that are particularly difficult. it would probably have similiar problems as this one though, for example weaver's second attack would register as a new one.
  13. MauranKilom

    MauranKilom Well-Known Member


    But making every non-attack damage be dealt through triggers isn't exactly easy, too.
    And furthermore, assuming every damage not dealt by triggers brings problems with cleave and splash again (which means you'd have to recode them, too).
  14. doomsheep

    doomsheep Well-Known Member

    it doesn't have to be dealt through triggers. it just needs to be detectable as not hero-based. for a hardcoded spell just use a dummy unit to cast it.

    actually, how about this?

    dealt by triggers or dummy units: ability damage
    dealt by a hero after the latest attack command: attack damage
    dealt by a hero but not after latest attack command: unknown

    -geminate attack has weird stacking rules and the second attack is likely to be registered as attack damage. weavers don't really do shit with orbs though so they could just be entirely disallowed on him without affecting anything.
    -moon glaive does not allow orbs except for lifesteal. allowing unknown damage to detect hits could glitch but not in a very abusable way.
    -cleave would always register as unknown since there's no projectile.
    -dragon knight's splash is likely to register wrong. however it only allows frost attack, lifesteal and lightning. none of them allow for abusable glitches.

    for the above mentioned only allow attack damage to proc attack detection spells and orbs.
    for ranged heroes that can't register stuff wrong, allow unknown damage to proc orbs.
    for melee heroes only allow attack damage to proc attack detection spells and orbs.
    Last edited: May 10, 2012
  15. MauranKilom

    MauranKilom Well-Known Member

    Split shot kills that...

    Also, allowing chainlightning to proc other orbs is probably not exactly what you wanted.

    Just to make sure we have the same presumptions:
    Do you plan on remaking all orbs with your latest system, or do you only want to use this to improve the "buggy" ones?
    Last edited: May 10, 2012
  16. doomsheep

    doomsheep Well-Known Member

    actually, there should be two kinds of unknown damage, one for units you've recently made an attack order against and another for units you haven't.

    dusa with split shot on would go to the "can fuck with the system" group and only be able to proc attack effects on the latest target.

    i don't see why that would happen.

    i don't plan anything. this is just theory.

    the spell indexing system would need atleast the orbs that do damage to work through triggers, i think. might actually get away with just remaking chain lightning and orb of venom.

    it would still allow relatively accurate attack detection though.
  17. Khristophoros

    Khristophoros Well-Known Member

    Once you stop using hardcoded damage block, you can now detect armor. You now have to softcode damage amplification too but it's not a big deal.

    I think the real problem is IceFrog doesn't want to do all the extensive testing it would take to find all of the stuff that needs to be soft coded. It's not really that hard once you identify all the stuff.

    Alternatively, just don't softcode Critical Strikes. Those in particular are not extremely important. It would just open up a little more design space to include them in the system.

    Change those attacks to regular missile attacks and softcode the splash damage. So it would no longer deal the 50% damage if it misses. I think that's the compromise I would make, anyway. You could have it proc stuff, or do that. Both are very minor edge cases that have very little impact on gameplay or balance imo.
  18. MauranKilom

    MauranKilom Well-Known Member

    Changing crits has by FAR more impact on the gameplay than the bugs of the systems used right now.

    And I'll just repeat it: Icefrog won't even start recoding all hardcoded damage that doesn't come from attacks.
  19. doomsheep

    doomsheep Well-Known Member

    think about it.

    take all the untriggered spells. remove everything that can be fixed by having a dummy unit use the spell. fix the ones that only use simple effects. what is there even left?
  20. Khristophoros

    Khristophoros Well-Known Member

    Like I said, you don't need to recode crits. You can still detect autoattacks for the purpose of refurbishing the orb/buff placer system or for creating new unique items or skills. Crits can remain untouched and that will still work.

    The only reason to recode crits is if you want to make something that triggers when you get a critical hit. To fix crits and ranged bash messing with eachother you just recode bash instead. That wouldn't cause any problems assuming lifesteal is now softcoded, so you can still lifesteal off ranged bash.