• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS/AI] Unit Immune to Silence and Hide Icon (still in testing)

Level 7
Joined
Mar 14, 2021
Messages
43
I was looking at Zwiebelchen's CreateUnitWithProperties topic and leandrotp's library about using dark cast to create your own unit using the Burrow ability glicht. The detail that I was playing with these values and I was able to find a way to make the units immune to silence, this is explained in leandrotp's SilenceEx, that this logic is fulfilled.

The topic
- Using the dark conversion ability combined with adding Burrow's ability with the same unit to transform, it will change to the established unit when used. The detail is that this unit does not have abilities.
1650259476515.png
1650259461313.png


The glitch
- Once transformed into this unit, what you have to do is kill it, then revive it and it will return to the original unit before transforming by dark conversion. With the peculiarity, spell silences have no effect, a -1 is created for sure in the entire counter of the unit, and it also affects when an ability hides the spells, so that they do not work, the best example is the Root and Burrow ability, which hide them. This unit seems to be broken in certain aspects, since like the Walk of Winds ability, the pathing 0 is maintained once the XD spell is finished.

The uses

Personally, for me this can be useful in units with Root and Burrow, since their abilities are seen even though they transform, including, that in Burrow a unit is invisible and can attack the enemy and be seen by all players without the Color Alpha transparency that affects it. But it looks like this could be used to see what happens on an unsilenced unit.

- Note: Illusions can also have this process, since they can be revived with this method (This is how illusions can be revived), when they are brought back to life they will have all their abilities hidden by the Illusion skill but they cannot be clicked by an internal code that disables the use of Skills by these units, with certain exceptions such as Harvest, Call of Arms, Root, etc. All explained by Fenix140 who showed abilities usable in illusions.

- Curiosities: Illusions are normal units, which have had their abilities hidden and silenced, so an illusion can sell units, can build, can harvest, and be a mine :v . The possibilities are varied. (Some details of the hero's revived illusion his level will remain at 1, and due to the transformation issue his life, attack, mana and defense will increase, this is due to the hero's stats duplication issue, in normal units this will not happen .)
* The heroes for some reason if you want to transform them first, before the normal units should not have the Hero Icon because the game is closed by this option, but if you transformed a normal unit before the hero this will no longer happen and it is because of the function "call SetUnitOwner(Dummy, GetOwningPlayer(u), false)" apparently has to preload something first so that the dark conversion doesn't get confused. (One solution would be to create a dummy cast the dark conversion spell and remove it. Or have your own dummy for each player, just as suggestions.)

1650258417059.png

1650258491911.png

1650258608524.png

1650260184219.png

1650260819820.png

Extra: I still haven't found everything that these units with this effect can generate XD, so if others wish they can see what weird things happen with other abilities lol. Spells like Amov and Aatk are affected by either silence or a no show. Also this works on all versions of warcraft 3 1.24e until Reforged.
(Out of curiosity I found other things that are not useful, such as a unit moving normally despite having a Web spell, or a unit being able to hide the "Patrol, Hold, Move" Amov buttons, without using any of the new Bliz functions of Hide Buttom, if you want I can put it) Greetings...

Attached is the test map. (Credits to leandrotp, Zwiebelchen and Fenix140)
 

Attachments

  • Unit_Immune_to_Silence.w3x
    59.8 KB · Views: 22
Last edited:
Level 7
Joined
Mar 14, 2021
Messages
43
Is it possible to re-enable movement after hiding all buttons and is there a way to only hide the normal patrol/hold/move/stop buttons while showing abilities?
Could you add an example of a webbed/ensnared unit still being able to function normally despite being webbed?
Of course, I already did it a long time ago, the detail is that in my case I had to resort to other tricks like Phoenix Metamorphophysis to restore the stats of the units if they were not affected by the double gain. It also sets the hero's starting armor to 0 and not -.2, so the illusion will look the same. Commenting on the illusion, this can be done too, just a few more tricks like using permanent invi to avoid auto attacking, and since it's an illusion it can have the Gathering ability to simulate "intelligent", too I didn't have time to see the issue of mana restoration in these illusions on normal units that doesn't happen, but I guess there are other tricks.

