Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: March 2 Bot Update

  1. #1
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,646

    March 2 Bot Update

    • Fixed bots calling ItemPurchaseThink() while paused, or when they've been fully taken over.
    • Changed all the "player" elements in GetLinearProjectiles(), GetLinearProjectileByHandle(), GetIncomingTrackingProjectiles(), GetDroppedItemList(), and GetAvoidanceZones() to be "playerid".
    • Fixed IsShrineHealing to not always return true.
    • Added a GetAllTrees() function to the global bot script API to return a table of every tree in the map.
    • Added CreateHTTPRequest() to the global bot script API for doing HTTP posts to localhost.
    • Added dota_bot_long_frame_warning convar to disable warnings about long frames.
    • Fixed crash if UpdateRoamDesire() doesn't return a table.
    • When bots are trying to pick up an item, they no longer optimize their backpack.


    I also moved the DispatchAsyncEvent backlog warning into the Panorama log channel, for easier filtering in vconsole.

  2. #2
    "Added CreateHTTPRequest() to the global bot script API for doing HTTP posts to localhost."

    Nice thanks
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  3. #3
    I've been trying different methods of calling CreateHTTPRequest(STORAGEAPI_API_URL):Send()

    and none of them seem to work

    CreateHTTPRequest(STORAGEAPI_API_URL) on its own is fine.

    but I need to attach data to it.


    CreateHTTPRequest(STORAGEAPI_API_URL) is always returning nil

    (if it does a ping/test of the STORAGEAPI_API_URL and returns nil if not available, that could be happening. but it's hard to tell)
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  4. #4
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,646
    It's basically a copy of the CreateHTTPRequest from the custom games script API, except that it forces it to be a POST and the url you specify is just the part after http://localhost.

  5. #5
    Quote Originally Posted by ChrisC View Post
    It's basically a copy of the CreateHTTPRequest from the custom games script API, except that it forces it to be a POST and the url you specify is just the part after http://localhost.
    which is correct syntax/use?
    simply
    Code:
    CreateHTTPRequest([[:9200/doublepull/run/1?'{"hero": "lion","damage_spread_lane": 1, "damage_spread_neutral": 0}']])
    or?
    Code:
    local req = CreateHTTPRequest([[:9200/doublepull/run/1?'{"hero": "lion","damage_spread_lane": 1, "damage_spread_neutral": 0}']])
        req:Send()
    I can't really tell if it's failing due to me or not, as there's nothing in dota logs.

    just wanted to check if Im doing roughly correct thing, and/or whether it's assuming a port as well as localhost?

    more info:

    I also tried
    Code:
    CreateHTTPRequest(':8000/')
    pointing at a simple python server. Curling with a post gives me code 501, "POST" unsupported.
    whereas bot script generates nothing in the log indicating request hasnt even got to server

    I've been trying things with windows firewall disabled as well
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  6. #6
    Basic Member
    Join Date
    Dec 2016
    Posts
    121
    - Fixed bots calling ItemPurchaseThink() while paused, or when they've been fully taken over.

    Why is that a fix?I'm doing a fully taken over but still use ItemPurchaseThink(), seems no harm? Now I just rename it as ItemPurchase() and call it in Think().
    Last edited by lunarbreez; 03-02-2017 at 11:05 PM.

  7. #7
    Basic Member
    Join Date
    Dec 2016
    Posts
    105
    Chris can u explain how to use DispatchAsyncEvent and convars for debugging and logging during the game. i found lost of commands in wiki but i dont know how to use and how to deal with some issues happen during the game. I always refresh the code using bot_reload script but sometimes dota crash or some functions didnt work.

    Thanks

  8. #8
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,646
    Quote Originally Posted by lunarbreez View Post
    - Fixed bots calling ItemPurchaseThink() while paused, or when they've been fully taken over.

    Why is that a fix?I'm doing a fully taken over but still use ItemPurchaseThink(), seems no harm? Now I just rename it as ItemPurchase() and call it in Think().
    Think I'm going to back this change out. Really meant for it to just not be called while paused.

  9. #9
    Basic Member
    Join Date
    Dec 2016
    Posts
    598
    Quote Originally Posted by ChrisC View Post
    Think I'm going to back this change out. Really meant for it to just not be called while paused.
    I'm not sure it was working anyways... my bot is buying strange stuff in a complete takeover. unless it has already been rolled back.

  10. #10
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,652
    Maybe I am getting too ahead of myself, but if bot event listeners will be implemented, I think an ItemPurchaseThink() in full takeovers might be easier to manage that way, right?
    As things were it seemed weird that the items were called separately while abilities were not in full takeovers, but I found that design quirk quite brilliant. Item purchases are on a different level (pardon the pun) to abilities. Therefore, an additional ItemPurchaseThink() even in takeovers is not really harmful. One can argue that for simplicity, you could do all that in bot_xxx.Think() (and just create a dummy generic item to "cancel" it).

    Still, in my crazy ideal world, short term ItemPurxhaseThink() is ok, long term - event handlers and listeners are the way to enlightment

    I assume GetAllTrees() return the tree ids, not handles, correct ?

    P.S. ty for "playerid"
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

Posting Permissions

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