Skip to content

Mudlet 3.1.0

Like clockwork, a new Mudlet release is here with a ton of improvements across the board.

Enhancement to multiplaying

A feature that'll come in quite handy where MUDs allow you to play multiple characters at once - you can now have one profile talk to other profiles in your code. A new function raiseGlobalEvent() allows you to raise events from one profile that will be received in all other open profiles.

Show Lua errors in main display

Mudlet now gained an option to display runtime Lua errors in the main display, previously available in the Errors view only:

This would be an option familiar to MUSHclient users. To enable it, enable "Echo Lua errors to main console" in the "Main display" preferences.

Show script name in error message

If you defined your function that you used elsewhere in a trigger/alias/etc, and it had an error, you'd be met with a rather unintuitive error message like this:

This has been fixed now, and the error message will include the original script where the error comes from:

Much better.

Timestamps in logging

A new option "Add timestamps at the beginning of log lines" allows you to log with timestamps:

Additionally, timestamps will also be copied if you have the timestamps view enabled in your main window and use copy or copy to HTML.

Ctrl+click selection

You can now ctrl+click on a line to select it entirely.

Ctrl+S in the trigger editor

Ctrl+S (Cmd+S on macOS) has now been enabled as a shortcut in the trigger editor - so you don't have to hit that 'Save Item' button every time.

Similarly, Ctrl+Shift+S will now save your entire profile to disk.

Pink keys

Key folders have now gotten their own colour in the trigger editor: pink.

Better mapper defaults

The mapper now has anti-aliasing, better room, and exit sizes by default so new maps look a lot more like what they should:

GMCP on by default

Having been thoroughly tested on many MUDs, GMCP is now enabled by default on new profiles - if your game supports it, Mudlet will enable and make use of it.

raiseWindow() and lowerWindow()

You can now raise a label or a miniconsole above all others with raiseWindow(), or lower it below all others with lowerWindow(). This can come in pretty handy when creating your Mudlet GUIs. Remember that the default Z-order of elements is the order they are created in, with newer labels/miniconsoles coming on top.

getMousePosition() added

getMousePosition() has been added, allowing you to know the mouse position (within Mudlet only) - this'll help enable make dragging UI elements much easier.

Try it out for yourself on Mudlet 3.1.0.

sysInstall and sysUninstall events added

These are two very useful events for script makers: sysInstall allows you to do post-install actions and sysUninstall allows you to do pre-uninstall actions.

Useful applications of this include showing a help or a welcome menu as soon as your package is installed or removing your UI and resetting the borders back to default for your GUI package.

In addition to this, more fine-grained events are also available: sysInstallPackage, sysInstallModule, sysSyncInstallModule, sysLuaInstallModule, sysUninstallPackage, sysUninstallModule, sysSyncUninstallModule, and sysLuaUninstallModule.

sysSoundFinished event added

You can now tell when a particular sound has finished playing with the sysSoundFinished event. In addition to this, the limit on playing maximum 4 sounds simultaneously has been removed.

Behind the scenes

Infrastructure

We've been modernising Mudlet heavily. The Linux continuous integration environment has been updated to Ubuntu 14.04 LTS and we've introduced automated macOS installer creation - this means anyone contributing to Mudlet can get a macOS Mudlet install for done for them automatically! This makes it much easier to code up a feature, submit it for inclusion to Mudlet, and get test versions of it in return for letting your friends test it.

Communi, the IRC library included with Mudlet, has also been upgraded to the latest 3.5.0 release.

Modern C++11 and Qt

We've put a lot of work into modernising Mudlets C++ codebase: the project is now using C++11Qt 5.6, and clang-format automated code styling. This enables Mudlet to make use of really nice C++11 features like the auto keyword (letting the compiler deduce the type), ranged-based for statements (far more readable than iterators), and lambda functions (using a function inline - especially nice for small Qt slots). All of the code has been upgraded to use auto and range-based foralready, and most of it has been through the automated code styling - so if you're curious about playing with Mudlets code using modern C++, have a look!

Start of automated testing