JASS:
private function CheckLife takes nothing returns boolean
    call DisableTrigger(GetTriggeringTrigger())
    call KillUnit(GetTriggerUnit())
    call ReviveHero(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),false)
    call UnitRemoveAbility(GetTriggerUnit(), BURROW)
    return false
endfunction

private function CheckLife4 takes nothing returns boolean
    if (GetIssuedOrderId() == 852479) then
        call UnitRemoveAbility(GetTriggerUnit(),'Aro1')
        call UnitRemoveAbility(GetTriggerUnit(), 'Amdf')
    endif
    return false
endfunction

function ConverUnitFreeButtons3 takes unit u returns nothing
    local integer i = GetHandleId(GetUnitRace(u))
    local trigger t = null
    if (i > 6) then
        set i=i-1
    endif
   
    //call SetUnitAbilitySilenced(u,'Amov',false)//I return to the ability 'Amov' immune to silence
    call UnitAddAbility(u,SmartIDHide)//Added the channel skill with the "smart" order
    call UnitMakeAbilityPermanent(u,true,SmartIDHide)//The permanent ability to not be removed by a morph
    call SetUnitAbilitySilenced(u,SmartIDHide,true)
    call UnitAddAbility(u,HoldIDHide)
    call UnitMakeAbilityPermanent(u,true,HoldIDHide)

    set t = CreateTrigger()
    call SetUnitAbilityLevel(Dummy2, DARK_CONVERSION, i)
    call SetUnitOwner(Dummy2, GetOwningPlayer(u), false)
    call UnitAddAbility(u, BURROW)
    call UnitAddAbility(u, 'AIs1')
    call UnitMakeAbilityPermanent(u, true, 'AIs1')
   
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call SetHeroAgi(u,0,true)
        call SetHeroInt(u,0,true)
        call SetHeroStr(u,0,true)
        call TriggerRegisterUnitStateEvent(t, u, UNIT_STATE_LIFE, LESS_THAN, GetWidgetLife(u)-0.1)
        call TriggerAddCondition(t, Condition(function CheckLife))
    else
        call TriggerRegisterUnitStateEvent(t, u, UNIT_STATE_LIFE, GREATER_THAN, 100.1)
        call TriggerAddCondition(t, Condition(function CheckLife))
    endif

    call IssueTargetOrderById(Dummy2, 852228, u)
    call UnitRemoveAbility(u,'BNdc')
    call UnitRemoveAbility(u,'AIs1')
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call UnitAddAbility(u, 'AIs1')
        call UnitRemoveAbility(u, 'AIs1')
    endif
    call DestroyTrigger(t)
    set t = null
   
    call UnitRemoveAbility(u,'AInv')
    call UnitAddAbility(u,'AInv')
   
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call UnitAddAbility(u,ResetStatUnit)
        call KillUnit(u)
        call UnitRemoveAbility(u,ResetStatUnit)
       
        call UnitAddAbility(u,ResetStatHero)
        call KillUnit(u)
    else
        call UnitAddAbility(u,ResetStatUnit)
        call KillUnit(u)
    endif
   
    set t = CreateTrigger()
    call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_ORDER)
    call TriggerAddCondition(t, Condition(function CheckLife4))
    call UnitAddAbility(u,'Amdf')
    call UnitAddAbility(u,'Aro1')
    call UnitRemoveAbility(u,'Aro1')
    call UnitAddAbility(u,'Aro1')
    call IssueImmediateOrderById(u, String2OrderIdBJ("unroot"))
    call DestroyTrigger(t)
    set t = null
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call UnitRemoveAbility(u,ResetStatHero)
    else
        call UnitRemoveAbility(u,ResetStatUnit)
    endif
   
    call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
    call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MAX_MANA))
    call SetUnitAbilitySilenced(u,'Amov',false)
    set u = null
   
    call SetUnitOwner(Dummy2, Player(15), false)
endfunction

On this map you can see everything you ask for. The only bad thing is that it takes several skills to make these effects and a lot of code, which I did, surely there is a better way. And there is also the function to create a rank changing unit without using morph just using root with dark conversion, which is needed to work with web or ensare (the code function is longer lol).
Botones Gratis Ensare Move.jpg

All credits for leantrop, DioD y fenix140.

