This is an old revision of the document!


Dune and GMCP

Generic Mud Communication Protocol (GMCP) is a way for Dune to send your MUD client extra information that isn't printed as game text. This is a helpful way to get extra context you can use for scripts and triggers. As a simple example, Dune can send a GMCP message to a GMCP enabled client when your character's health has changed so that you could automatically use a healing command.

GMCP Messages

TODO.

Client Setup

How to use GMCP messages sent by Dune depends on which MUD client you're using.

Mudlet

TODO.

See the Mudlet wiki for more information.

Blightmud

To use Dune's GMCP data in Blightmud you'll have to set up a script that will register some of the supported packages described above, and add handlers to do something with the received data.

Example:

function gmcp_init()
  --Uncomment next line to see all raw GMCP messages (good for debugging).
  --gmcp.echo(true)
 
  -- Register some packages to get information sent from the MUD.
  gmcp.register('Room')
  gmcp.register('Room.Info')
  gmcp.register('Char')
  gmcp.register('Char.Info')
  gmcp.register('Char.Vitals')
  gmcp.register('Char.Guild')
 
 -- Example handler for receiving room info
  gmcp.receive('Room.Info', function(data)
    obj = json.decode(data)
    blight.output("You're now in room: " .. data['name'])
  end)
end
 
gmcp.on_ready(gmcp_init)

See /help gmcp from inside Blightmud for more information.

Other

Other MUD clients that support GMCP can be made to work with Dune but it will require you to figure out how to configure it. Consider adding steps to this wiki page!