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 compatibility for Neoloader.
Example of a declaration file:
[modreg]
type=utility
id=debuzz
name=Station Sign Debuzzer
version=1.1.0
API=3
author=Luxen
website=https://voupr.spenced.com/plugin.php?name=debuzz
path=core.lua
[dependency]
num_dependents=2
depid1=multiui
depvs1=6
depid2=json
depvs2=2
[modreg] |
The header containing most of a mod's registration data |
type |
A descriptor of what a mod "is". This can be used for sorting mods in an in-game manager. It is otherwise unused. |
*id |
this is the access ID for a mod; any other mod will refer to this id. "null" is invalid. |
*name |
This is the public name of the mod, what a user expects to see. |
*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. For more information, see "mod versioning" |
API |
This should match the current 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. |
author |
Name of the author(s) of this mod. 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 |
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; 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-Neoloader plugins patched through the NeoPatcher utility. See more in plugin design tips |
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 values that aren't required, but it is best practice to include all tags to best represent your mod. |
[dependency] |
The header containing a list of the mod's dependencies. All must be met before the mod will load. |
num_dependents |
How many mods this one depends on. |
depid# |
the mod_id of the #th dependency |
depvs# |
the mod version of the #th dependency (0 means any version) |
depmx# |
the maximum version allowed for the #th dependency (optional; converts depvs# to be the minimum value if present) |
if there are no dependencies, this entire section can be removed.