Note: Can see [JASS/AI] - Attack Range Melee Unit Change funcional in War 3 and Reforged (still testing) and [JASS/AI] - Hide "Hold, Patrol and Move" functional in any version of War 3 or Reforged.
 

Attachments

  • Conver_Unit_Free_Buttons3.w3x
    75.9 KB · Views: 5
Last edited:
Of course, I already did it a long time ago, the detail is that in my case I had to resort to other tricks like Phoenix Metamorphophysis to restore the stats of the units if they were not affected by the double gain. It also sets the hero's starting armor to 0 and not -.2, so the illusion will look the same. Commenting on the illusion, this can be done too, just a few more tricks like using permanent invi to avoid auto attacking, and since it's an illusion it can have the Gathering ability to simulate "intelligent", too I didn't have time to see the issue of mana restoration in these illusions on normal units that doesn't happen, but I guess there are other tricks.

[CÓDIGO=JASS]
private function CheckLife takes nothing returns boolean
call DisableTrigger(GetTriggeringTrigger())
call KillUnit(GetTriggerUnit())
call ReviveHero(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),false)
call UnitRemoveAbility(GetTriggerUnit(), BURROW)
return false
endfunction

private function CheckLife4 takes nothing returns boolean
if (GetIssuedOrderId() == 852479) then
call UnitRemoveAbility(GetTriggerUnit(),'Aro1')
call UnitRemoveAbility(GetTriggerUnit(), 'Amdf')
endif
return false
endfunction

function ConverUnitFreeButtons3 takes unit u returns nothing
local integer i = GetHandleId(GetUnitRace(u))
local trigger t = null
if (i > 6) then
set i=i-1
endif

//call SetUnitAbilitySilenced(u,'Amov',false)//I return to the ability 'Amov' immune to silence
call UnitAddAbility(u,SmartIDHide)//Added the channel skill with the "smart" order
call UnitMakeAbilityPermanent(u,true,SmartIDHide)//The permanent ability to not be removed by a morph
call SetUnitAbilitySilenced(u,SmartIDHide,true)
call UnitAddAbility(u,HoldIDHide)
call UnitMakeAbilityPermanent(u,true,HoldIDHide)

set t = CreateTrigger()
call SetUnitAbilityLevel(Dummy2, DARK_CONVERSION, i)
call SetUnitOwner(Dummy2, GetOwningPlayer(u), false)
call UnitAddAbility(u, BURROW)
call UnitAddAbility(u, 'AIs1')
call UnitMakeAbilityPermanent(u, true, 'AIs1')

if IsUnitType(u,UNIT_TYPE_HERO) then
call SetHeroAgi(u,0,true)
call SetHeroInt(u,0,true)
call SetHeroStr(u,0,true)
call TriggerRegisterUnitStateEvent(t, u, UNIT_STATE_LIFE, LESS_THAN, GetWidgetLife(u)-0.1)
call TriggerAddCondition(t, Condition(function CheckLife))
else
call TriggerRegisterUnitStateEvent(t, u, UNIT_STATE_LIFE, GREATER_THAN, 100.1)
call TriggerAddCondition(t, Condition(function CheckLife))
endif

call IssueTargetOrderById(Dummy2, 852228, u)
call UnitRemoveAbility(u,'BNdc')
call UnitRemoveAbility(u,'AIs1')
if IsUnitType(u,UNIT_TYPE_HERO) then
call UnitAddAbility(u, 'AIs1')
call UnitRemoveAbility(u, 'AIs1')
endif
call DestroyTrigger(t)
set t = null

call UnitRemoveAbility(u,'AInv')
call UnitAddAbility(u,'AInv')

if IsUnitType(u,UNIT_TYPE_HERO) then
call UnitAddAbility(u,ResetStatUnit)
call KillUnit(u)
call UnitRemoveAbility(u,ResetStatUnit)

call UnitAddAbility(u,ResetStatHero)
call KillUnit(u)
else
call UnitAddAbility(u,ResetStatUnit)
call KillUnit(u)
endif

