Author Topic: Mudlet Graphical Prompt  (Read 4751 times)

azuriolinist

  • Posts: 438
Mudlet Graphical Prompt
« on: May 09, 2018, 08:50:21 AM »

Updated 2019-02-05: Added an equipment button next to the inventory button (arm_gui); added a 'riposte' button to the prompt, which toggles between normal and riposte stance (arm_gui/arm_prompt); included mapping script in arm_prompt.

I've been tinkering with Mudlet for a bit and got this prompt bar up. I'm planning on writing a mapping script to go along with it (some day) and to (potentially!) combine the two into a profile resembling a GUI for Mudlet.

Installing it should be fairly straightforward besides the font and the background colors.


Installation
Paste one of these one-liners into Mudlet to install the package:

Prompt
Code: [Select]
lua function d(a,b)if not b:find("arm_prompt",1,true)then return end installPackage(b)os.remove(b)cecho("<lime_green>Package installed!\n")end registerAnonymousEventHandler("sysDownloadDone","d")downloadFile(getMudletHomeDir().."/arm_prompt.zip","https://github.com/armageddon-mudlet/armageddon-mudlet/raw/master/arm_prompt.zip")
Complete GUI
Code: [Select]
lua function d(a,b)if not b:find("arm_gui",1,true)then return end installPackage(b)os.remove(b)cecho("<lime_green>Package installed!\n")end registerAnonymousEventHandler("sysDownloadDone","d")downloadFile(getMudletHomeDir().."/arm_gui.zip","https://github.com/armageddon-mudlet/armageddon-mudlet/raw/master/arm_gui.zip")
Alternatively, if that doesn't work, use the links below to download the package. Open Mudlet and navigate to the Package Manager (this is also found under Toolbox > Package manager).

Press Install and select the downloaded .zip file.


Setup
Setting the prompt
In order to get the prompt working, set your prompt by typing the following:
Code: [Select]
setprompt
Setting the background color
Because Mudlet does not (AFAIK) support setting the background color through a script, you will have to set it yourself through the preferences.

In the Profile preferences window, open the tab Color view and change the background colors (Background, Command line background, and Command background) to #16130F.


Mapping
To begin mapping, enter start mapping <area name>. Also make sure that you have brief exits off. Room exits should look like [N, E, S, W], rather than [NESW].

Fundamental Aliases
  • start mapping <optional area name> - use this command to start adding new content to the map, area name is required if there are no rooms in the map
  • stop mapping - use this command to stop mapping
  • save map - saves the map to a file (map.dat, located in the profile folder), this is generally only needed to share the map with someone else, or to act as a backup in case something happens to the map that Mudlet maintains for your profile
  • load map <optional 'local'> - loads the map from the location specified in the download_path, or from the local copy
  • export area <area name> - exports a file to the profile folder with data for the named area
  • import area <area name> - imports area data from a file created with export area, must be located in profile folder
Aliases
  • map mode <simple, normal, or complex> - sets the mapping mode, determining what exits are set automatically as you move around
  • set area <area name> - move the current room into the named area, area will be created if it does not currently exist
  • shift <direction> - use this command to move the room you are currently in around on the map
  • merge rooms - use this command to combine the room you are in with any other rooms in the same location and with the same name
  • clear moves - use this command to clear the move queue after you attempt a move that doesn't succeed, but for which there is no trigger indicating this with the onMoveFail event
  • add door <direction> <optional none, open, closed, locked> <optional yes, no> - adds a door in the given direction, defaulting to closed (use none to remove a door), and defaulting 'no' for one-way status
  • add portal <entry command> - adds a portal that uses the given command for entry. To force this command to create a new room, rather than linking to an existing one, put -f before the entry command, like this: add portal -f enter portal
  • set exit <direction> <roomID> - sets the given direction to connect, one way, to the room with the specified roomID, used for very complex areas. To set the destination room for a portal, put -p before the portal entry command like this: set exit -p enter portal 1124
Normal User Aliases
  • find me - use this command to search the entire map to try to locate you based on room name and exits. Typically not necessary, as this will be done anyway if a person moves and their location is unknown
  • find path <room name> OR <room name> ; <area name> - used to find a walking path to a room with the given name, in the given area if specified
  • set character <name> - sets the current character name (stored as map.character)
  • set recall - sets the current room as the recall room for the current character



If you have any feedback, that'd be greatly appreciated!

Download links
arm_prompt.zip
arm_gui.zip
« Last Edit: February 07, 2019, 10:19:52 PM by azuriolinist »

chrisdcoulombe

  • Posts: 1224
