Mod Registration

Mod Identity

class BBModIdentity(*args, **kwargs)

Bases: object

Includes the identity of your mod.

Note

It contains information about a mod such as Mod Name, Mod Author, the module namespace, and the script file path to your mod.

Example usage:

from bluuberrylibrary.mod_registration.bb_mod_identity import BBModIdentity

# This is how the bluuberrylibrary.mod_identity.ModIdentity implementation works.
class ModIdentity(BBModIdentity):
    _FILE_PATH: str = str(__file__)

    @property
    def mod_name(self) -> str:
        return 'BluuberryLibrary'

    @property
    def mod_author(self) -> str:
        return 'BluuberryBonanza'

    @property
    def module_namespace(self) -> str:
        return 'bluuberrylibrary'

    @property
    def script_file_path(self) -> str:
        return ModIdentity._FILE_PATH

    @property
    def mod_version(self) -> str:
        return '1.0'
property mod_author

The one who made the mod.

Returns:

The one who made the mod.

Return type:

str

property mod_name

The name of the mod.

Note

Do not include spaces in the name!

Returns:

The name of the mod.

Return type:

str

property mod_version

The version the mod is currently at.

Returns:

The version of the mod.

Return type:

str

property module_namespace

The namespace of the base module.

Note

BBL would have a value of bluuberrylibrary.

Returns:

The namespace of the base module.

Return type:

str

property script_file_path

The path to the .ts4script file of the mod.

Note

A good override value can be __file__, it will retrieve the file path automatically, assuming the inheriting class is at the root of the mod.

Returns:

The file path to the mod.

Return type:

str