set t = CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(t, Condition(function CheckLife4))
call UnitAddAbility(u,'Amdf')
call UnitAddAbility(u,'Aro1')
call UnitRemoveAbility(u,'Aro1')
call UnitAddAbility(u,'Aro1')
call IssueImmediateOrderById(u, String2OrderIdBJ("unroot"))
call DestroyTrigger(t)
set t = null
if IsUnitType(u,UNIT_TYPE_HERO) then
call UnitRemoveAbility(u,ResetStatHero)
else
call UnitRemoveAbility(u,ResetStatUnit)
endif

call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MAX_MANA))
call SetUnitAbilitySilenced(u,'Amov',false)
set u = null

call SetUnitOwner(Dummy2, Player(15), false)
endfunction
[/CODIGO]

On this map you can see everything you ask for. The only bad thing is that it takes several skills to make these effects and a lot of code, which I did, surely there is a better way. And there is also the function to create a rank changing unit without using morph just using root with dark conversion, which is needed to work with web or ensare (the code function is longer lol).
View attachment 413178
All credits for leantrop, DioD y fenix140.

Note: Can see [JASS/AI] - Attack Range Melee Unit Change funcional in War 3 and Reforged (still testing) and [JASS/AI] - Hide "Hold, Patrol and Move" functional in any version of War 3 or Reforged.
Thank you though what is the method for a webbed unit to still be able to move?
 
Level 7
Joined
Mar 14, 2021
Messages
43
Thank you though what is the method for a webbed unit to still be able to move?
First know that 'Aro2' which is the type 2 root ability, makes a unit not move through a counter that immobilizes you, this counter is the same one used by ensnare or web to stop a unit. You should note that the [JASS/AI] - Attack Range Melee Unit Change funcional in War 3 and Reforged (still testing) is easier, since it goes straight using only morph. Well (This method is long and requires several skills "blizzard pls", I only used it for some test heroes, the detail is to do this or use trick metamorphosis although its disadvantage is that it takes 0.01 second to work web or mode)

1) The method that I mentioned here is to add 'Aro2' to your unit but modified said spell so that it does not change attack 1 for another, and that it remains in this when the "unroot" command is used, you must also have the option (Rooted Turning) to "true" so that root doesn't use silence on 'Amov' but the freeze counter even if it hides "patrol/move/hold".
2) The next step is to remove the ability 'Amov' so that the immobilization counter that went to 1 when adding root 'Aro2' becomes 0, now you use the method of making the unit immune to silence as specified in the initial post , killing her and reviving her with the dark conversion and burrow effects. Now you will see that the unit will have already recovered 'Amov' thanks to the previous transformation method, but its immobilize counter will still be at 0.
3) We go on to add and remove 'Aro1' which is the root that is characterized in silencing 'Amov' since (Rooted Turning) is false, so you will have the unit again with its hidden "patrol/move/hold" and 'Amov ' silenced, here you would have to use SilenceEx to unmute 'Amov'.
4) The final step is to use the "unroot" command for 'Aro2' to make the unit uproot, the detail is that this ability in this mode silences all spells and hides them, but it won't happen by the silence-immune method . From here the ability subtracts -1 from the immobilize counter but since it was at 0, it goes to -1, having the same effect that the unit cannot move, so here we try the ensnare ability and you will see that the unit moves since the counter went to 0. and this effect will last until the buff ends, returning the counter to -1 lol.
JASS:
private function SilenceDetect takes nothing returns boolean
    if (GetIssuedOrderId() == 852479 and GetUnitTypeId(GetOrderedUnit()) != UnitSilence) then
        call UnitAddAbility(GetTriggerUnit(), BURROW)
        call IssueTargetOrderById(Dummy2, 852228, GetTriggerUnit())
        call UnitRemoveAbility(GetTriggerUnit(),'BNdc')
    endif
    return false
endfunction

private function CheckLife takes nothing returns boolean
    call DisableTrigger(GetTriggeringTrigger())
    call KillUnit(GetTriggerUnit())
    call ReviveHero(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),false)
    call UnitRemoveAbility(GetTriggerUnit(), BURROW)
    return false
endfunction

private function CheckLife5 takes nothing returns boolean
    if (GetIssuedOrderId() == 852479) then
        call UnitRemoveAbility(GetTriggerUnit(),'Aro2')
        call UnitRemoveAbility(GetTriggerUnit(), 'Amdf')
    endif
    return false
endfunction