We've started on automated testing of Mudlet by robots - they'll help raise the alarms should we break anything by accident. Teaching the robots doesn't require any programming experience, so if you're interested in helping us out, join us on Discord.

Pure Github development

We've now moved issue tracking to Github and setup a PR-based workflow. In addition to this, mudlet-lua - the Lua counterpart to C++ in Mudlet - has been merged back with the main repository. All of these changes reduce the overhead of developing Mudlet and make it a more pleasant experience.

Detailed changelog

A list of all the things changed in Mudlet 3.1.0 since 3.0.1, sans API changes which are detailed down below.

  • added a new option "Echo Lua errors to main console" to "Main display" preferences, enabling you to see any runtime errors with your script right in the main window
  • enabled MUDLET_VERSION_BUILD environment variable to set to set the build version information
  • fixed a crash if you tried to copy a map to a profile that didn't have one before
  • fixed a small memory leak that would happen when you edited the regex of a trigger/alias
  • fixed hideWindow() & showWindow() to work with userwindows
  • fixed logs breaking if you changed from HTML to plain text or back while it was on
  • fixed main toolbar buttons getting enabled if you clicked 'Cancel' in the connection dialog
  • fixed many 'chose' instead of 'choose' typos
  • fixed memory leak when copying maps between profiles
  • fixed scrpt packages typo in settings
  • fixed userwindows not being openable again after you've closed them with X
  • fixed xml import/export getting map room/exit sizes wrong sometimes
  • function parameters accepting QStrings have been tightened to QString constant references
  • improved a lot of commented-out code and cruft has been cleaned in core code
  • improved default mapper room size is now 5, exits 10
  • improved errors defined in a script that's called by an alias/trigger/etc will now also report the scipt name
  • improved log button now has an X over it when logging is enabled to disable buttons
  • improved QString handling to be more efficient with introduction of QLatin1String and QStringLiteral

API changelog

  • added closeMudlet() to save profiles and close Mudlet
  • added getCmdLine() to return the text that's currently in the command line
  • added getMousePosition() to return the current mouse position on the main display
  • added getProfileName() to return the profile's name
  • added raiseGlobalEvent() to raise an event in all other open profiles
  • added raiseWindow() and lowerWindow() functions to raise a label/miniconsole above all others or lower below all others
  • added saveProfile() to save the profile
  • added setHexFgColor()setHexBgColor() which allows hexadecimal equivalents of the RGB setFgColor() and setBgColor()
  • added setLabelReleaseCallback() which allows you to run a function when the mouse was pressed and then released on a label
  • added sysInstall and sysUninstall events for when packages or modules are installed or uninstalled. In addition to this, more fine-grained events are also available: sysInstallPackage, sysInstallModule, sysSyncInstallModule, sysLuaInstallModule, sysUninstallPackage, sysUninstallModule, sysSyncUninstallModule, and sysLuaUninstallModule
  • added sysSoundFinished which is raised whenever a sound stops playing
  • fixed [c|d|d]echoLink() echoing to a specific window losing the format argument
  • fixed crash using centerview() while not map is open
  • fixed hideWindow() to close userwindows
  • fixed showColors() text luminosity being incorrect in certain cases.
  • fixed sysDisconnectionEvent from getting raised twice in certain cases
  • Geyser flyout labels have been improved and are now nestable
  • Geyser.Label:setReleaseCallback() has been added
  • improved db:create() to be more resilient - now re-opens the db connection if needed
  • improved echo(), feedTriggers(), startLogging(), setLabelClickCallback(), setLabelOnEnter(), setLabelOnLeave(), deselect(), resetFormat() to explain what the bad argument is and what it should be, instead of giving an "wrong argument type" error message or none at all
  • improved echo(), setLabelClickCallback(), setLabelOnEnter(), setLabelOnLeave(), deselect(), resetFormat(), to return true on success or nil+error otherwise (error message just if one is available)
  • improved permGroup() to allow creating a folder within a folder
  • As part of the on-going process toward Mudlet 4.0 becoming more International and supporting languages other than English: Lua commands that accept user supplied text as arguments are gradually being reworked to gain the ability to process UTF-8 text. This and related steps are only at a preliminary stage at present but form a major component of the mile-stones on the way to the next major Mudlet release version.
  • improved startLogging() to return the log filename and the logging status

