Torchmodders

Modding => Modding Questions => Topic started by: Salan on September 07, 2014, 11:58:03 am


Title: Target_unittype discussion
Post by: Salan on September 07, 2014, 11:58:03 am
not to take over the arena thread...


so I can't for the life of me get my target_unittype to work correctly.
Here is what is set up and why I am confused on what I am missing:

Unittype: TARGET_ELITE
Quote
[TARGET_ELITE]
<STRING>NAME:TARGET_ELITE
[/TARGET_ELITE]


unittype:  MONSTER_ELITE
Quote
[MONSTER_ELITE]
<STRING>NAME:MONSTER_ELITE
<STRING>child:MONSTER
<STRING>child1:CHARACTER
<STRING>child2:ANY
<STRING>child:TARGET_ELITE
[/MONSTER_ELITE]


The base skill applies affixes to the player
Quote
[SKILL]
   <STRING>NAME:RANGER_NATURE_GIANTKILLER
   <TRANSLATE>DISPLAYNAME:Giant Killer
   <STRING>SKILL_ICON:icon_turnevil
   <STRING>SKILL_ICON_INACTIVE:icon_turnevil_grey
   <STRING>ACTIVATION_TYPE:NORMAL
   <STRING>TARGET_ALIGNMENT:GOOD
   <STRING>TARGET_TYPE:SELF
   <STRING>ANIMATION:special_gen_buff
   <STRING>MANA_COST_GRAPH:MANACOST_BIG
   <FLOAT>MANA_GRAPH_SCALE:1.3
   <FLOAT>SPEED:2
   <INTEGER>COOLDOWNMS:1500
   <FLOAT>TURNRATEOVERRIDE:-1
   <STRING>REQUIREMENT_GRAPH:SKILLTIER6
   <BOOL>DUELWIELD_REQUIRED:1
   <BOOL>CAN_BE_SILENCED:0
   <INTEGER>MAX_INVEST_LEVEL:15
   <INTEGER64>UNIQUE_GUID:-2080130591739349721
   [LEVEL1]
      [EVENT_START]
         <STRING>FILE:media/skills/ranger/nature_giantkiller/giantkiller_cast.layout
         <BOOL>ATTACHES:1
         <BOOL>APPLYEFFECTS:1
         [AFFIXES]
            <INTEGER>AFFIXLEVEL:1
            <STRING>TARGET:SELF
            <STRING>AFFIX:RANGER_NATURE_GIANTKILLER_1
         [/AFFIXES]
      [/EVENT_START]
   [/LEVEL1]

these affixes assign a 'cast spell when skill strike'
Quote
[AFFIX]
   <STRING>NAME:RANGER_NATURE_GIANTKILLER_1
   <INTEGER>RANK:0
   <INTEGER>MIN_SPAWN_RANGE:0
   <INTEGER>MAX_SPAWN_RANGE:100
   <FLOAT>DURATION:0
   <INTEGER>WEIGHT:0
   <INTEGER>SLOTS_OCCUPY:0
   [EFFECT]
      <STRING>NAME:RANGER_NATURE_GIANTKILLER_ELITE_1
      <STRING>ACTIVATION:DYNAMIC
      <STRING>DURATION:5
      <STRING>TYPE:CAST SKILL ON SKILL STRIKE
      <STRING>STATMODIFYNAME:EFFECT LEVEL
      <STRING>STATMODIFYPERCENT:100
      <BOOL>EXCLUSIVE:true
      <BOOL>MODIFIERISBONUS:true
      <FLOAT>MIN:3
      <FLOAT>MAX:3
   [/EFFECT]
[/AFFIX]

these affixes fire this skill on triggering
Quote
[SKILL]
   <STRING>NAME:RANGER_NATURE_GIANTKILLER_ELITE_1
   <TRANSLATE>DISPLAYNAME:GiantKiller ELITE
   <STRING>SKILL_ICON:icon_turnevil
   <STRING>ACTIVATION_TYPE:NORMAL
   <STRING>TARGET_UNITTYPE:TARGET_ELITE
   <FLOAT>RANGE:20
   <INTEGER>COOLDOWNMS:500
   <FLOAT>FINDTARGETANGLE:360
   <FLOAT>TURNRATEOVERRIDE:-1
   <BOOL>HIDDEN:1
   <BOOL>INTERRUPTABLE:1
   <BOOL>CAN_BE_SILENCED:0
   <INTEGER64>UNIQUE_GUID:7045692403799360456
   [LEVEL1]
      <STRING>TARGET_UNITTYPE:TARGET_ELITE
      [EVENT_START]
         <STRING>FILE:media/skills/ranger/nature_giantkiller/giantkiller_hit.layout
         <FLOAT>WEAPONDAMAGEPCT:150
         <BOOL>ATTACHTOTARGET:1
         <BOOL>DAMAGESHAPES_HIT_ONCE:1
         <BOOL>APPLYEFFECTS:1
         <INTEGER>MAX_UNITS_HIT:1
         [EFFECTS]
            <STRING>TARGET:SELF
            [EFFECT]
               <STRING>NAME:RANGER_NATURE_TREE
               <STRING>ACTIVATION:DYNAMIC
               <STRING>DURATION:INSTANT
               <STRING>TYPE:ADD STAT
               <FLOAT>MIN:-2
               <FLOAT>MAX:-2
               <FLOAT>CHANCE:100
            [/EFFECT]
         [/EFFECTS]
      [/EVENT_START]
   [/LEVEL1]
   [STATWATCHER]
      <STRING>STAT:RANGER_NATURE_TREE
      <STRING>PRIMARY_TARGET_TYPE:SELF
      <STRING>SECONDARY_TARGET_TYPE:VALUE
      <STRING>WATCH_TYPE:GREATER THAN OR EQUAL TO
      <FLOAT>SECONDARY_VALUE:2
   [/STATWATCHER]
[/SKILL]

right now this proc hits everything

there was this line just after the add stat -2, which I have removed

Quote
         [AFFIXES]
            <INTEGER>AFFIXLEVEL:1
            <STRING>TARGET:ENEMY
            <STRING>AFFIX:RANGER_COMBAT_BLEED_DAMAGE_10
         [/AFFIXES]

but even with that the skill shouldn't have been firing against normal monsters or target dummies.
Title: Re: Target_unittype discussion
Post by: Salan on September 07, 2014, 12:56:15 pm
So i did a test with my thorn rapid fire skill

using the unittype_target:Target_elite

works fine, it misses everything.

What is interesting thou is that it still fires the skill, MAYBE what I am seeing isn't a bug, the skill is still firing the layout and graphic, but it is not effecting the non_elite monsters..  its hard to read the combatlog correctly .. so I am going to add a

   <BOOL>REQUIRES_TARGET:1

to the procs and see if that does anything.
Title: Re: Target_unittype discussion
Post by: Salan on September 07, 2014, 01:48:50 pm
I believe the proc is actually working as intended.

The target_unittype doesn't stop the layout from firing, it simply stops the damage from taking effect.  In a proc it is very difficult to tell what is going on even in the combat log with a pure damage proc.

eitherway, it works.

Oh and the stat deduction fires regardless, I will be moving all of that to TRIGGER_UNITHIT instead of TRIGGER_START...