-
Notifications
You must be signed in to change notification settings - Fork 21
Plugin Development
Warning
The publicly shipped API is not stable and prone to breaking changes with no prior notice.
Warning
The documentation for this page may be outdated because of frequent updates. Check the API source code to be kept up to date.
Note
This article assumes the reader has a basic understanding of C# and .NET projects in addition to having an environment set up for development.
Configurations are wrappers for different methods of patching in Pandora Behavior Engine. The entire patching process for Skyrim Special Edition is done by one patcher, but there are two different configurations in the menu (Normal and Debug).
With the latest version (2.5.0-beta) of Pandora Behaviour Engine, it is now possible to develop plugins to add new configurations to the engine.
- Create a .NET class library, either by command line or using Visual Studio. This will be the plugin.
- Add Pandora API to the solution, either by the package or cloning and adding the project.
- In the
.csproj
for the plugin project, make sure the following is present as a property.
<PropertyGroup>
...
<DisableTransitiveProjectReferences>true</DisableTransitiveProjectReferences>
</PropertyGroup>
- In the same project file, ensure that the following properties are added under the Pandora API reference:
<Private>False</Private>
<ExcludeAssets>runtime</ExcludeAssets>
- Example:
<ItemGroup>
...
<ProjectReference Include="..\Pandora API\Pandora API.csproj">
<Private>False</Private>
<ExcludeAssets>runtime</ExcludeAssets>
</ProjectReference>
</ItemGroup>
-
Create a
plugin.json
file and add it to the project. UnderProperties > Build Action
ensure it is set to eitherCopy always
orCopy if newer
. -
Create the following properties and the values in the
plugin.json
file.
{
"name": "Example Plugin",
"author": "Monitor221hz",
"version": "1.2.3",
"path": "Example Plugin.dll"
}
Note
path
is the path to the plugin relative to the build folder (usually just the name of the plugin file).
- In the default
.cs
file, create a class inheriting fromIEngineConfigurationPlugin
. - Implement the MenuPath. This is the nested that the configuration will have when it is injected into the configuration selection menu.
- Implement the rest of the necessary properties, including the factory, configuration, and patcher.
- In your local Pandora Behaviour Engine repository, create a Plugins folder in the Pandora Behaviour Engine project.
- Create a new folder (recommended to be named same as the plugin).
- Create a
plugin.json
file inside the new folder (this will get ignored by git) - Put in the absolute or relative path to the plugin
.dll
file. - Run Pandora via Visual Studio or your preferred IDE. The plugin should then be injected and selectable in the configuration menu.
Copy the contents of the plugin build into a new folder in the Plugins folder of Pandora, then run Pandora normally.