PDA

View Full Version : Question about custom effects and IF: and ! functions



Dtoad
May 26th, 2019, 23:27
I want to create a custom condition "goading" and use the not (!) function to test for it using the IF: function. I am not sure its possible and my OCD is keeping me awake:p

First, can ! be applied to IF:, as in IF!: or IFT!:, so that if the result is not true it will be skipped? If possible, what is the correct syntax?

Next can ! be applied to a custom condition, as in !(CUSTOM)goading? Am I creating and/or using the custom condition wrong?

An example that doesn't work..Goaded;IFT!: (CUSTOM)goading;DISATK while (CUSTOM)goading is applied the PC I want to exclude.

Any help is appreciated!

LordEntrails
May 26th, 2019, 23:42
Nope. The only time I know of that not (!) can be applied is on the conditions themselves.

So, instead you have to do a !consition1, !condition2, etc.

See the example for Fiendish Resistance on the wiki; https://www.fantasygrounds.com/wiki/index.php/5E_Effects

Zacchaeus
May 26th, 2019, 23:53
The custom effect tests for something which is sitting on a target. So the syntax is IFT: CUSTOM (word) where word is what is being tested for. So if the target has an effect of ‘hex’ on it then you can test for it using IFT:CUSTOM (hex).

If in that example the target does have hex on it then the function returns true otherwise it returns false.

The pling (!) is used as a logical not, such as in the case where various NPCs have resistance to non magical damage. So damage resistances slashing, bludgeoning, !magic will resist slashing and bludgeoning damage except if the weapon is magical.

You can’t use the pling with an effect keyword such as IFT.

Dtoad
May 27th, 2019, 00:06
Thank You! This was driving me crazy!

Maybe now I can sleep....lol

Dtoad
May 27th, 2019, 00:38
Or not...

Can the pling be used with CUSTOM(hex), or only the conditions and resistances which are hard coded?

Zacchaeus
May 27th, 2019, 00:54
It can’t be used with the custom keyword. IF and IFT are binary tests, either positive or negative.

Dtoad
May 27th, 2019, 01:45
Good to know, Thank You!


Hmmm, could an extension hard code more conditions? Or make IF: actionable if it returns as false?

Zacchaeus
May 27th, 2019, 10:11
Almost anything is possible with an extension.