
MUDLET ALIASES CODE
The combination of string interpolation, named captures in regex triggers, and the addition of formatting codes for bold, underline, and italics to the c/d/hecho functions in particular will allow for much easier to read code when doing complicated string formatting and combining multiple patterns which do the same thing in your trigger editor.Before we deep delve into the details, let’s know what a mud client is. Mudlet 4.11 took a while longer than was hoped due to Travis CI essentially turning its back on FOSS with its new pricing model, but should hopefully get back to regular releases soon. We’ll see what people come up with =) Conclusion Also provides an official JSON format to code against for things like the web viewer for Mudlet maps, or perhaps a future program which allows you to add/remove rooms from the json file without being inside Mudlet itself. This makes it much easier to manage inside Git for people who maintain crowd maps, providing manageable diffs and much smaller repositories due to the way git handles binary vs ascii files. This has several benefits, among them that it is human readable.
MUDLET ALIASES UPDATE
With the 4.11 update it can now save and load in the JSON format. Right now, the Mudlet map saves as a binary file, the actual map item in the code being serialized to disk.

It replaces anything inside \n") Save/load Mudlet map to/from JSON The version Mudlet uses is modified from the f-strings luarock, which is primarily aimed at Lua 5.2+ and had to be slightly modified to work in Mudlet. It’s a fancy way developers describe replacing things inside strings with their value.

“What is string interpolation?” I hear some of you thinking. One piece of syntactic sugar whose lack is often bemoaned is string interpolation.
MUDLET ALIASES SKIN
regex pattern: ^You take (?\d+) damage as your blood boils, a faint red mist rising from your skin and flowing towards (?\w+)\.$ String interpolation (formatting) above code would also work with the following pattern, making it easier to combine patterns where the captures come in different order regex pattern: ^The mystical magical aura around (?\w+) turns a deep vermillion and you feel your blood boil, doing (?\d+) damage$Ĭecho("Blood boiled by ". regex pattern: ^The mystical magical aura around (\w+) turns a deep vermillion and you feel your blood boil, doing (\d+) damage$Ĭecho("Blood boiled by ". The release post includes some pictures, but briefly: - old way Named captures in perl regex triggersĪnother one that’s been requested a few times finally makes its way into Mudlet thanks to the efforts of Mudlet’s newest member of the core dev team, Delwing.
MUDLET ALIASES INSTALL
You have been able to drag and drop Mudlet packages onto the Mudlet window to install them for a few versions, but now you can drag and drop a url from your web browser onto Mudlet and it will download and install the package for you. getWindowWrap(windowName)Īnother small one, but when formatting text it can be super helpful to get the wrap width of a console.

I use the backtick (`) as my lua alias since I use it so often. Italics/Bold/Underline in c/d/hechoĪn oft-requested feature, finally these formatting options are parsed in cecho, decho, and hecho. So with that being said, here are some of the more exciting bits out of the Mudlet 4.11 release. A lot of this is touched on in the release post as well but bears repeating or a bit more of a dive, and some of it didn’t make it to the highlights reel for that post but are worth a mention in my opinion. Regardless, one of the things I’d like to do with this blog is highlight various features of the client which I think are either under-utilized or are new in an effort to get the word out. I’d meant to get this post out over the weekend but that didn’t work out for various reasons. Meatspace asserts itself always, but sometimes more than others.
