Skip to Content
Plugin DevelopmentIntroduction

Introduction

MudForge plugins extend the functionality of the MUD client using Lua scripting.

What Can Plugins Do?

  • Create Custom Widgets - Canvas for graphics, HTML for rich content, text for simple display
  • Draw Graphics - Shapes, text, images with full canvas API
  • React to MUD Output - Triggers match patterns in MUD text
  • Create Shortcuts - Aliases transform commands before sending
  • Schedule Actions - Timers run code periodically or after delays
  • Store Data - Variables and tables persist across sessions
  • Access Protocols - GMCP and MSDP data from the MUD server
  • Multi-Session - Communicate between multiple MUD connections

Plugin API

MudForge provides a clean, modern Lua API:

  • Drawing functions automatically target the last created canvas widget
  • No widget ID required as first parameter in drawing calls
  • Use setActiveWidget() only when switching between multiple widgets
  • Intuitive function names and parameters

Example:

-- Create a widget (automatically becomes active) local myWidget = createWidget({ type = "canvas", title = "My Widget", width = 300, height = 200 }) -- Draw on it immediately - no setActiveWidget() needed! drawRect(0, 0, 300, 200, "#1a1a2e") drawCircle(150, 100, 50, "#3498db") drawText("Hello MudForge!", 100, 100, "#ffffff")

Getting Started

See Plugin Structure for how to create your first plugin.

Last updated on