Vendetta/registration
Neoloader uses ini files to handle registration of mods, referred to as plugin declarations. These INI files have to follow certain standards, in order to ensure readability by Neoloader. An example declaration file is provided here:
[modreg]
type=plugin
API=3
id=rngui
version=0.1.0
name=Renoise Interface
author=Luxen
website=https://www.nexusmods.com/vendettaonline/mods/24
path=plugins/Renoise/rngui.lua
[dependency]
depid1=helium
depvs1=0.4.2 -indev
There are two main sections to a declaration file - the registration, and the dependency list. These are defined in detail below. All items in bold are required to be present, with an exception for the dependency list portion, which is only required if your mod has dependencies to declare in the first place.
Mod registration
Modreg item | Purpose of item |
---|---|
type | A currently-unused descriptor of what a mod "is". |
id | The internal name of the plugin. This MUST be unique, and cannot be 'null'. |
name | The name of a plugin as it appears to the user. |
version | This is the version of this specific mod. Mods with the same id and version cannot be loaded together; always use a unique version number. Semantic versioning is supported. For more information, see mod versioning |
API | This should match the current 'major' API of Neoloader. There is a Neoloader setting that will auto-error any plugin with a mismatching API version, and if the API ever changes this setting will be enabled by default. If the API expected is 3.11.0, then this value should be '3'. More granular versioning checks should be handled by the plugin itself. |
author | Name of the author(s) of this mod. This information is displayed in the bundled management frontend, neomgr. |
website | currently unused; a mod manager could allow the user to quickly access this website to check for updates. This functionality will be added to neomgr in an upcoming update to Neoloader. |
path * | This is the path to the mod's code file. If no path and only a file name is provided, the path of the INI file is used instead. If your mod is a library to be distributed with other mods, don't use a path, only the file name.
If no file is provided, Neoloader will assume that the plugin's main.lua file provides the necessary checks and the file will be marked appropriately. This is useful for plugins that would have compatibility issues running before the standard plugin loader - for instance, non-LME plugins patched through the NeoPatcher utility. See more in plugin design |
Other data can be present, but these are the preset items that are read when Neoloader runs lib.build_ini. To access any other data, lib.mod_read_str can be used. Neoloader will try to add stand-in information for mods missing these listed values that aren't required, but it is best practice to include all tags to best represent your mod.
Dependency declaration
Dependency item | Purpose of item |
---|---|
depid# | the mod id of the #th dependency that your plugin relies on. |
depvs# | the mod version of the #th dependency that your plugin relies on. Use 0 to indicate any version is allowed, as it will auto-calculate as the latest version enabled |
depmx# | the maximum version of the #th dependency of the mod that your plugin relies on. If present, the matching depvs becomes the minimum value expected. |
num_dependents | This value is no longer necessary and will be ignored. It use to be used to set the number of expected dependencies, but Neoloader now determines this automatically. |
Any version number can be defined with semantic syntax. Do note that if depmx is defined, depvs cannot be '0' - instead use '0.0', as '0' is reserved as a placeholder for 'latest enabled', and could put it at a value greater than the defined maximum.
As mentioned, if a mod has no dependencies, this entire section can be removed.