Dependencies
Updated for version 4.6.
Module Definition
The module inherits ModuleBase. All parameters and functions of this class are inherited by the module.
Module name
The name of the module you use as the meta of the module definition is 'Dependencies' or 'DependenciesModule' if _force_search
is set to true in the module definition.
XML Structure
<dependency name type version id provider/>
Parameter | Type | Description |
---|---|---|
name | String | The name of the mod to depend on. [REQ] For |
type | String | The type of mod the dependency is. Options are |
min_ver | String | The minimum required version of the dependency. [OPTIONAL] |
id | String/Number | The id of the mod on the server. [OPTIONAL] Having |
provider | String | The provider of updates for the mod/assets. [OPTIONAL] Having |
Example
This example is what you would put inside your main node within your mod config
Functions
Function | Description |
---|---|
Load(Table config | Called normally by the module's init function. This is what checks the dependencies. |
CheckBLTMod(String name) | Goes through the currently added BLT mods and compares the mod name with |
CompareVersion(Table dep, String/Number mod) | Compares the versions of the Dependency (dep) and the mod. Creates a ModError if Dependency version is higher than mod version. |
CreateErrorDialog(Table dep) | Creates an ModError and add calls AddDepDownload if |
AddDepDownload(Table dep) | Adds an ModAssetModule to the mod. Called by CreateErrorDialog. |
Last updated