Repository navigation
LuaUI Console
A separate black window your window scripts can print to while you build them. It is a developer tool: it opens only in dev mode, and a live client never shows it to a player.
It is its own window, independent of the game - you can drag it to a second monitor, and it keeps working while the game runs. The title bar shows the live cursor position, handy beside UIPlacement.
The console is tied to the same dev-mode switch as plain .lua loading and the F9
reload (see Turning it on):
- the GameServer must push dev mode to your client -
ClientDevMode=1inPluginSettings.ini, with your account listed inDevModeAccounts; - on a live client, or an account without dev mode, the console never opens and
Log.Adddoes nothing.
There is also a local switch on the client, for a machine where you have dev mode
but do not want the window. In the client's config.ini:
[Lua]
DisableDebugConsole=11 suppresses the console even in dev mode; 0 (the default) leaves it on.
Log.Add("hello") -- default grey
Log.AddC(Enums.Color.Red, "something broke") -- colouredLog.Add(text) prints in the default grey; Log.AddC(color, text) takes a colour
first, from Enums.Color (below). The pair mirrors the server's Log.Add /
Log.AddC. Off dev mode both are no-ops, so you can leave the calls in your scripts
- they cost nothing on a live client.
Each line is timestamped. The window scrolls with the wheel or the bars: while you sit at the bottom it follows new output, and if you scroll up to read it leaves you there. It keeps the last 1000 lines.
Closing the window closes the client. It is a debug surface, not a panel to dismiss - the X shuts the game down.
Enums.Color is a table of 140 named colours, shared with the rest of your UI. The
values are ordinary client colours (RGBA, opaque), so the same name works wherever
a colour is taken - not just in the console:
local Enums = require("Enums")
lbl:setColor(Enums.Color.Gold) -- a label
Log.AddC(Enums.Color.Cyan, "info") -- the consoleThe names are the usual web/X11 set - Red, Lime, Cyan, Orange,
DeepSkyBlue, White, Gray, and so on. It mirrors the server's Enums.LogColor.
MuLua Scripting Plugin | Home
🖼️ Lua UI
- File map
- Creating windows
- Client and server
- Designing a window
- Protocol
- Scrolling and scrollbars
- Controls
- Custom text
- Text input
- Debug console
- Bitmap Slicer
- Encrypting scripts
Maps
Monsters
Shared
Version 1.14 | 2026-09-09