No description
| deps | ||
| MosswartMassacreNG | ||
| MosswartMassacreNG.Loader | ||
| .gitignore | ||
| LICENSE | ||
| MosswartMassacreNG.sln | ||
| README.md | ||
<<<<<<< HEAD
MosswartMassacreNG
======= # 🚀 MosswartMassacreNG
A hot-reloadable Decal v2.9.8.3 plugin that builds against .NET Framework 4.8 and UtilityBelt.Service for the views.
🔧 Developing
- The plugin code is located in the
MosswartMassacreNGproject. You can ignore theMosswartMassacreNG.Loaderproject, it contains the hot-reloader and doesn't need to be edited unless you are doing something out of the ordinary.MosswartMassacreNG/PluginCore.csis the main Plugin class. It contains the plugin startup / shutdown methods.MosswartMassacreNG/ExampleUI.csincludes some demo UI code.MosswartMassacreNG/scripts/installer.nsiis the NSIS script used to generate the installer.
- Build the new plugin solution in Visual Studio with
Ctrl+Shift+B, or by going toBuild -> Build Solution. - Add both
MosswartMassacreNG.dllandMosswartMassacreNG.Loader.dllto decal by opening decal from the tray and selectingAdd -> Browse -> <YourProjectPath>/bin/Release/net481/. (Select each dll file individually.) - Disable
MosswartMassacreNGin decal by unchecking it under thePluginslist.- During development you should have
MosswartMassacreNG(underPlugins) disabled, andMosswartMassacreNG.Loaderenabled (underNetwork Filters) in decal. This allows for hot-reloading of the plugin without logging out / restarting the client. - To hot-reload, just recompile the plugin while ingame. You should see a message in the chat window showing that the plugin has reloaded.
- During development you should have
📦 Releasing
- Right click the Plugin project and choose
Properties. Scroll down and update the version number. - Build the latest release version.
- In decal, enable your Plugin under the
Pluginssection, and disableMosswartMassacreNG.Loaderunder Network Filters. This allows you to test the plugin with hot-reloading disabled. - Ensure the plugin works as expected ingame.
- Test the installer in
bin/Release/. - Distribute the installer.
Build Server Requirements
- Either use the docker image at
TODOor use a build server with the following requirements:- All build servers:
- Powershell is in the environment
PATHby callingpowershell.
- Powershell is in the environment
- Non-Windows build servers:
- NSIS is in the environment
PATHby callingmakensis. - DotNet 6 SDK installed.
- NSIS is in the environment
- All build servers:
💡 Tips
- If you need to reference more decal dlls, make sure to copy them to
deps/and reference from there to maintain linux build compatibility. - When hot-reloading, events like
CharacterFilter.LoginCompletehave already triggered when the plugin reloads so the plugin will never see them. During plugin startup, you can check the current login state to determine if this is a normal load, or a hot one.
protected override void Startup() {
var isHotReload = CoreManager.Current.CharacterFilter.LoginStatus == 3;
}
- If hot-reloading is being prevented because
<YourPlugin>.Loaderis trying to be recompiled and is locked by acclient, you can right click the<YourPlugin>.Loaderproject in the Visual StudioSolution Explorerand selectUnload Projectto prevent it from being rebuilt. Note: You must build<YourPlugin>.Loaderat least once before unloading the project, if you want to use hot-reloading.
bae77fb (init)