Junior Member
Join Date: Sep 2014
Posts: 7
|
I know that to add a flaw where a 19 strength is required, you'd put in 'Field' = 'reqStr'. But how would you add a flaw that required either a 19 str OR a 19 con?
|
#1 |
Senior Member
Join Date: Aug 2011
Posts: 363
|
i know it sounds odd but i believe you use the + sign, at least thats what i see in other examples and have used myself
|
#2 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
You'd need to use a pre-req for this
Code:
validif (#attrvalue[aSTR] >=19) validif (#attrvalue[aCON] >= 19) |
#3 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
|
#4 |
Senior Member
Join Date: Aug 2011
Posts: 363
|
so some times it is a combo and sometimes it does if 1 or the other is valid? i'll never get ahold of this coding. lol
|
#5 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
in general the #hasability and similar macros are all tagis[XXX.?] checks they have a value of 0 or 1. So adding them together and checking for a result that is not zero is like doing an or statement in an expr-req. This only works with the tagis statement.
In some rare occasions you might have to do a validif (#hasability[] + #hasability[] = 2) as part of a pre-req, something like Either A and B, or C, but it's rare. Using the pre-req the way I did means it checks to see if either line is valid. |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
So a "Boolean" question or "if" statement would be like do I have Feat A or Feat B as the answer is either "TRUE(1)" or "FALSE(0)". You have no other way of answering the question. So what you where saying is if a pre-req said Feat 1 or Feat 2 is required you would: Code:
#hasfeat[fFeat1] + #hasfeat[fFeat2] <> 0 Code:
If #hasfeat[fFeat1] = BOOLEAN_TRUE or #hasfeat[fFeat2] = BOOLEAN_TRUE; //Here do something when we have either feats else; //Here do something when we do NOT have either feat endif; 1) #hasfeat[fFeat1] returns 0 + #hasfeat[fFeat2] returns 1 (totals 1) will NOT equal zero so its "true". 2) #hasfeat[fFeat1] returns 1 + #hasfeat[fFeat2] returns 0 (totals 1) will NOT equal zero so its "true". 3) #hasfeat[fFeat1] returns 0 + #hasfeat[fFeat2] returns 0 (totals 0) will equal zero so its "False". 4) #hasfeat[fFeat1] returns 1 + #hasfeat[fFeat2] returns 1 (totals 2) will NOT equal zeros so its "True". Hope that helps some. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#7 |
Senior Member
Join Date: Aug 2011
Posts: 363
|
ahhhhhh....i see.. i just needed someone to turn on the lightswitch for me...haha )
|
#8 |
|
|