Torchmodders
Modding => Modding Questions => Topic started by: Phanjam on March 23, 2017, 10:11:09 pm
-
I've been wanting to add "Blight Damage Reduction" effects from wearing the Alchemist Transmuter armor set, and I've been studying using triggerables as part of the solution.
So I was looking at those "Slayer" triggerables (Kill x enemies, get an affix) and their structure intrigued me because they contained both the benefit AFFIX and the STAT to WATCH for applying it, all in the triggerable .DAT file itself.
So my question is, could I use that structure to trigger a healing affix when I get blighted? I threw the code below together quick-and-dirty, and would really appreciate comments/ corrections from the more skilled members...
[TRIGGERABLEACTION]
<STRING>NAME:TRANSMUTER_ARMOR_DR_TRIGGER
<TRANSLATE>DESCRIPTION:Applies an anti-blight healing passive
<STRING>GAMEEVENTTYPE:STAT
<STRING>EVENTCREATOR:SELF
<STRING>SUBTYPE:ADDSTAT
<INTEGER>LEVEL:1
<FLOAT>FLOATCONDITION:1
<INTEGER>COOLDOWN:750
[AFFIXES]
<STRING>AFFIX:SPELL_HEALSELF
[STATWATCHER]
<STRING>STAT:BLIGHTSTAT
<STRING>PRIMARY_TARGET_TYPE:SELF
<STRING>SECONDARY_TARGET_TYPE:VALUE
<STRING>WATCH_TYPE:EQUAL TO
<FLOAT>SECONDARY_VALUE:1
[/STATWATCHER]
[/AFFIXES]
[/TRIGGERABLEACTION]
What I am really unsure of are the SUBTYPE:, LEVEL: and FLOATCONDITION: variables ???
The healing affix "spell_healself" is actually just the "heal self" spell affix; just a placeholder for now...
Thank you in advance!
-
i havent dabbled with items but i took a quick look at some of those trigerrables
it seems like they consists of two parts
1. is the triggerable to count how much times youve done an action (kill, hit, crit etc.)
this part is what adds X stats to the character
2. is the triggerable to grant the affix, the SUB TYPE determines when the triggerable will trigger, in this case its when you gain a stat (ADD STAT), the X stat used in the stat watcher will determine which stat the triggerable chooses
FLOATCONDITION is what prevents the add stat triggerable from triggering each time you gain +1 of X stat, until its condition is met
as for LEVEL i have no idea, it might be there to determine what level the character can use the triggerable?
now... all of the above is all speculation based on my experience with triggerables, so take it with a grain of salt and keep experimenting
and yea its possible to have something trigger when you gain, loose or clear a stat (in this case the "blighted" stat) but you have to set the GAME EVENT TYPE to stat to get the proper drop down options
-
TYVM Twinkle!
My take-off point was gyt's triggerables tutorial (http://torchmodders.com/wiki/doku.php?id=triggerables) on the wiki and the method I picked up from there was the 2-stage method (a triggerable to trigger a separate skill, which then applies the affix) which is the more used method I guess. I was just thinking I could cut a few corners with this combined method :P
Okay back to work ;D thanks!