Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   candidate tag expression (http://forums.wolflair.com/showthread.php?t=60848)

tkarn June 29th, 2018 01:17 AM

candidate tag expression
 
I have a list of special abilities. Each ability is associated with a charactertype.

I have a dynamic table that shows the special abilities. That works fine.

Now I only want to show these special abilities with is associated with a special type.

I use the candidate expression, for example:

<![CDATA[
CharTyp.ctySpeak
]]>

When I use the ctySpeak type, the special abilities are shown in the pick.
When I use the ctyWarr type, the special abilities are not shown in the pick. I think it works fine.

When I use the candidate expression:

<![CDATA[
CharTyp.ctySpeak | CharTyp.ctyWarr
]]>

the abilities of both types are shown. That works fine.

Now I only want to see the abilities either of ctySpeak or ctyWarr.
How can I built the expression. I tried if then. I does not work.
I tried findchild, but it didn't work too. What do I do wrong?

Duggan June 30th, 2018 06:50 PM

In what situations do you want ctySpeak versus ctyWarr?

tkarn July 1st, 2018 02:22 AM

During character creation. I choose a character type ctySpeak or ctyWarr etc.

Then I choose special abilities for this character type. I added a CharTyp prerequisite for the special abilities. Only the abilities for the correct character type are highlighted. Everything works good.
Now I want to make it a little bit nicer. The list is very long and i have to scroll down (or filter "Only valid items") to find the abilities.
Now I want to display only those items that match the character type. Its only a kind of cosmetic.

Duggan July 2nd, 2018 09:14 AM

Ah. So, if I understand correctly, you want the Candidate Expression set based off of the character type so that only the appropriate ones are shown. Hmm... this is outside of my realm of experience, but I can try when I get home. What behavior were you getting when you tried the "if then"? Do you still have that code?

tkarn July 2nd, 2018 09:21 AM

Correct.
I get an undeclared item error "if".

Duggan July 2nd, 2018 03:49 PM

{nods} So you were trying to put the "if then" statement inside of the candidate expression. Instead, you're going to want to build that candidate expression dynamically inside a pick or field and then refer to it via a candidatepick or candidatefield on the table. The 4E files have some examples in how they build magical items.

tkarn July 2nd, 2018 10:38 PM

Thank you. I will take a look at this.

tkarn July 18th, 2018 06:26 AM

@Duggan: Now I had time to test it. It works the way I want.

Duggan July 18th, 2018 08:28 AM

Excellent! ^_^ I was not 100% certain that I knew what I was talking about, so it is gratifying that it worked.


All times are GMT -8. The time now is 07:17 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.