GMCP in Mudlet

Enabling GMCP

If you are using Mudlet then (if it is not enabled already) you will need to enable GMCP data.

Accessing GMCP

Once enabled, Mudlet will automatically share with DuneMUD that it can receive GMCP data. You can check that you are receiving data by entering lua gmcp in your command line.

You'll probably be shown a LOT of data, more than a screen's worth. The GMCP data is organized like a Lua table with gmcp.Section.Subsection.key structure. Some of the sections are:

  • Char which contains all information about your character.
    • Char.Name which is your name and full title.
    • Char.Stats which is your stats, so gmcp.Char.Stats.str is your strength, for example.
    • Char.Vitals which is your hp and cp (though it's called “sp” for now).
    • Char.Status which contains most of the other stuff you'd see on score. For example, gmcp.Char.Status.xp is your exp.
    • Char.StatusVars are string-type descriptors of the entries in Status. For example, gmcp.Char.StatusVars.xp is the string “Experience”.
    • Char.Guild contains data particular to your guild. This usually has sub-subsections. For example, on Atreides gmcp.Char.Guild.Shieldbelt.Level is your shieldbelt's level.
  • Room which contains data about your current room.
    • Room.name is it's name.
    • Room.num is a unique identifier code.
    • Room.Info contains area (planet) info, indoor/outdoor info, and (visible) exit info.
  • External which is Discord information that you could have Mudlet use.

Using GMCP

You can use the raw GMCP data table in your scripts/triggers/aliases just like you would variables you defined yourself.

You can also use “event handlers” to execute scripts when new GMCP data is received. See the “Triggering on GMCP” section (page 5) of https://www.mudlet.org/wp-content/uploads/2013/02/GMCPtutorial.pdf