function ConverUnitFreeButtons_RangeAttack takes unit u returns nothing
    local integer i = GetHandleId(GetUnitRace(u))
    local trigger t = null
    if (i > 6) then
        set i=i-1
    endif
 
    call UnitAddAbility(u,'Aro2')
    call UnitMakeAbilityPermanent(u, true, 'Aro2')
    call UnitRemoveAbility(u,'Amov')
 
    call UnitAddAbility(u,HoldIDHide)
    call UnitMakeAbilityPermanent(u,true,HoldIDHide)
    call UnitAddAbility(u,SmartIDHide)//Added the channel skill with the "smart" order
    call UnitMakeAbilityPermanent(u,true,SmartIDHide)//The permanent ability to not be removed by a morph
    call SetUnitAbilitySilenced(u,SmartIDHide,true)
 
    set t = CreateTrigger()
    call SetUnitAbilityLevel(Dummy2, DARK_CONVERSION, i)
    call SetUnitOwner(Dummy2, GetOwningPlayer(u), false)
    call UnitAddAbility(u, BURROW)
 
    call UnitAddAbility(u, 'AIs1')
    call UnitMakeAbilityPermanent(u, true, 'AIs1')
 
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call SetHeroAgi(u,0,true)
        call SetHeroInt(u,0,true)
        call SetHeroStr(u,0,true)
        call TriggerRegisterUnitStateEvent(t, u, UNIT_STATE_LIFE, LESS_THAN, GetWidgetLife(u)-0.1)
        call TriggerAddCondition(t, Condition(function CheckLife))
    else
        call TriggerRegisterUnitStateEvent(t, u, UNIT_STATE_LIFE, GREATER_THAN, 100.1)
        call TriggerAddCondition(t, Condition(function CheckLife))
    endif
 
    call IssueTargetOrderById(Dummy2, 852228, u)
    call UnitRemoveAbility(u,'BNdc')
    call UnitRemoveAbility(u,'AIs1')
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call UnitAddAbility(u, 'AIs1')
        call UnitRemoveAbility(u, 'AIs1')
    endif
    call DestroyTrigger(t)
    set t = null
 
    call UnitRemoveAbility(u,'AInv')
    call UnitAddAbility(u,'AInv')
 
    call SetUnitAbilitySilenced(u,'Amov',false)
 
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call UnitAddAbility(u,ResetStatUnit)
        call KillUnit(u)
        call UnitRemoveAbility(u,ResetStatUnit)
  
        call UnitAddAbility(u,ResetStatHero)
        call KillUnit(u)
    else
        call UnitAddAbility(u,ResetStatUnit)
        call KillUnit(u)
    endif
 
    call UnitAddAbility(u,'Aro1')
    call UnitRemoveAbility(u,'Aro1') //Let's remove Aro1 "Root" since we don't need it anymore.
    call SetUnitAbilitySilenced(u,'Amov',false)//I return to the ability 'Amov' immune to silence
 
    set t = CreateTrigger()
    call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_ISSUED_ORDER)
    call TriggerAddCondition(t, Condition(function CheckLife5))
    call UnitAddAbility(u,'Amdf')
    call IssueImmediateOrderById(u, String2OrderIdBJ("unroot"))
    call DestroyTrigger(t)
    set t = null
    if IsUnitType(u,UNIT_TYPE_HERO) then
        call UnitRemoveAbility(u,ResetStatHero)
    else
        call UnitRemoveAbility(u,ResetStatUnit)
    endif
 
    call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
    call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MAX_MANA))
    call SetUnitAbilitySilenced(u,'Amov',false)
    set u = null
 
    call SetUnitOwner(Dummy2, Player(15), false)
endfunction
I use within the code, phoenix metamorphosis so that this method works on the heroes and does not duplicate their stats, I also use silence detection with the spell 'Adef' to remove 'Aro2' since if you remove it in the same line of code the unit is immobile in pause state, and it will not be possible to be taken out of this state. Well this is how the spell is coded by blizzard :v

You must take into account that if the ability 'Amov' is hidden and not silenced you will not be able to use the orders by triggs, so you will have to use a channel ability that its order is "smart" so that the unit can move, and this solve said problem.

The method is long, but I don't look for another way as I don't have much free time to find another way to do it. Greetings...
 
Last edited:
Top