Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old January 14th, 2013, 04:28 PM
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
AndrewD2 is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 14th, 2013, 05:27 PM
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.
Aaron is offline   #2 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old January 14th, 2013, 05:37 PM
I know that, I working with pre-req here.
AndrewD2 is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 14th, 2013, 06:31 PM
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).
Aaron is offline   #4 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old January 14th, 2013, 07:27 PM
Thanks, I just went with using multiple validif statements, works like a charm!
AndrewD2 is offline   #5 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:24 AM.


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