Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width45%

Schema definition overview

The global structure of the XML-schema for the script configuration is shown on the right.

Anchor
titleScript
titleScript
The title key is an optional identifier for the script.

Anchor
timeZone
timeZone
The time zone for the Water Coach is specified within the section timeZone. All times in the script configuration must be specified relative to this time zone. The time zone can be specified as a name using the keyword name (e.g. GMT, MET, ...) or as an offset to the default time zone GMT using the keyword offset (e.g. +02:00, -06:00, ...).

Anchor
startstop
startstop
The start and end date/time for the script have to be specified using attributes date and time in the format YYYY-MM-DD and hh:mm:ss, respectively. The date/time of the data in the FEWS local data store does not have to match the date/time that is displayed in the game. The actual start and end date/time (or current system time) of the local data store can be specified with the keys dataStart and dataStop. The time that is displayed in the game is controlled by the key displayStart. With this functionality, it is possible to play a scenario of several years ago as if it happened today. If no displayStart is specified, then this defaults to dataStart. All dates and times that are specified in the remainder of the script configuration are in data store time, i.e. between dataStart and dataStop. The keys scriptStart and scriptStop are deprecated as of FEWS release 2013.02.

The configuration of stories (events), the forecastTable, forecastNote, and dictionaryFiles for a script are explained below.

Column

...

Section
Column
width45%

Anchor
frames
frames

Frames

A story (including the inbox) may consist of an arbitrary number of frames by specifying the frame key according to the following schema:

Anchor
titleFrame
titleFrame
The title of a frame in the inbox will be used in the list of actions that the user can invoke from the inbox drop-down menu. The title of a frame in a regular story will be used as the name of the button that the user can activate. As explained above, the title can be different for various languages.

Anchor
startFrame
startFrame
The start and stop keys indicate the time window in which the frame of a story is active. For a frame in the inbox this means that the associated event is available in the inbox within the time window defined by the start and stop time. For a frame in a regular story, the associated event will be executed if the user pushes the story button between the start and stop time. The start and stop keys have attributes date and time following the format YYYY-MM-DD and hh:mm:ss, respectively. Both the start and stop keys are optional. If these are not specified, then these default to the start and end time of the scriptgame, respectively.

Anchor
popup
popup
The popup key is a flag indicating whether or not to show a pop-up window at the start of the frame. For a frame belonging to the inbox this means that the associated event is executed. For a frame of a regular story, a message dialog appears informing the user that new content is available for that story, which can trigger the user to activate the relevant story button. If FEWS is running, these messages will appear within FEWS, otherwise a new window containing the message will be shown.

Anchor
requiredExperienceLevel
requiredExperienceLevel
The requiredExperienceLevel key specifies that an event is only executed for the indicated experience level. Experience levels are defined in the application configuration as a list, e.g. "Beginner;Intermediate;Expert". This key can be specified multiple times if the event should be executed for multiple levels (e.g. both Beginner and Intermediate). In a frame one refers to these levels by a number (starting with 0), e.g. if an event is only to be executed for experts, then this is configured as 

Code Block
xml
xml
<requiredExperienceLevel>2</requiredExperienceLevel>

If this key is not specified, then the event will be executed for all experience levels.

Anchor
once
once
The once key is a flag indicating that an event must be executed only once during a time frame.

Any number of conditions can be added to a story (or inbox) frame; the associated event will only be executed if all of these conditions are fulfilled (see below).

Anchor
file
file
An event can be associated with a story frame by specifying the file key. Depending on the file type, a suitable application is started for displaying the file (e.g. a pdf-file is displayed in Adobe Reader and the contents of a txt-file is displayed in a message dialog window). The file key has an optional language attribute lang that behaves the same as for the title keys.

Anchor
message
message
Apart from a file, an event for the story frame may also be a message. For such a message, no file has to be added to the scenario/script database. Instead, the contents of the message (a text string) can be specified directly in the script configuration. The message key takes an optional lang attribute as explained before. If the message contains an URL (starting with 'http://', 'https://', 'ftp://' or 'mailto:// ' and ending with '/') then this URL is made clickable automatically.

Column

...