Help Popup Module for Mudlet

TetchtaTetchta Member Posts: 570 ✭✭✭✭
edited April 21 in Tech Talk
Hey guys,

One of my favorite, and I mean favorite features of Nexus is that, if you look up a help file, it pops up in its own separate window. this makes reading files a snap. Instead of painfully scrolling up while bashing to try and read, you can literally just have a liddle window that overlays over everything and can be moved around at your convenience.

When I first started getting into coding, I really wanted to emulate this feature, but it turns out it's surprisingly tricky to make work. Instead of piping help text into the GMCP table, Nexus instead uses a proprietary GMCP flag to remove the page length limits on generic help files, and then individually copy-pastes each line in the help file into the window and then deletes it from your screen. It's a pain, and a bit goofy, but it works. I gave up on that project then, but came back to it now that I'm better at coding. A year later, I'm like, "Hey, I'm just dangerous enough to copy multiple lines and delete them." And mostly that's because I already had the code in my system to do that, because I shamelessly stole it verbatim from @Lin.

Anyway, if you want it, here it is, a help popup window that's very similar to Nexus. It's actually better in some ways--mainly in that, since it's a UserWindow in Mudlet, you can actually move it all the way off your mudlet main window and completely out of the way. It works with MXP clickables, and I think I got all of the bugs out:


There are a few settings you might want to tweak in the help_grabber script, mainly setBackgroundColor() setting if you have a color other than black as your background (it uses RGBA format), and setWindowWrap() if you find you want it to be narrower or wider to your tastes.


Other than that, I think this should be plug-and-play with any system out there, providing the system in question isn't already scraping command strings for help messages.
"We're taught Lord Acton's axiom: all power corrupts, absolute power corrupts absolutely. I believed that when I started these books, but I don't believe it's always true any more. Power doesn't always corrupt. What I believe is always true about power is that power always reveals. When you have enough power to do what you always wanted to do, then you see what the guy always wanted to do."
-Robert Caro
ArchelausLinMazzionZeheiaValorieGavramel

Comments

  • TiurTiur Producer Member, Administrator, Immortal Posts: 1,126 admin
    This is pretty cool, thank you for making it and sharing.
    Tetchta
Sign In or Register to comment.