Testing your Plugin
Note: In this section, we'll be making the following assumptions:
Plugin name:
"Tutorial Plugin"
Plugin ID:
"com.tutorial.plugin"
DLL Name:
"tutorial-plugin.dll"
Now that you have a basic plugin, we want to make sure we can load it into Exanima.
Compiling your plugin
To build your plugin for testing, just run cargo build
. It might take a while to compile first-time, or after changing dependencies.
Once it's complete, your plugin should be available in ./target/debug/tutorial_plugin.dll
. Note that rust always replaces hyphens (-
) with underscores (_
) when compiling.
We usually use hyphens in our dll names, so for example, when we copy tutorial_plugin.dll
into the Exanima mods folder, we usually rename it to tutorial-plugin.dll
.
You don't have to use hyphens though, so if you'd rather keep the underscore, just make sure you update the executable
value in your config.toml
to match the dll name:
executable = "tutorial_plugin.dll"
Loading your plugin into Exanima
In your Exanima game folder (The folder containing Exanima.exe
), create a mods
folder (if it doesn't already exist), and inside there, create a folder with your plugin name (e.g. tutorial-plugin
)
Copy ./target/debug/tutorial_plugin.dll
into C:/path/to/steamapps/common/Exanima/mods/tutorial-plugin/tutorial-plugin.dll
Copy ./config.toml
into C:/path/to/steamapps/common/Exanima/mods/tutorial-plugin/config.toml
Now if you run EMTK, your plugin should be loaded. You can use the F2
key to toggle the in-game overlay, where you can enable/disable your plugin.
As you enable & disable the plugin, you will see the logs in the EMTK console.