First, and most importantly, a huge thanks to @jonsky7 for all your work not only creating this guide but supporting it for more than two years!
---
There is an easy way to include multiple aircraft in a single monitor config file without renaming display exports.
NOTES:
Apparently, the method below worked many years ago, stopped working for a few years but is working again now (at least with OpenBeta 2.8.7).
As others have mentioned, many aircraft have common names for display exports (LEFT_MFCD, RIGHT_MFCD, etc.) so you may not need customisation for each aircraft.
As also mentioned by others, any display export that doesn't have a matching name will simply be ignored (meaning you could have an 'F14_EDI' entry for example and it would simply be ignored for other aircraft).
If you want to use a display that isn't exported for a given aircraft, then you will still need to add a 'try_find_assigned_viewport' function call into the aircraft's appropriate Lua file (details of how to do that can be found elsewhere).
I am by no means an expert with this stuff but it's working for me!!!
The following method is useful if you want different display arrangements for different aircraft, without having to customise display export names.
The solution is to use a 'reconfigure_for_unit' function and its passed 'unit_type' parameter...
(Note: this is in your monitors config file, after 'name =', 'description =', 'Viewports =', etc.)
Instead of just having a single, generic entry in your monitors config file that will be used for all aircraft:
LEFT_MFCD =
{
...
}
RIGHT_MFCD =
{
...
}
wrap them in a 'reconfigure_for_unit' function and define entries for each unit (aircraft, etc.):
function reconfigure_for_unit(unit_type)
if unit_type == "AH-64D_BLK_II" then
LEFT_MFCD =
{
...
}
RIGHT_MFCD =
{
...
}
TEDAC =
{
...
}
elseif unit_type == "FA-18C_hornet" then
LEFT_MFCD =
{
...
}
RIGHT_MFCD =
{
...
}
CENTER_MFCD =
{
...
}
elseif unit_type == "F-16C_50" then
...
elseif unit_type == "F-14A-135-GR" then
...
else -- FALLBACK FOR UNITS NOT MATCHED ABOVE
LEFT_MFCD =
{
...
}
RIGHT_MFCD =
{
...
}
end
end
(you need to replace '...' with appropriate values of 'x', 'y', 'width' and 'height' for each entry)
NOTE: There are various ways of finding unit type names - I got them from a Helios config file. Here's a copy:
Thanks again to @jonsky7 and everyone else who has contributed - it's been a huge help to me!