New PRExxx tag to simplify many prerequisites
Many abilities in Pathfinder datasets, such as traits or swappable class or racial abilities use prerequisites with a wordy and unwieldy syntax like this:
PREMULT:1,[PREABILITY:1,CATEGORY=Special Ability,Resilient ~ Trait],[!PREABILITY:1,CATEGORY=Special Ability,TYPE.CombatTrait]
PREMULT:1,[PREABILITY:1,CATEGORY=Archetype,Barbarian Archetype ~ Breaker],[!PREABILITY:1,CATEGORY=Archetype,TYPE.BarbarianFastMovement,TYPE.BarbarianTrapSense]
PREMULT:1,[PREABILITY:1,CATEGORY=Special Ability,Heart of the Streets ~ Human],[!PREABILITY:1,CATEGORY=Special Ability,TYPE.HumanSkilled]
In all cases, these prerequisites accomplish two things:
1) The second condition of the PREMULT prevents that the character takes more than one ability of one or more certain ability types, i.e. only one trait per trait type, only one archetype that replaces certain class feature, or only one racial trait that replaces a certain racial trait.
2) The first condition of the PREMULT is needed so the character qualified for the ability in spite of the second condition. without the first condition, the ability would "turn red" as soon as the character takes it.
I'm proposing to simplify this construction by creation of a new PRExxx tag.
One possibility would be something like "PRETHIS" to replace the first PREMULT part. This tag would then pass if the character has the exact object (ability, etc.) it is being evaluated for. With this tag, the PREMULT could look like this:
Another solution might be to fit the PRETHIS into a new kind PREABILITY tag so whe could even avoid the PREMULT. This could then look like
Actually, let's look at the root issue here. We don't want the ability turning red and "Confusing" the user. This to me sets a case of why we should implement the REQ vs. PRE.
After all, the RED indicate you no longer Qualify as the requirements are not being met. If we fix this issue with the REQ in place, would we still need a PRETHIS?
Fix that issue, and the red goes away and we don't need the premults any longer, instead we just drop to the "!PREABILITY "that prevents a same kind from being taken.