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

Thread: Summary of Current Issues

  1. #1
    Basic Member
    Join Date
    Dec 2016
    Posts
    684

    Summary of Current Issues

    @ChrisC - we miss your presence and interaction here

    Things still needing resolution:
    • CreateHTTPRequest() return callback throws a traceback error when passed a function. Here is an example of what should work but doesn't: http://dev.dota2.com/showthread.php?...=1#post1424770
    • Illusion Hero Issues - it has been reported that GetUnitList() does include illusion handles, whereas GetNearbyHeroes() does not for enemy units: http://dev.dota2.com/showthread.php?t=279145
    • We really need another GetUnitList() type aggregator for enemy summoned entities (perhaps 'units' is still the term here). These would be for things like: Undying's Tombstone (and I'm not sure if the Zombies are in the enemy unit list group), Jugg's Healing Ward, Pugna's Nether Ward, Gyro's Homing Missle, Warlock's Golems, Shadow Shaman's Serpent Wards, Necronimicon, Beastmaster's hawk and boar, Shadow Demon's disruption illusions, Terrorblade illusions (to me they should be treated differently than typical illusions as in game they are easily graphically distinguishable from real Terrorblade), same for Arc Warden double, TA traps (when visible), Techies mines/traps (when visible), etc
    • Still need a notification or method of querying for incoming teleports that are within vision - as a player you see the animation (with shape now to know which hero it is) that is teleporting to say defend a tower before he gets there... how do bots get this info?
    • A few npc_heroes.txt stubs are missing. Link: http://dev.dota2.com/showthread.php?...=1#post1425898
    • Illusions can cast autoskills. Link: http://dev.dota2.com/showthread.php?t=279578
    • Lots of good suggestions in the API Request thread
    • A method for profiling our code, especially timing and memory, would be great (i.e., if we could specify a timeout global variable that would dump a traceback if a single bot's frame execution exceeds the threshold value)
    Last edited by nostrademous; 05-01-2017 at 09:48 AM.

  2. #2
    Basic Member
    Join Date
    May 2014
    Posts
    262
    For addition:
    1. GetRespawnTime() return the actual respawn time in each level not the remaining respawn time.
    2. I'm not sure but HasBuyback() always return false even though bot has gold to buyback and buyback is on cooldown. So I have to write my own BB logic temporary. But not sure it's good enough or not but bots can BB when there are certain amount of enemy near certain building. Here is my BB logic
    Code:
    TimeDeath = nil 
    function IsThereHeroNearby(building)
    	local heroes = GetUnitList(UNIT_LIST_ENEMY_HEROES);
    	local nearbynum = 0;
    	for _,hero in pairs(heroes)
    	do
    		if GetUnitToUnitDistance(building, hero) <= 1300 then
    			nearbynum = nearbynum + 1;
    		end
    	end
    	return nearbynum >= 2;
    end
    
    function CanBB()
    	return not npcBot:IsAlive() and npcBot:GetBuybackCooldown() == 0 and npcBot:GetGold() >= npcBot:GetBuybackCost();
    end
    
    function GetRemainingRespawnTime()
    	if TimeDeath == nil then
    		return 0;
    	else
    		return npcBot:GetRespawnTime() - ( DotaTime() - TimeDeath );
    	end
    end
    
    function BuybackUsageThink() 
    	
    	if npcBot:IsIllusion() then
    		return;
    	end	
    	
    	if npcBot:IsAlive() and TimeDeath ~= nil then
    		TimeDeath = nil;
    	end
    	
    	if not CanBB() then
    		return;
    	end
    
    	if not npcBot:IsAlive() then
    		if TimeDeath == nil then
    			TimeDeath = DotaTime();
    		end
    		--print(npcBot:GetUnitName()..":"..tostring(npcBot:GetRespawnTime()).."><"..tostring(RespawnTime))
    	end
    	
    	local RespawnTime = GetRemainingRespawnTime();
    	
    	local team = GetTeam();
    	
    	local tower_top_3 = GetTower( team, TOWER_TOP_3 );
    	local tower_mid_3 = GetTower( team, TOWER_MID_3 );
    	local tower_bot_3 = GetTower( team, TOWER_BOT_3 );
    	local tower_base_1 = GetTower( team, TOWER_BASE_1 );
    	local tower_base_2 = GetTower( team, TOWER_BASE_2 );
    
    	local barracks_top_melee = GetBarracks( team, BARRACKS_TOP_MELEE );
    	local barracks_mid_melee = GetBarracks( team, BARRACKS_MID_MELEE );
    	local barracks_bot_melee = GetBarracks( team, BARRACKS_BOT_MELEE );
    
    	local ancient = GetAncient(team );
    
    	local buildList = {
    		tower_top_3, tower_mid_3, tower_bot_3, tower_base_1, tower_base_2,
    		barracks_top_melee, 
    		barracks_mid_melee,
    		barracks_bot_melee, 
    		ancient
    	};
    
    	for _, build in pairs(buildList) 
    	do
    		if ( build ~= nil and IsThereHeroNearby(build) and RespawnTime > 10 ) 
    		then
    			npcBot:ActionImmediate_Buyback();
    			return;
    		end
    	end
    
    end
    3. item.playerid in GetDroppedItemList() always return -1.
    Code:
    [VScript] playerid:-1
    [VScript] item:table: 0x002271c0
    [VScript] location:Vector 0000000001197BD8 [-6826.604492 -6614.278809 512.000000]
    [VScript] playerid:-1
    [VScript] item:table: 0x002c9748
    [VScript] location:Vector 0000000001197CB0 [-6969.465820 -6496.934082 512.000000]
    [VScript] playerid:-1
    [VScript] item:table: 0x002f8100
    [VScript] location:Vector 0000000001197D88 [-7048.769043 -6290.643555 512.000000]
    Last edited by arz_on4dt; 04-26-2017 at 08:15 AM.

  3. #3
    Basic Member
    Join Date
    Oct 2016
    Posts
    219
    - Sand Kings burrowstrike only works as a unit target (however will work with npcEnemy:GetLocation()) - wont work if you use a "location X units infront" type function that returns a vector, this is the same function which does work on antimage blink.
    players can use it as point target, but bot can only use it if a unit is involved somewhere.

    - Bots assemble onto a danger ping - very bad.
    Last edited by Yavimaya; 04-26-2017 at 05:31 PM.

  4. #4
    Basic Member
    Join Date
    Dec 2016
    Posts
    684
    FYI - I talked with @ChrisC and he said we have not been forgotten. The Valve team is just slammed with fixing-up and finishing the Battle Pass (presumably for the upcoming The International) which takes priority over bot API.

  5. #5
    Basic Member
    Join Date
    Jul 2012
    Posts
    19
    Yavimaya , antimage blink is fine.

  6. #6
    Basic Member
    Join Date
    Oct 2016
    Posts
    219
    Quote Originally Posted by SarCasm View Post
    Yavimaya , antimage blink is fine.
    yes i know, i said sand king cant use the same functions as antimage, but should be able to.

  7. #7
    Basic Member
    Join Date
    Jan 2014
    Posts
    49
    Issue with Monkey King ult as summarised by one bot script author: "we can only set his ult to spawn clones, but if we allow to control main hero, we also giving up a control of a clones to A.I."
    (Not sure if this is covered by "Illusions can cast autoskills" in the OP or if it's a separate issue.)
    Last edited by Riveon; 05-27-2017 at 01:50 AM.

  8. #8
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,861
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  9. #9
    Basic Member
    Join Date
    Oct 2016
    Posts
    219
    WasRecentlyDamagedByAnyHero doesnt work for towers
    nor does WasRecentlyDamagedByCreep.

    tower:WasRecentlyDamagedByAnyHero(1.0) doesnt return positive.
    Last edited by Yavimaya; 05-28-2017 at 06:39 AM.

  10. #10
    Basic Member
    Join Date
    Oct 2016
    Posts
    219
    does anyone know why a simple GetUnittoUnitDistance check on npcbot and npccourier cant stop the bot using the courier if its too close? (to stop bots chasing courier back to base early game)
    get UnittoLocation with bot as unit and cour location as location doesnt work either.

Posting Permissions

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