Difference between revisions of "Manual:GMCP Extensions"

From Mudlet
Jump to navigation Jump to search
m
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{TOC right}}
 
= Automatic package installation =
 
= Automatic package installation =
 
Mudlet supports automatic download and setup of [[Mudlet_Packages|Mudlet packages]] should the MUD server offer it. These packages could consist of graphical additions to your game or anything else you'd like your players to have loaded on their Mudlet profiles by default. This setup is automatic and carefree on part of the user, and handles package updates in a transparent manner as well.
 
Mudlet supports automatic download and setup of [[Mudlet_Packages|Mudlet packages]] should the MUD server offer it. These packages could consist of graphical additions to your game or anything else you'd like your players to have loaded on their Mudlet profiles by default. This setup is automatic and carefree on part of the user, and handles package updates in a transparent manner as well.
  
 
== setup ==
 
== setup ==
After GMCP is negotiated, the server should send a string with raw telnet in the format of:
+
After GMCP is negotiated, the server should send a message via GMCP with:
 
 
  Client.GUI <package version>\n<url>
 
 
 
or alternatively, send the message with GMCP
 
  
 
<syntaxhighlight lang="json">
 
<syntaxhighlight lang="json">
Line 16: Line 13:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
And Mudlet will make it happen. If the user does not have a package, it will be downloaded and installed from the ''<url>'', and if they do, but of an older version - it'll be upgraded. If they're already on the latest, nothing happens. Ensure that the zip name is the same as the package name.
+
When Mudlet receives the message, it will do everything necessary to make the latest UI appear: if the user does not have a package, it will be downloaded and installed from the ''<url>'', and if they do, but of an older version - it'll be upgraded. If they're already on the latest, nothing happens.  
 +
 
 +
Ensure that the filename is the same as the package name, as Mudlet will use the filename in determining if the package is already installed.
  
 
For example:
 
For example:
 
  Client.GUI 1562626892\nhttps://mudlet.reinosdeleyenda.es/RLMud_Config.zip
 
 
(observe no quotes)
 
 
or with GMCP:
 
  
 
<syntaxhighlight lang="json">
 
<syntaxhighlight lang="json">
 
