IPluginList¶
-
class
mobase.IPluginList¶ Bases:
objectPrimary interface to the list of plugins.
Methods Summary
isMaster(name)Check if a plugin is a master file (basically a library, referenced by other plugins).
loadOrder(name)Retrieve the load order of a plugin.
masters(name)Retrieve the list of masters required for a plugin.
onPluginMoved(callback)Install a new handler to be called when a plugin is moved.
onRefreshed(callback)Install a new handler to be called when the list of plugins is refreshed.
origin(name)Retrieve the origin of a plugin.
- returns
The list of all plugin names.
priority(name)Retrieve the priority of a plugin.
setLoadOrder(loadorder)Set the load order.
setState(name, state)Set the state of a plugin.
state(name)Retrieve the state of a plugin.
Methods Documentation
-
isMaster(name)¶ Check if a plugin is a master file (basically a library, referenced by other plugins).
In gamebryo games, a master file will usually have a .esm file extension but technically an esp can be flagged as master and an esm might not be.
- Parameters
name – Filename of the plugin (without path but with file extension).
- Returns
True if the given plugin is a master plugin, False otherwise or if the file does not exist.
- Return type
bool
-
loadOrder(name)¶ Retrieve the load order of a plugin.
- Parameters
name – Filename of the plugin (without path but with file extension).
- Returns
The load order of the plugin (the order in which the game loads it). If all plugins are enabled this
is the same as the priority but disabled plugins will have a load order of -1. This also returns -1 if the plugin does not exist.
- Return type
int
-
masters(name)¶ Retrieve the list of masters required for a plugin.
- Parameters
name – Filename of the plugin (without path but with file extension).
- Returns
The list of masters for the plugin (filenames with extension, no path).
- Return type
List[str]
-
onPluginMoved(callback)¶ Install a new handler to be called when a plugin is moved.
- Parameters
callback – The function to call when a plugin is moved. The first parameter is the plugin name, the second the old priority of the plugin and the third one the new priority.
- Returns
True if the handler was installed properly (there are currently no reasons for this to fail).
- Return type
bool
-
onRefreshed(callback)¶ Install a new handler to be called when the list of plugins is refreshed.
- Parameters
callback – The function to call when the list of plugins is refreshed.
- Returns
True if the handler was installed properly (there are currently no reasons for this to fail).
- Return type
bool
-
origin(name)¶ Retrieve the origin of a plugin. This is either the (internal) name of a mod, “overwrite” or “data”.
The internal name of a mod can differ from the display name for disambiguation.
- Parameters
name – Filename of the plugin (without path but with file extension).
- Returns
The name of the origin of the plugin, or an empty string if the plugin does not exist.
- Return type
str
-
pluginNames()¶ - Returns
The list of all plugin names.
- Return type
List[str]
-
priority(name)¶ Retrieve the priority of a plugin.
The higher the priority, the more important.
- Parameters
name – Filename of the plugin (without path but with file extension).
- Returns
The priority of the given plugin, or -1 if the plugin does not exist.
- Return type
int
-
setLoadOrder(loadorder)¶ Set the load order.
Plugins not included in the list will be placed at highest priority in the order they were before.
- Parameters
loadorder – The new load order, specified by the list of plugin names, sorted.
-
setState(name, state)¶ Set the state of a plugin.
- Parameters
name – Filename of the plugin (without path but with file extension).
state – New state of the plugin (INACTIVE or ACTIVE).
-
state(name)¶ Retrieve the state of a plugin.
- Parameters
name – Filename of the plugin (without path but with file extension).
- Returns
The state of the plugin.
- Return type
int