Results 1 to 9 of 9

Thread: Differences Between some modifiers

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

    Differences Between some modifiers

    Does anyone know the Differences between these modifiers?( I will add more of this )

    modifier_fountain_aura vs modifier_fountain_aura_buff
    modifier_backdoor_protection vs modifier_backdoor_protection_in_base vs modifier_backdoor_protection_active

    i think in base means near fountain( ?? )

    modifier_juggernaut_healing_ward_aura vs modifier_juggernaut_healing_ward_heal
    modifier_voodoo_restoration_aura vs modifier_voodoo_restoration_heal

    Voodoo is the Second Ability of witch doctor

    I cant find any references related to modifier information.

  2. #2
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    I believe one applies to the ability, while the other applies to the (de)buff.

    For example: the Healing ward will have the aura (modifier_juggernaut_healing_ward_aura) on itself, while the actual effect applied on units is the ward heal (modifier_juggernaut_healing_ward_heal)

    Please check the link and under the ward you will see the modifier name. I used gamepedia to tell which modifier is the one that applies the effect to units when names are ambiguous
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  3. #3
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    Thanks Nomad for your help. that was helpful

    Just for sure, we can check area zone of Healing ward via GetAvoidanceZones() and "modifier_juggernaut_healing_ward_aura"

    so if a hero stand near fountain, modifier_fountain_aura_buff will appear in its modifiers slots( or placed in "modifier_fountain_aura" Zone )

  4. #4
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    Quote Originally Posted by SIKIM View Post
    Just for sure, we can check area zone of Healing ward via GetAvoidanceZones() and "modifier_juggernaut_healing_ward_aura"
    I guess you could try it. For the radius, you can use GetSpecialValueInt("healing_ward_aura_radius") on the ability (not the ward) to always have the correct spaced-out zones.

    Quote Originally Posted by SIKIM View Post
    so if a hero stand near fountain, modifier_fountain_aura_buff will appear in its modifiers slots( or placed in "modifier_fountain_aura" Zone )
    Yup. This is how I do it:
    Code:
    function CDOTA_Bot_Script:IsInsideFountain ()
    	return ((self:HasModifier("modifier_fountain_aura_buff") == true) and (self:DistanceFromFountain() < _G.TARGET_LOC_DIST_REACHED_THRESHHOLD));
    end
    The order is done on purpose: iterating modifiers should always be faster (if there aren't many - still, I won't call this function except in certain situations, therefore I expect the unit to either be in the fountain or to at least have at most 4-5 modifiers active) than calculus, especially sqrt. The second condition is to make sure the user didn't TP out and still has the lingering buff effect for 1-2 more seconds.

    As for modifiers, for example, when wanting to decide if the unit should heal, or it needs HP (via items) or mana, I have these utils:

    Code:
    function DOTA.HasMPRegenItems (Hero)
    	if (IsValidUnit(Hero) == false) then
    		return false;
    	end
    
        return ((Hero:HasModifier("modifier_eul_cyclone") == true)
    	or (Hero:HasModifier("modifier_item_ancient_janggo") == true)
    	or (Hero:HasModifier("modifier_item_battlefury") == true)
    	or (Hero:HasModifier("modifier_item_bloodstone") == true)
    	or (Hero:HasModifier("modifier_item_bloodthorn") == true)
    	or (Hero:HasModifier("modifier_item_echo_sabre") == true)
    	or (Hero:HasModifier("modifier_item_infused_raindrop") == true)
    	or (Hero:HasModifier("modifier_item_lotus_orb") == true)
    	or (Hero:HasModifier("modifier_item_medallion_of_courage") == true)
    	or (Hero:HasModifier("modifier_item_oblivion_staff") == true)
    	or (Hero:HasModifier("modifier_item_orchid_malevolence") == true)
    	or (Hero:HasModifier("modifier_item_perseverance") == true)
    	or (Hero:HasModifier("modifier_item_refresherorb") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_aquila_aura") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_aquila_aura_bonus") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_basilius_aura") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_basilius_aura_bonus") == true)
    	or (Hero:HasModifier("modifier_item_sheepstick") == true)
    	or (Hero:HasModifier("modifier_item_sobi_mask") == true)
    	or (Hero:HasModifier("modifier_item_solar_crest") == true)
    	or (Hero:HasModifier("modifier_item_soul_ring") == true)
    	or (Hero:HasModifier("modifier_item_sphere") == true)	
    	or (Hero:HasModifier("modifier_item_void_stone") == true)
    	or (Hero:HasModifier("modifier_item_vladmir_aura") == true)
    	or (Hero:HasModifier("modifier_item_urn_of_shadows") == true));
    end
    
    function DOTA.HasBreakableModifier (Hero)
    	if (IsValidUnit(Hero) == false) then
    		return false;
    	end
    
        return ((Hero:HasModifier("modifier_aegis_regen") == true)
    	or (Hero:HasModifier("modifier_bottle_regeneration") == true)
    	or (Hero:HasModifier("modifier_clarity_potion") == true)
    	or (Hero:HasModifier("modifier_flask_healing") == true)
    	or (Hero:HasModifier("modifier_greater_clarity") == true)			-- in case it gets added to the game
    	or (Hero:HasModifier("modifier_item_urn_heal") == true)
    	or (Hero:HasModifier("modifier_rune_regen") == true));
    end
    
    function DOTA.IsBeingHealed (Hero)
    	if (IsValidUnit(Hero) == false) then
    		return false;
    	end
    
        return ((Hero:HasModifier("modifier_aegis_regen") == true)
    	or (Hero:HasModifier("modifier_bottle_regeneration") == true)
    	or (Hero:HasModifier("modifier_enchantress_natures_attendants") == true)
    	or (Hero:HasModifier("modifier_filler_heal") == true)
    	or (Hero:HasModifier("modifier_flask_healing") == true)
    	or (Hero:HasModifier("modifier_forest_troll_high_priest_heal_autocast") == true)
    	or (Hero:HasModifier("modifier_fountain_aura_buff") == true)
    	or (Hero:HasModifier("modifier_huskar_inner_vitality") == true)
    	or (Hero:HasModifier("modifier_item_armlet") == true)
    	or (Hero:HasModifier("modifier_item_guardian_greaves_aura") == true)
    	or (Hero:HasModifier("modifier_item_headdress_aura") == true)
    	or (Hero:HasModifier("modifier_item_urn_heal") == true)
    	or (Hero:HasModifier("modifier_juggernaut_healing_ward_aura") == true)
    	or (Hero:HasModifier("modifier_legion_commander_press_the_attack") == true)
    	or (Hero:HasModifier("modifier_oracle_purifying_flames") == true)
    	or (Hero:HasModifier("modifier_phoenix_sun_ray") == true)	-- TODO
    	or (Hero:HasModifier("modifier_rune_regen") == true)
    	or (Hero:HasModifier("modifier_tango_heal") == true)
    	or (Hero:HasModifier("modifier_treant_living_armor") == true)
    	or (Hero:HasModifier("modifier_voodoo_restoration_heal") == true)
    	or (Hero:HasModifier("modifier_warlock_shadow_word") == true));
    end
    
    function DOTA.IsRestoringMana (Hero)
    	if (IsValidUnit(Hero) == false) then
    		return false;
    	end
    
        return ((Hero:HasModifier("modifier_aegis_regen") == true)
    	or (Hero:HasModifier("modifier_bottle_regeneration") == true)
    	or (Hero:HasModifier("modifier_bane_fiends_grip_self") == true)
    	or (Hero:HasModifier("modifier_clarity_potion") == true)
    	or (Hero:HasModifier("modifier_filler_heal") == true)
    	or (Hero:HasModifier("modifier_fountain_aura_buff") == true)
    	or (Hero:HasModifier("modifier_greater_clarity") == true)			-- in case it gets added to the game
    	or (Hero:HasModifier("modifier_keeper_of_the_light_chakra_magic") == true)
    	or (Hero:HasModifier("modifier_lion_mana_drain") == true)
    	or (Hero:HasModifier("modifier_obsidian_destroyer_essence_aura_effect") == true)	
    	or (Hero:HasModifier("modifier_phoenix_supernova_hiding") == true)
    	or (Hero:HasModifier("modifier_pugna_life_drain") == true)
    	or (Hero:HasModifier("modifier_rune_regen") == true)
    	or (Hero:HasModifier("modifier_item_soul_ring_buff") == true));
    end
    
    function DOTA.IsRegeneratingHealth (Hero)
    	if (IsValidUnit(Hero) == false) then
    		return false;
    	end
    
        return ((DOTA.IsBeingHealed(Hero) == true) or (Hero:GetHealthRegen() > 6.00) or ((Hero:GetHealthRegen() > 2.00) 
    	and ((Hero:HasModifier("modifier_alchemist_chemical_rage") == true)
    	or (Hero:HasModifier("modifier_item_armlet") == true)
    	or (Hero:HasModifier("modifier_item_battlefury") == true)
    	or (Hero:HasModifier("modifier_item_heart") == true)
    	or (Hero:HasModifier("modifier_item_headdress_aura") == true)
    	or (Hero:HasModifier("modifier_item_helm_of_iron_will") == true)
    	or (Hero:HasModifier("modifier_item_hood_of_defiance") == true)
    	or (Hero:HasModifier("modifier_item_lotus_orb") == true)
    	or (Hero:HasModifier("modifier_item_mekansm_aura") == true)
    	or (Hero:HasModifier("modifier_item_perseverance") == true)
    	or (Hero:HasModifier("modifier_item_pipe_aura") == true)
    	or (Hero:HasModifier("modifier_item_refresherorb") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_health") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_regeneration") == true)
    	or (Hero:HasModifier("modifier_item_soul_ring") == true)
    	or (Hero:HasModifier("modifier_item_sphere") == true)
    	or (Hero:HasModifier("modifier_item_vanguard") == true)
    	or (Hero:HasModifier("modifier_item_vladmir_aura") == true)
    	or (Hero:HasModifier("modifier_slark_essence_shift_buff") == true))));
    end
    
    function DOTA.IsRegeneratingMana (Hero)
    	if (IsValidUnit(Hero) == false) then
    		return false;
    	end
    
        return ((DOTA.IsRestoringMana(Hero) == true) or (Hero:GetManaRegen() > 6.00) or ((Hero:GetManaRegen() > 2.00) 
    	and ((Hero:HasModifier("modifier_alchemist_chemical_rage") == true)
    	or (Hero:HasModifier("modifier_crystal_maiden_brilliance_aura") == true)
    	or (Hero:HasModifier("modifier_crystal_maiden_brilliance_aura_effect") == true)
    	or (Hero:HasModifier("modifier_eul_cyclone") == true)
    	or (Hero:HasModifier("modifier_forest_troll_high_priest_mana_aura") == true)
    	or (Hero:HasModifier("modifier_forest_troll_high_priest_mana_aura_bonus") == true)
    	or (Hero:HasModifier("modifier_item_ancient_janggo") == true)
    	or (Hero:HasModifier("modifier_item_battlefury") == true)
    	or (Hero:HasModifier("modifier_item_bloodstone") == true)
    	or (Hero:HasModifier("modifier_item_bloodthorn") == true)
    	or (Hero:HasModifier("modifier_item_echo_sabre") == true)
    	or (Hero:HasModifier("modifier_item_infused_raindrop") == true)
    	or (Hero:HasModifier("modifier_item_lotus_orb") == true)
    	or (Hero:HasModifier("modifier_item_medallion_of_courage") == true)
    	or (Hero:HasModifier("modifier_item_oblivion_staff") == true)
    	or (Hero:HasModifier("modifier_item_orchid_malevolence") == true)
    	or (Hero:HasModifier("modifier_item_perseverance") == true)
    	or (Hero:HasModifier("modifier_item_refresherorb") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_aquila_aura") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_aquila_aura_bonus") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_basilius_aura") == true)
    	or (Hero:HasModifier("modifier_item_ring_of_basilius_aura_bonus") == true)
    	or (Hero:HasModifier("modifier_item_sheepstick") == true)
    	or (Hero:HasModifier("modifier_item_sobi_mask") == true)
    	or (Hero:HasModifier("modifier_item_solar_crest") == true)
    	or (Hero:HasModifier("modifier_item_soul_ring") == true)
    	or (Hero:HasModifier("modifier_item_sphere") == true)	
    	or (Hero:HasModifier("modifier_item_void_stone") == true)
    	or (Hero:HasModifier("modifier_item_vladmir_aura") == true)
    	or (Hero:HasModifier("modifier_item_urn_of_shadows") == true)
    	or (Hero:HasModifier("modifier_necrolyte_death_pulse_counter") == true))));
    end
    You can check out the list for reference if you wanna double check some. Please note I haven't tested all of them, so some might be incorrect, but I'd wager for around at most 20% to be wrong.
    Last edited by The Nomad; 08-01-2017 at 12:08 PM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  5. #5
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    Thanks for your suggestion and functions.

    Yes checking modifiers will make this matter more easily.
    do you set _G.TARGET_LOC_DIST_REACHED_THRESHHOLD as a constant value( e.g. 100 ) for checking distance?

    what I think about this, is that the fountain location is not actually in center. somewhere around the man in base shop. checking distance in circle radius around this location may not cover all surface of fountain!!

  6. #6
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    Quote Originally Posted by SIKIM View Post
    Thanks for your suggestion and functions.
    You're welcome. I mostly put it up so you can have some examples. if you want the funcs too, feel free to take them.

    Quote Originally Posted by SIKIM View Post
    Yes checking modifiers will make this matter more easily.
    do you set _G.TARGET_LOC_DIST_REACHED_THRESHHOLD as a constant value( e.g. 100 ) for checking distance?
    Yup, it's a constant. Should have been SHOP_HOME_USE_DISTANCE though Just noticed. It's set to 1000.

    Quote Originally Posted by SIKIM View Post
    what I think about this, is that the fountain location is not actually in center. somewhere around the man in base shop. checking distance in circle radius around this location may not cover all surface of fountain!!
    This is why I don't only check the distance. The distance is something decent only as backup. So this is why I don't care about the radius circle It will not impact me.
    The real check is the modifier which will only be active while the unit is inside the fountain. Then, if the unit TPs out and the modifier is still active, the distance will always be longer than the constant and I can ignore the modifier. Same if the unit walks out. This way I know the unit TPed or walked out of the fountain.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  7. #7
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    This is why I don't only check the distance. The distance is something decent only as backup. So this is why I don't care about the radius circle It will not impact me.
    The real check is the modifier which will only be active while the unit is inside the fountain. Then, if the unit TPs out and the modifier is still active, the distance will always be longer than the constant and I can ignore the modifier. Same if the unit walks out. This way I know the unit TPed or walked out of the fountain.
    that's right, thanks for ur tips. i should implement distance check after my bot goes out of Coma.

  8. #8
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    Keep in mind there are some Sqr() distance functions. Normally distance check, while not that intensive, do add some overhead IF called every frame (especially if you multiply by 5, consider you have 2 VMs for both teams, then add minions like Lycan wolves or Spirit Bear, do some courier checks etc. etc. etc.). After you finish checking where you do all distance checks, especially every frame, you might end up being sad seeing how many you call.

    If you want to reduce it but not sacrifice accuracy, you can use the Sqr() equivalents, just remember to convert:

    Code:
    local dist = GetUnitToLocationDistance(unit, targetLoc)
    if (dist < 100) then ...
    ... is equivlaent to ...
    Code:
    local dist = GetUnitToLocationDistanceSqr(unit, targetLoc)
    if (dist < 10000) then ...
    The shops and fountain don't have Sqr() equivalents yet. Just GetUnitToLocationDistanceSqr() and GetUnitToUnitDistanceSqr(). Just make sure you don't mix them up.

    Obviously, as stated, it doesn't add THAT much overhead compared to other functions, but it's just one example to optimize away some unneeded code lag.
    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
    Dec 2016
    Posts
    180
    This is one the main tricks to reduce latency of command performing. I override whole bot using bot_generic and after about 30 minutes pass, VM shows a warning that dota occupy 1.6 of RAM( big data ). however the game continues but im sure this code will be crashed on dedicated servers.

    i already encounter with new issue about generic file share variables with other players http://dev.dota2.com/showthread.php?...25#post1434625 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
  •