Roster Templates

The template system for exporting rosters uses 'commands' that gp_vcon reads and converts into the appropriate data.
For example, the command '$$NICKNAME' will be replaced with the teams' nickname. So, from '$$NICKNAME' you might get 'Eagles'.
This way of describing a roster is used throughout, and makes it extremely flexible.


Understanding the Commands

Although there are over 60 commands, you probably won't be using them all, unless you really want to go mad with individual customized roster pages for each team. There are also a few rules where certain commands only work when used with other commands, but all this is explained in the relevant sections.

A command is defined by two dollar ($$) signs followed by the command text. For example, $$NICKNAME.
As gp_vcon reads the template file, it interprets the commands on the page, and either converts them into the relevant text, or uses them for reference points, like a section that loops for a set of players.

Importantly, some commands determine what contents other commands output to the page. For example, any of the 'player' commands, like $$POS, or $$WR1 tell gp_vcon, that any player-detail commands that follow, refer to that particular player. So, if you ever find that details are appearing out of sequence, then you should examine the order of commands on the page. Remember, that the page is interpreted as you would read it, left to right, top to bottom.


Displaying League and Date details

The Name of the league, and the current Week and Season can also be exported with the following commands :

$$LEAGUE
$$SEASON
$$WEEK

For example,

Rosters - $$LEAGUE, week $$WEEK, $$SEASON.
...will produce output like :
Rosters - NFLAB, week 7, 2004.

Available Team information

There are several commands for displaying details regarding the current team. These are :

$$LOCATION
$$NICKNAME
$$ABREV

Being, in order, the teams' city/location, nickname, and the abreviation used in Gameplan.
For example,

This is the roster for the $$LOCATION $$NICKNAME
...will produce output like :
This is the roster for the Philadelphia Eagles

Exportable Player Details

Before you can see the details for a particular player, you need to define which player it is you'd like to access the details of. This is done in one of two ways, using either the block commands $$PLAYERSTART and $$PLAYERSTOP, or a specific position, like $$QB. When gp_vcon sees one of these commands, it knows what player you are referring to, and will assume this until it reads another similar command. (See the sections on 'Exporting a Specific Player position' and 'Exporting All players in a Team' for more details on these rules).
You can select which of the available player details you'd like to export by using the following set of commands :

$$NAME
$$EXP
$$SHIRT
$$NOM
$$STR

The commands should be self-explanetory, but here is a short description of each :
$$NAME is the full-name of the player.
$$EXP is the players' league experience.
$$SHIRT is the current shirt number of the player.
$$NOM is the players' current nominal value.
$$STR is the displayed nominal strength. (This works slightly differently than what you see in the scouting and initial roundup, as it will show either the main strength, or the most recently coached strength if appropriate)
For example,

The star $$QB for $$LOCATION is $$NAME, the $$EXP year player wearing no $$SHIRT.
...will produce output like :
The star QB for Philadelphia is Randall Cunningham, the 8 year player wearing no 12.

Exporting a Specific Player position

Instead of allowing gp_vcon to work through the rosters automatically, you can also specify which Position you want to display. To accomplish this, there is a command for EACH position on the roster, and so to have the complete roster exported, your template file will require ALL the commands to be used.
The commands use the standard format of the '$$' followed by the position code that is used throughout gameplan. For example, the command for WR1 is $$WR1, ...and so on.
For example,

$$QB $$NAME, $$BQ $$NAME
...will produce output like :
QB Randall Cunningham, BQ Jim McMahon

Note : These commands don't work with the block-commands of $$PLAYERSTART/STOP, $$OSTART/STOP, $$DSTART/STOP and $$PSTART/STOP, for obvious reasons. See the sections "Exporting All the players in a team" and "Exporting Offense, Defense and Special Teams" for more details.


Exporting Multiple Teams to a single file

gp_vcon can easily export all the teams into a single file.
This is done by setting up a template file with the following commands :

$$TEAMSTART
$$TEAMSTOP

The command $$TEAMSTART defines the beginning of the block for a team. Each subsequent line in the template file, will be generated again and again for each of the selected teams. To define the end of this block, you use the command $$TEAMSTOP.
For example,

$$TEAMSTART
This is the roster for $$LOCATION
$$TEAMSTOP
...will produce output like :
This is the roster for Arizona
This is the roster for Baltimore

... and so on, until all the teams are processed.
Note : These two commands are ONLY available when you have select 'Single File' as your exporting option.


Exporting All the players in a team

You want to export all the positions, in order, in a team.
You can do this by using the following commands :

$$PLAYERSTART
$$PLAYERSTOP

Everything between the block commands will be generated for every player in the team.
So, for example,

$$PLAYERSTART
$$POS is $$NAME
$$PLAYERSTOP
...will produce output like :
QB is Randall Cunningham
BQ is Jim McMahon
FB is Siran Stacy
HB is Herschel Walker

