Infobar for Mudlet

Started by Cutthroat, October 02, 2013, 08:49:58 PM

October 02, 2013, 08:49:58 PM Last Edit: October 03, 2013, 07:58:29 PM by Cutthroat
I made a small package for mudlet. I've been working on it on and off for a while, and basically learned how to program mudlet triggers/scripts while working on it. Someone more knowledgeable can probably improve on it greatly. It covers the basics.



The main feature is an Infobar with the following:
- HP/MV/ST/MA gauges
- movement speed (shows white when walking, red otherwise)
- time of day (changes color based on day/night)
- encumbrance (changes color based on encumbrance)
- position (changes color if not standing)
- armed status (changes to red if armed)
- language & accent (changes to red if not the default/"preferred" language, set by the player)
- timer (shows how long you've been logged in).

There are a few smaller features.
- Skill list colored by skill level
- Room title when you "look" is bolded and underlined
- Typing "time" converts the year/Age to a four digit number, and will show something like:  "In the Year of Lirathu's Slumber, year 11 of the 22nd Age. (1628)"
- Echoes from playing darts will show the the score of a dart according to normal rules, e.g. "A colorful dart landed in the Slave Ring. (1)"

Installation instructions:
- Download the package, MudletArmPackage.trigger.xml, here: https://www.dropbox.com/s/vmlss5nk3e5m6rx/MudletArmPackage.trigger.xml
- Click the Triggers button in Mudlet, then the Import button (downward-pointing green arrow).
- Go to where you downloaded the package and select it.
- Enter this command for a prompt:

prompt %h/%H/%v/%V/%t/%T/%m/%M/%A/%w/%S/%a/%o/%e/%E/%n\n

Yes, it is messy. But don't worry - if the script works correctly, it won't show.

- Go into the script by clicking the Script button, going into MudletArmPackage and selecting ArmGui. On lines 85 and 86 you'll see this:
defaultAccent = "northern"
defaultLanguage = "sirihish"

Change this to whatever accent/language your character normally speaks. The language portion of the infobar will change to red if you are not speaking this accent/language combination. Handy if you switch a lot and tend to make a mistake about what language you are speaking.

Download Link

Feel free to ask any questions and I'll do my best to help (or let me know if it works for you, because that would be good to hear.)

OMG, THANK YOU!
Fredd-
i love being a nobles health points

Cutthroat You are AWESOME Thank you so much!!!!!!!!!!!!!!!!!!!!!!!!
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

Wow. Good work.  Is there any simple way to change the color of the bolded part of the combat text like we can with mushclient? That is really still the only thing keeping me from using this mudlet, changing the color settings don't quite work for incoming bolded text.

Okay, a few things.

1) Are you aware of a way to make the fields large and the font a bit larger?
2) Is taking out something like mana as easy as changing the prompt and removing that line of code?
3) I don't see my PCs name, its in the prompt. Where should it show it?

Overall this is really nicely done. I would like to just make the above tweaks and I would be very very very happy.
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

Quote from: slvrmoontiger on October 03, 2013, 01:35:14 AM
Okay, a few things.

1) Are you aware of a way to make the fields large and the font a bit larger?
2) Is taking out something like mana as easy as changing the prompt and removing that line of code?
3) I don't see my PCs name, its in the prompt. Where should it show it?

Overall this is really nicely done. I would like to just make the above tweaks and I would be very very very happy.

1) I'm not sure. That is something I can look into though.
2) It should be that easy, yes. I wanted a feature where you can change whether you see your mana bar, but it was clunky. I may try to add that feature in a second version.
3) I didn't set it up to show the name. (I did before, but it looked weird with everything else. That's why it's left in the prompt but not the infobar. It may be in a second version.)

I'm glad you like it!

Quote from: Blur on October 03, 2013, 12:13:25 AM
Wow. Good work.  Is there any simple way to change the color of the bolded part of the combat text like we can with mushclient? That is really still the only thing keeping me from using this mudlet, changing the color settings don't quite work for incoming bolded text.

Thanks. I have some combat colors that work pretty well, and had no problem changing color of bolded text (or bolding and coloring text). The general format for coloring would be something like this:

You deftly block (.*)'s attack. [select perl regex on the side]

The meat of the trigger would be this:

selectString(matches[1], 1) --selects the whole line for the following commands
fg("green") --colors it green
setBold(true) --makes it bold if you want it to be, you can delete this line otherwise
resetFormat() --makes it so that future lines are the normal color

You can set it up to your own taste.


If anyone is getting problems with things getting cut off, you may have to change your prompt slightly by adding \n at the end. In other words:

prompt %h/%H/%v/%V/%t/%T/%m/%M/%A/%w/%S/%a/%o/%e/%E/%n\n

Sorry for the thread necromancy, but I'm having issues here.. I followed the instructions in the original post to the letter, but it looks like the infobar isn't loading 100% correctly for me in Mudlet. I import the trigger, then in Arm I enter: prompt %h/%H/%v/%V/%t/%T/%m/%M/%A/%w/%S/%a/%o/%e/%E/%n\n

However, the infobar doesn't seem to activate. I get the info dump from the server, but it's just displayed as plaintext. Thinking I may have imported the file incorrectly, I tried it again -- only to be told that I can't import it again, since it's already installed.

