Skip to content

plugin.json

plugin.json is the manifest file placed directly in the plugin folder. The editor uses it to find, check and load the plugin. A folder without this file is not treated as a plugin.

%APPDATA%\NPEditor\plugins\
└─ road_tools\
├─ plugin.json
├─ RoadTools.dll
└─ RoadTools.pdb (optional)
FieldRequiredTypeDescription
idYesstringThe plugin id. Follow the “id rules” below. It may differ from the folder name.
nameNostringThe name shown in the Plugin Manager. If empty, id is used.
versionYesstringYour plugin’s version, in x.y.z form. You can append -tag or +tag (for example 1.2.0-beta.1).
sdkYesstringThe required SDK version range. Follow the “sdk range” below.
dllYesstringPath of the dll to load, relative to plugin.json. Subfolders are allowed; .. and absolute paths are not. Must end in .dll.
entryNostringFull name of the entry class (Namespace.Class). If empty, the first class in the dll that implements INpEditorPlugin (ordered by full name) is used.
descriptionNostringShown in the Plugin Manager’s description line and tooltip.
authorNostringThe author.
  • Every field is a JSON string. A non-string value is treated as empty.
  • Fields not listed above are ignored.
  • // comments and trailing commas are allowed.
  • If a field is invalid, the Plugin Manager shows Error (file) with the reason.
RuleValidInvalid
Starts with a lowercase letterroad_toolsRoadTools · 1road · _road
Lowercase letters, digits and _ onlyroad_tools2road-tools · road tools
Segments can be separated with .myteam.road_toolsmyteam..road · road.
  • If two plugins share the same id, only the one in the folder found first is used (plugin folder order → folder name order). The others become Error (file).
  • Inside the editor, the menu, mode and panel ids this plugin registers are prefixed with ext.<id>..
  • The settings file name (plugin_settings\<id>.json) and saved shortcuts also use the id. If you change the id later, saved settings do not carry over.
Written asMeaningWhen to use
"^1.2"1.2.0 or later, below 2.0.0Recommended. Use the minimum version of the features you use.
"1.2"Same as "^1.2"
"~1.2"1.2.0 or later, below 1.3.0When it must run only on 1.2.x
">=1.0"1.0.0 or later (no upper bound)Not recommended. Loads even on the next major.
">1.0"Above 1.0.0
"<1.5"Below 1.5.0Use together with another condition.
"<=1.4"1.4.0 or earlier
">=1.0 <1.5"1.0.0 or later, below 1.5.0Join conditions with spaces.
"=1.3.0"1.3.0 onlyFor testing
  • Write versions with 1 to 3 parts. 1 is 1.0.0; 1.2 is 1.2.0.
  • A -tag after the version is ignored in comparisons.
  • If the editor’s SDK version is outside the range, the plugin becomes Version mismatch and is not loaded. The editor keeps running.
Features you usesdk
Menus · quick add · commands · import/export · panels · modes · actor types · cell guards · symmetry · WorldChanged · Committed^1.0
The above + shortcuts · Settings · Draw^1.1
The above + AddSceneEvent^1.2
The above + Scene · View · field kind ActorList^1.3

Per-version details are in the SDK changelog.

Within the same major version, the SDK only adds members and never renames them. That is why a ^1.0 plugin also runs on an SDK 1.3 editor.

The shortest file:

{
"id": "my_first_plugin",
"version": "0.1.0",
"sdk": "^1.0",
"dll": "MyFirstPlugin.dll"
}

A file using every field:

{
// name shown in the manager window
"id": "myteam.road_tools",
"name": "도로 도구",
"version": "1.2.0",
"sdk": "^1.1",
"dll": "bin/RoadTools.dll",
"entry": "RoadTools.Plugin",
"description": "선택 영역에 도로 깔기 · 가로등 · 단축키 Ctrl+Alt+R",
"author": "도로팀",
}