MO2 Python Plugin API
Contents:
Setting up the environment
Required tools
Preparation
1. Get the
mobase
stubs
2. Configure Visual Studio Code for
mobase
3. Configure
mypy
to find the
mobase
stubs
4. [Optional] Automatically reload plugins during development
Testing the setup
Type of Plugins
Installers
Previewers
Mod Page
Game
Tool
Proxies
Free Plugins
Extension Interfaces
Diagnose
File Mappings
Writing Plugins
Getting started
Single file plugins
Module Plugins
Writing the plugin
IPlugin
interface
Examples
Tutorial Plugins
Official Plugins
Unofficial Plugins
FAQ
1. Why is MO2 throwing an exception when I try to create a type inheriting one of MO2 class?
2. How can I be sure to implement all the required methods when creating a plugin?
3. Why are my
isinstance(x,
QObject)
and
isinstance(y,
QWidget)
not working?
mobase
API
Functions
getFileVersion
getIconForExecutable
getProductVersion
Classes
BSAInvalidation
DataArchives
EndorsedState
ExecutableForcedLoadSetting
ExecutableInfo
FileInfo
FileTreeEntry
GamePlugins
GuessQuality
GuessedString
IDownloadManager
IFileTree
IInstallationManager
IModInterface
IModList
IModRepositoryBridge
IOrganizer
IPlugin
IPluginDiagnose
IPluginFileMapper
IPluginGame
IPluginInstaller
IPluginInstallerCustom
IPluginInstallerSimple
IPluginList
IPluginModPage
IPluginPreview
IPluginRequirement
IPluginTool
IProfile
ISaveGame
ISaveGameInfoWidget
InstallResult
InterfaceNotImplemented
LoadOrderMechanism
LocalSavegames
Mapping
ModDataChecker
ModDataContent
ModRepositoryFileInfo
ModState
PluginRequirementFactory
PluginSetting
PluginState
ProfileSetting
ReleaseType
SaveGameInfo
ScriptExtender
SortMechanism
TrackedState
UnmanagedMods
VersionInfo
VersionScheme
MO2 Python Plugin API
»
Index
Index
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
K
|
L
|
M
|
N
|
O
|
P
|
R
|
S
|
T
|
U
|
V
|
W
A
absoluteIniFilePath() (mobase.IProfile method)
absolutePath() (mobase.IModInterface method)
(mobase.IProfile method)
activate() (mobase.BSAInvalidation method)
ACTIVE (mobase.ModState attribute)
(mobase.PluginState attribute)
activeProblems() (mobase.IPluginDiagnose method)
addArchive() (mobase.DataArchives method)
addCategory() (mobase.IModInterface method)
addDirectory() (mobase.IFileTree method)
addFile() (mobase.IFileTree method)
addNexusCategory() (mobase.IModInterface method)
allFiles() (mobase.ISaveGame method)
allMods() (mobase.IModList method)
allModsByProfilePriority() (mobase.IModList method)
ALPHA (mobase.ReleaseType attribute)
ALTERNATE (mobase.ModState attribute)
appVersion() (mobase.IOrganizer method)
archive (mobase.FileInfo attribute)
archives() (mobase.DataArchives method)
arguments() (mobase.ExecutableInfo method)
asCustom() (mobase.ExecutableInfo method)
author() (mobase.IPlugin method)
B
basePath() (mobase.IOrganizer method)
basic() (mobase.PluginRequirementFactory static method)
BETA (mobase.ReleaseType attribute)
binary() (mobase.ExecutableInfo method)
binaryName() (mobase.IPluginGame method)
BinaryName() (mobase.ScriptExtender method)
BOSS (mobase.SortMechanism attribute)
BSAInvalidation (class in mobase)
C
CANCELED (mobase.InstallResult attribute)
CANDIDATE (mobase.ReleaseType attribute)
canonicalString() (mobase.VersionInfo method)
categories() (mobase.IModInterface method)
categoryID (mobase.ModRepositoryFileInfo attribute)
CCPlugins() (mobase.IPluginGame method)
check() (mobase.IPluginRequirement method)
clear() (mobase.IFileTree method)
(mobase.VersionInfo method)
clearPluginSettings() (mobase.IModInterface method)
color() (mobase.IModInterface method)
comments() (mobase.IModInterface method)
CONFIGURATION (mobase.ProfileSetting attribute)
CONTINUE (mobase.IFileTree attribute)
converted() (mobase.IModInterface method)
copy() (mobase.IFileTree method)
createFile() (mobase.IInstallationManager method)
createFromJson() (mobase.ModRepositoryFileInfo static method)
createMod() (mobase.IOrganizer method)
createNexusBridge() (mobase.IOrganizer method)
createOrphanTree() (mobase.IFileTree method)
createTarget (mobase.Mapping attribute)
D
DataArchives (class in mobase)
dataDirectory() (mobase.IPluginGame method)
dataLooksValid() (mobase.ModDataChecker method)
DATE (mobase.VersionScheme attribute)
deactivate() (mobase.BSAInvalidation method)
DECIMAL_MARK (mobase.VersionScheme attribute)
default_value (mobase.PluginSetting attribute)
description (mobase.ModRepositoryFileInfo attribute)
(mobase.PluginSetting attribute)
description() (mobase.IPlugin method)
descriptionAvailable (mobase.IModRepositoryBridge attribute)
destination (mobase.Mapping attribute)
detach() (mobase.FileTreeEntry method)
detectGame() (mobase.IPluginGame method)
diagnose() (mobase.PluginRequirementFactory static method)
DIRECTORY (mobase.FileTreeEntry attribute)
DISCOVER (mobase.VersionScheme attribute)
display() (mobase.IPluginTool method)
displayName() (mobase.IModList method)
(mobase.IPluginModPage method)
(mobase.IPluginTool method)
(mobase.UnmanagedMods method)
displayString() (mobase.VersionInfo method)
DLCPlugins() (mobase.IPluginGame method)
documentsDirectory() (mobase.IPluginGame method)
downloadManager() (mobase.IOrganizer method)
downloadPath() (mobase.IDownloadManager method)
downloadsPath() (mobase.IOrganizer method)
downloadURLsAvailable (mobase.IModRepositoryBridge attribute)
E
EMPTY (mobase.ModState attribute)
enabled() (mobase.ExecutableForcedLoadSetting method)
ENDORSED (mobase.ModState attribute)
ENDORSED_FALSE (mobase.EndorsedState attribute)
ENDORSED_NEVER (mobase.EndorsedState attribute)
ENDORSED_TRUE (mobase.EndorsedState attribute)
ENDORSED_UNKNOWN (mobase.EndorsedState attribute)
EndorsedState (class in mobase)
endorsedState() (mobase.IModInterface method)
endorsementsAvailable (mobase.IModRepositoryBridge attribute)
endorsementToggled (mobase.IModRepositoryBridge attribute)
ESSENTIAL (mobase.ModState attribute)
executableForcedLoads() (mobase.IPluginGame method)
ExecutableForcedLoadSetting (class in mobase)
ExecutableInfo (class in mobase)
executables() (mobase.IPluginGame method)
EXISTS (mobase.ModState attribute)
exists() (mobase.IFileTree method)
extractFile() (mobase.IInstallationManager method)
extractFiles() (mobase.IInstallationManager method)
F
FAIL_IF_EXISTS (mobase.IFileTree attribute)
FAILED (mobase.InstallResult attribute)
FALLBACK (mobase.GuessQuality attribute)
feature() (mobase.IPluginGame method)
featureList() (mobase.IPluginGame method)
FILE (mobase.FileTreeEntry attribute)
FILE_OR_DIRECTORY (mobase.FileTreeEntry attribute)
FILE_TIME (mobase.LoadOrderMechanism attribute)
fileCategory (mobase.ModRepositoryFileInfo attribute)
fileID (mobase.ModRepositoryFileInfo attribute)
FileInfo (class in mobase)
fileInfoAvailable (mobase.IModRepositoryBridge attribute)
fileName (mobase.ModRepositoryFileInfo attribute)
filePath (mobase.FileInfo attribute)
filesAvailable (mobase.IModRepositoryBridge attribute)
fileSize (mobase.ModRepositoryFileInfo attribute)
fileTime (mobase.ModRepositoryFileInfo attribute)
fileTree() (mobase.IModInterface method)
FileTreeEntry (class in mobase)
fileType() (mobase.FileTreeEntry method)
FINAL (mobase.ReleaseType attribute)
find() (mobase.IFileTree method)
findFileInfos() (mobase.IOrganizer method)
findFiles() (mobase.IOrganizer method)
fix() (mobase.ModDataChecker method)
FIXABLE (mobase.ModDataChecker attribute)
forced() (mobase.ExecutableForcedLoadSetting method)
fullDescription() (mobase.IPluginDiagnose method)
G
gameDependency() (mobase.PluginRequirementFactory method)
gameDirectory() (mobase.IPluginGame method)
gameIcon() (mobase.IPluginGame method)
gameName (mobase.ModRepositoryFileInfo attribute)
gameName() (mobase.IModInterface method)
(mobase.IPluginGame method)
gameNexusName() (mobase.IPluginGame method)
GamePlugins (class in mobase)
gameShortName() (mobase.IPluginGame method)
gameVariants() (mobase.IPluginGame method)
gameVersion() (mobase.IPluginGame method)
genFilePreview() (mobase.IPluginPreview method)
getAllContents() (mobase.ModDataContent method)
getArch() (mobase.ScriptExtender method)
getContentsFor() (mobase.ModDataContent method)
getCreationTime() (mobase.ISaveGame method)
getExtenderVersion() (mobase.ScriptExtender method)
getFileOrigins() (mobase.IOrganizer method)
getFilepath() (mobase.ISaveGame method)
getFileVersion() (in module mobase)
getGame() (mobase.IOrganizer method)
getIconForExecutable() (in module mobase)
getLauncherName() (mobase.IPluginGame method)
getLoadOrder() (mobase.GamePlugins method)
getMissingAssets() (mobase.SaveGameInfo method)
getMod() (mobase.IModList method)
getName() (mobase.ISaveGame method)
getPluginDataPath() (mobase.IOrganizer static method)
getProductVersion() (in module mobase)
getSaveGameWidget() (mobase.SaveGameInfo method)
getSaveGroupIdentifier() (mobase.ISaveGame method)
getSupportedExtensions() (mobase.IInstallationManager method)
GOOD (mobase.GuessQuality attribute)
GuessedString (class in mobase)
GuessQuality (class in mobase)
H
handlesDownload() (mobase.IPluginModPage method)
hasGuidedFix() (mobase.IPluginDiagnose method)
hasSuffix() (mobase.FileTreeEntry method)
I
icon() (mobase.IPluginModPage method)
(mobase.IPluginTool method)
IDownloadManager (class in mobase)
IFileTree (class in mobase)
ignoredVersion() (mobase.IModInterface method)
IInstallationManager (class in mobase)
IModInterface (class in mobase)
IModList (class in mobase)
IModRepositoryBridge (class in mobase)
INACTIVE (mobase.PluginState attribute)
iniFiles() (mobase.IPluginGame method)
init() (mobase.IPlugin method)
initializeProfile() (mobase.IPluginGame method)
insert() (mobase.IFileTree method)
install() (mobase.IPluginInstallerCustom method)
(mobase.IPluginInstallerSimple method)
installArchive() (mobase.IInstallationManager method)
installationFile() (mobase.IModInterface method)
installMod() (mobase.IOrganizer method)
InstallResult (class in mobase)
InterfaceNotImplemented (class in mobase)
INVALID (mobase.GuessQuality attribute)
(mobase.ModDataChecker attribute)
invalidationActive() (mobase.IProfile method)
IOrganizer (class in mobase)
IPlugin (class in mobase)
IPluginDiagnose (class in mobase)
IPluginFileMapper (class in mobase)
IPluginGame (class in mobase)
IPluginInstaller (class in mobase)
IPluginInstallerCustom (class in mobase)
IPluginInstallerSimple (class in mobase)
IPluginList (class in mobase)
IPluginModPage (class in mobase)
IPluginPreview (class in mobase)
IPluginRequirement (class in mobase)
IPluginTool (class in mobase)
IProfile (class in mobase)
isArchiveSupported() (mobase.IPluginInstaller method)
(mobase.IPluginInstallerCustom method)
ISaveGame (class in mobase)
ISaveGameInfoWidget (class in mobase)
isBackup() (mobase.IModInterface method)
isCustom() (mobase.ExecutableInfo method)
isDir() (mobase.FileTreeEntry method)
isDirectory (mobase.Mapping attribute)
isFile() (mobase.FileTreeEntry method)
isForeign() (mobase.IModInterface method)
isInstalled() (mobase.IPluginGame method)
(mobase.ScriptExtender method)
isInvalidationBSA() (mobase.BSAInvalidation method)
isManualInstaller() (mobase.IPluginInstaller method)
isMaster() (mobase.IPluginList method)
isOverwrite() (mobase.IModInterface method)
isPluginEnabled() (mobase.IOrganizer method)
isSeparator() (mobase.IModInterface method)
isValid() (mobase.ExecutableInfo method)
(mobase.VersionInfo method)
K
key (mobase.PluginSetting attribute)
L
library() (mobase.ExecutableForcedLoadSetting method)
lightPluginsAreSupported() (mobase.GamePlugins method)
listDirectories() (mobase.IOrganizer method)
listSaves() (mobase.IPluginGame method)
LITERAL (mobase.VersionScheme attribute)
loaderName() (mobase.ScriptExtender method)
loaderPath() (mobase.ScriptExtender method)
loadOrder() (mobase.IPluginList method)
LoadOrderMechanism (class in mobase)
loadOrderMechanism() (mobase.IPluginGame method)
localizedName() (mobase.IPlugin method)
LocalSavegames (class in mobase)
localSavesEnabled() (mobase.IProfile method)
localSettingsEnabled() (mobase.IProfile method)
looksValid() (mobase.IPluginGame method)
LOOT (mobase.SortMechanism attribute)
M
managedGame() (mobase.IOrganizer method)
MANUAL_REQUESTED (mobase.InstallResult attribute)
Mapping (class in mobase)
mappings() (mobase.IPluginFileMapper method)
(mobase.LocalSavegames method)
master() (mobase.IPlugin method)
masters() (mobase.IPluginList method)
MERGE (mobase.IFileTree attribute)
merge() (mobase.IFileTree method)
META (mobase.GuessQuality attribute)
MISSING (mobase.PluginState attribute)
MLOX (mobase.SortMechanism attribute)
mobase (module)
modDataChanged() (mobase.IOrganizer method)
ModDataChecker (class in mobase)
ModDataContent (class in mobase)
modID (mobase.ModRepositoryFileInfo attribute)
modList() (mobase.IOrganizer method)
modName (mobase.ModRepositoryFileInfo attribute)
ModRepositoryFileInfo (class in mobase)
MODS (mobase.ProfileSetting attribute)
mods() (mobase.UnmanagedMods method)
modsPath() (mobase.IOrganizer method)
ModState (class in mobase)
move() (mobase.IFileTree method)
moveTo() (mobase.FileTreeEntry method)
N
name (mobase.ModRepositoryFileInfo attribute)
name() (mobase.FileTreeEntry method)
(mobase.IModInterface method)
(mobase.IPlugin method)
(mobase.IProfile method)
newestVersion (mobase.ModRepositoryFileInfo attribute)
newestVersion() (mobase.IModInterface method)
nexusGameID() (mobase.IPluginGame method)
nexusId() (mobase.IModInterface method)
nexusModOrganizerID() (mobase.IPluginGame method)
NONE (mobase.SortMechanism attribute)
NOT_ATTEMPTED (mobase.InstallResult attribute)
notes() (mobase.IModInterface method)
NUMBERS_AND_LETTERS (mobase.VersionScheme attribute)
O
onAboutToRun() (mobase.IOrganizer method)
onDownloadComplete() (mobase.IDownloadManager method)
onDownloadFailed() (mobase.IDownloadManager method)
onDownloadPaused() (mobase.IDownloadManager method)
onDownloadRemoved() (mobase.IDownloadManager method)
onFinishedRun() (mobase.IOrganizer method)
onInstallationEnd() (mobase.IPluginInstaller method)
onInstallationStart() (mobase.IPluginInstaller method)
onModInstalled() (mobase.IModList method)
onModMoved() (mobase.IModList method)
onModRemoved() (mobase.IModList method)
onModStateChanged() (mobase.IModList method)
onPluginDisabled() (mobase.IOrganizer method)
onPluginEnabled() (mobase.IOrganizer method)
onPluginMoved() (mobase.IPluginList method)
onPluginSettingChanged() (mobase.IOrganizer method)
onPluginStateChanged() (mobase.IPluginList method)
onProfileChanged() (mobase.IOrganizer method)
onProfileCreated() (mobase.IOrganizer method)
onProfileRemoved() (mobase.IOrganizer method)
onProfileRenamed() (mobase.IOrganizer method)
onRefreshed() (mobase.IPluginList method)
onUserInterfaceInitialized() (mobase.IOrganizer method)
origin() (mobase.IPluginList method)
origins (mobase.FileInfo attribute)
overwritePath() (mobase.IOrganizer method)
P
pageURL() (mobase.IPluginModPage method)
parent() (mobase.FileTreeEntry method)
parse() (mobase.VersionInfo method)
path() (mobase.FileTreeEntry method)
pathFrom() (mobase.FileTreeEntry method)
pathTo() (mobase.IFileTree method)
persistent() (mobase.IOrganizer method)
pluginDataPath() (mobase.IOrganizer method)
pluginDependency() (mobase.PluginRequirementFactory method)
pluginList() (mobase.IOrganizer method)
pluginNames() (mobase.IPluginList method)
PluginPath() (mobase.ScriptExtender method)
PluginRequirementFactory (class in mobase)
PLUGINS_TXT (mobase.LoadOrderMechanism attribute)
PluginSetting (class in mobase)
pluginSetting() (mobase.IModInterface method)
(mobase.IOrganizer method)
pluginSettings() (mobase.IModInterface method)
PluginState (class in mobase)
PRE_ALPHA (mobase.ReleaseType attribute)
PREFER_DEFAULTS (mobase.ProfileSetting attribute)
prepareProfile() (mobase.LocalSavegames method)
PRESET (mobase.GuessQuality attribute)
primaryCategory() (mobase.IModInterface method)
primaryPlugins() (mobase.IPluginGame method)
primarySources() (mobase.IPluginGame method)
priority() (mobase.IModList method)
(mobase.IPluginInstaller method)
(mobase.IPluginList method)
process() (mobase.ExecutableForcedLoadSetting method)
profile() (mobase.IOrganizer method)
profileName() (mobase.IOrganizer method)
profilePath() (mobase.IOrganizer method)
ProfileSetting (class in mobase)
R
readPluginLists() (mobase.GamePlugins method)
referenceFile() (mobase.UnmanagedMods method)
refresh() (mobase.IOrganizer method)
REGULAR (mobase.VersionScheme attribute)
ReleaseType (class in mobase)
remove() (mobase.IFileTree method)
removeAll() (mobase.IFileTree method)
removeArchive() (mobase.DataArchives method)
removeCategory() (mobase.IModInterface method)
removeIf() (mobase.IFileTree method)
removeMod() (mobase.IModList method)
renameMod() (mobase.IModList method)
REPLACE (mobase.IFileTree attribute)
repository (mobase.ModRepositoryFileInfo attribute)
repository() (mobase.IModInterface method)
requestDescription() (mobase.IModRepositoryBridge method)
requestDownloadURL() (mobase.IModRepositoryBridge method)
requestFailed (mobase.IModRepositoryBridge attribute)
requestFileInfo() (mobase.IModRepositoryBridge method)
requestFiles() (mobase.IModRepositoryBridge method)
requestToggleEndorsement() (mobase.IModRepositoryBridge method)
requirements() (mobase.IPlugin method)
reset() (mobase.GuessedString method)
resolvePath() (mobase.IOrganizer method)
S
savegameExtension() (mobase.ScriptExtender method)
SaveGameInfo (class in mobase)
SAVEGAMES (mobase.ProfileSetting attribute)
savesDirectory() (mobase.IPluginGame method)
scheme() (mobase.VersionInfo method)
ScriptExtender (class in mobase)
secondaryFiles() (mobase.UnmanagedMods method)
setActive() (mobase.IModList method)
setFilter() (mobase.GuessedString method)
setGameName() (mobase.IModInterface method)
setGamePath() (mobase.IPluginGame method)
setGameVariant() (mobase.IPluginGame method)
setInstallationManager() (mobase.IPluginInstaller method)
setIsEndorsed() (mobase.IModInterface method)
setLoadOrder() (mobase.IPluginList method)
setNewestVersion() (mobase.IModInterface method)
setNexusID() (mobase.IModInterface method)
setParentWidget() (mobase.IPluginInstaller method)
(mobase.IPluginModPage method)
(mobase.IPluginTool method)
setPersistent() (mobase.IOrganizer method)
setPluginSetting() (mobase.IModInterface method)
(mobase.IOrganizer method)
setPriority() (mobase.IModList method)
(mobase.IPluginList method)
setSave() (mobase.ISaveGameInfoWidget method)
setState() (mobase.IPluginList method)
settings() (mobase.IPlugin method)
setUrl() (mobase.IModInterface method)
setVersion() (mobase.IModInterface method)
shortDescription() (mobase.IPluginDiagnose method)
SKIP (mobase.IFileTree attribute)
SortMechanism (class in mobase)
sortMechanism() (mobase.IPluginGame method)
source (mobase.Mapping attribute)
startApplication() (mobase.IOrganizer method)
startDownloadNexusFile() (mobase.IDownloadManager method)
startDownloadURLs() (mobase.IDownloadManager method)
startGuidedFix() (mobase.IPluginDiagnose method)
state() (mobase.IModList method)
(mobase.IPluginList method)
steamAppID() (mobase.ExecutableInfo method)
steamAPPId() (mobase.IPluginGame method)
STOP (mobase.IFileTree attribute)
SUCCESS (mobase.InstallResult attribute)
suffix() (mobase.FileTreeEntry method)
supportedExtensions() (mobase.IPluginInstallerCustom method)
(mobase.IPluginPreview method)
T
title() (mobase.ExecutableInfo method)
tooltip() (mobase.IPluginTool method)
TRACKED_FALSE (mobase.TrackedState attribute)
TRACKED_TRUE (mobase.TrackedState attribute)
TRACKED_UNKNOWN (mobase.TrackedState attribute)
trackedModsAvailable (mobase.IModRepositoryBridge attribute)
TrackedState (class in mobase)
trackedState() (mobase.IModInterface method)
trackingToggled (mobase.IModRepositoryBridge attribute)
U
UnmanagedMods (class in mobase)
update() (mobase.GuessedString method)
uri (mobase.ModRepositoryFileInfo attribute)
url() (mobase.IModInterface method)
useIntegratedBrowser() (mobase.IPluginModPage method)
USER (mobase.GuessQuality attribute)
userData (mobase.ModRepositoryFileInfo attribute)
V
VALID (mobase.ModDataChecker attribute)
(mobase.ModState attribute)
validated() (mobase.IModInterface method)
validShortNames() (mobase.IPluginGame method)
vanillaArchives() (mobase.DataArchives method)
variants() (mobase.GuessedString method)
version (mobase.ModRepositoryFileInfo attribute)
version() (mobase.IModInterface method)
(mobase.IPlugin method)
VersionInfo (class in mobase)
VersionScheme (class in mobase)
W
waitForApplication() (mobase.IOrganizer method)
walk() (mobase.IFileTree method)
withArgument() (mobase.ExecutableInfo method)
withEnabled() (mobase.ExecutableForcedLoadSetting method)
withForced() (mobase.ExecutableForcedLoadSetting method)
withSteamAppId() (mobase.ExecutableInfo method)
withWorkingDirectory() (mobase.ExecutableInfo method)
workingDirectory() (mobase.ExecutableInfo method)
writePluginLists() (mobase.GamePlugins method)