AutoTroll has a simple set of logic commands that let you fully customize templates. Conditional logic can be used to write templates in different langauges based on one variable, group and color races/games/players based on the value of one variable you can set or your players can set. If you're a programmer you'll notice the syntax is similar to programming style. If you're not a programmer, I hope the syntax is easy enough you can use without programming experience.
Syntax
[If ..],[Else],[Endif] syntax
[IF EXPR1 OP EXPR2]
EXPR1 and EXPR2 (expression 1 and 2) can be either a template variable or
a string. [IF Game.Number = 1] returns true if the game number is one. Of
course this has to be in the middle of a [CycleEach ..] loop. If EXPR2 is
not a recognized template variable, it is assumed to be a string.
Template variables that return 'Yes' or 'No' are "boolean" expressions and
can be evaluated with [IF Race.IsPlayed]. To test if a boolean is false,
use 'not' : [IF not Race.IsPlayed].
Valid operators (OP) for the [IF EXPR OP EXPR] are:
<,>,<=,>=,=,<>
Example 1
[CycleEach Game SortBy GameOpenings]
Game [Game.Number] [Game.Name]
Played Races:
[CycleEach Race SortBy RaceAScorePercent]
[If Race.Number > 0 ] [If Race.IsPlayed]
[if Race.AScoreRank = 1]
[Race.AScoreRankFMT] Place Player : [Player.Alias]
[Else]
[If Race.AScoreRank <= 3]
Worthy [Race.AScoreRankFMT] place player [Player.Alias]
[Else]
[Race.AScoreRankFMT] place player [Player.Alias]
[EndIf]
[Endif]
[Endif][EndIf]
[EndCycle]
[EndCycle]
Output:
Played Races:
1st Place Player : Andres
Worthy 2nd place player Indigo
Worthy 3rd place player Aiva
4th place player Angel
5th place player Delboy
6th place player Andrew Blakey
7th place player Dar
8th place player Estremo
9th place player Graviton
10th place player Alexander Shafir
11th place player Tholias
Example 2
[CycleEach Game SortBy GameNextHost]
Game [Game.Number] - [Game.Name]
Races being played:
[CycleEach Race SortBy RaceAScorePercent]
[if Race.IsPlayed][if Race.Number]
#[Race.Number:2] [Race.Name:15] [Race.AScorePercent]
[endif][endif]
[EndCycle]
Races available to join:
[CycleEach Race SortBy RaceAScorePercent ]
[if Race.IsOpen]
#[Race.Number:2] [Race.Name:15] [Race.AScorePercent]
[endif]
[EndCycle][EndCycle]
Game 3 - xxx
Races being played:
#3 Birdmen 12.51 %
#2 Lizard 12.19 %
#1 Federation 11.23 %
#9 Robot 10.45 %
#10 Rebel 8.29 %
#4 Fascist 8.20 %
#8 Evil Empir 8.02 %
#7 Crystalline 6.32 %
#6 Cyborg 5.74 %
Races available to join:
#5 Privateer 10.54 %
#11 Colonial 6.51 %
Example 3
[cycleeach game]
[game.number] - [game.name]
[CycleEach Race]
[race.number] [if race.turnstatus = Received] it's in [else] not in [endif]
[endcycle] [endcycle]
1 - test
1 not in
2 not in
3 it's in
4 not in
5 not in
6 not in
7 not in
8 not in
9 not in
10 not in
11 not in