👌Mod Declaration
Introduction
To keep consistent with NCMS mod, NML uses mod.json
to contain meta information of a mod. And NML will search mod.json
recursively and use the parent folder of mod.json
as mod's folder.
mod.json file will be deserialized as below class through JSON
If GUID
is empty, NML uses captalization of "Author_ModName" as mod's ID, non letter or numeric characters belonging to ASCII will be replaced with underscores. For example:
Nikon#7777
Example Mod
NIKON_7777_EXAMPLE_MOD
一米
中文名
一米_中文名
"一米" and "中文名" are not belonging to ASCII, so they are not replaced.
Url to Repository
You can keep it empty. It used for users to report bug/suggestions.
Hard dependencies
It should be an array of mods' ID. NML tries to load mod only when all of its hard dependencies compiled successfully.
Mods can directly access the public content of dependent mods
Soft dependencies
It should be an array of mods' ID. NML load mod no matter how many its soft dependencies compiled successfully. NML will add mods' ID as macro(predefined constants) to mark what soft dependent mods compiled successfully.
Incompatible
It should be an array of mods' ID. It has not been completed yet.
Icon path
Related to mod folder(folder of mod.json
). It can be empty. When it is empty, icon of your mod will be icon of NML.
Usage in mod
When a mod's OnLoad
is called, its ModDeclare
has been processed by NML. You can access its content according to the following definition of ModDeclare
:
Last updated