Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

API Requests

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • API Requests

    We expect the API will expand over time as developers start using it. Feel free to post API requests!

    Examples of some API requests:
    • Missing actions that you would like bots to do.
    • Missing queries that you need.
    • Utility functions, commonly-used functions, or slow functions that would be better implemented on the C++ side.

  • #2
    I want bots that can buy sentry wards... That's how you request stuff right?
    Originally posted by Gandalf
    You're a wizard,Goku
    Originally posted by Russian player
    ХОРОШАЯ ИГРА! СУКА! ОТЧЕТ! 0-35-0! ПОДАЧИ
    Originally posted by Pinoy Player
    Ako mid
    When everyone is on low hp and you're Zeus with scepter

    Spoiler: 

    Comment


    • #3
      This is fantastic ChrisC, I hope this is really the beginning of a beautiful relationship. I know lots of modders who are very interested in Bots. Would you be willing to join our developer chatroom that has all major mod developers in it? They would be so excited to actually have a valve developer in their midsts.

      Comment


      • #4
        Add new bot will be good This game have 2 year for nothing bot add every patch

        Comment


        • #5
          This is awesome!

          Comment


          • #6
            It looks like the bot example is included in the test client is broken. It spams the log, but never actually picks any heroes. What's wrong?

            Comment


            • #7
              Not necessarily super important, but adding "IgnoreDifficulty()" could be a good addition for custom bots as the preset difficulties come with a bunch of gimping and cheating additions that might make creating balanced/enjoyable bots a bit harder.
              I.e., if I understood correctly that difficulty selections will override custom bot behavior/actions (mentioned in "Complete takeover" part).

              Comment


              • #8
                API requests:
                Missing actions that you would like bots to do:
                1. Hit and run: cancel attacking animation after attack is finished)
                2. Stop/cancel skill casting(tide hunter ultra, axe roar) when condition change during animation

                Comment


                • #9
                  Originally posted by lunarbreez View Post
                  API requests:
                  Missing actions that you would like bots to do:
                  1. Hit and run: cancel attacking animation after attack is finished)
                  2. Stop/cancel skill casting(tide hunter ultra, axe roar) when condition change during animation
                  +1 on this. Maybe this can be done, I have not dived into the available API yet.

                  If there is the option to perform an action X milliseconds after the last one, you could do:

                  CastAbility(0, target)
                  Wait(50)
                  Stop()

                  But not sure if this is a possibility right now.

                  Also not sure of the synchronicity of calls.

                  i.e. the next instruction after CastAbility(0, target) would be ran after the cast animation ended?

                  - DISCLAMER: Not familiar with the actual API, hence the pseudocode I used.

                  Comment


                  • #10
                    I would love to see more mechanics in the API. For now most of the stuff seems related to the bigger picture, the team work, etc.

                    But I would love to have, for example:

                    * Being able to wait a specific amount of milliseconds after the last action *started* and then cancel it.
                    * Being able to target a point IN FRONT of my target enemy, i.e. target a point in front of the enemy nearby hero, towards the direction he is facing, X units away from him. Extremely useful for many aoe skills that require trajectory prediction. Also, the option to deviate this by a certain angle (useful for when enemies usually dodge your aoe skills).

                    edit: For clarity, this would be similar to an extrapolation of GetUnitPotentialValue() into the future.
                    Last edited by trevorflux2; 12-11-2016, 05:40 PM.

                    Comment


                    • #11
                      Originally posted by trevorflux2 View Post
                      I would love to see more mechanics in the API. For now most of the stuff seems related to the bigger picture, the team work, etc.

                      But I would love to have, for example:

                      * Being able to wait a specific amount of milliseconds after the last action *started* and then cancel it.
                      * Being able to target a point IN FRONT of my target enemy, i.e. target a point in front of the enemy nearby hero, towards the direction he is facing, X units away from him. Extremely useful for many aoe skills that require trajectory prediction. Also, the option to deviate this by a certain angle (useful for when enemies usually dodge your aoe skills).

                      edit: For clarity, this would be similar to an extrapolation of GetUnitPotentialValue() into the future.
                      Surely movement extrapolation is something you would do in the AI? predicting anything but a simple linear extrapolation is a large part of what makes your bot different/better.

                      Even if you just want linear extrapolation it's just a single trivial vector operation.

                      Comment


                      • #12
                        Thought there are something like 'get_location_nearest_tree()' already exist for tango use?
                        Can't find it in scripting page but need it for timbersaw/broodmother skill.

                        Comment


                        • #13
                          There's a GetExtrapolatedLocation() API call which takes a time in the future that probably does most of what you want.

                          There's also GetMovementDirectionStability() which indicates how much their movement direction has recently changed. ("Serpentine!")

                          Comment


                          • #14
                            This API should probably get another pass before integration into non-test.

                            Please restructure your API while you still have the chance - it'll get harder on everyone as time goes on. The approach that you are currently going for has several downsides:

                            1. The current system encourages designing AIs that are inflexible, and only work for dota. This means that you're going to get little to no cross-over benefits for custom games, which is a real disappointment.
                              Suggestion to fix: Change the structure of the AI API such that there are four different kinds of AIs that you can add: strategic, tactical, hero-macro, and hero-micro, with separate workshop entries and well-defined APIs between them. This means that custom games that use dota heroes in different situations will be able to rely on the hero AIs from dota, and simply override the strategic and tactical AIs with something mode-appropriate.
                            2. The structure of the high-level AIs limits systems to certain strategies.
                              Suggestion to fix: Change the objectives established by the high-level AI components from explicit enum values to more abstract structures; having the AI have the ability to say "mount an offensive against this object" or "sweep this area for enemies" would be very useful. This also helps with custom games; a general set of capabilities means that developing a strategic AI for a custom game could be a fairly simple finite state machine, with defined objectives structures to use at each state.
                            3. The current system only allows a single AI workshop item to be used per team. This is bad for several reasons; firstly, any single group would be hard-pressed to implement good bots for every dota hero. As such, any complete AI would be either very primitive on most heroes or require massive buy-in in terms of combining several AI mods into one super-mod. These groups tend to be somewhat unstable and there's been a lot of issues flying around about the rights to workshop items; I know of multiple people who with custom games have their materials used without permission or license with no effective recourse. This also limits the quality of these AIs; with so much overhead to making a complete AI mod, there's going to be fewer of them, and so less competition to drive progress in the area.
                              Suggestion to fix: Split up the AI components in the workshop so that individually excellent pieces can become individually excellent and be used in conjunction with one another.


                            I understand that there's an interest in getting something shipped, and simply adding hooks to the existing AI functions is an easy way to do so, but please structure it so that it'll be healthy and versatile in the long term, even if it takes another week.

                            I'm very interested to hear your thoughts on the matter, ChrisC.
                            Last edited by penguinwizzard; 12-11-2016, 07:14 PM. Reason: formatting

                            Comment


                            • #15
                              API requests:
                              Missing actions that you would like bots to do:
                              1. Hit and run: cancel attacking animation after attack is finished)
                              2. Stop/cancel skill casting(tide hunter ultra, axe roar) when condition change during animation
                              Just looking through the example scripts it looks like it should be pretty easy to do using "npcBot:IsUsingAbility()".
                              ability_item_usage_lina.lua uses this to make sure the hero doesn't accidentally interrupt it's own cast animation but I don't think it would be tricky to make it do the opposite.
                              the only problem I can see is if the script only gets called once per second the delay might be too long to cancel the animation but I'm not 100% sure of the actual tick rate.

                              Comment

                              Working...
                              X