Page 43 of 45 FirstFirst ... 33 41 42 43 44 45 LastLast
Results 421 to 430 of 447

Thread: API Requests

  1. #421
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    How about IsCooldownReady() ?

  2. #422
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by Siesta Guru View Post
    How about IsCooldownReady() ?
    It always return true too even if it's still on cool down.

  3. #423
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    Requesting the ability to have bots directly purchase an Upgraded Item and the remaining needed items be purchased in bulk like it currently does for human players. Currently nothing happens when Upgraded Items are entered in the purchase function. Having a function to return the Cost To Complete upgraded items would also be handy.
    It may be presumptuous, but the Cost To Complete is already available on the UI and the auto completing Upgraded Items is enabled for player, so one would think they can be made available to the bots without too much difficulty.

    These functions can be accomplished with current API tool, but it's a bit more of a lengthy process than I think should be necessary. Mostly when dealing with Upgraded Items that use more than 1 of a component item.

    Thanks.

  4. #424
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,013
    Quote Originally Posted by Cornbane View Post
    It may be presumptuous, but the Cost To Complete is already available on the UI and the auto completing Upgraded Items is enabled for player, so one would think they can be made available to the bots without too much difficulty.
    Welcoem back Thought you gave up as I haven't seen you around those past few months

    I requested some additional HUD functions (like seeing what heroes have items on the courier and sending the courier to another hero, seeing how many item slots you have on it) and so on. Another low priority request would have been for human interaction (like ALT-clicks - for example on modifiers to say that they are under the effect of a debuff or "Beware" from right clicking an enemy ability). I suspect apart from the additional task of exporting it, it shouldn't be too hard as well.

    It seems the team is very caught up in the patching of Dueling Fates as it had quite some bugs.

    I believe the native code actually does break up an item into components and buys each one separately in one go and makes it seem to actually purchase the main item. However looking at it objectively, the only way I see this of use is when you had so many kills that money started pumping and you didn't get a chance to buy anything. In an early game this would be impossible as it would mean you'd leave the bot itemless until it had the money to buy a full kit.

    f.e. Meka: you would either get the buckler for the armor or the headdress for the sustain. Waiting 30 mins on a support that constantly buys wards and dust to get a mek might mess up the game. What is the scenario you had in mind?

    The reason I ask is that I tried to implement this and found out it's easier if I just go ahead with components But if you have a better idea feel free to share I am searching for better ways to improve my code logic
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  5. #425
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    I was mostly chased away by the silly script plagiarism or whatever situation from a bit back that overtook the forum.
    Combine that with the API having pretty much what I needed so there wasn't much need to stop in. XD

    But now, I'm taking my script down a different path and could use some API additions to assist in making it less of a hassle. None of my bot have "their item list." Every item they'll be getting and which order they get them in, every talent and ability will be completely situational. From who is on the team, the enemy team, what the GPM is like, if they're getting ganked a lot, etc. With certain restrictions of course.
    They also look at items on the allied and enemy teams to determine if they should build something to help or counter.

    For example: A bot is waiting to see if it wants to make Manta or S&Y. It has the Yasha, but it knows that enemy bots or players are watching its items, so it doesn't want to get everything piece by piece or else the opponent can determine what it is building and prepare for it. So the gold may add up to get the other components + pattern in a swoop.
    It can also work this way if the bot is saving up for a more expensive item and then switches to a cheaper one, one that can be bought fully at once. Like if it's saving up for Butterfly and notices an opponent has MKB.
    They also hold out so they don't show what they're making so it can come as a surprise if they're planning a team fight.
    The biggest thing though, since I mostly play with buddies when using my bots, is reacting to what players are building. Like a bot Necro could be working towards Mek and suddenly a player decided to. So the Necro will ditch the Headdress or use it to work down a different path.
    And so on.

    So I have a number of situations where bulk buying is used. And something to this degree needs to be done on a per-hero basis. Having a general function that I point them all to isn't an option.

    It's mostly easy to determine which components are already acquired by using FindItemSlot() and checking the result, but it's more of a pain when an Upgraded Item uses more than 1 of a given item (Wand, Skadi, etc). Now you have to dig in and check how many you have and carry that over to how many more are needed, which is more annoying than it sounds. I have a way of doing it, but I don't like it. It'd just be more appropriate to have access to tools that are already implemented. Especially since I need to implement it in different ways for each hero bot.
    Last edited by Cornbane; 11-11-2017 at 05:06 PM.

  6. #426
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    Yeah I feel you, It's a massive pain to get it right. I ended up sort of managing to do it in a flexible way that works for all heroes and all items, but it's large chunk of ugly, badly performing code, which still has some issues in some situations. Such as items on the courier, a bot trying to build two items simultaneously which both require the same component or items which have two paths to the same sub-component (such as meka requiring two branches, one through headdress, one through buckler). Since I can't find a way to guarantee ownership of items on the courier, it might either think it's still missing an item it already has, or might think it already has an item it doesn't. And if I already have a branch, it might think both the buckler and headdress are already completed and that it just requires bringing the courier over, but then I end up with a bunch of junk in my inventory since it can't complete both at the same time.

    Speaking of junk. Besides having difficulty identifying junk, there's no good way to get rid of junk as far as I can tell, since there doesn't seem to be a method which allows you to put items back on the courier. And since selling isn't really an option on a large portion of the map, I'm currently just dropping junk items whenever I need space, so you'll see the map slowly fill with branches, tangoes, ogre clubs, etc.

  7. #427
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,013
    Doesn't the pickup item action work on couriers? I never tried it but I assumed it does.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  8. #428
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    Unfortunately not. Nor does the move action

  9. #429
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    My biggest problem, and the reason why I requested what I requested, is that there is a decent amount of ms being added on to the script execution finding out which items are needed to finish an item. My method works as I want it to, but it requires more nested loops and custom functions than I ever want to use for such a minor result. Due to the dynamic nature of my item builds, I'm looking to cut down on as many unnecessary performance drainers as possible.

    The fact that the UI displays the remaining cost needed to finish an item for players suggests that there is an internal method to find the remaining items. So a unit function that returns a table of the remaining items needed for an input item ( npcBot:GetCompletionItems(sItemName) ) would eliminate the need for ~90% of the ugly, resource draining methods we are currently using.
    I switched over to this function suggestion from my other suggestion because we can easily get the remaining cost and execute the purchasing with little processing impact when the needed items are known. It's making the items known that's the bulk of it.

  10. #430
    Basic Member
    Join Date
    Oct 2016
    Posts
    247
    does anyone know if there is a way to find out if a skill is upgradable by a scepter? (not HasScepter() )
    something that can read:
    Code:
    "HasScepterUpgrade"			"1"
    in the same manner as GetAbilityDamage(), 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
  •