Difference between revisions of "GMCP"

From LegendMUD
Jump to navigation Jump to search
(Added basic GMCP summary)
 
Line 17: Line 17:
 
The clients only provide the ability to ''use'' GMCP messaging. It is up to the player, however, to add triggers and other scripts to consume and request the information.
 
The clients only provide the ability to ''use'' GMCP messaging. It is up to the player, however, to add triggers and other scripts to consume and request the information.
  
GMCP messages are formed of a package name and an optional JSON payload separated by a space.
+
GMCP messages are formed of a package name and an optional JSON payload separated by a space. A list of the available packages can be found [[GMCP Packages|here]].
 +
 
 
Normally, the mud client will handle the parsing and will provide the information in its native format to the scripts.
 
Normally, the mud client will handle the parsing and will provide the information in its native format to the scripts.
 
For exact details, you will need to look into the documentation of your mud client.
 
For exact details, you will need to look into the documentation of your mud client.

Revision as of 07:34, 6 January 2021

What is GMCP?[edit]

LegendMUD supports the Generic Mud Communication Protocol, or GMCP, to pass easily parsable information to your mudclient. GMCP gives clients and servers the ability to send messages that are invisible to the player. This allows for easy access to certain data from within scripts without the use of cumbersome or unreliable triggers.

While GMCP provides a quality of life improvement for players writing scripts, it will not provide players with any distinct advantage. Any information provided through GMCP will have the same precision and visibility as through the normal interface.

Which Clients Support GMCP?[edit]

At the moment of writing, the following clients support GMCP:

  • CMUD v3.22 and higher
  • Mudlet v2.0 and higher
  • TinTin++ v2.00.3 and higher
  • Mushclient v4.59 and higher
  • Tinyfugue - when compiled with --enable-gmcp flag

There may be other clients that support GMCP.

How do I use GMCP?[edit]

The clients only provide the ability to use GMCP messaging. It is up to the player, however, to add triggers and other scripts to consume and request the information.

GMCP messages are formed of a package name and an optional JSON payload separated by a space. A list of the available packages can be found here.

Normally, the mud client will handle the parsing and will provide the information in its native format to the scripts. For exact details, you will need to look into the documentation of your mud client.

The following tutorials have been written for popular MUD clients:

These tutorials give examples specific to LegendMUD, if you are using a client that is not listed here, it might still be beneficial to view one or more of these tutorials to gain an understanding of how Legend sends GMCP messages.