requirements

One gating vocabulary, defined once and used everywhere.

One object answering one question: does this actor, right now, meet these conditions. It appears in sixteen places and behaves identically in all of them.

Where it appears

ability.requiresgate.requiresgate.bypassdialogueOption.requiresdialogueNode.redirectWhen.requiresquest.requiresobjective.requiresreaction.requiresbehaviour.requirestrigger.requireslootTable.requireslootEntry.requiresencounterGroup.requiresarea.requiresroomTemplate.requiresnpc.shop.requirestextVariant.requires

The shape

Every clause is optional. Those present must all hold.

{
  "description": "Why this gate exists. Shown in the editor and in refusals.",

  "minLevel": 3, "maxLevel": 8,
  "classes":    ["warden", "stalker"],
  "attributes": [ { "attribute": "might", "min": 14 } ],
  "skills":     [ { "skill": "lore", "minRank": 2, "minTier": "adept" } ],
  "items":      [ { "item": "brass_key", "quantity": 1, "consume": true } ],
  "quests":     [ { "quest": "the_mill_door", "status": "complete" } ],
  "factions":   [ { "faction": "wardens", "minStanding": 10 } ],
  "memories":   [ { "deedKind": "theft", "who": "speaker", "known": false } ],
  "flags":      [ { "flag": "mill_clear", "equals": true } ],

  "without": { "items": ["cursed_idol"], "conditions": ["frightened"] },

  "anyOf": [ { "items": [ { "item": "brass_key" } ] },
             { "skills": [ { "skill": "lockpicking", "minRank": 5 } ] } ],

  "custom": { "gte": [ { "ref": "flags.morale" }, 5 ] }
}
without
A quest offered only before you have met someone. A shrine admitting only the unarmed. A merchant who deals with you only while you are not carrying stolen goods.
anyOf is one level deep
Branches do not nest. Use custom for anything deeper.
An empty requirement passes
It is skipped entirely and costs nothing.

How it runs

A requirement becomes an ordinary predicate. { "minLevel": 3 } becomes { "gte": [ { "ref": "actor.level" }, 3 ] }.

Every field

abilities → requirescontent.abilities.requires

FieldTypeReqDefaultWhat it does
descriptionstring""Why this gate exists. Shown in the editor and in refusals.
minLevelnumberLowest character level that passes.
maxLevelnumberHighest character level that passes.
classescontent.classes[][]Passes if the actor is any one of these classes.
ancestriescontent.ancestries[][]Passes if the actor is any one of these ancestries.
abilitiescontent.abilities[][]The actor must know all of these.
attributesobject[][]Attribute floors and ceilings the actor must sit inside.
skillsobject[][]Skill ranks or mastery tiers the actor must have reached.
creatureTypesrules.creatureTypes[][]Passes if the actor is any one of these creature types.
alignmentsrules.alignments[][]Passes if the actor is any one of these alignments.
languagesrules.languages[][]The actor must speak all of these.
currencynumberMoney the actor must be carrying.
itemsobject[][]Items the actor must hold, optionally equipped or spent.
questsobject[][]Quests that must stand at a given status.
factionsobject[][]Standing or rank the actor must hold with a faction.
memoriesobject[][]What someone must, or must not, know about a deed.
flagsobject[][]World flags that must be set, or set to a value.
loreobject[]Lore entries the actor must know.
withoutobject{}What the actor must lack. As common as what they must have.
custompredicateRaw predicate for a gate the clauses cannot say.
anyOfobject[][]Alternatives. Any one branch passing satisfies the whole gate.

abilities → requires → attributescontent.abilities.requires.attributes

FieldTypeReqDefaultWhat it does
attributerules.attributesyesWhich attribute is being checked.
minnumberLowest value that passes.
maxnumberHighest value that passes.

abilities → requires → skillscontent.abilities.requires.skills

