NV Play Cricket has a flexible templating system for outputting ball by ball data, suitable for scoreboard integration. The templating system can be used to create many different formats or the provided files can be used as a starting point for customisations. The output format is defined by a ‘Template file’ which is combined with a field list, replacing placeholder values with real data any time there is a change.

For example, to output just the batting team name in JSON format, create a simple text file called ‘simple-json-example.template’ containing the following text which contains the special {{fieldname}} value which is substituted for real data ball by ball:

{

  "thisIsTheBattingTeamName": "{{CurrentBattingTeamName}}"

}

 

Which, when a ball is scored, the contents of the generated output file could look like this:

{

  "thisIsTheBattingTeamName": "NV Play Northern 1st XI"

}

Any number of fields can be added to a template file and the content of the template can be any other format such as XML or simple text.

The available field list is generated on launch and is available as two files which can be used as reference when building custom templates:

%userprofile%\Documents\Cricket Matches\_Scoreboards\Fields\nvplay-scoreboard-fields.csv

%userprofile%\Documents\Cricket Matches\_Scoreboards\Fields\nvplay-led-scoreboard-fields.csv

 

Example templates (although not recommended for new, standard integrations) are available here:

%userprofile%\Documents\Cricket Matches\_Scoreboards\Templates\

 

The output files are written each time a scoring change is made, ball by ball. While the file can be configured to save to any accessible location on the computer or network, the default folder is provided:

%userprofile%\Documents\Cricket Matches\_Scoreboards\Output\

Setup the output by going to Tools > Configuration > Scoreboard tab. You can optionally tick ‘LED fields only’ to reduce the size of the output, but the full list may contain additional data required so can be left enabled.

 

See below for an example of outputting all fields with no template applied:

mceclip0.png

 

See below for an example using ‘simple-json-example.template’ which was saved in the Templates folder:

mceclip1.png

 

 

 

Was this article helpful?
0 out of 2 found this helpful