Background for Fallout 4
Member of the Game script
boolfunctionIsPluginInstalled(stringasName)NativeGlobal

Description

Wiki Description

Returns whether the specified plugin is installed and activated or not. Note that it needs the extension as well (esp or esm).

Documentation Comment

Is the specified plugin (esm or esp) installed?


Caveats

CK Wiki - 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
  • 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.

Parameters

stringasName


Examples

if (Game.IsPluginInstalled("DLC1.esm"))
  Debug.Trace("The player has installed DLC1 - let's do some fun stuff!")
endIf

Auto-Generated Example

string myString__asName

bool returnedValue = Game.IsPluginInstalled(myString__asName)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.