Page 3 of 6 FirstFirst 1 2 3 4 5 ... LastLast
Results 21 to 30 of 57

Thread: SUMMARY OF ISSUES

  1. #21
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    Do you have vision on those neutrals you considered?

  2. #22
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    Yep, standing right next to them. And I got the same results using both GetNearbyCreeps and GetUnitList

  3. #23
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by Siesta Guru View Post
    Yep, standing right next to them. And I got the same results using both GetNearbyCreeps and GetUnitList
    Is it Dire neutral or Radiant neutral? Currently there's still a bug on Dire neutral. Even though the bot literally standing next to them GetHealth() always return -1, CanBeSeen() always return false and I don't know about GetLocation(). I ever made the bot use their location based ability usage to neutral:GetLocation() and they always walk to dire and radiant mid lane meeting point and cast it there so I asume it always return Vector(0,0,0) for GetLocation().

  4. #24
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    My test was indeed on Dire neutrals, I'll try to see what happens with radiant

    Edit: Radiant neutrals are fine. The issues just with the dire side
    Last edited by Siesta Guru; 10-14-2017 at 05:19 AM.

  5. #25

  6. #26
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    SUGGESTION: implement some basic variables from main API like turntimerate and some other basic properties of each hero like here:
    https://dota2.gamepedia.com/Turn_rate

    these variables are useful for handling critical situations and actions like running out of enemy attack range or last-hits.
    thanks

  7. #27
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,014
    While I don't have Turn Rate implemented yet, I did work on the BAT. At the moment it's just implemented so I didn't get a chance to test it. If anybody has time to do some tests for me and confirm I implemented it correctly, I'd appreciate it

    Code:
    function DOTA.GetBaseAttackSpeed (Unit)
    	return (1.00 / DOTA.GetBaseAttackTime(Unit));
    end
    
    function DOTA.GetBaseAttackTime (Unit)
    	local attacksPerSecond = (1 / Unit:GetSecondsPerAttack());
    	local attackSpeed = ((100 + Unit:GetAttributeValue(ATTRIBUTE_AGILITY)) * 0.01);
    	return (attackSpeed / attacksPerSecond);
    end
    The BAT can help to accurately determine Attack Speed.

    While it's not what you wanted, it could help you with last hits since the AS is vital (along with the projectile speed and attack range) in determining the best moment to last hit creeps or towers
    Obviously, the code is free to use. Credit is not needed (unless you wanna give a shout-out to me ) since I used gamepedia myself

    I figure if I have little time to work on the bots I might as well help those that have more time
    Last edited by The Nomad; 11-06-2017 at 10:41 AM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  8. #28
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    I already create a method for last hitting by considering turn rate, projectile speed and attack range. the algorithm is to calculate time-need of all of them and find out after n seconds which unit entity will face it. if the hpreduction after n seconds below some criteria( simply total damage ), target will be assigned for next frame to be hit.

    turntimerate shows how much does a player need to turn 180 degree, same as what the link you were provided. for example pangolier has a base turntimerate 0.094, meaning turn in a 0.094 seconds for turning into opposite side. but the problem is the turning rate is not linear and many months ago I begged Chris to solve this issue or atleast some tricky ideas to handle it.

    in breif, 4 things are important from hero side: 1- turn time 2- move time( become close less than attack range ) 3- starting attack knowing as attack speed and attack time and attack animation 4- projectile speed if ranged
    many important things from outsiders: 1- who attack the creep 2- when they attack settled on creep 3- what kind of magical or physical abilites may come after n seconds

    this algorithm shall run for each creep and also for allied creeps for denies( ) this is my current problem in team developing beside decision making. hope this help you.
    Code:
    T_TO = time_turn_to_creep+time_reach_to_creep+time_attack_performed+time_missile_reached;
    		T_AT = time_attack_performed+time_missile_reached;
    		T_MV = time_turn_to_creep+time_reach_to_creep;
    		local incomeDmgTotal			= 	0;
    		local incomeDmgMove 			=	0;
    		for i=1,table.getn( OnECreep ) do
    			local dat 	=	OnECreep[i];
    			if( T_TO >= dat.timeinfuture ) then
    				incomeDmgTotal   	= incomeDmgTotal 	+ 	ecreep:GetActualIncomingDamage( dat.damage , DAMAGE_TYPE_PHYSICAL );
    			elseif( T_MV >= dat.timeinfuture ) then
    				incomeDmgMove 		= incomeDmgMove 	+	ecreep:GetActualIncomingDamage( dat.damage , DAMAGE_TYPE_PHYSICAL );
    			end
    		end
    		local mydamage 	= GetBot():GetAttackDamage();
    		if( UTILITY.GetItemCountForUnit( GetBot() , ITEM_QUELLING_BLADE ) ~= 0 or UTILITY.GetItemCountForUnit( GetBot() , ITEM_TALON ) ~= 0 ) then
    			if( UTILITY.IsUnitMelee( GetBot() ) ) then
    				mydamage = mydamage + 24;
    			else
    				mydamage = mydamage + 7;
    			end
    		end
    		--print( "dmgvariane: "..NAME.." "..tostring(GetBot():GetBaseDamageVariance()) );
    		incomeDmgTotal 	= incomeDmgTotal 	+ ecreep:GetActualIncomingDamage( mydamage , DAMAGE_TYPE_PHYSICAL );
    		--incomeDmgMove 	= incomeDmgMove 	+ ecreep:GetActualIncomingDamage( GetBot():GetAttackDamage() , DAMAGE_TYPE_PHYSICAL );
    		if( ecreep:GetHealth() < incomeDmgTotal ) then
    			table.insert( ObjectsToAttack , ecreep );
    		elseif( ecreep:GetHealth() < incomeDmgMove ) then
    			table.insert( ObjectsToMove , ecreep );
    		end
    	end

  9. #29
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    I'm using hardcoded values for turn rate here, no other option as far as I can tell. Unfortunately it doesn't take stuff like napalm into account, but oh well.

    Using BAT for lasthitting didn't work for me timing wise when combined with the GetAnimCycle we have in the bot api.
    What seems to work the best for me after a lot of testing is this formula to determine when a units swing will land/spawn a projectile:

    ((unit:GetAttackPoint() - unit:GetAnimCycle ())/ unit:GetAttackSpeed()) +0.0333



    This seems to be accurate within ~5 millisecs for most units though strangely not for all

    Now I'm also not 100% sure about the +0.0333 but it seems to work well. Basically that's there because it seems the actual attack always lands on the next frame, instead of the one it's executed

    Obviously the projectile flight time (which is non-deterministic ) , and movement time including turn time still need to be added. I've got formulas for this too if anyone wants to use them, but they don't seem to be perfect. My projectile flight time formula in particular has issues

    edit: changed the formula based on more testing
    Last edited by Siesta Guru; 11-09-2017 at 06:42 AM.

  10. #30
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,014
    Quote Originally Posted by Siesta Guru View Post
    (((unit:GetAttackPoint() / fullAttackAnim ) - unit:GetAnimCycle ())/ unit:GetAttackSpeed()) +0.03
    I assume this works 99% for melee units. I expect it to have between 50% and 75% success on ranged. Or is it accurate on ranged as well?

    The reason I say this for ranged attackers is because I would expect the projectile speed and attack distance to count as factors.
    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
  •