Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15

Thread: Unit scoped functions are very inconsistent as to what they apply to

  1. #11
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,018
    TimeSinceDamagedByCreep() doesn't work on towers either. There definitely needs some consistency with these helper functions. I am trying to do some decision making for bots, but it's hard when there are so many weird limits that get imposed.

    The warning is
    [Developer] 'CDOTA_Bot_Script::TimeSinceDamagedByCreep' called on an entity (npc_dota_goodguys_tower1_bot at 4924 -6128 384) that isn't a bot!
    Why should it matter whether the context belongs to a bot or not?! I know that from a technical point of view it most likely has to do with the member variables or functions that (don't) exist for non-bots, but I don't see why we can't use helper functions on non-bots as well, from a gameplay point of view (meaning they should be added). How can I tell my bots to defend the tower if I can't tell if creeps are attacking it?

    Sidenote: I expect these functions to work on enemies as well. The rules of the API are that the API should provide only that information which is known to an actual player. Nothing more, nothing less. That was the concept behind the illusion change. I am all for it. But since in a game I can see that enemy towers (or other units, including enemy heroes !!!) are being attacked, I expect the API to know that as well and not restrict me in any way. If I can move my minimap camera and focus on an enemy unit (whatever unit that may be) and see how much damage it took in the last X minutes, I expect the API to say that as well and return the info that I query at that time. I can understand why it wouldn't work on heroes that are hidden behind FoW, but I expect it to work on towers and other buildings even inside the FoW. Same rules. The towers are fully visible and accessible to human players.

    Thanks
    Last edited by The Nomad; 10-15-2017 at 02:45 PM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  2. #12
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,927
    A bit apples and oranges there.
    A human player would not get a precise timing of when a tower was last hit by inspecting the building. Or a precise dmg taken number - it needs calculus.
    Are your bots suffering from tunnel vision / autism?
    Bots should simply track the hints a human player receive - "your tower is under attack.." , and use watch-zones in the same manner a human player uses camera-zones.
    No idea if it's entirely possible atm, but it should be that way.

    As for the building dmg being visible trough FoW - it's actually a bug in DOTA, and bugs should not translate just because we got used to them.

  3. #13
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,018
    Sure, if I look at a tower minutes later. But if I am watching the tower now, as any normal player would when attacking (you won't watch the rune spot for 45 secodns while doing and attack move towards the enemy base would you?) I can look at the in-game clock and remember the time I started attacking and do the basic maths "oh I attacked it 8 seconds ago". If I am a noob it's fine, that means a coach is with me in the game and he can tell me the same. If not, a dead player can that happened to watch me since he got bored.
    No matter how you look at it, it's not normal to "not know".

    It's like saying "you don't know the cooldown on the enemy glyph". But that's not true since there are players that use the chat wheel time to note the last time the glyph was used. Or the last time Enigma used Black Hole. If I can "know" that as a player, the API should as well.

    If what you are saying is true then the Rosh and courier callbacks should be removed because a player won't know the time Rosh or the courier died without calculus. Or the spell cast callbacks. How would a player know the exact magical damage an ability did?
    Or the Incoming Porjectiles functions. How could a player calculate the exact speed and distance to a projectile in mid-game.

    Let's face it, an API is an API. These types of restrictions should not exist IMO.
    Last edited by The Nomad; 10-15-2017 at 03:40 PM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  4. #14
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,927
    Funny, that's exactly what I thought is the goal of the new bot api - human-like, not all-seeing-eye.
    ChrisC's approach seems to support this - instead of starting from all-access and restrain from there like for classic-bots, it's doing it in reverse and that's why it's so damn hard and tedious to pull off..

  5. #15
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    Giving human like ways of interpreting data is nigh impossible to work with. Humans rely on many very detailed types of information you just can't really represent easily in code. For example the way heroes are relatively positioned in lane and how this compares to escape routes etc. The only real reasonable way of providing this data is to just supply us with the positions of objects. Same deal with hp etc. Sure, it's more human like to have some vague idea about the threat to some building, and it isn't highly detailed including exact health, armor, damage calculations, etc. But the human version does have a lot of things to work with that just aren't easy to do in code. Such as whether the enemy team is approaching the tower, whether a clinkz with desolator could be nearby, etc. You just can't reasonably put all the of that in a single variable or call without losing alot of important subtlety.
    The best thing you really can do is to provide accurate, detailed information, so that we can build our own methods of for example estimating building threat. It just so happens that whether a specific unit dealt damage to a tower recently is a relatively hard and performance intensive thing to track for us. Since we have to rely on attack targets, attack animations, etc.

Posting Permissions

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