LeeS
Imperator
Is it possible to detect whether another mod is active in lua by this method:
Or does it only apply to DLC and Expansion "content" ?
It would certainly be less bloaty than using a method like this where I printed out the titles and ID's of all active mods:
In 'real' code I would only want the local sModID = v.ID bit to compare against a known mod ID, but it still seems like a bloaty way to go about it.
PS: I tried searching the forum and kept getting 'terms too short' or 'terms too common' errors. My google-foo is sadly lacking, I guess.
Code:
local bIsBNW = ContentManager.IsActive("6DA07636-4123-4018-B643-6575B4EC336B", ContentType.GAMEPLAY)
It would certainly be less bloaty than using a method like this where I printed out the titles and ID's of all active mods:
Code:
local activatedMods = Modding.GetActivatedMods();
for i,v in ipairs(activatedMods) do
local title = Modding.GetModProperty(v.ID, v.Version, "Name");
title = Locale.TruncateString(title, 30, true);
local sModID = v.ID
print(title .. " is " .. sModID)
end
PS: I tried searching the forum and kept getting 'terms too short' or 'terms too common' errors. My google-foo is sadly lacking, I guess.