Kneeboards
A complete list of available Kneeboard Tags and functions can be found at the bottom
MCT uses HTML/CSS web pages as kneeboard templates, combined with available 'Tags' that MCT will replace for the correct values. After converting tags to values, MCT will render your HTML page allowing it be exported in a number of image / document formats. MCT will treat any text based file within the 'Saved Games\MCT\KneeboardTemplates' folder as a kneeboard (meaning you can also use plain txt files). If the template file contains a HTML "<Title>" element, this will be used as the name of the kneeboard. If this is not present, MCT will use the name of the template file (it will remove the word "template" from the end of a file name).
MCT will do this for each Package Asset that is "controlled" (non-AI), producing kneeboards from the 'point of view' of an Asset (flight).
Making your Own
You can either use a full, to-spec, HTML file or a partial one (with just the Body section). To provide styling, you can use a <Style> attribute within your <Head> section or provide it in-line. If you would like to specify a name different from the filename, you can add a <Title> attribute to your head section.Using Tags
When you create the template, you use 'Kneeboard tags' in the format of [[KNEEBOARD_TAG]] where this will be replaced by the value of the requested data when the kneeboard is created.For some information, you may need to create repeating lists - such as when listing Waypoints. To do this, MCT provides a number of [[XYZ_LIST_START]] and [[XYZ_LIST_END]] tags - all HTML and tags between the START and END tags will be repeated for each item in that list. For example, the following will produce table row and table cell HTML elements containing the Waypoint name, for each Waypoint that exists:
[[WAYPOINT_LIST_START]]
<tr>
<td class="tg-7zrl">[[WAYPOINT_NAME]]</td>
<tr>
[[WAYPOINT_LIST_START]]
<tr>
<td class="tg-7zrl">[[WAYPOINT_NAME]]</td>
<tr>
[[WAYPOINT_LIST_START]]
Note that MCT will replace tags for listed items with empty values if used outside of a [[LIST_START]] tag but you CAN use non-list based tags inside lists. A full list of available tags can be found at the bottom of this page.
Design From Spreadsheet
If you have an idea in mind but aren't great at HTML, there are a number of tools that allow you to convert an xls or google sheets spreadsheet into HTML. A simple to use tool can be found at https://www.tablesgenerator.com/html_tables (MCT is not affiliated with this website / project).Example: Create your design using Excel, Google Sheets etc. - once you're happy with your layout, select and copy all rows and columns that are part of your template. Using the website linked above, choose "Paste table data..." from the "File" menu and paste in your copied spreadsheet. To retain your styling, check "Paste with formatting" at the bottom. Save the resulting HTML as 'Your_Cool_Template.html' and place it in the MCT Kneeboard Templates folder.
Tag Functions
For more complex designs, you may find a need to use a value that depends on the amount of items in a list. For these situations, MCT supports the use of "FUNC()" tags i.e. [[FUNC( ... )]].All FUNC's accept 3 parameters; the Function Name, Value 1 and Value 2. Value's 1 and 2 may either be decimal numbers or another MCT Tag. If you are supplying an MCT tag as Value1 or Value22, you need to ensure the tag translates to a number value.
Currently, the following functions are available:
- ADD - [[FUNC(ADD,Value1<double>,Value2<double>]] - Adds Value 1 to Value 2, replacing the whole tag with the answer.
- SUB - [[FUNC(SUB,Value1<double<,Value2<double<]] - Subtracts Value 1 from Value 2, replacing the whole tag with the answer.
- MORE - [[FUNC(MORE,Value1<double<,Value2<double<]] - Compares Value 1 with Value 2 and replaces the whole tag with the higher number.
- LESS - [[FUNC(LESS,Value1<double<,Value2<double<]] - Compares Value 1 with Value 2 and replaces the whole tag with the lower number.
Example - given the following line in a kneeboard template (Assuming the number of 'Asset Targets' is equal to 4)
<td class="tg-2m49" rowspan="[[FUNC(ADD,ASSET_TARGET_COUNT,1)]]">TARGET PRI</<td>
MCT will generate the following:
<td class="tg-2m49" rowspan="5">TARGET PRI</<td>
MCT will generate the following:
<td class="tg-2m49" rowspan="5">TARGET PRI</<td>
HTML / CSS Considerations
There are a few things you will need to consider when designing and styling your kneeboard:- Included images can be inline Base64 or externally linked. External links must have a valid, public URL.
- JavaScript is disabled by default and will not interpreted by MCT unless enabled. Templates containing JavaScript cannot be shared on MCT Discord.
- Kneeboard previews are rendered with auto height and a fixed max width of 750px; if your template doesn't format well at this size, it may not look correct when previewed in MCT.
- MCT uses CSS styling itself, some of these values may cascade when previewing your template if you do not explicitly provide them.
Javascript
It is highly recommended you avoid JavaScript if possible. DO NOT use third-part templates that contain JavaScript if you do not trust the author!MCT does support the use of JavaScript - you will however need to enable this within MCT settings. Any other consumers of your kneeboard will also need to do the same. JavaScript is NOT processed, interpreted or inspected by MCT and will be given "as-is" to the kneeboard rendering engine for it execute - useful if you want to implement your own logic between tag replacement and generation.
Kneeboard Updates
MCT is capable of updating any kneeboard pack, official or community made. To utilise this feature you will need to include an additional file named info.json which provide MCT version and download information. You will need to ensure this is hosted somewhere public and accessible via a URL (an Amazon S3 bucket works well for this).MCT requires your kneeboard pack to be a zip file, containing any templates and the info.json file. Filenames are not cap sensitive.
Info.json - metadata for the default MCT kneeboard pack
{
"Name":"MCT Kneeboards",
"Description": "MCT Default Kneeboard Pack",
"Version": 4,
"Link": "https://a44074a4-8852-4e80-9d62-09098560709e.s3.eu-north-1.amazonaws.com/Kneeboards/",
"PackFileName": "MCTKneeboards.zip",
"Attribution": "Made by MCT"
}
"Name":"MCT Kneeboards",
"Description": "MCT Default Kneeboard Pack",
"Version": 4,
"Link": "https://a44074a4-8852-4e80-9d62-09098560709e.s3.eu-north-1.amazonaws.com/Kneeboards/",
"PackFileName": "MCTKneeboards.zip",
"Attribution": "Made by MCT"
}
The json file must contain the following properties:
- Name (string) - Defines the name of the kneeboard pack within MCT.
- Description (string) - This helps others to understand what your kneeboard pack contains.
- Version (integer) - the current version of this kneeboard pack.
- Link (string) - This is the download URL of your pack - MCT will first look for an info.json file at this URL.
- PackFileName (string) - The name of the kneeboard pack (zip file). This is used with the Link property above.
- Attribution (string) - Author / designer information.
All MCT Tags
Non-List Tags
- TACOP_THEATRE
- TACOP_NAME
- TACOP_GOAL
- TACOP_ATO
- TACOP_DATETIME
- TACOP_DATE
- TACOP_TIME
- TACOP_DOOR_OPEN_DATETIME
- TACOP_DOOR_OPEN_DATE
- TACOP_DOOR_OPEN_TIME
- TACOP_DOOR_CLOSE_DATETIME
- TACOP_DOOR_CLOSE_DATE
- TACOP_DOOR_CLOSE_TIME
- TACOP_DAY
- ASASSET_FLIGHT_FREQ
- ASSET_FLIGHT_CHAN
- ASSET_STEP_DATETIME
- ASSET_STEP_DATE
- ASSET_STEP_TIME
- ASSET_PRI_TASKTYPE
- ASSET_ASSIGN_AC
- ASSET_PRI_TASK
- ASSET_SEC_TASK
- ASSET_TAC_REM
- ASSET_TAC_PLAN
- ASSET_PRE_FLIGHT_REM
- ASSET_DEP_REM
- ASSET_ARR_REM
- ASSET_DIVERT_REM
- ASSET_FUEL_TOT
- ASSET_JOKER
- ASSET_BINGO
- ASSET_TOTAL_PARTS
- ASSET_HARDDECK
- ASSET_YARDSTICK
- ASSET_CALLSIGN
- ASSET_TARGET_SUM
- ASSET_ELE
- ASSET_TARGET_COUNT
- ASSET_DEPT_NAME
- ASSET_DEPT_TWR
- ASSET_DEPT_MGRS
- ASSET_DEPT_TCN
- ASSET_DEPT_RNYW
- ASSET_DEPT_REMARKS
- ASSET_ARRV_NAME
- ASSET_ARRV_TWR
- ASSET_ARRV_MGRS
- ASSET_ARRV_TCN
- ASSET_ARRV_RNYW
- ASSET_ARRV_REMARKS
- ASSET_DVRT_NAME
- ASSET_DVRT_TWR
- ASSET_DVRT_MGRS
- ASSET_DVRT_TCN
- ASSET_DVRT_RNYW
- ASSET_DVRT_REMARKS
- PACKAGE_FREQ
- PACKAGE_FRAG_ID
- PACKAGE_NAME
- PACKAGE_PRI_OBJECTIVE
- PACKAGE_SEC_OBJECTIVE
- PACKAGE_REMARKS
- PACKAGE_REMARKS_SHORT
- PACKAGE_ASSET_COUNT
- PACKAGE_BRIEF_TIME
- PACKAGE_BRIEF_DATE
- PACKAGE_BRIEF_DATETIME
- PACKAGE_BRIEF_LOCATION
Non-List Tags
Target ListList Start: TARGET_LIST_START
List Start: TARGET_LIST_END
- TARGET_NAME
- TARGET_THREAT
- TARGET_CLASS
- TARGET_TYPE
- TARGET_RANGE
- TARGET_GEO_ELE
- TARGET_GEO_ALT
- TARGET_ASSIGNMENT
Waypoint List
List Start: WAYPOINT_LIST_START
List Start: WAYPOINT_LIST_END
- WAYPOINT_NAME
- WAYPOINT_TYPE
- WAYPOINT_ETE
- WAYPOINT_NDIST
- WAYPOINT_SPD
- WAYPOINT_DUR
- WAYPOINT_ALT
- WAYPOINT_ELE
- WAYPOINT_HDG
- WAYPOINT_NUMBER
Facility List
List Start: SP_LIST_START
List Start: SP_LIST_END
- SP_NAME
- SP_DISPLAY
- SP_ICAO
- SP_AREA
- SP_TYPE
- SP_METAR
- SP_TACAN
- SP_RNWY
- SP_REMAKRS
- SP_FREQ_TOWER
- SP_FREQ_CLDL
- SP_FREQ_GROUND
- SP_FREQ_APPDEP
- SP_FREQ_CTR
- SP_GEO_MGRS
- SP_GEO_ELE
- SP_GEO_ELE_M
Nav & Fix List
List Start: NAV_LIST_START
List Start: NAV_LIST_END
- NAV_NAME
- NAV_DESC
- NAV_TYPE
- NAV_FREQ