Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 201

Old November 16th, 2018, 08:07 PM
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."
Bob G is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,727

Old November 16th, 2018, 09:13 PM
In this specific case you can use a tagexpr[].

Example:
Code:
hero.tagexpr[HasFeat.fWepFin | HasFeat.fComExp] <> 0
Check those tag ids I as don't remember them exactly but the example otherwise works.

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.
ShadowChemosh is offline   #2 Reply With Quote
TheIronGolem
Senior Member
 
Join Date: Feb 2015
Posts: 641

Old November 17th, 2018, 11:58 AM
Another thing you can do is combine tagis results and see what they add up to:

Code:
tagis[HasFeat.fWepFin] + tagis[HasFeat.fComExp] > 0
This works because tagis[whatever] returns 1 if the container in question (the hero, in this case) has at least one copy of the referenced tag. So in the above example, the result will be 1 if the hero has one feat, 2 if they have both, and 0 if they have neither. So any result greater than zero is valid.
TheIronGolem is offline   #3 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 201

Old November 19th, 2018, 03:35 PM
Thank you both, those suggestions are very helpful. I appreciate the help, as always.
Bob G is offline   #4 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 201

Old June 19th, 2020, 08:03 PM
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) 94.9%, Assassin (Interjection Games) 81%, Eldritch Godling (Super Genius Games) 50.8%, Mighty Godling (Super Genius Games) 35.6%, Clever Godling (Super Genius Games) 30.3%, Adept Godling (Super Genius Games) 27.2%, Legendary Cavalier (Legendary Games) 18.7%, Fortunate (rebuild of Luckbringer, Rite Publishing) 13.5%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,794

Old June 20th, 2020, 09:48 AM
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
Mathias is offline   #6 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 201

Old June 20th, 2020, 11:45 AM
Quote:
Originally Posted by Mathias View Post
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
Got it, thanks Mathias. Working as expected now. I appreciate the assist, as always.

Projects: Legendary Rogue (Legendary Games) 94.9%, Assassin (Interjection Games) 81%, Eldritch Godling (Super Genius Games) 50.8%, Mighty Godling (Super Genius Games) 35.6%, Clever Godling (Super Genius Games) 30.3%, Adept Godling (Super Genius Games) 27.2%, Legendary Cavalier (Legendary Games) 18.7%, Fortunate (rebuild of Luckbringer, Rite Publishing) 13.5%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #7 Reply With Quote
Reply

Thread Tools
Display Modes

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:46 PM.


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