Credits

Big thanks to Ahmed Charles, Florian Scheel, Ian Adkins, Jor'Mox, Kae, Nyyrazzilyss, Pavol Gono, Stephen Lyons, and Vadim Peretokin who collectively put in 980 commits to Mudlet's foundations. Shoutout to all the helpers in our Discord channels and and everyone who's helped improve our wiki!

Comments

  • I'm slow about updating (plx don't WCry me), so I'm just getting around to using 3.1 now. Some minute change made me have to realign some UI elements, but it looks better now anyway. Only thing I want so far is the ability to stop a specific sound file rather than just the all stop.
  • edited May 2017
    @Vadi I have something I wanted to bring up that's been an issue with me the last several weeks.

    I generally prefer the mudlet commands to the in-game pathfinding because it allows me to watch the map when I am moving. However, ever since I updated, I have noticed a dramatic dip in the quality of mudlet pathfinding.

    This has manifested in 2 ways -
    slowwalk: I used to have it on slowwalk off which would work fast enough not to create problems with movement command stacking while still being persistent enough to continue moving when I am off balance bashing. Since I updated, movement directions are spammed several times before the commands go through, resulting in a LOT of backtracking and recalcuating paths to the point that I have slowwalk off/on toggled in my 'goto' alias and 'bash' alias respectively. 

    walk speed: literally so slow, regardless of slowwalk's toggle. I have 2 types of celerity and mount movement bonus and mudlet mapper does not seem to care at all. Either with or without slowwalk, it will attempt to move me at a speed that is appropriate for somebody with no movement bonus. And I understand that mudlet mapper is not going to move as fast as pathfinding, for obvious processing reasons, but it has taken a dramatic dip from what was normal prior to updating. This is especially strange because it will occasionally move at the 'usual' speed, but I have not been able to figure out a thing that would cause it to lag or work any more effectively.

    I have tested with a raw profile and seen no improvement on the walk speed.
    I updated to the most recent mudlet mapper.
    I deleted the map folder entirely from the profile.
    I uninstalled and reinstalled mudlet entirely.
    I deleted and reinstalled the game map.
    I saw no evidence that ping or lag is an issue ie testing with/without hard wired connection. This has been persistent daily, so I do not think it is my connection.
    Edit: I also fished around in the settings and tinkered with the timer/counter thing in the scripts that adjusts for network latency but I noticed no change.

    I d k. I'd appreciate any word on this. Obviously I've found a workaround for the biggest problem I have, but I'll be bummed out if I have to switch back to in-game pathfinding. :(

    ty
     You say, "This is much harder than just being a normal person."
  • Is there a way to completely suppress the prompt in Mudlet, by hook or by crook?  I'm using a GMCP status bar and dont need nor want it in the main feed.
    image
  • You can do that by creating a trigger and setting the pattern to 

    return isPrompt()

    with the type in the drop-down menu set to lua function, then drop

    deleteLine()
    cecho("\n")

    into the script. You can also make the prompt say whatever you want by adding it after the cecho.


  • edited June 2017
    Okay that mostly works, but it doesn't add the new line there, curiously.
    [edit: doubling it up worked, though]
    image
  • For future people coming across this thread and also maybe @Gjarrus, here's how I managed to delete the prompt lines without having a bunch of extraneous extra lines, adapting it in a pair of triggers had the best result:

    Trigger#1:
    return isPrompt()
       deleteLine()
    
    Trigger#2:
    return not isPrompt()
       cecho("\n")

    image
  • Oystir not sure, nothing changed in the mappers walking speed. Is this still an issue?
  • Vadi said:
    Oystir not sure, nothing changed in the mappers walking speed. Is this still an issue?
    FWIW Vadi, I've noticed certain things seem to make Mudlet hang for half a second to a couple seconds at a time, or rather, not certain things, but it happens on a certain timer.  Eliminating the mudlet mapper "fixed" it for me on 3.0.0, but re-introducing my own timers has it come up again occasionally, so I think it's something timers related.  Or, alternatively, perhaps GMCP related since Imperian will send it on a certain timer and I use my own timer to ping for GMCP inventory stuff.
    image
  • Perhaps we need a way to track down performance issues in scripts that run. This one sounds pretty hard to pin down without sprinkling stopwatches everywhere.
  • Vadi said:
    Perhaps we need a way to track down performance issues in scripts that run. This one sounds pretty hard to pin down without sprinkling stopwatches everywhere.
    If there's anything I can do to help, I can certainly try.  My system to be fair is pretty demanding on mudlet I imagine (A LOT of UI stuff and table-based lookups), but the flipside of that is if it has performance problems eliminated than less strenuous systems shouldn't have issues either.
    image
  • If you need something right now, I recommend looking into stopwatches - adding them to your prompt function and drilling down as necessary. I've found those to be help useful to tune the performance of the systems I built (https://github.com/svof/svof, https://github.com/m-mf/m-mf).
  • edited July 2017
    @Vadi - Yes it is. It definitely has something to do with the slowwalk map settings stacking on top of each other at suboptimal speeds. 

    Also, following somebody in a large group makes mudlet stutter ridiculously. I'm pretty sure that is partly my own system's fault, but I am bringing it up anyway. 
     You say, "This is much harder than just being a normal person."
  • The mapper has always just spammed movement as fast as it can, so maybe the games movement has been reduced? You can ungag the "too fast" messages to check if it's the case.

    If your S: number bottom right is high, it would mean some trigger is inefficient, yep.
  • Vadi said:
    If you need something right now, I recommend looking into stopwatches - adding them to your prompt function and drilling down as necessary. I've found those to be help useful to tune the performance of the systems I built (https://github.com/svof/svof, https://github.com/m-mf/m-mf).
    Hmm, those github links just give me a 404
    image
  • The forums linker is buggy and made it be a giant link. I'm on mobile, but manually doing them separately will work!
  • Does anyone use GMCP Comm.Channel in the new version of Mudlet? I upgraded from 2.1 to 3.3.1 yesterday, and I am not getting the events from this hook at all anymore.

    I'm still enabling it as expected using:
    gmod.enableModule("Naruj", "Comm.Channel")

    But my existing code is not doing anything, and I don't see the events anymore with debug active. The IRE.Rifts module works just fine, so it's purely the Comm.Channel one.
    You grabbed my hand and we fell into it
    Like a daydream.. or a fever
  • That looks right. Does it also need to send Core.Supports.Add so that it knows the latest version handles it?  Not sure, been awhile. 
  • Cassius said:
    That looks right. Does it also need to send Core.Supports.Add so that it knows the latest version handles it?  Not sure, been awhile. 
    According to the documentation it shouldn't, but I sent it manually with sendGMCP while testing last night and didn't notice any change.
    You grabbed my hand and we fell into it
    Like a daydream.. or a fever
  • Should still be there as-is. Are you setting any new errors in the errors window?
  • edited July 2017
    Vadi said:
    Should still be there as-is. Are you setting any new errors in the errors window?
    I'm not really getting anything at all now. It worked prior to the upgrade, and now just silence. No new errors and no events to hook onto.

    The code is running, because it shows up in gmod.PrintModules().

    <div>[GMCP Tracker] Current modules:</div><div><br></div><div>IRE.Rift</div><div>&nbsp; Naruj</div><div>Comm.Channel</div><div>&nbsp; Naruj</div>

    Edit: The code tags on this forum make that look weirder than it should be.
    You grabbed my hand and we fell into it
    Like a daydream.. or a fever
  • If you PM me, we can teamviewer and see what's going on
  • @Naruj here's my code for getting it to work. I run this every time I log in since it seems that the module needs disabled/renabled with each connect. ctx.state.player.name should be your character's name.

    ['client:login'] = function(ctx, payload) gmod.disableModule(ctx.state.player.name, 'Comm.Channel') gmod.enableModule(ctx.state.player.name, 'Comm.Channel') end,
Sign In or Register to comment.