Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Hi everyone,
How would you set up a prerequisite that uses the argument "or"? i.e. "If the hero has the weapon finesse feat or the combat expertise feat, the argument is true." |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
In this specific case you can use a tagexpr[].
Example: Code:
hero.tagexpr[HasFeat.fWepFin | HasFeat.fComExp] <> 0 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. |
#2 |
Senior Member
Join Date: Feb 2015
Posts: 676
|
Another thing you can do is combine tagis results and see what they add up to:
Code:
tagis[HasFeat.fWepFin] + tagis[HasFeat.fComExp] > 0 |
#3 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Thank you both, those suggestions are very helpful. I appreciate the help, as always.
|
#4 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
A follow-up question regarding this topic: I'm working on a feat that two different criteria to satisfy prerequisites.
Prerequisites: Tripping bite feat or (combat expertise and improved trip) I'm trying to translate this in ExprReqs, but keep getting parsing errors. My latest attempt was hero.tagexpr[HasFeat.fTrippBite] <> 0 | hero.tagexpr[HasFeat.fComExpert + HasFeat.fImpTrip] >= 2 What's the correct syntax to express this? Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9% Message me for a list of completed projects. Visit my blog! https://gauntletsofblogrepower.blogspot.com/ |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Bob - take another look at the examples, and look for where the "|" and "+" actually are. Right now, you're mixing them together, with + inside tagexpr, where it's not used, and | outside of a tagexpr, so that won't work either.
tagexpr (HasFeat.fTrippBite | (HasFeat.fComExpert & HasFeat.fImpTrip)] <> 0 |
#6 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Quote:
Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9% Message me for a list of completed projects. Visit my blog! https://gauntletsofblogrepower.blogspot.com/ |
|
#7 |
|
|