Re: Mudlet Graphical Prompt
« Reply #1 on: May 09, 2018, 12:43:10 PM »
Tek has 930 hp no wonder
Quote from MeTekillot
Samos the salter never goes to jail! Hahaha!

Jihelu

  • Posts: 2669
Re: Mudlet Graphical Prompt
« Reply #2 on: May 09, 2018, 04:51:37 PM »
This is very cool

So I uninstalled it for a moment and this seems to be stuck, how do I get rid of this massive gap?

https://imgur.com/a/EFqNSVP
« Last Edit: May 09, 2018, 05:23:37 PM by Jihelu »

chrisdcoulombe

  • Posts: 1224
Re: Mudlet Graphical Prompt
« Reply #3 on: May 09, 2018, 05:17:38 PM »
Okay what am I doing wrong, its not gagging the prompt or putting the prompt into the boxes.
Quote from MeTekillot
Samos the salter never goes to jail! Hahaha!

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #4 on: May 09, 2018, 09:22:41 PM »
So I uninstalled it for a moment and this seems to be stuck, how do I get rid of this massive gap?

https://imgur.com/a/EFqNSVP

Huh, it must have saved the border setting. Open up Preferences and click on the Main display tab. You can set the size of the Display border through there (so you probably want Border bottom height at 0).

Okay what am I doing wrong, its not gagging the prompt or putting the prompt into the boxes.

Praise Tektolnes!

Also, huh. Did you try setting your prompt to %h/%H|%v/%V|%t/%T|%m/%M|%A|%w|%S|%a|%o|%d|%e|%E|%p|%P|%O|%n>?

Jihelu

  • Posts: 2669
Re: Mudlet Graphical Prompt
« Reply #5 on: May 09, 2018, 09:26:59 PM »
Thanks!

Occasionally, I'll enter a room and it wont give the description of the room. Just "You are in x room [N, E, S] and no description. This, of course, only happening when using your prompt.

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #6 on: May 09, 2018, 10:02:44 PM »
That's odd. Thanks for pointing it out! I'll try to pin that down.

chrisdcoulombe

  • Posts: 1224
Re: Mudlet Graphical Prompt
« Reply #7 on: May 10, 2018, 12:04:47 PM »
Whoops that had character info in it.
« Last Edit: May 10, 2018, 12:10:46 PM by chrisdcoulombe »
Quote from MeTekillot
Samos the salter never goes to jail! Hahaha!

chrisdcoulombe

  • Posts: 1224
Re: Mudlet Graphical Prompt
« Reply #8 on: May 10, 2018, 12:11:41 PM »
And yeah I put the prompt in.  I did a screen shot and posted it and then realized it had my character info in it so I deleted it.
Quote from MeTekillot
Samos the salter never goes to jail! Hahaha!

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #9 on: May 10, 2018, 01:42:16 PM »
Weird. How did you go about installing the package? Version shouldn't a problem AFAIK (unless your at any version before 3.0), but what version are you at?

There should be a catchprompt trigger in the Triggers area, too. Mind checking out if it's in there?

I appreciate your feedback a lot, by the way! <3

chrisdcoulombe

  • Posts: 1224
Re: Mudlet Graphical Prompt
« Reply #10 on: May 10, 2018, 03:19:30 PM »
Hmm, I installed it using the package manager, Maybe thats what it is the catch promt trigger.  Yeah Version 3.0.  I installed my old one back, but I wanted to check yours out.  I will try again and check the Catch trigger.
Quote from MeTekillot
Samos the salter never goes to jail! Hahaha!

chrisdcoulombe

  • Posts: 1224
Re: Mudlet Graphical Prompt
« Reply #11 on: May 10, 2018, 07:47:04 PM »
I got it I didn't close the prompt with >
Quote from MeTekillot
Samos the salter never goes to jail! Hahaha!

chrisdcoulombe

  • Posts: 1224
Re: Mudlet Graphical Prompt
« Reply #12 on: May 10, 2018, 08:15:29 PM »
The pics of the sword, the boot, the chest and the clock are not showing now.
Quote from MeTekillot
Samos the salter never goes to jail! Hahaha!

stoicreader

  • Posts: 135
Re: Mudlet Graphical Prompt
« Reply #13 on: May 10, 2018, 10:20:16 PM »
OooOO I can't wait to try it!
Meh

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #14 on: May 10, 2018, 10:47:55 PM »
The pics of the sword, the boot, the chest and the clock are not showing now.

Darn it. Mind trying to reinstall it from the .zip file?

stoicreader

  • Posts: 135
