Torchmodders

Modding => Modding Questions => Topic started by: Phanjam on June 17, 2018, 06:02:52 pm


Title: [SKILL] Applying Affixes to Multiple Targets
Post by: Phanjam on June 17, 2018, 06:02:52 pm
Hi @Lord Nyriox this is an attempt to answer your question on the Discord about applying the "Share the wealth" skill's effects to monsters as well as allies and self...

A quick look at the code suggest to me that you should be able to set-up an additional AFFIX block like the ones already there, except have the <STRING>TARGET: set to ENEMY...

Code: [Select]
[LEVEL1]
<TRANSLATE>DESCRIPTION:Shared Charge benefits: 20%
<FLOAT>RANDOMRANGE:0
[EVENT_START]
<STRING>FILE:media/skills/wanderer/sharethewealth/sharethewealth.layout
<BOOL>FOLLOWS:true
<BOOL>NOSTEALEFFECTS:false
<BOOL>STATSHIDDEN:true
[AFFIXES]
<STRING>TARGET:FRIEND
<STRING>AFFIX:WANDERER_SHARE_THE_WEALTH
[STATWATCHER]
<STRING>STAT:PLAYER CHARGE PERCENT
<STRING>PRIMARY_TARGET_TYPE:SELF
<STRING>SECONDARY_TARGET_TYPE:VALUE
<STRING>WATCH_TYPE:GREATER THAN
<FLOAT>SECONDARY_VALUE:0
[/STATWATCHER]
[/AFFIXES]
[AFFIXES]
<STRING>TARGET:SELF
<STRING>AFFIX:WANDERER_SHARE_THE_WEALTH
[STATWATCHER]
<STRING>STAT:PLAYER CHARGE PERCENT
<STRING>PRIMARY_TARGET_TYPE:SELF
<STRING>SECONDARY_TARGET_TYPE:VALUE
<STRING>WATCH_TYPE:GREATER THAN
<FLOAT>SECONDARY_VALUE:0
[/STATWATCHER]
[/AFFIXES]
[/EVENT_START]
[/LEVEL1]

Haven't tried it myslef yet tho...
Title: Re: [SKILL] Applying Affixes to Multiple Targets
Post by: Lord Nyriox on June 19, 2018, 02:48:11 pm
A quick look at the code suggest to me that you should be able to set-up an additional AFFIX block like the ones already there, except have the <STRING>TARGET: set to ENEMY...

EDIT:  Dang it!  Using a UnitTheme on the Affix, I can confirm that "TARGET:ENEMY" is not enough to make it affect monsters.  It apparently affects friendly NPCs (including pets and town guards) just fine, though.  :} 

I will attempt setting "TARGET_ALIGNMENT" to "ALL" next. 
Title: Re: [SKILL] Applying Affixes to Multiple Targets
Post by: Phanjam on June 20, 2018, 07:45:12 am
Yes, good call! I missed that :o