Senior Member
Join Date: Jun 2007
Posts: 273
|
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? |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
In what situations do you want ctySpeak versus ctyWarr?
|
#2 |
Senior Member
Join Date: Jun 2007
Posts: 273
|
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. |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
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?
|
#4 |
Senior Member
Join Date: Jun 2007
Posts: 273
|
Correct.
I get an undeclared item error "if". |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
{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.
|
#6 |
Senior Member
Join Date: Jun 2007
Posts: 273
|
Thank you. I will take a look at this.
|
#7 |
Senior Member
Join Date: Jun 2007
Posts: 273
|
@Duggan: Now I had time to test it. It works the way I want.
|
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Excellent! ^_^ I was not 100% certain that I knew what I was talking about, so it is gratifying that it worked.
|
#9 |
|
|