r4nkt
Search…
Criteria Groups

Description

A criteria group is a group of criteria and/or nested criteria groups. A criteria group is attached to an achievement and used to determine whether or not the achievement has been earned by a player.

Properties

A criteria group has the following properties:
Name
Type
Default
custom_id
string
-
name
string
-
description
string
empty
operator
string
and
criteria
collection
empty
criteria_groups
collection
empty
conditions
json
empty
Click here for information about common properties.

Operator

The criteria group's operator property determines which boolean logic is employed when it is evaluated. It can have any one of the following values:
  • and: The criteria group's criteria and nested criteria groups will be anded together when evaluated. This means that all criteria and nested criteria groups for a criteria group with operator equal to and must be true for it to evaluate to true itself.
  • or: The criteria group's criteria and nested criteria groups will be ored together when evaluated. This means at least one of a criteria group's criteria or nested criteria groups must be true for it to evaluate to true itself.
  • xor: The criteria group's criteria and nested criteria groups will be xored together when evaluated. This means only one of a criteria group's criteria or nested criteria groups can be true for it to evaluate to true itself.
If a criteria group has neither criteria nor nested criteria groups, then it will always evaluate to false, regardless of its operator value.

Criteria

A criteria group can have multiple criteria. They can be attached to a criteria group in order to be evaluated against a player's activities.

Criteria Groups

A criteria group may itself have nested criteria groups. This allows for a single achievement to have simple or complex criteria.
Some notes about nested criteria groups:
  • Criteria groups can have zero or more nested criteria groups.
  • Criteria groups cannot have duplicate nested criteria groups.
  • Chains can be defined. That is, criteria group A can nest criteria group B, which can nest criteria group C.
  • Chains may not be cyclical. That is, criteria group A can nest criteria group B, but criteria group B cannot nest criteria group A.
  • Depending on your subscription, there may be limits to the number of nested criteria groups a single criteria group can have as well as the depth or length of an criteria group-nested-criteria group chain.

Conditions

Criteria conditions are common to both criteria and criteria groups. If present, they are applied before looking to see if a criterion has been met. Conditions provide a way to filter player activities when determining whether or not a criterion has been met. Once filtered, the criterion's rule is used against whatever activities remain.
Last modified 9mo ago