IModInterface

class mobase.IModInterface

Bases: object

Methods Summary

absolutePath()

returns

Absolute path to the mod to be used in file system operations.

addCategory(name)

Assign a category to the mod.

addNexusCategory(category_id)

Set the category id from a nexus category id.

categories()

returns

The list of categories assigned to this mod.

name()

returns

The name of this mod.

remove()

Delete the mod from the disc.

removeCategory(name)

Unassign a category from this mod.

setGameName(name)

Set the source game of this mod.

setIsEndorsed(endorsed)

Set endorsement state of the mod.

setName(name)

Set the name of this mod.

setNewestVersion(version)

Set the latest known version of this mod.

setNexusID(nexus_id)

Set the Nexus ID of this mod.

setVersion(version)

Set the version of this mod.

Methods Documentation

absolutePath()
Returns

Absolute path to the mod to be used in file system operations.

Return type

str

addCategory(name)

Assign a category to the mod. If the named category does not exist it is created.

Parameters

name – Name of the new category to assign.

addNexusCategory(category_id)

Set the category id from a nexus category id. Conversion to MO ID happens internally.

If a mapping is not possible, the category is set to the default value.

Parameters

category_id – The Nexus category ID.

categories()
Returns

The list of categories assigned to this mod.

Return type

List[str]

name()
Returns

The name of this mod.

Return type

str

remove()

Delete the mod from the disc.

This does not update the global ModInfo structure or indices.

Returns

True if the mod was deleted, False otherwise.

Return type

bool

removeCategory(name)

Unassign a category from this mod.

Parameters

name – Name of the category to remove.

Returns

True if the category was removed, False otherwise (e.g. if no such category

was assigned).

Return type

bool

setGameName(name)

Set the source game of this mod.

Parameters

name – The new source game short name of this mod.

setIsEndorsed(endorsed)

Set endorsement state of the mod.

Parameters

endorsed – New endorsement state of this mod.

setName(name)

Set the name of this mod.

This will also update the name of the directory that contains this mod

Parameters

name – New name for this mod.

Returns

True if the name was changed, False if an error occured (e.g. if the name is not a valid

directory name).

Return type

bool

setNewestVersion(version)

Set the latest known version of this mod.

Parameters

version – The latest known version of this mod.

setNexusID(nexus_id)

Set the Nexus ID of this mod.

Parameters

nexus_id – Thew new Nexus ID of this mod.

setVersion(version)

Set the version of this mod.

Parameters

version – The new version of this mod.