Difference between revisions of "IsPluginInstalled - Game"
Jump to navigation
Jump to search
imported>Plplecuyer |
imported>Docclox m (→Notes: Documented a bug in the function.) |
||
Line 27: | Line 27: | ||
*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. | *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 - Actor|OnPlayerLoadGame]] to update whether a mod is installed or not | *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 - Actor|OnPlayerLoadGame]] to update whether a mod is installed or not | ||
*There is a bug with this function, in that if you uninstall a mod using the in-game mod menu and re-load a saved game without first quitting and restarting the game, IsPluginInstalled will still return TRUE. | |||
== See Also == | == See Also == |
Latest revision as of 19:25, 26 March 2017
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[edit | edit source]
bool Function IsPluginInstalled(string asName) native global
Parameters[edit | edit source]
- asName - The plugin to check for, including extension
Return Value[edit | edit source]
True if the specified plugin is installed and activated.
Examples[edit | edit source]
if (Game.IsPluginInstalled("DLC1.esm"))
Debug.Trace("The player has installed DLC1 - let's do some fun stuff!")
endIf
Notes[edit | edit source]
- 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
- There is a bug with this function, in that if you uninstall a mod using the in-game mod menu and re-load a saved game without first quitting and restarting the game, IsPluginInstalled will still return TRUE.