Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
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 |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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.
|
#2 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
I know that, I working with pre-req here.
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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) 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) |
#4 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Thanks, I just went with using multiple validif statements, works like a charm!
|
#5 |
|
|