Results 1 to 4 of 4

Thread: A few questions for Chris

  1. #1
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,769

    A few questions for Chris

    Hey there

    Here's a small thread for maybe some questions about the inner workings of the bot functions.

    • Does GetEstimatedDamageToTarget() take into account damage reduction or does it assume full damage ?
    • How does GetActualIncomingDamage() actually work? Does it return something akin to how effective HP is calculated ?
    • Does ActionQueue_MoveToLocation() take into account the Fog Of War? I ran into a scenario where the bot had vision of an area, queued to move there, but stopped moving, after losing vision of the target location, just because the route took him behind a tree. I'll do some more tests to try and reproduce it, but atm this seems to be the cause. I can confirm the bot had more move actions queued.


    Thanks

    EDIT: Alright, after running a battery of tests for #3, it only seemed like the FoW was causing it, although unlikely, after placing multiple observer wards, because I added IsLocationVisible() and IsRadiusVisible() checks. In reality, it just happened that the target location was a tree. I added a IsLocationPassable() check to make sure the bot doesn't want to walk inside trees and it seemed to work for a while. After even more test iterations it seems the bot "stops" just near the spot. After using the Draw() functions I noticed the spot is just below the tree crown (as in, near the root but below the branches).

    This means that IsLocationPassable() returns true cos there is nothing there to block it, but, the collision radius of the tree blocks access. Therefore the bot tries to reach that spot precisely and never does. I even tried IsLocationPassable() within a loop to make sure ending with the same result.
    After even more iterations, I decided to test this by using the quelling blade and indeed, the bot became unstuck and continued with the remaining queued actions.

    My conclusions:
    • bot queued actions seem to work slightly different than human actions; if a human tries to queues trees, the hero will always find a way there or at least, continue with the remaining actions once close to the target location (I can't pinpoint the exact difference since I can't be sure I am right clicking below, near or inside a tree at a precise location because of the isometric view); bots stop, however.
    • IsLocationPassable() is not reliable when taking collision into account; IsLocationReachable() might help and maybe a function that takes bounding boxes into account
    Last edited by The Nomad; 07-07-2017 at 11:53 PM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  2. #2
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,769
    What does GetAttackProjectileSpeed() return? Is it meant to return the physical right click attack "bullet" ? It seems to make sense as Jug has 0 since he is melee. However, I remember testing it some time ago on PA and it returned 900. How come ? The dagger is an ability and should not be included here IF this function only refers to attacks.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  3. #3
    Basic Member
    Join Date
    Dec 2016
    Posts
    164
    for resolving FoW, u can use GetHeroLastSeenInfo for finding last location of target. however this will be good if it works on all entities( like creeps, ancient creeps and etc. ).
    Also I think that Bots use some default locations on map for moving to specific locations like bounty and powerup runes.

    As u mentioned, GetAttackProjectileSpeed return 0 for melee heroes, but it is first time that I see this function works on abilities.

    I think this will be tricky if u check current animation activity of hero when calling GetAttackProjectileSpeed. for example if PA casting ability, GetAttackProjectileSpeed will return projectile speed of dagger( not her attack actually ). and I think this matter is natural because some heroes use their abilities( may active once or toggle ) and their range attack and its speed become vary like dragon knight, troll warlord or lone druid.

  4. #4
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,769
    Quote Originally Posted by SIKIM View Post
    for resolving FoW, u can use GetHeroLastSeenInfo for finding last location of target. however this will be good if it works on all entities( like creeps, ancient creeps and etc. ).
    The problem was for locations, not units. Therefore GetHeroLastSeenInfo doesn't really help.


    Quote Originally Posted by SIKIM View Post
    As u mentioned, GetAttackProjectileSpeed return 0 for melee heroes, but it is first time that I see this function works on abilities.
    I didn't say it does. I am asking why it showed a value different than 0 for PA and assumed it is because of the dagger.

    Quote Originally Posted by SIKIM View Post
    I think this will be tricky if u check current animation activity of hero when calling GetAttackProjectileSpeed. for example if PA casting ability, GetAttackProjectileSpeed will return projectile speed of dagger( not her attack actually ). and I think this matter is natural because some heroes use their abilities( may active once or toggle ) and their range attack and its speed become vary like dragon knight, troll warlord or lone druid.
    It might be due to her ult, which is why I am waiting for an official answer from Chris on this as it seems weird
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •