Closed shiremct closed 3 years ago
The canonical approach is
local XComOnlineEventMgr OnlineEventMgr;
local int i;
OnlineEventMgr = `ONLINEEVENTMGR;
for (i = 0; i < OnlineEventMgr.GetNumDLC(); ++i)
{
// use result of...
OnlineEventMgr.GetDLCNames(i);
}
which checks the base name of the .XComMod
/.XComDLC
name (and which is what the CHL dependency checker uses).
GetInstalledDLCNames
has zero usage in base game UC code, and two usages in CHL code that checks for AH/SLG installations.
GetInstalledModNames
has zero usage in base game UC code and CHL code.
Did some logging and the class'Helpers'.static.GetInstalledModNames()
seems to return the name of the mod's .XComModFile, including mods with no DLCIdentifier set, or config only mods with no script files whatsoever. Tested with 292 mods active and all were reported, with no worry about DLCIdentifier or multiple script packages etc.
Edit, Nevermind - I see Robo's method does essentially the same thing, but covers both DLC and Mods in one!
The DLC gate element in the InfiltrationModifier struct is intended to check for DLCs and Mods.
The following code is used:
but
class'Helpers'.static.GetInstalledDLCNames()
only returns actual FXS DLC. There is also aclass'Helpers'.static.GetInstalledModNames()
function that may be the ticket for checking Mods. Needs investigating whether it looks for package name or Mod's DLCIdentifier.