The formula editor has four areas:
- The formula field at the top left for entering formulas>
- A color-coded list of available variables at the bottom left for a better overview
- A payoff graph at the top right that visually reflects the payoffs and the payoff curve
- The payoff table at the bottom right, calculated using the formula from the top left and the parameters below it
Example
For demonstration purposes, we will examine a formula that assigns points to the final table (the top nine positions) and all other participants will receive five points.
If you are not interested in the formula itself, you may skip this section.
If you wish to delve into the formulas, please follow this link: How do formula functions & operators work?
Formula:
round(ranges(r;1;100;2;70;3;50;4;40;5;30;6;25;7;20;8;15;9;10;10;5) * ranges(gn;1;1.0;25;1.1;50;1.2;75;1.3;100;1.4) * if(tier>0;switch(tier;1;1.4;2;1.2);1.0))
Functionality
As evident, we have three expressions that are multiplied. Two are range-functions, and one is an if-statement containing a switch-function.
ranges(gn;1;1.0;25;1.1;50;1.2;75;1.3;100;1.4)
The second range function utilizes the gn variable, which represents the total number of entries. Following the gn variable, there are several tuples (two values) defining a range.
- The first tuple is (1; 1.0). This indicates that if the total number of entries is equal to or greater than one, the value is 1.0.
- The second tuple is (25; 1.1). This signifies that if the total number of entries is equal to or greater than 25, the value is 1.1.
- The third tuple is (50; 1.2). This implies that if the total number of entries is equal to or greater than 50, the value is 1.2.
- The fourth tuple is (75; 1.3). This indicates that if the total number of entries is equal to or greater than 75, the value is 1.3.
- The third tuple is (100; 1.4). This means that if the total number of entries is equal to or greater than 100, the value is 1.4.
The multiplier for the points varies depending on the total number of entries (gn) and ranges from 1.0 to 1.4.
ranges(r;1;100;2;70;3;50;4;40;5;30;6;25;7;20;8;15;9;10;10;5)
The first range function utilizes the r variable, which represents the rank or finishing position of the player. Following the r variable, there are several tuples (two values) defining a range.
- The first tuple is (1; 100). This indicates that if the finishing position is equal to or greater than one, the value is 100.
- The second tuple is (2; 70). This signifies that if the finishing position is equal to or greater than two, the value is 70.
- The third tuple is (3; 50). This implies that if the finishing position is equal to or greater than three, the value is 50.
- and so on...
- The last tuple is (10; 5). This means that if the finishing position is equal to or greater than 10, the value is 5.
The points awarded for each rank (r) varies depending on the finishing position, ranging from 100 to 5.
if(tier>0;switch(tier;1;1.4;2;1.2);1.0)
The third expression is an if-statement that employs a switch function. The if-statement evaluates the tier variable to determine whether it is greater than zero. If the condition is met, the switch function is executed. Otherwise, the value is set to 1.0.
The switch function evaluates the tier value and returns a corresponding multiplier. If the tier value is 1, the multiplier is 1.4. If the tier value is 2, the multiplier is 1.2.
In essence, the if-switch expression and the tier variable function as a multiplier that can be set to 1.0, 1.2, or 1.4.