.. and so on, until all the players have been processed.
Note : You cannot use these commands with the position-specific commands like $$QB or $$WR1, as the whole roster is automatically stepped through. If you need the position of the current player, use $$POS.


Exporting Offense, Defense and Special Teams

As well as exporting ALL the positions in a team, you can work with only parts of the roster, namely, Offense, Defense, and Special Teams.
The commands that define these are :
for offense,

$$OSTART
$$OSTOP

for defense,

$$DSTART
$$DSTOP

for special teams,

$$PSTART
$$PSTOP

These commands work in exactly the same way as the PLAYERSTART/PLAYERSTOP commands, except of course the fact that only a part of the roster is used.
On offense, the positions : QB, BQ, FB, HB, RB, TE1, TE2, RT, RG, C, LG, LT, WR1, WR2, WR3 and WR4 are processed.
On defense, the positions : DRE, DRT, NT, DLT, DLE, ROLB, RILB, MLB, LILB, LOLB, RCB, SS, FS, LCB and NCB are produced.
And finally, PN and KK appear with the use of the special teams commands.
So, for example,

$$PSTART
$$POS is $$NAME
$$PSTOP

...will produce output like :
PN is Jeff Feagles
KK is Eddie Murray

Example Templates

The following sections contain examples of a few of the methods that can be used to display the exported rosters.
The templates are of a webpage (HTML) format since this is likely to be the most useful form of export, and as default there is a csv (comma separated) export built-in.
The filename in italics after each heading refers to the name of the example stored in the 'templates' folder in gp_vcon's home folder, if you want to try them out for yourself.


Multiple Teams example Template - example_multi.gtp

The following is an example template layout to produce a very basic web page of all the rosters for a league :

<HTML>
<HEAD><TITLE>$$LEAGUE Rosters</TITLE></HEAD>
<BODY>
$$TEAMSTART
<TABLE>
<TR><TH COLSPAN="5">$$LOCATION $$NICKNAME</TH></TR>
<TR>
<TH>Pos</TH>
<TH>Num</TH>
<TH>Name</TH>
<TH>Age</TH>
<TH>Val</TH>
</TR>
$$PLAYERSTART
<TR>
<TD>$$POS</TD>
<TD>$$NUM</TD>
<TD>$$NAME</TD>
<TD>$$EXP</TD>
<TD>$$NOM</TD>
</TR>
$$PLAYERSTOP
</TABLE><BR>
$$TEAMSTOP
</BODY>
</HTML>

Single Team Non-Specified Players - example_team.gtp

The following is an example template layout to produce a very basic team-roster web page :

<HTML>
<HEAD><TITLE>$$LEAGUE Rosters - $$LOCATION</TITLE></HEAD>
<BODY>
<TABLE>
<TR>
<TH>Pos</TH>
<TH>Num</TH>
<TH>Name</TH>
<TH>Age</TH>
<TH>Val</TH>
</TR>
$$PLAYERSTART
<TR>
<TD>$$POS</TD>
<TD>$$NUM</TD>
<TD>$$NAME</TD>
<TD>$$EXP</TD>
<TD>$$NOM</TD>
</TR>
$$PLAYERSTOP
</TABLE><BR>
</BODY>
</HTML>

Multiple Teams Separate Squads Template - example_tables.gtp

The following is an example template layout to produce a web page of all the rosters for a league, also showing how the offense, defense and special teams can be displayed separately :

<HTML>
<HEAD><TITLE>$$LEAGUE Rosters</TITLE></HEAD>
<BODY>
$$TEAMSTART
<TABLE WIDTH="100%">
<TR><TH COLSPAN="2">$$LOCATION $$NICKNAME</TH></TR>
<TR VALIGN="TOP">
<TD WIDTH="50%">
<TABLE WITDH="100%">
<TR>
<TH>Pos</TH><TH>Num</TH><TH>Name</TH><TH>Age</TH><TH>Val</TH>
</TR>
$$OSTART
<TR>
<TD>$$POS</TD><TD>$$NUM</TD><TD>$$NAME</TD><TD>$$EXP</TD><TD>$$NOM</TD>
</TR>
$$OSTOP
</TABLE>
</TD>
<TD WIDTH="50%">
<TABLE WITDH="100%">
<TR>
<TH>Pos</TH><TH>Num</TH><TH>Name</TH><TH>Age</TH><TH>Val</TH>
</TR>
$$DSTART
<TR>
<TD>$$POS</TD><TD>$$NUM</TD><TD>$$NAME</TD><TD>$$EXP</TD><TD>$$NOM</TD>
</TR>
$$DSTOP
$$PSTART
<TR>
<TD>$$POS</TD><TD>$$NUM</TD><TD>$$NAME</TD><TD>$$EXP</TD><TD>$$NOM</TD>
</TR>
$$PSTOP
</TABLE>
</TD>
</TR>
</TABLE><BR>
$$TEAMSTOP
</BODY>
</HTML>