r4nkt
  • Introduction
  • Getting Started
  • Concepts
    • Overview
    • Achievements
    • Actions
    • Activities
    • Badges
    • Criteria
    • Criteria Conditions
    • Criteria Groups
    • Custom Data Reference
    • Games
    • Leaderboards
    • Players
    • Rewards
    • Scores
  • Cookbook
    • Criteria Conditions
    • Achievements
  • API
    • Overview
    • Authentication
    • Achievements
    • Actions
    • Activities
    • Criteria
    • Criteria Groups
    • Leaderboards
    • Players
    • Player Badges
    • Rewards
    • Scores
  • Webhooks
    • Overview
    • Getting Started
    • Events
  • PHP SDK
    • Overview
    • Getting Started
  • Laravel Package
    • Overview
    • Installation
    • Webhooks
Powered by GitBook
On this page
  • Description
  • Properties
  • Operator
  • Criteria
  • Criteria Groups
  • Conditions

Was this helpful?

  1. Concepts

Criteria Groups

PreviousCriteria ConditionsNextCustom Data Reference

Last updated 4 years ago

Was this helpful?

Description

A criteria group is a group of criteria and/or nested criteria groups. A criteria group is attached to an 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 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

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

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

are common to both 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 is used against whatever activities remain.

criteria
achievement
Criteria conditions
criteria
here
criterion's rule