Page 4 of 45 FirstFirst ... 2 3 4 5 6 14 ... LastLast
Results 31 to 40 of 447

Thread: API Requests

  1. #31
    I couldn't see anything on the wiki page about searching for units around a location. Examples of the kinds of problems this might be used to solve:
    Has my team already placed any wards near this location?
    Have I got any summoned friendly units at radiant top T1?
    How many creeps are sieging safe lane T2?
    How big is the neutral stack at location X?

    Being able to filter the query by types and flags would be really useful. I'd imagine it always being able to return a list of friendly units, but non-friendly units would only be returned if not in FoW.

    Stretch goal: Enemies and neutrals would perhaps be cached using the last seen unit information, since I can imagine this might be quite costly if the caching were to be done on the Lua side rather than in C++.

  2. #32
    Basic Member
    Join Date
    Dec 2016
    Request from my side, what I wanna do. Somethings can already be done/calculated, but I list them anyway.

    Because some bots interact with trees (timber, treant, monkey)
    * Query for nearest tree
    * Query for nearest tree into a direction

    For junglers
    * Coordinates of the jungle camps
    * Query location of the nearest jungle camp
    * Query content of the jungle camp (type, health)

    For offlaners
    Use case: try to stay in XP range:
    Query to nearest creeps, pick out the range creep, get coords, distance max 1300.

    * Check if hero has tower aggro
    * Check if hero has lane creep aggro
    * Check if hero has jungle creep aggro
    * Check if hero is in lane vision.

    I want to incorporate the risk calculation of a location. To prevent that a bot walks uphil, into fog, into a shrine. Some areas are really dangerous, maybe I map them manually.
    * Query nearest shrine
    * Query how deep he is into enemy territory
    * Query if target location is above or below
    * Query if hero or enemy is above or below
    * Patrol an area command
    Last edited by brainzap; 12-13-2016 at 03:39 AM.

  3. #33
    Basic Member
    Join Date
    Dec 2016
    I'm looking for the detail of API reference.

  4. #34
    Right now it's a WIP, we all are just keeping an eye on the dev page for updates

  5. #35
    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
    * Chat commands; When running a local script free text chat messages shouldn't be a problem and provide easy alerting for scripters. Although workshop bots chat is obviously open to abuse, throttling and a limited set of available messages (eg the alt click messages like 'I will purchase > Mekansm' and the message set the default bots use 'Defending mid' etc) should let players know what the bots are doing without the chatlog becoming a twichchat simulator...

    As an incentive to make faster more stable bots it'd be good if the wrapping logic caught long running loops and exceptions on the bot code and stunned the offending bot

  6. #36
    I had to make a new acount because I lost access to my old email with my old account linked to it.

    Thanks for doing this ChrisC.

    Been hoping and holding out for something like this for a long time.

    I've read over the documentation a couple of times now, but haven't really touched any of it yet. I just have a couple of questions in regards to finding out some things when querying a bot.

    It's possible to query with GetUnitName, would that return npc_dota_hero_tidehunter?

    I'd like to start creating a dynamic item system, but I'd need to run a simple script at the start of the game to determine who are core heroes and who are supporting heroes.

    I see:
    Which of these would be best used to figure that out? If it's at all possible to elaborate on these calls on the wiki, that'd be great, too. As in, what variables it returns.

    The other thing I'm thinking is having using chat wheel commands, and being able to identify when a player uses the chat wheel options.
    So going back to the dynamic items, have a bot use "I will build Mekanism." once the script decides who will build Mekanism on the team.
    But also, say a player pings, "I will build Mekanism", would there be a way of identifying that, so adjustments could be made so a bot that was going to build mekanism would change their item build?

  7. #37
    Although we can view the bot visibility grid via debug commands, I can't see a way to query that grid for visibility of a location. Maybe a location + radius query that returns the percentage covered by fog of war. That could help determine what areas might need more vision.
    Last edited by SurgeonDiversion; 12-13-2016 at 08:36 PM.

  8. #38
    The bot api function docs need parameter lists and names. Action_AttackUnit has a boolean for the second arg and I've no idea what it does.

    I haven't seen the functions available on inventory items anywhere - it'd be nice to have those with params & descriptions as well.
    To be honest, though, I'm also not sure how to get bots to use items yet.

    Is there a handy way in lua to define a bunch of utility functions that can be used within different files? It would be nice to have a single place for those.

    More sample code would be wonderful as well.
    Attached Files Attached Files

  9. #39
    Basic Member
    Join Date
    Dec 2016
    And I need APIs to know whats my level,how much is my damage and other details.

    local nRadius = abilityDS:GetSpecialValueInt( "dragon_slave_width_end" );

    And how to get the key of these specialvalues

  10. #40
    Not sure if all status feedback from 'Unit-Scoped' list are only y/n or with more specific info.(Cause it's WIP)

    For example, if one Lina-bot query 'IsStunned' on an enemy, time remains for the stun is good-to-know for next ability casting. This info can be seen by status bar in this version, also we can check the teammate's current ability level in game so it's not cheating.

    - a query to check the remaining time of some cureent status.
    - also a general timer for countdown(important for many bot actions from cancelling the current casting to check Roshan refreshing time), stronger than tic-toc maybe.

    (Actually I hope to build a support bot with function 1.placing wards 2.dewards 3.pulling 4.stacking, but seems a good timer is the top requirement now)

Posting Permissions

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