Relaxation
#
Rule RelaxationsRelaxation is essentially an alteration of rule behaviour. This can be useful for dynamic rule description.
Any rule can be relaxed by providing a list of relaxations in the rule. Refer to the Rule Contract.
#
Base Relaxation ContractField | Type | Description |
---|---|---|
Type | string | Type of relaxation to apply. See Relaxation Types |
Value | * | Value used by the relaxation rule. |
AtSeconds | number | Number of seconds (inclusive) after which the relaxation is triggered. |
AgeType | string (Optional) | Use the Oldest (default), Average or Youngest ticket time in the given scope. Not used if AgeScope is Ticket . See Relaxation Types |
AgeScope | string (Optional) | Can be Match (default), Ticket or Team . Scope from which the ticket time is chosen. See Relaxation Types |
#
Relaxation TriggersRelaxations are triggered based on certain conditions. Unity Matchmaker currently only supports ticket age relaxation triggers.
#
Ticket Age TypeTicket age triggers are based on the ticket age in any match and are defined as follows:
Oldest
: triggers the relaxation when the oldest ticket in the match reaches a certain age.Youngest
: triggers the relaxation when the youngest ticket in the match reaches a certain age.Average
: triggers the relaxation when the average age of tickets in a match reaches a certain age.
#
Ticket Age ScopeTicket age is computed within a certain scope and compared with AtSeconds
. It can be:
Match
: will relax using the whole match age. This is the default value.Team
: will relax using the current team age.Ticket
: will relax using the current ticket age. If used,AgeType
is not necessary.
#
Relaxation TypesUnity Matchmaker supports Rule Control and Reference Change relaxation types.
#
Rule ControlThis category of relaxation types controls the rule associated with it. The following types are supported:
#
RuleControl.EnableOnce the relaxation is triggered, the associated rule will start being enforced.
#
RuleControl.DisableOnce the relaxation is triggered, the associated rule will stop being enforced.
#
Reference ControlThis category of relaxation types controls the reference value in the rule associated with it. The following types are supported:
#
ReferenceControl.ReplaceOnce the relaxation is triggered, the reference value will be replaced with another.
#
Range ControlContrary to other types, Range control relaxation is a special type of relaxation that only applies to TeamCount
and PlayerCount
. This type of relaxation does not apply to rules.
#
RangeControl.ReplaceMinOnce the relaxation is triggered, the minimum value of the TeamCount
or PlayerCount
will be replaced with the specified value.