Results 1 to 1 of 1

Thread: A few questions for Chris

  1. #1
    Basic Member
    Join Date
    Mar 2012

    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.


    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

Posting Permissions

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