Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Creature type as prerequisite? (http://forums.wolflair.com/showthread.php?t=64530)

Aril July 14th, 2020 09:31 PM

Creature type as prerequisite?
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]

Dami July 14th, 2020 09:39 PM

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]

Minous July 15th, 2020 06:12 AM

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

Aril July 15th, 2020 08:12 PM

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?

Minous July 16th, 2020 03:54 AM

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.

Mathias July 16th, 2020 07:44 AM

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.

Daniel V July 17th, 2020 11:17 AM

"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

#hasrace[rDuskwalker] <> 0
so is valid if you have the duskwalker race. It also has two Pre-reqs, the first being


Only one Origin feat allowed without GM permission.

validif (hero.tagis[Dependant.SocChar] <> 0)
validif (hero.tagcount[fCategory.Origin] = 0)
validif (@ispick <> 0)

So if you are a PFS character, it doesn't show this (you can only take one per PFS rules, so this doesn't apply), if you have no Origin feats already its valid (since there's no reason to display a warning for taking an additional before the first is taken), and if you have been added to the character we're not going to show, since you've already made the choice to forgo the warning.

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.

All times are GMT -8. The time now is 11:52 PM.

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