Template Examples


Below are a few simple examples of what you can do with templates. For more examples, look at the various *.atf files in the AutoTroll directory tree.

Example 1.
[CycleEach Game SortBy GameNumber]
[Game.Name]
[EndCycle]


This will cycle through each game (that's not marked as hidden) and sort the list by the game number. For each game, it will print the game name and nothing more. An example output might be:
Game 1
ExploreMap
Raiders of Doom Game
5 on 5
Test Game

Example2.
[CycleEach Player SortBy PlayerAccount]
[CycleEach GameForPlayer SortBy GameNumber]
[Player.Alias] is playing the [Race.Name] in [Game.Name].
[EndCycle][EndCycle]

This would create a list of all players and the races each player is playing
Red Troll is playing the Lizards in Game 1.
Red Troll is playing the Federation in ExploreMap.
Black Troll is playing the Crystals in Test Game.


Example3.

[CycleEach Player SortBy PlayerName]
[Player.Alias:15] <[Player.EMail:30]> Use Shadow Email : [Player.UseEMail2:1]
[EndCycle]


Instead of showing the default "Yes" for using the shadow e-mail, this template would now display:
Red Troll      red.troll@sharenet.com         Use Shadow EMail : Y
Black Troll    black.troll@sharenet.com       Use Shadow EMail : N