Client.GUI {
 
Client.GUI {
 
   "version": "39",
 
   "version": "39",
   "url": "http://www.stickmud.com/mudwww/StickMUDv39.mpackage"
+
   "url": "http://www.stickmud.com/mudwww/StickMUD.mpackage"
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
{{Note}} Mudlet 4.18+ The JSON "''version"'' parameter may also be an integer value
 +
 +
{{Note}} there is an older, not preferred but still supported way is to send a message via GMCP with:
 +
 +
  Client.GUI <package version>\n<url>
 +
 
== demonstration ==
 
== demonstration ==
 
Enable GMCP in settings, connect to Midnight Sun 2 (''midnightsun2.org'' on port ''3000'') and create a character. A GUI will automatically install over GMCP once you finish character creation, and an overview of it is [http://midnightsun2.org/gateways/gui.html?show=overview available here] - a good idea to consider to make your MUD more visually appealing.
 
Enable GMCP in settings, connect to Midnight Sun 2 (''midnightsun2.org'' on port ''3000'') and create a character. A GUI will automatically install over GMCP once you finish character creation, and an overview of it is [http://midnightsun2.org/gateways/gui.html?show=overview available here] - a good idea to consider to make your MUD more visually appealing.
Line 43: Line 42:
 
== updating ==
 
== updating ==
 
If you change the package version to any other text than what it previously was, Mudlet will consider it an update - it'll uninstall the old package and install the new package. This happens without prompting the user (since it can be kind of tricky if they decline), thus any modifications they would have done would be wiped - encourage users to make any modifications outside of the package and provide hooks for doing so.
 
If you change the package version to any other text than what it previously was, Mudlet will consider it an update - it'll uninstall the old package and install the new package. This happens without prompting the user (since it can be kind of tricky if they decline), thus any modifications they would have done would be wiped - encourage users to make any modifications outside of the package and provide hooks for doing so.
 +
 +
For [https://en.wikipedia.org/wiki/Software_versioning#Schemes package versioning] you can use any text you seem appropriate. Simple version numbers (start with 1, then 2, then 3) will do, as well as minor and/or patch versions like 1.2 and 1.2.3 or even 1.2.3-alpha (see https://semver.org/ for inspiration). You could also easily use the current date of release (like 2021-06-17 now - but make sure to indicate if you happen to release multiple versions on the same day), or even fancy special names for each release (how about http://sentimentalversioning.org/ for inspiration?)
  
 
= Automatic map download =
 
= Automatic map download =
Line 49: Line 50:
 
[[File:Start own map.png|center]]
 
[[File:Start own map.png|center]]
  
The map can be either in the [[Standards:MMP|MMP standard]] or one [[Manual:Mapper_Functions#saveMap|exported from Mudlet]].
+
The map can be either in the [[Standards:MMP|MMP standard]] (indicated by .xml at end of file name) or one [[Manual:Mapper_Functions#saveMap|exported from Mudlet]].
  
 
== setup ==
 
== setup ==

Latest revision as of 00:21, 3 January 2024

Automatic package installation

Mudlet supports automatic download and setup of Mudlet packages should the MUD server offer it. These packages could consist of graphical additions to your game or anything else you'd like your players to have loaded on their Mudlet profiles by default. This setup is automatic and carefree on part of the user, and handles package updates in a transparent manner as well.

setup

After GMCP is negotiated, the server should send a message via GMCP with:

Client.GUI {
  "version": "<package version>",
  "url": "<url>"
}

When Mudlet receives the message, it will do everything necessary to make the latest UI appear: if the user does not have a package, it will be downloaded and installed from the <url>, and if they do, but of an older version - it'll be upgraded. If they're already on the latest, nothing happens.

Ensure that the filename is the same as the package name, as Mudlet will use the filename in determining if the package is already installed.

For example:

Client.GUI {
  "version": "39",
  "url": "http://www.stickmud.com/mudwww/StickMUD.mpackage"
}

Note Note: Mudlet 4.18+ The JSON "version" parameter may also be an integer value

Note Note: there is an older, not preferred but still supported way is to send a message via GMCP with:

 Client.GUI <package version>\n<url>

demonstration

Enable GMCP in settings, connect to Midnight Sun 2 (midnightsun2.org on port 3000) and create a character. A GUI will automatically install over GMCP once you finish character creation, and an overview of it is available here - a good idea to consider to make your MUD more visually appealing.

For an ATCP demo, connect to godwars2.org on port 3000. Mudlet will download the GW2 interface and set it up automatically.

Sample string sent by GodWars 2:

 "Client.GUI 1\nhttp://www.godwars2.org/download/mudlet/GW2_GUI.mpackage"

updating

If you change the package version to any other text than what it previously was, Mudlet will consider it an update - it'll uninstall the old package and install the new package. This happens without prompting the user (since it can be kind of tricky if they decline), thus any modifications they would have done would be wiped - encourage users to make any modifications outside of the package and provide hooks for doing so.

For package versioning you can use any text you seem appropriate. Simple version numbers (start with 1, then 2, then 3) will do, as well as minor and/or patch versions like 1.2 and 1.2.3 or even 1.2.3-alpha (see https://semver.org/ for inspiration). You could also easily use the current date of release (like 2021-06-17 now - but make sure to indicate if you happen to release multiple versions on the same day), or even fancy special names for each release (how about http://sentimentalversioning.org/ for inspiration?)

Automatic map download

Mudlet can download a map for the user as soon they open the mapper for the first time, as well as re-download the map from the Mapper tab in settings:

Start own map.png

The map can be either in the MMP standard (indicated by .xml at end of file name) or one exported from Mudlet.

setup

To let Mudlet know where it can download your map, send the following after GMCP has been enabled:

Client.Map {
  "url": "https://..."
}