• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Problems with Targeted As: Ward

Status
Not open for further replies.
Level 8
Joined
Jul 10, 2008
Messages
353
Need a guide about this section of editor.

1. That field seems to only "really" take 3-4 variables.

2. Adding Ward there make unit attack slower(?) Not sure if its slower but 1000% sure the overall dps or ehp drops a lot.

3. Is there hidden attributes for units that are listed Targeted AS: Ward ? (I suspect they are). And is there a way to find this hidden attributes? Any got a link for a guide?
 
Level 8
Joined
Jan 28, 2016
Messages
486
Firstly, you're points:
  1. The field takes all the variables but some don't work (i.e. Tree).
  2. There does seem to be a slow but I don't know why.
  3. I have no idea what you mean by this.

As for guides, there's this thread from The Hive that has some good explanations of what each classification does. There is some info from the Jass Manual as well (it's a bit of an eyesore though).

I also wrote up this code to prove that a unit with multiple classes is registered by the game. It's in Jass because the Giant and Tauren types aren't available in GUI and you can't write conditions in custom script. The code will print the name of the unit class of a target unit.

For those who don't know Jass:
  1. Create a new trigger and name it "Unit Class Test."
  2. In the toolbar, go to Edit>Convert to Custom Text and click Ok.
  3. Delete everything in the trigger and paste the following code instead.
  4. Adjust the spell ID 'A000' in the code to your chosen spell.
    (Press Alt+D when looking at your spell in the Object Editor to get the code)
  5. Make sure you're spell is unit-target.
    (Pro-tip: base it off Purge with 0 summoned unit damage to target anything)
JASS:
function Unit_Class_Test_Conditions takes nothing returns boolean
    if GetSpellAbilityId() == 'A000' then //remember to adjust this to your spell's ID
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_ANCIENT ) then
            call BJDebugMsg("Ancient")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_GIANT ) then
            call BJDebugMsg("Giant")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_MECHANICAL ) then
            call BJDebugMsg("Mechanical")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_SAPPER ) then
            call BJDebugMsg("Suicidal")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_SUMMONED ) then
            call BJDebugMsg("Summoned")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_TAUREN ) then
            call BJDebugMsg("Tauren")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_TOWNHALL ) then
            call BJDebugMsg("Town Hall")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_UNDEAD ) then
            call BJDebugMsg("Undead")
        endif
        if IsUnitType( GetSpellTargetUnit(), UNIT_TYPE_PEON ) then
            call BJDebugMsg("Worker")
        endif 
    endif
    return false
endfunction

//===========================================================================
function InitTrig_Unit_Class_Test takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Unit_Class_Test_Conditions ) )
    set t = null
endfunction
 
Level 8
Joined
Jul 10, 2008
Messages
353
@Dehua_Darbuya

What I meant that classifications in the field of "Targeted as" that are not Ward,Structure,Ground,Air, they seem to do nothing. I can write in there p**** else well and will have same effect as if I wrote hero >.<

Am mainly jass user, in fact I only use editor to edit terrain and get skill ids. (That doesn't mean am good at it, I try tho).

About 3. What I meant is, example:
Targeted as: Air --> can be attacked by air only stuff
Targeted as: Structure --> Various buffs/debuffs don't work etc
Targeted as: Ground --> Generic targeted
Targeted as Ward ---> Well seems this makes units attack slower
Those are some attributes of classification "Targeted as: Something" Am looking for a guide to this something, and even more so on ward classification under Targeted as

Ty for the link too, but that guide is extremely incomplete and in fact it doesn't cover even the basics. (Where is structure?!?)

edit: From guide: "Ward - Removes the commands panel". Is this when is Classified as "Type: Ward" or when "Targets: Wards" or when classified as "Targeted as: Ward". Those are 3 different things. I know it makes no sense, but blizzard.

At least I would like to know how much slower does "Targeted as: Ward" makes a unit so I can compensate with adding extra attack speed. It really threw my maps balance off.
 
Last edited:
Level 8
Joined
Jan 28, 2016
Messages
486
@puffdragon: Wow completely misunderstood what you were after. This is what a lack of sleep does to you... (-.-)

Basically everything I said is irrelevant to your problem but if you ever need some info of Unit Types, you know where to look! As for Target Types, they're a mess as you said. Thanks Blizzard! :D

This is difficult to explain so I'll try to break it up.
FieldInteraction
Combat - Attack 1 - Targets Allowed Determines what the unit can attack; is affected by Target As but not Unit Class
Combat - Target As of attacked unitDetermines what attacks and spells can target the unit; is affected by attacking units Combat - Atk - Targets Allowed
Stats - Unit ClassificationDetermines the unit's behaviour and interaction with certain spells (Eg: specific Undead spells are hardcoded to only be cast on Undead-type units)

This isn't set in stone as they're are many cases where these "rules" don't make sense. For instance the Stone Giant's War Club ability can only target trees, no matter what you put down in the Targets Allowed field. On the flip-side, Purge has no targets checked yet can be cast on almost any unit and the Spiritwalker's Spirit Link will only affect Tauren-type units. A few of the target options don't seem to work either. Thanks again Blizzard! :D
 
Level 8
Joined
Jul 10, 2008
Messages
353
Again tho, what am looking after is what changes happen internally to the unit when i change its value of "Targeted As:" to something, example Ward. Cause it doesn't just make it targetable by abilities that "Targets: Ward" it also makes the unit slower and probly other stuff I don't know about yet.

Tyvm for trying to help, but still need more information if anyone has it.
 
Level 8
Joined
Jan 28, 2016
Messages
486
My bad, was having one of those days... (-.-) Can't help with the problem but hopefully someone more knowledgeable than myself can solve this issue. It's quite interesting nonetheless; keen to see a solution if it arises. And subcribed. Good luck! :D
 
Status
Not open for further replies.
Top