Re: Mudlet Graphical Prompt
« Reply #15 on: May 16, 2018, 05:35:40 PM »
Everything works, but the prompt is WAY too small. I got  a keyboard just now for my Surface Pro.
Meh

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #16 on: May 17, 2018, 05:10:01 AM »
Everything works, but the prompt is WAY too small. I got  a keyboard just now for my Surface Pro.

Awesome! Mind showing how it looks on your screen (during startup, so no one sees any sekrit details)? I was hoping to make the prompt info easy to absorb, but not take too much attention from the MUD's text on the main window.

Pheo

  • Posts: 4
Re: Mudlet Graphical Prompt
« Reply #17 on: May 18, 2018, 11:51:38 AM »
The pics of the sword, the boot, the chest and the clock are not showing now.

Darn it. Mind trying to reinstall it from the .zip file?

This appears to be happening on Windows.
getMudletHomeDir() returns a string with backslash ('\')
:setStyleSheet mandates use of forward slash ('/')

Dirty change to getMudletHomeDir():gsub('\\', '/') does the trick for me.

Many many thanks for sharing this.

stoicreader

  • Posts: 135
Re: Mudlet Graphical Prompt
« Reply #18 on: May 18, 2018, 10:47:01 PM »

Everything works, but the prompt is WAY too small. I got  a keyboard just now for my Surface Pro.

Awesome! Mind showing how it looks on your screen (during startup, so no one sees any sekrit details)? I was hoping to make the prompt info easy to absorb, but not take too much attention from the MUD's text on the main window.

I had a beloved character lose connection on his final march to the arena. So I was stored by the staff. :(

Before I discovered it was my child playing with one of our routers I uninstalled mush client and bought a keyboard for my surface pro 3 tablet. This solved my travel problem but created a mudlet problem.

Surface pro 3 and mudlet are not friends. Every thing is out of proportion. QuickBooks too among other programs that don't scale to different resolutions well.

I tried changing the resolution, but nothing works. I can't even make alias triggers or gags because the font and box sizes aren't proportional.

For example "name" for alias tool says "ame" because the box is so squished. Don't yet know how to do screenshots on surface pro. My keyboard doesn't have a print screen button.
Meh

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #19 on: May 19, 2018, 07:36:05 AM »
The pics of the sword, the boot, the chest and the clock are not showing now.

Darn it. Mind trying to reinstall it from the .zip file?

This appears to be happening on Windows.
getMudletHomeDir() returns a string with backslash ('\')
:setStyleSheet mandates use of forward slash ('/')

Dirty change to getMudletHomeDir():gsub('\\', '/') does the trick for me.

Many many thanks for sharing this.

Huh. I see. Thanks for letting me know! I wonder if there's a way to handle that through the package so it's compatible throughout OSes.

...

I'm so sorry to hear about your character. I've felt the same. Also, what you said about mudlet may be good feedback to forward to Mudlet's developers. They may look into it!

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #20 on: May 19, 2018, 09:19:59 PM »
Updated to use :gsub on the image stylesheets, as Pheo mentioned above. Hopefully that works out the kinks on Windows.

kroack

  • Posts: 4
Re: Mudlet Graphical Prompt
« Reply #21 on: July 05, 2018, 04:18:52 PM »
This creation is splendid, good work.

Inky

  • Posts: 218
Re: Mudlet Graphical Prompt
« Reply #22 on: July 10, 2018, 04:49:28 PM »
This is really useful.

What would also be really sweet is an auto-updating inventory and equipment list. If that's even possible.

azuriolinist

  • Posts: 438
Re: Mudlet Graphical Prompt
« Reply #23 on: July 11, 2018, 01:14:29 PM »
I have been meaning to add a couple more things. I haven't been able to figure out the mapper, though. One of these days, I'll strap myself down to it.

Putting in an auto-updating inventory and equipment list proved to be really hack-y. I tried having Mudlet send "i" and "eq" to the MUD every time the prompt showed up. Kept running into the risk of it becoming an endless loop of "i"s and "eq"s, what with the prompt showing up after the inventory/equipment list.

Went with timers, instead, and manually updating the inventory/equipment list by typing in the commands. Also, I changed the look to incorporate more graphics. The color of the time of day now adjusts according to said time, while the weight bar also adjusts depending on how heavy it is. I was jealous of RiftTalon's MUSHClient set-up. Sue me!



Feedback's always appreciated. You can download the package here. Same instructions as those in the OP to set it up.

deskoft

  • Helper
  • Posts: 379
Re: Mudlet Graphical Prompt
« Reply #24 on: July 11, 2018, 02:20:54 PM »
Goodness, I always wished I could code stuff like this...