IsPluginInstalled - Game
Revision as of 10:59, 2 December 2015 by imported>Plplecuyer
Member of: Game Script
Returns whether the specified plugin is installed and activated or not. Note that it needs the extension as well (esp or esm).
Syntax
bool Function IsPluginInstalled(string asName) native global
Parameters
- asName - The plugin to check for, including extension
Return Value
True if the specified plugin is installed and activated.
Examples
if (Game.IsPluginInstalled("DLC1.esm"))
Debug.Trace("The player has installed DLC1 - let's do some fun stuff!")
endIf
Notes
- Uninstalling plugins and resuming from a save that had the plugin installed is not supported. If a plugin is uninstalled, the user must revert back to using a save from before the plugin's installation.
- The installed plugin list can change between any two lines of your script, since the game can save, exit, and have a plugin activated before then having the save game loaded and resume running your script. So unless you have to, it is best not to just check once and assume the return value is correct forever. You may want to interact with OnPlayerLoadGame to update whether a mod is installed or not