Water Coach application configuration
What |
application_config.xml |
---|---|
Description |
Configuration of the Water Coach application |
schema location |
application_config.xsd |
In the application configuration, global settings for the Water Coach (fka FEWS Game) which are valid for all scenarios/scripts can be specified.
Schema definition
The structure of the XML-schema for the application configuration is as shown on the right.
Explanation
The keys in the XML-schema are explained in the figure above. Some of the keys are explained in more detail here.
Note: when 'relative path' is mentioned, this is the relative path with respect to the location of the Water Coach executable (i.e. not the FEWS executable).
- The value of the key
locale
must be a 2-letter abbreviation of the language in which the game screens will be displayed (currently available: EN for English or NL for Dutch). - Historical scenarios/scripts may be familiar to players of the game. Therefore it is possible to hide the year of the scenario/script in the Water Coach by setting the flag
hideYear
to true. Note that for the Water Coach a copy of the operational system should be used since some changes in the FEWS configuration are required; see below. A better option for misleading players is to overrule the date/time of the historical scenario by explicitly setting the in-game time in the script configuration. - The key
fewsExecutable
must contain the (absolute or relative) path to the FEWS executable, which is usually located in thebin
-directory of a FEWS release. On the Linux platform, the FEWS executable is the shell scriptfews.sh
. See below for required changes in the FEWS configuration. - The key
fewsRegionDir
is the (absolute or relative) path to the so-called region directory of FEWS. The region directory contains the FEWS configuration (theConfig
-subdirectory) and the global properties for the FEWS configuration. The Water Coach is generic and can be used with any FEWS configuration. Note that on a Windows system, the FEWS region directory is also specified in the so-calledjpif
-file that is located in thebin
-directory of the FEWS system. This specification must be consistent with the one inFewsRegionDir
. - The system time in FEWS is controlled by the Water Coach. The frequency for updating the FEWS system time is specified by the key
fewsSystemTimeUpdateInMinutes
. See below for required changes in the FEWS configuration. - Scenarios/scripts that can be played with the Water Coach must be part of a scenario/script database. The key
scenarioScriptDatabasePath
contains the (absolute or relative) path to the scenario/script database. - Events in a script can be associated with a file that is executed during the game. For example, a pdf-file can be associated with an event to simulate an incoming e-mail or an mp3-file to simulate telephone calls. Using the key
fileAssociation
, programs can be specified with which files with indicated extensions must be processed. Default file associations are used if nothing is specified here. - In the section
timeControl
, the presence of buttons for time control during the game can be configured, namely apause/play
button, anext
button for jumping to the next scheduled event in the script,fast Forward/Backward
buttons for speeding up/down time, and aset
button for adjusting the time manually. - Section
experienceLevel
contains configuration of experience levels in the game. With the keylevels
, the actual experience levels are defined, separated by semi-colons, e.g. "Beginner;Intermediate;Expert". In the script configuration, events can be defined for each of these experience levels. The flagadjustLevel
indicates that the experience level can be adjusted during the game. - Communication between FEWS and the Water Coach is handled by the so-called FEWS PI service. This service requires a port number that must be specified in the section
fewsPiPortNumber
. See below for required changes in the FEWS configuration. - The Water Coach can be played combined with the so-called "procedure game", developed for the Dutch Water Service (Waterdienst). In such a combined setting, the hostname and the port number for connecting to the combined game must be specified in
serverHostName
andserverPort
, respectively. Furthermore, forecasts must be published to a file in so-called PI-format. This can be accomplished by setting the keywritePiOutput
to true (defaults to false). - The option to visualize the script can be activated by setting
showVisualizeScriptButton
to true. - This keyword should be used to indicated the game is part of a combined setting
participant
. - This option has been added to aid the script configurator
copyLocalDataStore
. If you are working on the script for one scenario, you can turn of the copying of the localDataStore at the start-up of the Water Coach by temporarily setting this keyword to false.
FEWS configuration
It is advisable to use a copy of the operational system for the Water Coach, to prevent any possible obstructions to operational activities. Also, some minor changes are needed in the FEWS configuration in order to use it with the Water Coach:
Note: for a more detailed description of the FEWS configuration files, please refer to the wiki pages of the Delft FEWS Configuration Guide.
- In order to hide the year within FEWS, the
dateTimeFormat
must be configured accordingly in thedateTime
section of the FEWS configuration fileExplorer.xml
. - The
cardinalTimeStep
, as configured in thedateTime
section of the FEWS configuration fileExplorer.xml
, should be consistent withfewsSystemTimeUpdateInMinutes
. Indeed, it makes no sense to set it in the Water Coach to 1 minute, while it is set to 1 hour in the FEWS configuration (although this will not cause any problems in the game). - The element
adjustSystemTimeAutomatically
should be set to 'false', otherwise it will not be possible for the Water Coach to alter the systemTime during the game. - Since all data for a scenario is pre-loaded in the FEWS local data store, it is desirable to hide certain data after the current system time, e.g. measurement data. This can be accomplished by specifying
hideExternalHistoricalAfterSystemTime=true
in the fileglobal.properties
, which is located in the FEWS configuration directory. As the name of this key implies, only time series of the type "external historical" are hidden; time series of the types "external forecast", "simulated historical", and "simulated forecast" are completely visible. As of FEWS release 2012.02, this step is no longer required. - The port number
fewsPiPortNumber
for the FEWS PI service has to be in the range of port numbers that must be specified in the FEWS configuration fileExplorer.xml
in the directorySystemConfigFiles
, e.g. Note: by specifying this range the PI service is started. This part of the configuration can be kept the same in the operational configuration.<piServicePortRange start="8100" end="8200"/>
- To distinguish the FEWS configuration for the Water Coach, one could change the name and panel labels in
Explorer.xml
, which you will find in the directorySystemConfigFiles
. The name of the Explorer window is configured withsystemCaption
and the name of the panels withpanelHeaderLabels
. For example, the term TRAINING or SERIOUS GAME could be added to the captions of these panels. - Depending on the set-up of the scenario and script database, an additional change could be required, see Scenario and Script database.
Example
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/watercoachschemas/version1.0/application_config.xsd"> <name>Example of application configuration</name> <locale>EN</locale> <hideYear>false</hideYear> <fewsExecutable>..\FEWS_WaterCoach\bin\Fews_WC.exe</fewsExecutable> <fewsRegionDir>..\FEWS_WaterCoach\Fews_WC</fewsRegionDir> <fewsSystemTimeUpdateInMinutes>1</fewsSystemTimeUpdateInMinutes> <scenarioScriptDatabasePath>ScenarioScriptDatabase\Fews_WC</scenarioScriptDatabasePath> <fileAssociation extension="pdf">C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe</fileAssociation> <fileAssociation extension="jpg">C:\WINDOWS\system32\mspaint.exe</fileAssociation> <timeControl> <pause>true</pause> <next>false</next> <set>false</set> <fastForwardBackward>true</fastForwardBackward> </timeControl> <experienceLevel> <levels>Beginner;Expert</levels> <adjustLevel>false</adjustLevel> </experienceLevel> <fewsPiPortNumber>8100</fewsPiPortNumber> <serverHostName>192.168.0.3</serverHostName> <serverPort>4530</serverPort> <showVisualizeScriptButton>true</showVisualizeScriptButton> <participant>false</participant> <!-- option for developer, useful when you are working on the same scenario --> <copyLocalDataStore>false</copyLocalDataStore> </config>