Hello!
For my D&D 5e Datafiles I need a "Conditional Portal", what I mean is this: A portal where the user can choose spells should only be visible if the character has a specific ClassFeat (a specific thing). If not visible should be put to 0.
I tried to implement the following way in the <layout>:
foreach pick in hero
if (eachpick.tagis[thingid.fWBkAn]<>0) then
portal[clBoS].visible = 1
endif
nexteach
But this seems to get ignored (as if the Feat would not be present!)
Interestingly even checking for thingid.clsWarl (the Warlock class) does not work, while
perform state.clearfocus
perform hero.findchild[Class].setfocus
if (state.isfocus=0) then
if (compare(focus.field[name].text,"Warlock")=0) then
actually works !!! Sadly for the checking of the Feat I cannot do something like this string comparision (which works in other cases).
Anybody got a hint for me how I can solve the problem ? (Currently in my datafiles the Book of Ancient Shadows Ritual list is ALWAYS displayed, and a text tells the user if he is allowed to use this list or not - this is of course not a good solution, making it visible/invisible based on if he has the feat would be better).
Thanks in advance!
Best regards,
MagicSN
For my D&D 5e Datafiles I need a "Conditional Portal", what I mean is this: A portal where the user can choose spells should only be visible if the character has a specific ClassFeat (a specific thing). If not visible should be put to 0.
I tried to implement the following way in the <layout>:
foreach pick in hero
if (eachpick.tagis[thingid.fWBkAn]<>0) then
portal[clBoS].visible = 1
endif
nexteach
But this seems to get ignored (as if the Feat would not be present!)
Interestingly even checking for thingid.clsWarl (the Warlock class) does not work, while
perform state.clearfocus
perform hero.findchild[Class].setfocus
if (state.isfocus=0) then
if (compare(focus.field[name].text,"Warlock")=0) then
actually works !!! Sadly for the checking of the Feat I cannot do something like this string comparision (which works in other cases).
Anybody got a hint for me how I can solve the problem ? (Currently in my datafiles the Book of Ancient Shadows Ritual list is ALWAYS displayed, and a text tells the user if he is allowed to use this list or not - this is of course not a good solution, making it visible/invisible based on if he has the feat would be better).
Thanks in advance!
Best regards,
MagicSN