

A simple example mod demonstrating how to use the ZUI API for VRising mods.
Purpose: This mod showcases how to register categories and buttons with ZUI's API.
This example mod demonstrates:
ZUI.AddCategory()ZUI.AddButton()dotnet build
Copy the compiled ZUIExampleMod.dll to your VRising BepInEx plugins folder:
<VRising Install>/BepInEx/plugins/
When you load the game with ZUI installed, this mod:
ZUI.SetPlugin("ZUIExample")You'll see in the Mods menu:
ZUIExample
Example
Test
Example 2
Example
Here's the entire implementation in Plugin.cs:
private void RegisterWithZUI()
{
// Set your plugin name
ZUI.SetPlugin("ZUIExample");
// Example category
ZUI.AddCategory("Example");
ZUI.AddButton("Test", ".ignorethis");
// Example 2 category
ZUI.AddCategory("Example2");
ZUI.AddButton("Example", ".ignorethis");
LogInstance.LogInfo("Registered with ZUI successfully!");
}
That's it! Simple and clean.
ZUIExampleMod/
Plugin.cs # Main plugin - registers categories & buttons
MyPluginInfo.cs # Plugin metadata
ZUIExampleMod.csproj # Project configuration
ZUI.SetPlugin("YourModName");
This creates a folder in the Mods menu with your mod's name.
ZUI.AddCategory("Settings");
ZUI.AddCategory("Features");
ZUI.AddCategory("Admin Tools");
Categories organize your buttons into groups.
ZUI.AddButton("Enable Feature", ".yourcommand");
ZUI.AddButton("Show Stats", ".stats");
ZUI.AddButton("Reset Data", ".reset");
Each button executes a chat command when clicked.
private void RegisterWithZUI()
{
// Your mod name
ZUI.SetPlugin("MyAwesomeMod");
// Player features
ZUI.AddCategory("Player");
ZUI.AddButton("Heal", ".heal");
ZUI.AddButton("Show Stats", ".stats");
// Admin features
ZUI.AddCategory("Admin");
ZUI.AddButton("Give Items", ".give");
ZUI.AddButton("Teleport", ".tp");
LogInstance.LogInfo("Registered with ZUI successfully!");
}
ZUI.SetPlugin(string pluginName)Sets your plugin's display name in ZUI. Call this FIRST before adding categories.
ZUI.AddCategory(string categoryName)Creates a new category/folder in your plugin's section. Subsequent AddButton calls will add buttons to this category.
ZUI.AddButton(string buttonText, string command, string tooltip = "")Adds a button to the current category.
Mod loads but no UI appears:
"ZUI not found" warning:
Build errors:
This example mod demonstrates minimalism:
Start here, then add your own functionality!
MyPluginInfo.csRegisterWithZUI()This is example code for educational purposes. Modify and use as needed!
Happy modding!