Plugin Development
Learn how to create plugins for MudForge Web Client.
Getting Started
Plugins are written in Lua and can:
- Create custom widgets (canvas, HTML, text)
- Draw graphics and text
- Respond to MUD output with triggers
- Create command aliases
- Set up timers for periodic actions
- Access GMCP and MSDP protocol data
- Communicate with other plugins
Quick Example
-- My First Plugin
print("Loading...")
local widget = createWidget({
type = "canvas",
title = "My Widget",
width = 200,
height = 150
})
local function draw()
clear("#1e1e2e")
drawRect(10, 10, 180, 130, "#89b4fa")
drawCircle(100, 75, 40, "#f38ba8")
drawText("Hello!", 70, 80, "#cdd6f4")
end
registerWidgetEvent(widget, "resize", function() draw() end)
function init()
draw()
end
print("Loaded!")Sections
- Introduction - Overview and concepts
- Plugin Structure - Plugin lifecycle and patterns
- Examples - Working plugin examples
Last updated on