Manual:Base UI

From Mudlet
Jump to navigation Jump to search

Base UI

Mudlet VersionAvailable in Mudlet5.0+

Mudlet builds new players a small starter interface out of whatever their game already provides: a map, a chat window and a set of health bars, docked down the right-hand side of the screen.

The base UI docked on the right: map, chat and health bars

It is a starting point rather than a finished interface. Everything in it is an ordinary Mudlet package, so you can move it, hide it, take it apart, or replace it with something of your own.

Who gets it

The base UI is installed into new profiles, and only for players who are new to Mudlet - if you have been using Mudlet for a while, your profiles will not suddenly grow a dock. It is also skipped for games that bring an interface of their own.

Nothing appears straight away. The dock is only built once the game sends something worth showing, so a profile that has connected but not yet received recognisable data will look completely ordinary. Typing baseui at that point reports that it is waiting for game data.

What is in the dock

The three sections: map, chat and health bars

Map

The map section shows a placeholder - "Your map will appear here as you explore" - until the profile actually has map data in it. Once there is a map, the placeholder is replaced by Mudlet's real mapper, with its own zoom buttons and area selector.

Chat

Tells, says and channel chat are copied into the chat window as they arrive, sorted into All, Tells and Channels tabs. Tabs you are not looking at carry an unread counter, which clears when you switch to them.

The Tells tab, with two unread messages still waiting on Channels

Capture is additive: a line copied into the chat window is still shown in the main window, in its original colours. Nothing is taken away from the game's own output.

Health bars

Up to four gauges are drawn, from whichever of health, mana, experience, movement and enemy health the game reports. When a game supplies more than four, movement is the one that loses its slot. An enemy health bar only appears while there is an opponent to show, and disappears again afterwards.

Where the data comes from

Every part of the dock is built from data the game already sends - the base UI never guesses. For the gauges it works down a ladder, and the first source that produces a complete health reading owns the gauges from then on; only a better source can take them over, so gauges built from a prompt hand themselves to GMCP whenever it turns up.

  1. GMCP - Char.Vitals, Char.Maxstats and Char.Status, with the various spellings games use for the same field (hp/health, maxhp/max_hp/maxHealth, and so on) all understood.
  2. MSDP - negotiated quietly on connect, reading HEALTH, MANA, EXPERIENCE, MOVEMENT and OPPONENT_HEALTH. This costs nothing on games without MSDP, and gives gauges to games that have it but no GMCP.
  3. Prompt and score lines - self-sufficient prompts (ones carrying labelled current/max values, or a percentage) are trusted once they have recurred, and score screens are read as they go past. As a last resort, on games whose prompt only carries current values, score is sent once per session to learn the maxima - visibly, and announced in the main window, so it is never a command you did not know about. If the score screen teaches it nothing, that is the end of it: there is no retry.

Chat works the same way. If the game offers Comm.Channel.Text over GMCP, that is used. Otherwise a set of triggers catches the line shapes most games share - tells, says, yells, whispers, group tells, and [tag], (tag) or < tag | channel prefixes whose first word is a recognised channel name. Those triggers retire themselves the moment GMCP chat shows up.

Note Note: The chat triggers are a plain trigger tree in the script editor, under the mudlet-base-ui package. They are meant to be read and copied - if your game names a channel the list does not know about, the tree is the place to add it.

Moving things around

Nothing is stuck in the dock.

  • Drag the "Mudlet UI" title bar to move the whole dock.
  • Drag a section's header row - the strip carrying MAP, CHAT or VITALS - to pull that section out of the dock and drop it anywhere over the game's text.

The sections left behind share out the space the departing one had, so the dock stays tidy. Where you leave each section is remembered between sessions.

The health bars dragged out of the dock; the map and chat have grown to take the space

baseui dock puts every section back where it started.

Commands

baseui reports the current state and the options
Command What it does
baseui Report what the interface is currently doing, and list the options below.
baseui hide Remove the interface. Remembered between sessions.
baseui show Bring it back.
baseui dock Put every section back in the dock, if you dragged any out.

When a game brings its own interface

Games that install an interface of their own win. The moment Mudlet installs a game-supplied GUI package, the base UI stands aside: its dock is hidden and its capture triggers retire, and it stays aside in later sessions too. This happens silently - the game's own interface arriving is announcement enough.

If you prefer the base UI, baseui show brings it back. If the game's package is later uninstalled, the base UI quietly returns to duty on its own.

Package authors can hook the same moment through the gameUiInstalled event.

Removing it

The base UI is an ordinary package named mudlet-base-ui, so it can be uninstalled from the package manager like any other. baseui hide is usually enough though, and is reversible.

Its own settings - whether you hid it, and whether it is standing aside - live in base_ui_settings.lua in the profile directory. Where each section was left is remembered separately, by Geyser.