Difference between revisions of "DiscworldUI"

From Mudlet
Jump to navigation Jump to search
m (→‎Package Info: Corrected version number that I forgot to change in previous edits)
(Release 0.2.3 (File upload is still in moderation))
 
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{TOC right}}
 +
[[File:Discworld-ui.png|border|Right|Bottom|500px|link=http://wiki.mudlet.org/images/4/45/Discworld-ui.png|alt="Image of Mudlet with the Discworld UI active."|Discworld UI v0.1 top aligned. Showing the upside down coloured map bug that was fixed in version 0.1.1 and upwards]]
 +
 +
==Summary==
 +
This package adds status bars and a separate map window to the MUDlet client, the data for both is supplied through GMCP.
 +
 +
It automatically sets-up GMCP session settings for the client upon login to the Discworld MUD. This use of triggers is explicitly allowed by the Discworld MUD creators, see "help gmcp" in-game.
 +
 +
This way you can keep an eye on your status and your location without having to read between the lines.
 +
 +
The plugin can be configured by editing variable names and CSS in the scripts. Take your time to read the comments so you know what you're changing.
 +
 +
===Features===
 +
*Automatic GMCP handshake with Disworld MUD server upon login.
 +
*Five status bars on the right hand side:
 +
**Shows HP, GP, XP, XP/hour, Burden.
 +
**Updates with every command you send and when the MUD sends a status update.
 +
*Map of your current location:
 +
**Updates on location change, look, glance.
 +
**Now in full colour both on "network" and "mxp" terminals.
 +
*Customisable UI
 +
** By modifying CSS
 +
** By modifying configuration variables at the top of the script.
 +
** Includes five pre-defined gradient colour schemes.
 +
** Supports all ANSI colours and all MXP colours used for the map.
 +
*** You can change the client side colours to any RGB value.
 +
 
==Package Info==
 
==Package Info==
By: [[User:Ghostbird|Ghostbird]]
+
By: [https://ghostbird.nl Ghostbird]
[[File:Discworld-ui.png|thumb]]
 
  
 
For(MUD): [http://discworld.starturtle.net Discworld]
 
For(MUD): [http://discworld.starturtle.net Discworld]
Line 7: Line 33:
 
Size: 4.7 KiB
 
Size: 4.7 KiB
  
Version: 0.1.1
+
Version: 0.2.3
  
Contents: discworld-ui.xml, config.lua
+
Contents: discworld-ui-0.2.3.xml, config.lua
 
 
== Known Issue ==
 
*Map colour hack is unstable due to it's hackish nature. Therefore it is disabled by default.
 
  
 
==Files==
 
==Files==
 
===Current version===
 
===Current version===
Version 0.1.1: [[File:Discworld-mud-ui-0-1-1.mpackage]]
+
Download: [[File:Discworld-0.2.3.zip]]
 +
* Map now automatically discards MXP links sent by Discworld. The linked "goto" command doesn't work anyway and is undocumented on the MUD. It might be a work in progress.
 +
* File extension changed from .mpackage to .zip, since this wiki no longer allows upload of application/zip mime-typed files whose name does not end in ".zip". According to [[Mudlet_Packages]] Mudlet itself will still accept these package files.
 +
 
 
===Older versions===
 
===Older versions===
Version 0.1: [[File:Discworld-mud-ui-0-1.mpackage]]
+
====Version 0.2.2====
 +
Download: [[File:Discworld-0.2.2.mpackage]]
 +
*Map colouring now also supports MXP in addition to ANSI.
 +
*Fixed Map and Status not being equally wide nor correctly aligned by default.
 +
*Revised code so everything related to the plugin is now stored in one global table named "Discworld".
 +
**Every part of the code can be accessed from any script.
 +
**The risk that this is done accidentally by other scripts is pretty much gone.
  
==Summary/Description==
+
====Version 0.2.1 ====
This package adds GMCP powered status bars and a GMCP powered separate map window to the MUDlet client.
+
Download: [[File:Discworld-ui-0.2.1.mpackage]]
This way you can keep an eye on your status and your location without having to read between the lines.
+
 
No longer will your combat monitor clutter up your entire screen.
+
*Fixes a bug that occurred for some users where the MUD sent ANSI <ESC>[0;10m (reset text attributes; default font) instead of the more common ANSI <ESC>[0m (reset text attributes).
 +
*Moved many global variables and function into the local scope.
 +
 
 +
Note: Fix is untested by author since the error did not occur on his system. The fix is tested to not break normal 0.2 functionality.
 +
 
 +
====Version 0.2====
 +
Download: [[File:Discworld-ui-0.2.mpackage]]
 +
*Map now fully works with ANSI escape codes embedded in GMCP instead of the ugly hack in 0.1
 +
 
 +
====Version 0.1.1====
 +
Download: [[File:Discworld-mud-ui-0-1-1.mpackage]]
 +
*Fixed an issue where the coloured map hack would print the map upside down.
  
Configuration can be done almost entirely by changing the global variable names in the scripts. Take your time to read the comments so you know what you're changing.
+
====Version 0.1====
Requires GMCP enabled in Mudlet settings. Sets up GMCP session settings for client upon login to the DiscWorld.
+
Download: [[File:Discworld-mud-ui-0-1.mpackage]]
 +
*First release
  
==Features==
 
*Five status bars on the right hand side
 
*HP, GP, XP, XP/hour, Burden.
 
*Separate map
 
*Automatic GMCP handshake with Disworld MUD server upon login.
 
*Configurable top or bottom alignment.
 
*Map automatically snaps to status bars, can be disabled if desired.
 
*Status bars update on every command you send and when the MUD sends a status update.
 
*Map updates on location change, look, glance.
 
*Disable XP/hour bar if you don't like it.
 
*Customisable Style
 
 
==Installation instructions==
 
==Installation instructions==
#Download the package and save it to your file-system.
+
<ol>
#Load the profile you use to connect to the Discworld. (Unless you are already connected).
+
<li>Download the package and save it to your file-system.</li>
#Enable GMCP in Mudlet settings.
+
<li>Load the profile you use to connect to the Discworld.</li>
#Install the package trough the Mudlet package manager. Do NOT import from the script interface, that only works for XML files.
+
<li>Enable GMCP in the Mudlet Settings, General tab.</li>
#Connect to the Discworld MUD. If you were already connected, re-login to the MUD by sending:
+
<li>Uninstall any previous version of this plugin and check whether the triggers and scripts are gone.</li>
 +
<li>Install the package trough the Mudlet Package Manager menu.</li>
 +
<li>Connect to the Discworld MUD. If you were already connected, re-login to the MUD by sending:</li>
 
  su
 
  su
#Interface is fully initialised once the second gmcp.Char.Vitals is received. (For every command you send to the mud after login you receive updated gmcp.Char.Vitals data.)
+
<li>Make sure you've told the MUD to send you GMCP map frames. To do this send:</li>
#Make sure you've told the MUD to send you map data. To do this send:
 
 
  options output map frame = on
 
  options output map frame = on
#Configure the Discworld MUD map options to your liking. (Recommended settings below)
+
<li>Configure the Discworld MUD map options to your liking. (Recommended settings below)</li>
#[OPTIONAL] Open the Mudlet Scripts interface and customise the variables in Discworld-MapUI and Discworld-StatusUI to your liking.
+
<li>[OPTIONAL] Open the Mudlet Scripts menu and customise the variables and CSS to your liking.</li>
 +
</ol>
  
 
==Recommended Discworld MUD settings==
 
==Recommended Discworld MUD settings==
Line 59: Line 94:
 
   look              = off
 
   look              = off
 
   lookcity          = off
 
   lookcity          = off
 +
 +
== Known Issues==
 +
*The author has (almost) no Lua experience, no guarantee of any kind is given.
 +
*The status bar text is rather small.
 +
*Currently the Geyser mini-console that holds the map overflows the right of the map container.
 +
*:It is unclear whether this is caused by;
 +
*:an older bug that is only now visible,
 +
*:a bug caused by a change to the behaviour of Geyser mini-console in Mudlet 3,
 +
*:or a bug in Mudlet 3-delta that will be fixed before 3.0 is released.
 +
*If you change the UI settings by changing the variable values you must re-save the script files to force Mudlet to process it again or restart Mudlet.
 +
**If you re-save the script, please do this in the top-down order (Discworld, UI, Status, Map) to avoid errors.
 +
**If you use the default option where the Map snaps to the Status and you move or resize the Status you must also re-save the Map script to force update the snapping.
 +
*Whereas the map supports most ANSI colours¹, it only supports the MXP colours that the Discworld MUD actually uses for the map by default.
 +
#The ANSI code for black text is not supported, but this is not used by the Discworld MUD.
 +
*If every mpackage fails to install on a Debian based Linux distribution (Ubuntu, Mint etc.) make sure lua-zip is installed:
 +
sudo apt-get install lua-zip
 +
:Otherwise just unzip the mpackage file (it is a ZIP) to get the XML file and use the Mudlet Package Manager to install it.
 +
*If you often suddenly lose connection to the MUD and it is not a network problem, disable compression in Mudlet Settings, Special Options tab.
 +
**This is not a problem with the plugin but a Mudlet problem. It will hopefully be fixed in Mudlet 3.
 +
 +
==Future Plans==
 +
 +
*No new features are planned for the future.
 +
*Bugs will be fixed if the author is made aware of them.
 +
**When he has the time to.
 +
**He can give no guarantees.
  
 
==Acknowledgements==
 
==Acknowledgements==
 
===Discworld MUD===
 
===Discworld MUD===
*Pit Veridicus: Helped by reporting server-side GMCP status of the connection. Explained that Mudlet doesn't support ANSI sequences in strings sent over GMCP and right away implemented a fix that escapes ANSI sequences if the GMCP client reports it is "mudlet". Without this, the coloured map would not have been possible.
+
*Pit Veridicus: Helped by reporting server-side GMCP status of the connection. Being open to suggestions, helping fix problems, thinking of workarounds, and fixing a JSON error on the MUD side.
 +
*Octagon: Reminding that people actually use this plugin, which prompted me to make the 0.2.x releases in 2015, two years after the last 0.1.1 release.
  
 
===Mudlet IRC===
 
===Mudlet IRC===
 
*Demmonic: Helped explain the documentation of Mudled and Geyser and why the Wiki is more up to date than the LuaDoc.
 
*Demmonic: Helped explain the documentation of Mudled and Geyser and why the Wiki is more up to date than the LuaDoc.
 
*_heiko (Heiko Köhn): Thought up the coloured map hack.
 
*_heiko (Heiko Köhn): Thought up the coloured map hack.
 +
*cizra: Helped find out why ANSI colour codes in GMCP didn't work.
 +
*Other Mudlet developers whose names I have forgotten.
  
 
==Contact==
 
==Contact==

Latest revision as of 13:25, 15 December 2019

"Image of Mudlet with the Discworld UI active."

Summary

This package adds status bars and a separate map window to the MUDlet client, the data for both is supplied through GMCP.

It automatically sets-up GMCP session settings for the client upon login to the Discworld MUD. This use of triggers is explicitly allowed by the Discworld MUD creators, see "help gmcp" in-game.

This way you can keep an eye on your status and your location without having to read between the lines.

The plugin can be configured by editing variable names and CSS in the scripts. Take your time to read the comments so you know what you're changing.

Features

  • Automatic GMCP handshake with Disworld MUD server upon login.
  • Five status bars on the right hand side:
    • Shows HP, GP, XP, XP/hour, Burden.
    • Updates with every command you send and when the MUD sends a status update.
  • Map of your current location:
    • Updates on location change, look, glance.
    • Now in full colour both on "network" and "mxp" terminals.
  • Customisable UI
    • By modifying CSS
    • By modifying configuration variables at the top of the script.
    • Includes five pre-defined gradient colour schemes.
    • Supports all ANSI colours and all MXP colours used for the map.
      • You can change the client side colours to any RGB value.

Package Info

By: Ghostbird

For(MUD): Discworld

Size: 4.7 KiB

Version: 0.2.3

Contents: discworld-ui-0.2.3.xml, config.lua

Files

Current version

Download: File:Discworld-0.2.3.zip

  • Map now automatically discards MXP links sent by Discworld. The linked "goto" command doesn't work anyway and is undocumented on the MUD. It might be a work in progress.
  • File extension changed from .mpackage to .zip, since this wiki no longer allows upload of application/zip mime-typed files whose name does not end in ".zip". According to Mudlet_Packages Mudlet itself will still accept these package files.

Older versions

Version 0.2.2

Download: File:Discworld-0.2.2.mpackage

  • Map colouring now also supports MXP in addition to ANSI.
  • Fixed Map and Status not being equally wide nor correctly aligned by default.
  • Revised code so everything related to the plugin is now stored in one global table named "Discworld".
    • Every part of the code can be accessed from any script.
    • The risk that this is done accidentally by other scripts is pretty much gone.

Version 0.2.1

Download: File:Discworld-ui-0.2.1.mpackage

  • Fixes a bug that occurred for some users where the MUD sent ANSI <ESC>[0;10m (reset text attributes; default font) instead of the more common ANSI <ESC>[0m (reset text attributes).
  • Moved many global variables and function into the local scope.

Note: Fix is untested by author since the error did not occur on his system. The fix is tested to not break normal 0.2 functionality.

Version 0.2

Download: File:Discworld-ui-0.2.mpackage

  • Map now fully works with ANSI escape codes embedded in GMCP instead of the ugly hack in 0.1

Version 0.1.1

Download: File:Discworld-mud-ui-0-1-1.mpackage

  • Fixed an issue where the coloured map hack would print the map upside down.

Version 0.1

Download: File:Discworld-mud-ui-0-1.mpackage

  • First release

Installation instructions

  1. Download the package and save it to your file-system.
  2. Load the profile you use to connect to the Discworld.
  3. Enable GMCP in the Mudlet Settings, General tab.
  4. Uninstall any previous version of this plugin and check whether the triggers and scripts are gone.
  5. Install the package trough the Mudlet Package Manager menu.
  6. Connect to the Discworld MUD. If you were already connected, re-login to the MUD by sending:
  7. su
  8. Make sure you've told the MUD to send you GMCP map frames. To do this send:
  9. options output map frame = on
  10. Configure the Discworld MUD map options to your liking. (Recommended settings below)
  11. [OPTIONAL] Open the Mudlet Scripts menu and customise the variables and CSS to your liking.

Recommended Discworld MUD settings

options output map:
  frame             = on  Note: Is required, configures server to send gmcp.Window.Frame.map
  glance            = off
  glancecity        = off
  look              = off
  lookcity          = off

Known Issues

  • The author has (almost) no Lua experience, no guarantee of any kind is given.
  • The status bar text is rather small.
  • Currently the Geyser mini-console that holds the map overflows the right of the map container.
    It is unclear whether this is caused by;
    an older bug that is only now visible,
    a bug caused by a change to the behaviour of Geyser mini-console in Mudlet 3,
    or a bug in Mudlet 3-delta that will be fixed before 3.0 is released.
  • If you change the UI settings by changing the variable values you must re-save the script files to force Mudlet to process it again or restart Mudlet.
    • If you re-save the script, please do this in the top-down order (Discworld, UI, Status, Map) to avoid errors.
    • If you use the default option where the Map snaps to the Status and you move or resize the Status you must also re-save the Map script to force update the snapping.
  • Whereas the map supports most ANSI colours¹, it only supports the MXP colours that the Discworld MUD actually uses for the map by default.
  1. The ANSI code for black text is not supported, but this is not used by the Discworld MUD.
  • If every mpackage fails to install on a Debian based Linux distribution (Ubuntu, Mint etc.) make sure lua-zip is installed:
sudo apt-get install lua-zip
Otherwise just unzip the mpackage file (it is a ZIP) to get the XML file and use the Mudlet Package Manager to install it.
  • If you often suddenly lose connection to the MUD and it is not a network problem, disable compression in Mudlet Settings, Special Options tab.
    • This is not a problem with the plugin but a Mudlet problem. It will hopefully be fixed in Mudlet 3.

Future Plans

  • No new features are planned for the future.
  • Bugs will be fixed if the author is made aware of them.
    • When he has the time to.
    • He can give no guarantees.

Acknowledgements

Discworld MUD

  • Pit Veridicus: Helped by reporting server-side GMCP status of the connection. Being open to suggestions, helping fix problems, thinking of workarounds, and fixing a JSON error on the MUD side.
  • Octagon: Reminding that people actually use this plugin, which prompted me to make the 0.2.x releases in 2015, two years after the last 0.1.1 release.

Mudlet IRC

  • Demmonic: Helped explain the documentation of Mudled and Geyser and why the Wiki is more up to date than the LuaDoc.
  • _heiko (Heiko Köhn): Thought up the coloured map hack.
  • cizra: Helped find out why ANSI colour codes in GMCP didn't work.
  • Other Mudlet developers whose names I have forgotten.

Contact

If you have any questions, send me an email.