Rules

Updated: 8/14/2020

Sportzdesigner users can produce highly customized graphics that go far beyond simply placing images and data on the stage. This is accomplished using rules, overrides, and conditions. This page will cover rules, while overrides and conditions will be covered in the subsequent articles.

When you assign a rule to an element, you are telling Sportzdesigner to replace one text value with another. Specifically, if your bot provides a value for which a rule is defined, that value is replaced with the rule value.

For example, a user may want to define a rule for a clock element where the value 0.0 is replaced with the word “Final”. To define this rule, simply click on the “add rule” button and enter "0.0=Final" into the text input. After this rule is applied, the clock value will display its true value in all cases except when the value reaches 0.0, at that point the rule will be applied, and the clock will display “Final” instead.

Click add rule

Enter rule

Rule applied

A stage element can have multiple rules assigned to it; this is done by “piping” together rule fragments. Let’s say that in addition to displaying the word final at 0.0, you want the clock to display “two-minute warning!” when the clock reaches 2:00. To add this rule to your existing clock rule, simply click on the “add rule” button again.

Note that your previous rule appears in the text input - any rules you have assigned to an element can always be found here. If you delete this rule and save a new one, you will have deleted the old rule. In this example we want to pipe a new rule onto the old one without deleting the old rule, to do this modify the text input to say “0.0=Final|2:00=Two-minute Warning!” and click submit.

Pipe a second rule

Second rule is applied

Tips

  • Keep your element width values in mind when you create rules. If you create a rule with a long replacement text value, you may need to adjust your auto-width settings.
Read next: Overrides