Page 10 of 10 FirstFirst ... 8 9 10
Results 91 to 98 of 98

Thread: January 19 Bot Update

  1. #91
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    I for one would add COURIER_ACTION_SIDE_SHOP_RADIANT and COURIER_ACTION_SIDE_SHOP_DIRE as well... humans can manipulate the Courier to go to side shops. Bots should be allowed to as well somehow.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  2. #92
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    Quote Originally Posted by ChrisC View Post
    The solution I'm considering at the moment is:
    • Change GetTeamMember() to only work on teammates. The team parameter would be removed.
    • Change GetUnitList() to exclude not-visible enemy heroes. Currently it takes visibility into account for all unit types EXCEPT for heroes, which it always includes.
    • Handles for enemy heroes are destroyed when they become invisible to a team.
    • Handles for enemy heroes are destroyed when illusions are created of that hero.
    • Handles for enemy heroes are created as needed (when they become visible again, or immediately if, for example, an enemy hero is visible when using Manta).
    • Any functions that can validly be called on a hero at any time (level, alive/dead state, etc) take a PlayerID rather than a unit handle.

    Then, when bots wanted to differentiate real heroes from illusions, they could do so however they wanted (suspicious movement, damage taken too high, damage done too low, process of elimination, etc), and note that using the handle. Which would be valid until they lost sight of the unit, at which point they couldn't be sure, seeing the unit again, that it's the same unit anyways.
    I just thought of a use-case that might break:
    - My bot (let's think of some AoE such as WR, Lina, Pugna, Jakiro etc) is fighting an enemy Bounty Hunter
    - BH is just about to die but he gets his Magi Stick and gets enough HP to survive with 5 hp after a wayward flying projectile and goes invisible
    - If I am to use a function to help me judge his potential location so I can AoE him and hopefully kill him, I assume the most likely to use funcs would be GetUnitPotentialValue(), GetExtrapolatedLocation(), GetLastSeenLocation()
    - if his handle gets NULLed, how could I possibly do that in that same frame using his old (now invalid) handle?
    - I have no guarantee GetUnitList() will be fast enough and even if it would be I'd still need to parse it to get to BH

    Since D2 is "a game of numbers and seconds" as most casters call it, even a nanosecond would make a HUGE difference to a possible teamwipe with a Shallow Grave/False Promise/Mekansm that turns it all around. Having said that, any delay would cause me to judge/guess a possible location that would be AoE-ed long after he's gone simply because of too much parsing/iteration that wouldn't have happened if I had his old handle

    I might be wrong, but I am pretty sure the above use-case would have at least a 50% chance to fail (although it is just an educated guess)
    Imagine a Power Shot or Meat Hook that is off by 0.25 seconds.

    Unless, of course, anyone has a workaround
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  3. #93
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    I believe it was mentioned before that things like GetLastSeenLocation(), GetExtrapolatedLocation(), IsAlive() and so on would be globals that will take the playerID. So you'd just need to match the handleUnit:GetUnitName() to GetSelectedHeroName(playerID) to match the ID and go from there.
    You could even cache the aligning playerID + Hero Name's at the beginning of the game to cut out the need to process through the match, since the player ID's are static.

    So I don't think execution time will be an issue. Unless a thousandth of a second is considered as an issue. XD

  4. #94
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    Quote Originally Posted by Cornbane View Post
    I believe it was mentioned before that things like GetLastSeenLocation(), GetExtrapolatedLocation(), IsAlive() and so on would be globals that will take the playerID.
    That's true... Forgot about that...

    But then, what's stopping me from using GetLastSeenLocation(nPID) every frame, then compare to the position returned by GetLocation() on each illusion, match it and find the real hero?
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  5. #95
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    GetLocation() is to remain handle based I think. And currently GetLastSeenLocation() returns 0's if the unit is still in view and only gives actual coords if the unit leaves view. I haven't check to see what happens with that function and illusions yet - if it activates when the real one leaves or if it remains as 0's until all illusions are gone as well.

    EDIT

    Scratch that, it does show the coords if they're in view. I forgot that I put a self implemented "blocker" for if they were still in view. In this case, implementing such a blocker into the actual function itself may solve the problem.
    It makes sense to me because you don't get the last seen location of something you are currently looking at. You get its current location. XD
    Last edited by Cornbane; 01-27-2017 at 06:23 PM.

  6. #96
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    Quote Originally Posted by Cornbane View Post
    . In this case, implementing such a blocker into the actual function itself may solve the problem.
    It makes sense to me because you don't get the last seen location of something you are currently looking at. You get its current location. XD
    Hmm, again we're talking about the code lying, like the above point with regen which is not the best thing IMO
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  7. #97
    Basic Member
    Join Date
    Nov 2015
    Posts
    108
    I don't see why GetLastSeenLocation() exists. Just have GetLocation() always give the latest position and just stop updating when CanBeSeen() goes false and keep returning the last known position. That way with CanBeSeen() and GetLocation() you cover the whole package.

  8. #98
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    A sapient point. And, to be fair, that's kinda how GetLastSeenLocation() currently works. XD

Posting Permissions

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