FieldTypeReqDefaultWhat it does
skillcontent.skillsyesWhich skill is being checked.
minRanknumber1Lowest trained rank that passes.
minTierrules.masteryTiersLowest mastery tier that passes, instead of naming a rank.

abilities → requires → itemscontent.abilities.requires.items

FieldTypeReqDefaultWhat it does
itemcontent.itemsyesWhich item is being checked.
quantitynumber1How many are needed.
consumebooleanfalseTrue to spend them on passing. This is how a key is used up.
equippedbooleanfalseTrue when carrying is not enough and it must be worn or wielded.

abilities → requires → questscontent.abilities.requires.quests

FieldTypeReqDefaultWhat it does
questnarrative.questsyesWhich quest is being checked.
statusavailableactivecompletefailedunstarted"complete"The status it must stand at. Unstarted means never taken.
objectiveidAsk for one finished objective instead of the whole quest.

abilities → requires → factionscontent.abilities.requires.factions

FieldTypeReqDefaultWhat it does
factioncontent.factionsyesWhich faction is being checked.
minStandingnumberLowest standing that passes.
maxStandingnumberHighest standing that passes.
minRankidLowest rank that passes, instead of naming a number.

abilities → requires → memoriescontent.abilities.requires.memories

FieldTypeReqDefaultWhat it does
deedKindnarrative.deedKindsyesWhich kind of deed is being asked about.
whospeakerpartyanyonefaction"speaker"Whose memory is consulted. The speaker, the party, anyone, or the faction.
knownbooleantrueTrue to require they know it, false to require they do not.
withinDaysnumberOnly count the memory if it is fresher than this.

abilities → requires → flagscontent.abilities.requires.flags

FieldTypeReqDefaultWhat it does
flagstringyesFlag name. A free string, not a checked reference.
equalsstring | number | booleanValue it must hold. Omit to require only that it is set.

abilities → requires → lorecontent.abilities.requires.lore

FieldTypeReqDefaultWhat it does
entrynarrative.loreyesWhich lore entry is being checked.
knownbooleantrueTrue to require it is known, false to require it is not.

abilities → requires → withoutcontent.abilities.requires.without

FieldTypeReqDefaultWhat it does
classescontent.classes[][]Fails if the actor is any of these classes.
abilitiescontent.abilities[][]Fails if the actor knows any of these.
itemscontent.items[][]Fails if the actor is carrying any of these.
questsobject[][]Fails if any of these quests stands at the named status.
flagsobject[][]Fails if any of these flags is set.
conditionsrules.conditions[][]Fails if the actor is under any of these conditions.
lorenarrative.lore[]Fails if the actor knows any of these lore entries.

abilities → requires → anyOfcontent.abilities.requires.anyOf

FieldTypeReqDefaultWhat it does
descriptionstring""Why this branch exists. Shown in the editor.
minLevelnumberLowest character level that passes this branch.
maxLevelnumberHighest character level that passes this branch.
classescontent.classes[][]Branch passes if the actor is any one of these classes.
ancestriescontent.ancestries[][]Branch passes if the actor is any one of these ancestries.
abilitiescontent.abilities[][]The actor must know all of these for this branch.
attributesobject[][]Attribute bounds this branch checks.
skillsobject[][]Skill ranks or tiers this branch checks.
creatureTypesrules.creatureTypes[][]Branch passes if the actor is any one of these creature types.
alignmentsrules.alignments[][]Branch passes if the actor is any one of these alignments.
languagesrules.languages[][]The actor must speak all of these for this branch.
currencynumberMoney this branch needs the actor to be carrying.
itemsobject[][]Items this branch needs.
questsobject[][]Quest statuses this branch checks.
factionsobject[][]Faction standing this branch checks.
memoriesobject[][]Memory this branch checks.
flagsobject[][]Flags this branch checks.
loreobject[]Lore this branch checks.
withoutobject{}What this branch needs the actor to lack.
custompredicateRaw predicate for this branch. Branches do not nest further.