Page 11 of 45 FirstFirst ... 9 10 11 12 13 21 ... LastLast
Results 101 to 110 of 447

Thread: API Requests

  1. #101
    would be useful to be able to have a debug permanent range circle around our bot for testing things

    edit: I can probably just use DebugDrawText(bot:GetLocation().x...blah)
    Last edited by TheP1anoDentist; 12-22-2016 at 05:56 PM. Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially) Parsing data from bot games

  2. #102
    Basic Member
    Join Date
    Dec 2016
    to Kamelasa:
    getting a unit facing already exist in the API with Bot:GetFacing() which return an angle in degree ,we can use math.rad to convert it then obtain the normalized facing vactor
    local SELF_ANGLE=math.rad(npcBot:GetFacing());
    local SELF_VEC=Vector( math.cos(SELF_ANGLE),math.sin(SELF_ANGLE),0);
    Last edited by DzeeRay; 12-22-2016 at 05:27 PM.

  3. #103
    would like GetRecentNearbyCreeps(), which for the unseen ones returns their last seen location and stats.

    the thing I'm currently having most trouble with is

    Im doing a single pull, I need to check health of creeps in camp to know when to double pull, as timing depends on whether they target range creep, what type of camp, how the damage is distrubuted.
    extremes mean a missed pull.

    now if I look at total health of getNearbyCreeps, if I get fogged from some of the creeps, it only returns the visible ones. yet I 'know' there is a full health one just the other side of the tree.
    this makes it underestimate camp health left and try double pull Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially) Parsing data from bot games

  4. #104
    Basic Member
    Join Date
    Dec 2016
    @DzeeRay, oh ok! Didn't see that one, thanks!

  5. #105
    Basic Member
    Join Date
    Dec 2016
    Action_DropItem is not working for me, does any one tried it?, furthermore the default bots have the same problem when trying to pickup aegies with a full inventory, help will be appreciated.

  6. #106
    Basic Member
    Join Date
    Dec 2016
    TY for the update, those new functions and const are really helpful(especially the GetLaneFrontie ,thanks to Platinum_dota2).
    some requests:
    -reworking the GetNearby* functions to gather information around a dummy npc that the bot set its location one time per frame (that way the bot can for example explore the area around a tower befor TPing to it, setting that npc explorer's location to the bot's location will do the default behavior).
    -add GetNearbyDropedItems that return an array of item_name/item_ownerid pairs.
    -as previously requested, a function get owned summons(couriers included) and a way to call summons abilities.
    -add courier:UsedBy() that return the ID of the player using the courier or nil/-1 if its free.
    -add SwapItems(int nSlot1, int nSlot2)(similar to the main API function).

  7. #107
    Basic Member
    Join Date
    Mar 2012
    Quote Originally Posted by martindevans View Post
    I came to ask for something similar but I was imagining a very simple API for it. Simply allows bots (and the team commander AI) to exchange arbitrary messages.

    SendMessage(msg:string, optional bot_index:int);

    Essentially each bot would get a queue of incoming messages and can then read messages from their queue (including the team commander AI as conceptually bot number 6). With this structure you can do any kind of team orders you want, or bots can communicate directly with one another. You can even extend this to allow the game itself send messages to bots, so custom games could inform bots about certain events (and if the bot doesn't understand a message it can just ignore it).
    This. I was looking for a way to do this but it seems there is no way to get the members of a team and exchange internal messages between them.

    Quote Originally Posted by EriKKo View Post
    Thanks a lot for the updates! Gonna be fun to have the bots chat a bit, and getting modifiers was really useful to prevent them from spamming healing salves

    A list of the things I would like the most for next update:
    • Making GetNearbyTrees return trees created by branches
    And if possible if it's a sprout from Furion

    Quote Originally Posted by JamesDrake View Post
    Few initial thoughts from me after reading though the docs so far; it may be I've missed things that are part of the API already, but I couldn't see obvious functions for them.

    * A way to write to a local file; so I can log data (something similar to a dota_bot_dump_state) to disk and display it on a secondary monitor (so repeatedly overwriting the same file, rather than a log file appending). Probably locked down to only occur on local servers running local (non-workshop) bots
    It'd only work after closing the match or game since the file would be in use and you couldn't read it in-game

    I would appreciate the following:
    - GetNearbyUnits() which should bring all nearby units (not trees) such as wards, couriers, summons (wolves, bear, golem etc.) if possible; maybe not needed to include heroes and creeps as it might add too much overhead plus we already have functions for those
    - chatwheel access (to issue a CW message and read one)
    - event methods i.e. BotEvent() and maybe an enum as a param (with stuff like BOT_TAKE_DMG, BOT_EVENT_BOUGHT_ITEM, BOT_EVENT_LEVELUP etc.), GameEvent() (with maybe GAME_EVENT_CHAT, GAME_EVENT_UNIT_REPSAWNED, GAME_EVENT_UNIT_DIED etc) - or even better a listener/subscriber function that hooks events similar to game addon scripting
    - Get() function that returns the latest attackers (say in the last 30 secs or so) with the handles (let's say to use them as targets for attack), damage they did (similar to the death summary) and last time they attacked
    - we have TimeSinceDamagedByAnyHero() but what about other units? Lane Creeps, Jungle Creeps, Towers etc
    - PingLocation() to have the !O and X minimap pings available to bots (i.e. "let's go there" or "attack this unit" or "get back"); also to read the ping location from bot code
    - include the jungles as "lane" constants
    - tell if the game is paused
    - get the couriers in-game for either team; i was thinking of maybe some courier micro-ing or an antimage blinking to kill the enemy courier
    - add a Think() event to team_desires; this way we have a function called every frame at the team level as well, not just at the unit level
    Quote Originally Posted by ChrisC View Post
    - Moved npc_units.txt, npc_abilities.txt, and npc_heroes.txt outside of the VPKs, so it's easy to track down unit/hero/ability/modifier/parameter names.
    A way to query them from LUA i.e. query how "much" of a trait each hero has from their gamecard
    - control child units (TB, PL, Naga, SD illusions, bear, wolves, golem etc) separately and be able to communicate between them and with their master (let's say send one naga illz top, one mid, one bot while the real naga farms); otherwise I don't think we will ever have a Spectre or Furion bot
    Last edited by The Nomad; 12-27-2016 at 01:53 PM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  8. #108
    Basic Member
    Join Date
    Dec 2016
    As far as communicating between bots goes, they have a shared memory space, so it doesn't require any special APIs (though they might help keep things orderly). I'm not sure what the cleanest way to approach it is, but here's some options:

  9. #109
    Basic Member
    Join Date
    Dec 2016
    Not actual API request, but still..
    I need to use bitwise operations as the optimal way to implement some feature. I can do that without them, but it will be ugly and slow.
    I've heard that LUA itself doesn't provide such operators, so there is many of libraries that implements them. Is there one in current LUA runtime that is running bot scripts? Is it possible to include such library (ie bit32 which is default in LUA 5.2)?

  10. #110
    Basic Member
    Join Date
    Dec 2016
    API request:
    GetAttackTarget and GetEstimatedDamageToTarget work for non-hero unit like tower and creep.

Posting Permissions

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