IPluginInstallerSimple

class mobase.IPluginInstallerSimple

Bases: IPluginInstaller

Simple installer for mods. Simple installers only deal with an in-memory structure representing the archive and can modify what to install and where by editing this structure. Actually extracting the archive is handled by the manager.

Methods Summary

install(name, tree, version, nexus_id)

Install a mod from an archive filetree.

Methods Documentation

abstract install(name, tree, version, nexus_id)

Install a mod from an archive filetree.

The installer can modify the given tree and use the manager to extract or create new files.

This method returns different type of objects depending on the actual result of the installation. The C++ bindings for this method always returns a tuple (result, tree, version, id).

Return type:

Union[InstallResult, IFileTree, Tuple[InstallResult, IFileTree, str, int]]

Parameters:
  • name – Name of the mod to install. As an input parameter this is the suggested name (e.g. from meta data) The installer may change this parameter to rename the mod).

  • tree – In-memory representation of the archive content.

  • version – Version of the mod, or an empty string is unknown.

  • nexus_id – ID of the mod, or -1 if unknown.

Returns:

In case of failure, the result of the installation, otherwise the modified tree or

a tuple (result, tree, version, id) containing the result of the installation, the modified tree, the new version and the new ID. The tuple can be returned even if the installation did not succeed.