OBSIDREL / DOCS

Documentation

Guides, tutorials and technical references for the Obsidrel ecosystem.

DocumentationConditions: types and operators

Conditions: types and operators

Conditions in resources/conditions/ return pass/fail and do not execute effects by themselves. Each condition type has specific arguments.

FamilyEngine types
LogicALL/AND, OR/ANY, NOT
ReferenceREFERENCE/REF/CONDITION
PlayerPERMISSION/PERM, WORLD, GAMEMODE
NumbersLEVEL, HEALTH, HEALTH_PERCENT
Items/valuesITEM, VALUE/PLACEHOLDER
Player dataVARIABLE/VAR, FLAG, TIMER
OtherCHANCE, COOLDOWN, TRUE, FALSE

Numeric operators: >, >=, <, <=, ==, =, !=, <>. For strings: CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH, MATCHES/REGEX. Behavior depends on the condition type.

Advanced double-gate example

yaml
magic_access:
  enabled: true
  type: ALL
  message: '<red>Requirements not met.</red>'
  conditions:
    level:
      type: LEVEL
      operator: '>='
      value: 10
    permission:
      type: PERMISSION
      permission: obsidrel.magic.use

Change ALL to OR to accept either. An Action uses conditions: [magic_access]. COOLDOWN can acquire the cooldown while evaluating, so do not treat it as a read-only check.

Linked project · Actions.

Was this article helpful?Loading ratings…

Help us improve Obsidrel documentation. One vote per account and article. Discord AI feedback can also contribute when the answer cites this article.