• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Couple of prereq questions.

AndrewD2

Well-known member
These both have to do with "or statements"

first: I've got a feat that has the requirement of 2 ranks in skill a or b. I tried using #skillranks[skA] + #skillranks[skB] but if I have 1 rank in each it satisfies the expression.

I saw a way of using | for or, but I couldn't get it to work in this situation. (The reference in the forums is for checking races).

I know I could just do 2 if statements, but it just seems like there has to be a better way than that.

second: Is it possible to make a prerep mutable? One feat I'm inputting has a required of "Int 13 or Cha 13 (whichever is your primary casting ability).

Thanks,
Andrew
 
Anything that is more complex than 1 line can't be in an expr-req, it would have to go in a pre-req script. That's the way you'll have to go.
 
The "|" means "or" is only in tag expressions, you can't use it in most eval/pre-req scripts (the exception only applies to tags, whereas you want field values here).

Two validif statements is how I would handle this first one.

Code:
validif (#skillranks[skWHATEVER] >= 2)
validif (#skillranks[skWHATEVER2] >= 2)

For the second, you have 3 choices.

1 - You could just have a pre-req check for Int 13 or Cha 13 and be satisfied.

2 - You could make 2 versions, an Int version or a Cha version, and give them seperate expr-reqs (relying on the user to add the one they want).

3 - You could make the feat have an eval rule which tests for the correct Stat based on a user choice. Eval rules don't execute until after the user adds the feat, but are necessary when the pre-req relies on a user choice.

You will have to make the feat select the class desired, and then you can detect the linkage[spellattr] to detect whether it has Cha or Int casting, then make it check for 13 in that attribute.

Post Attr 10000
Code:
validif (field[usrChosen1].chosen.linkage[spellattr].field[aFinalVal].value >= 13)

Alternately, you could have the user select the attribute directly (rather than looking at the class, and transitioning to the attribute used to cast for that class).
 
Back
Top