thanks! I had to google this last night and came right here... works perfectly! :)
I just started trying out this coding business today. I am trying to create Foe Hunter ability that reads +1 damage and crit on 19-20 vs. orcs and half orcs. The damage seems to work (I impressed myself with that! I'm a noob give me a break) but crit fails. I read through the forum and the effects page. Am I correct that this is currently not an achievable script?
IFT: Type orc; DMG+1; CRIT: 19 [SELF]
You are correct in that you cannot use the CRIT keyword in an IFT statement - see posts above for the reasons.
Your effect should be IFT: TYPE(orc); DMG: 1
I am puzzled by one thing. "Hexblade's Curse; IFT: custom(HexCurse); DMG: 5" works fine. "Hexblade's Curse; IFT: Custom(HexCurse); CRIT: 19" does not work. "Hexblade's Curse; CRIT: 19" works, but lacks the conditional. Do you know why a conditional expression before "CRIT:" causes it to fail?
It is a perplexing programming choice to have IF: work with all effect components, but IFT: only work with components that are listed as having the (T) tag in the notes. It does not seem to say that in the atlassian wiki, but more importantly it would be much more useful if it controlled all effect components. I offer that as a programming suggestion.
Enhancement requests are best tracked
On the wish list. Link in mr Zs sig.
Roger that. Thank you.
IFT needs the target/opposing actor as information for the code to work, and only targetable effects use that information in the code, hence, why other type of effects won't work with IFT :) (sometimes the target information is not accessible in certain parts of the code)
(not sure about 5e, but conditions with (T) might not work in that way, too, at least in 3.5e/PF1 they are an exception to that rule)
IF just needs the actor and you always have the actor information in the code, therefore IF works with all effects :)
EDIT: Not saying that it is impossible to add target information to existing effects :D Just an explanation about what is going on in the code and why (T) gives a hint about effects working with IFT :)