Plugins
Plugins allow you to expand the functionality of OpenBullet 2 by adding your own custom blocks to use in a config.
What a plugin is
A plugin is a .NET class library that exposes static methods as OB2 blocks through attributes from RuriLib.
At a minimum, a plugin usually contains:
- a class marked with
BlockCategory - one or more static methods marked with
Block - optional methods marked with
BlockAction - any extra helper code or dependencies needed by those blocks
Creating a plugin
- Install the .NET 10 SDK.
- Create a class library project.
- Reference
RuriLibfor compilation. - Implement your blocks using the plugin attributes.
- Build the project.
You can use the OB2PluginSample repository as a base for your own plugin. It includes two supported development workflows:
- reference
RuriLibdirectly from a local clone of theOpenBullet2source tree - reference a local
RuriLib.dllfrom a small SDK-style folder if you do not want to clone the full repo
Installing a plugin
After building your plugin:
- Open the output folder, usually
bin/Debug/net10.0orbin/Release/net10.0. - Copy the main plugin
.dllto the root ofUserData/Plugins. - Copy any dependencies that are not already shipped with OB2 either:
- to the root of
UserData/Plugins, or - to a subfolder named after the plugin assembly, for example
UserData/Plugins/MyPlugin/...
- to the root of
- Restart OpenBullet 2.
WARNING
Do not copy assemblies that OpenBullet 2 already ships with unless you really need a different version. Duplicating core dependencies can cause load conflicts.
Notes
- Plugin blocks are discovered automatically when OB2 starts.
- The main plugin assembly must be in the root of
UserData/Pluginsto be discovered. - If your plugin depends on another local library, that dependency must also be copied under
UserData/Plugins. - If you only need extra libraries inside LoliCode and not custom blocks, see the External Libraries page.