Chapter 3.1 - The Config-File

Each robot get's its own configuration file. In there, you can define where to log the robot's messages or specify some strategy relevant information. Brotfrucht for exaple defines its ShootingInterval in there. The sored information can be loaded during a game by calling getConfigurationProperty().

It might be a good idea to have a look at a brotfrucht configuration to understand all the possible directives. For each actor in the RealTimeBattle Team Framework you can specify an own logfile but it might be better to take one (you do not have so many different files).

The strategy relevant things in the config file are the following (taken from brotfrucht):

[Strategy]
StrategyName="Brotfrucht"

[BrotFrucht]
# let the robot shot every second
ShootInterval="1"

[BrotfruchtServer]
logDriverName="UnixFileLogDriver"
logDriverParameters="file:/tmp/Brotfrucht-Robot3-TeamOne.log"
logPriority="10"

[BrotfruchtClient]
logDriverName="UnixFileLogDriver"
logDriverParameters="file:/tmp/Brotfrucht-Robot3-TeamOne.log"
logPriority="10"
  

The section Strategy includes just the Strategy name. In this sample it's Brotfrucht, of cause. The following Section BrotFrucht is for the the configuration properties that should be accessable by getConfigurationProperty(). It's just the ShootInterval in Brotfrucht's case.

The sections BrotfruchtServer and BrotfruchtClient are for the logger configuration. As you remember, a strategy might log some information to a file or anywhere else. Where to log, that is defined in this section.

A strategy has to provide an own config-template. In each place, the robot name should appear in the final configuration file, use @ROBOTNAME@ instead, for @STRATEGY@, @TEAM@ in the same way. They were replaced by the parts of the filename (explained in the next chapter). This template must be saved in the root folder of your RealTimeBattle Team Framework folder.