Is there something special I have to do to activate it? When I open the Triggers/Scripts menu, I can't even see that the file has been installed anywhere.

That's weird. Try opening Mudlet and clicking the package manager button (Cardboard box button at the top). Do you see "MudletArmPackage" there? If so, try clicking it, click Uninstall. Either way, click Install and select MudletArmPackage from where you downloaded it.

Quote from: Cutthroat on July 06, 2014, 08:50:25 AM
That's weird. Try opening Mudlet and clicking the package manager button (Cardboard box button at the top). Do you see "MudletArmPackage" there? If so, try clicking it, click Uninstall. Either way, click Install and select MudletArmPackage from where you downloaded it.

Yep, it showed up in the Package Manager. When I highlighed it and clicked Install, it said that it already was installed. In the end I just uninstalled it and I guess I'll just have to live without  :-\

For me I had to quit out of mudlet and come back into it in order for the infobar to activate the first time. You might also go through the triggers and scripts and make sure everything is enabled. It might not have automatically enabled everything.
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

Looks to me like the script is no longer on the download host, I had the same issues as you and then when I opened the file in text editor it was replaced by some dropbox info?
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean? It's a mystery, and that's why so is mankind.

And the solution just like that... I right click -> downloaded rather than went to the page and saved it.

As soon as I went to the page, saved it, then imported it worked like a charm.

Thanks!
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean? It's a mystery, and that's why so is mankind.

Quote from: Durant on July 08, 2014, 12:06:02 PM
And the solution just like that... I right click -> downloaded rather than went to the page and saved it.

As soon as I went to the page, saved it, then imported it worked like a charm.

Thanks!


Wow, that was a simple solution. Did this and it works perfectly. Dumb Dropbox.

At any rate, thanks! The infobar rules.

September 29, 2014, 04:36:08 PM #15 Last Edit: September 29, 2014, 05:39:05 PM by creeper386
Don't know if anyone is still paying attention to this or if there is a better option.

But my prompt still shows onscreen even with the infobar showing up properly.

[EDIT]

Never mind. Removed the profile and started over. Not sure what caused it ... Wonder if I messed up on typing southern for accent.
21sters Unite!

When i installed this i got 4 coloured rectangles and when i typed: prompt %h/%H/%v/%V/%t/%T/%m/%M/%A/%w/%S/%a/%o/%e/%E/%n\n it shown this: 123/123/138/138/111/111/103/103/unarmed/walking/standing/tribal/sirihish/late at
night/light/Oskandrenill WHAT DID I DO WRONG???

Yeah I haven't figured it out. It worked once. As soon as I closed mudlet and reopened it, it didn't show all the infomration and the massive prompt showed up again.

I'd really like it to work but if someone closing and reopening mudlet would require me to delete the profile and put the script back in, I'm out.
21sters Unite!

Quote from: Piotrhabera on October 03, 2014, 06:25:23 PM
When i installed this i got 4 coloured rectangles and when i typed: prompt %h/%H/%v/%V/%t/%T/%m/%M/%A/%w/%S/%a/%o/%e/%E/%n\n it shown this: 123/123/138/138/111/111/103/103/unarmed/walking/standing/tribal/sirihish/late at
night/light/Oskandrenill WHAT DID I DO WRONG???

Can't answer your problem with the four rectangles (I don't use MUdlet), sorry.

But for the prompt, you didn't do anything really wrong. It looks like you just formatting your prompt with almost every variable possible!

http://www.armageddon.org/help/view/Prompt

Take another look at the various options you have for your prompt, you might find some you don't really need. For example, you're probably not playing a magicker so you have no need for mana to show in your prompt. You can also save space by cutting out your maximum Health, Stamina and Stun inputs (%H and %V and %T). Just familiarize yourself with your maximum values, and know that getting down low on any of them is bad bad bad!

Here's a simple sample prompt that'll show your current amount of health, stamina, stun, time and encumbrance levels.

prompt: %h/%v/%t/%d/%E

You'll almost never need everything available through the prompt command to be displayed at one time. As you get more accustomed to the game, you might find yourself not needing the reminder. And some characters just won't need to worry about certain things: a non-magicker (or "mundane" we call them) won't need to know his mana, a person with only one accent available won't need to be reminded what accent he's using, et cetera.

Hope this helps!

Just a heads up, the prompt he has set if if you read OP is a prompt specifically for the Mudlet Inforbar ... Which this thread is about.
21sters Unite!

As long as you make sure to save the prompt every time you quit it should work fine every time you open mudlet up. I've never had a problem with this. Now when you first open Mudlet and log into game you have to do something for it to get the prompt and get it's bearings sometimes so do a look or walk in a direction and everything should fill in. If it's not working and you're not getting the bar than more than likely it's not enabled. So go into triggers and scripts and make sure it's enabled and try again.
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

Yeah. See when I set it up it works fine. When I exit. I save profile. When I reload game it shows the four colored infobars. I enter game it refreshes. But doesn't provide information such as standing or what I'm speaking etc. Nor does it delete the prompt the prompt still shows. So I don't know what's up with it. I think I just give up.
21sters Unite!

Not really sure. Make sure that the prompt is exactly as stated in the OP's post.
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.