Adding your own modules
Last updated
Last updated
Updated for version 3.38.
The module is inherited from ItemModuleBase. So base parameters can be found there.
This modules let's you add custom modules.
The name of the module you use as the meta of the module definition is 'Modules' or 'ModulesModule' if _force_search
is set to true in the module definition.
<Modules directory>
/ <modules directory>
Parameter | Type | Description |
---|---|---|
<module file name type_name/>
Parameter | Type | Description |
---|---|---|
Modules loaded through this method have to be loaded from mods that have very high priority; making sure all mods that want to use this module, are able to.
This example is what you would put inside your main node within your mod config
The module will inherit either ModuleBase or ItemModuleBase (for tweakdata stuff)
Modules/FoodModule.lua:
And a mod that would want to use this module:
This adds a food module! The heisters are pretty hungry after a day of heisting so they gotta eat.
Just... Gotta code it.
directory
String
An optional directory for the modules. All modules will join their file to this directory
file
String
The file path to module. This will join the mod path + directory
type_name
String
The friendly/short name for your module to be defined from BeardLib mods
name
String
The name of the module class you just made in your file. Defaults to type_name
+ Module