Senior Member
Join Date: Jul 2019
Posts: 142
|
is it possible to set an ability to have a particular Type as a prerequisite?
I've seen some feats with #has race [rElf] as a requirement. Is it possible to do something like #has type [monstrous humanoid] |
#1 |
Senior Member
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 1,086
|
It's common for feats. Normally special abilities are written for a particular creature, so you wouldn't need a prerequisite.
If you really want to do things that way there are macros #hastype[type_id] and #hassubtype[subtype_id] Current RPG's: Pathfinder (GM), Pathfinder (Player), Gamma World (GM, Pathfinder homebrew). HeroLab: 3.5 & Pathfinder. HL User Files for PF: Greyhawk Setting, Gamma World (WIP). DM and player of D&D since 1980. |
#2 |
Senior Member
Join Date: May 2015
Posts: 830
|
I just pulled up two feats that required either the shapechanger subtype or the outsider type:
Shapechanger subtype required. #hassubtype[stShapecha] <> 0 Magical Beast, Outsider, or Undead type required. #hastype[tpMagBeast] + #hastype[tpOutsider] + #hastype[tpUndead] <> 0 |
#3 |
Senior Member
Join Date: Jul 2019
Posts: 142
|
Thanks for this. I was able to adapt those code samples. It was a bit tricky. I thought at first I was supposed to put the code into the Eval Rules tab, and it didn't work there.
Then I tried Pre-reqs, and finally found a feat with a racial requirement for elf, and realized it needs to go into Pick-Reqs. If I can ask, which feats did you get your sample from? That have Shapechanger subtype as a requirement? |
#4 |
Senior Member
Join Date: May 2015
Posts: 830
|
fGruesShap => Gruesome Shapechanger
fConsuEsse => Consume Essence In the case of the shapechanger I had seen several feats related to Kitsune and shape change, so I just searched the feats for it. I also figured there would be a couple feats that required you to be an outsider (most common non-humanoid type in PF). If you dont select a race and search the feat section it search on any re-reqs that you dont meet, as those error messages are part of the text. |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Pick-reqs are an old method that doesn't work in a lot of side cases, and that we've stopped using for our own work. For example, if you have a "elf required" prereq, and you implement it with a pick-req, "Drow" or "Elf, aquatic" won't satisfy that pick-req. But if you look at those two races in the editor, you'll see that they have "counts as race" set to the main elf race. A standard racial prereq will be able to detect that "counts as" behavior.
So please find a more modern example than whatever you copied that has a pick-req as an example. |
#6 |
Senior Member
Lone Wolf Staff
Join Date: Apr 2020
Posts: 408
|
"Expr-reqs" are generally what you're going to want to be using for simple cases like this. You set a formula, in this case "#hastype[tpDragon] <> 0" for instance, and if #hastype returns a non-zero value (is true), the expression is valid.
"Pre-reqs" are used for things that are more involved than just simple true/false checks. They involve scripts that could either be conditional, or possess a number of checks beyond just a sum of returned values. The duskwalker origin feats are a good example of the difference. Willing Death for instance has the Expr-req of Code:
#hasrace[rDuskwalker] <> 0 Code:
Only one Origin feat allowed without GM permission. validif (hero.tagis[Dependant.SocChar] <> 0) validif (hero.tagcount[fCategory.Origin] = 0) validif (@ispick <> 0) The second is a check to see that you only have one Origin feat if you are a PFS character, so it checks that there are none present if you haven't added it yet, and if you have added it that it is the only one. Hopefully this helps in understanding the different uses for the two pre-req methods. There's also tags that get used, and fields, but those are all just in the editor. Like Mathias said though, pretty much just ignore Pick-reqs. |
#7 |
Thread Tools | |
Display Modes | |
|
|