Download Infobar 3.2 \ Graphical Status Bar for MUSHclient

Started by Agent_137, April 09, 2009, 02:51:29 PM

April 09, 2009, 02:51:29 PM Last Edit: October 19, 2024, 09:52:06 PM by Agent_137
Hot githlicker! If you use Mushclient you're gonna like this. It's an infobar (pictured below) that shows all your stats right below where you type, replacing the in-game status prompt.



### INSTALLATION INSTRUCTIONS ###

Step 1: Save this XML file and move it into the MUSHclient/Worlds/Plugins directory. Make sure it gets saved as XML and not plain text! Windows users may need to change the file type to "All Files" if "XML Document" is not already selected. If you get an error about saving in Program Files, feel free to save it in your documents folder or anywhere convenient.

Step 2: Load the plugin!
* Open MUSHclient
* Open the plugins menu (SHIFT+CONTROL+P)
* Click the "Add" button.
* Navigate to where you saved this file and select it.
* Close the plugins menu.

Step 3: Hop into your Armageddon character and send the install command: InstallInfobar , then try the other commands: ManaOn, ManaOff, and SwapInfobar. Yes these are all case sensitive.

Note: Your in game prompt values will no longer show in your logs. If you want that then you'll need to modify that value in the gag triggers in the plugin file. PM me if you want help with that.

### INFOBAR COMMANDS ###

* ManaOn - adds mana into your infobar
* ManaOff - hides mana from your infobar
* InstallInfobar - fixes your prompt after you die and make a new character
* SwapInfobar - swaps between the Detailed and Descriptive versions...
    Detailed is the default that's pictured at the top of this post. It offers a detailed list of numbers.
    Descriptive replaces the stat numbers with text that shows up when you drop below 65%. It looks like this:
        "You're hurting, exhausted, woozy, armed, mounted, and set for running. Also you're Fighting: Amos. It's late afternoon."

### UPDATE HISTORY ###

Version 3.3 (Jan 2022)
Add encumbrance and improve legibility and compactness.

Version 3.2 (September 2021)
Adds support for focus points - you will need to remove the existing version then re-run the installation steps below.

Version 3.1
New optional plugins for highlighting which are now defunct because the game has its own now.

Version 3.0:
Plugin installation
Open Source
One minute installation
Two different display options
Mana toggle
Font support in Linux

### UPDATE / UNINSTALL INSTRUCTIONS ###

Updating it as a plugin
* Go to plugins menu. Select it. Click Remove. Repeat installation process.

Uninstalling it as a plugin
* Go to the plugins menu. Select it. Click Remove.
* Fix your prompt to whatever you want. See the prompt help file for details.

Updating from the old non-plugin versions:
* Remove the old triggers (they start with ^PROMPT_. . .  )
* Re-install according to the instructions above, starting with Step 1.
* Hit control+shift+6 to open the scripting menu. Note it still has the old infobar script selected. You can now replace it or leave it. It's no longer needed.

Uninstalling from the old non-plugin versions:
* Remove the old triggers (they start with ^PROMPT_. . .  ).
* Use the prompt to set it to whatever you want. See the prompt help file for details.
* Hit control+shift+6 to open the scripting menu. Note it still has the old infobar script selected. You can now replace it or leave it. It's no longer needed.

### CREDITS ###

Originally a vbs script from Delirium. Testing by RogueGunslinger, Prodikus, and Iiyola.

### USER FEEDBACK ###

Quote from: RogueGunslinger on April 09, 2009, 02:53:05 PMI promote this.

Quote from: Feco on July 08, 2012, 08:01:23 PMJust wanted to say your status bar increased my love of Arm tenfold.

Quote from: FantasyWriter on January 29, 2010, 11:32:14 AMThis is truly awesome.

Makes cleaning up logs easier, makes keeping up with what's going on easier, makes things much more neat all around.

Quote from: Irulan on January 28, 2010, 02:55:47 PMThis info bar is really neat, and I've gotta give MAJOR kudos to Agent for helping me get it set up. He's a mushclient god, plain and simple.

Thanks Agent!

Quote from: Durant on September 19, 2009, 01:10:27 PMI've been using this awhile and must say it's great. Highly recommended!

Quote from: John on August 08, 2012, 02:37:58 AMI have not gone unconscious once from using the Way since I started using Agent 137's infobar.Would buy from again. A++

Quote from: LauraMars on July 22, 2013, 01:50:56 PMI just installed this.

It's amazing!  I'm excited.

Quote from: razorback on July 24, 2013, 04:55:33 PMInstalled...and I'll never use anything else. Descriptive is the best!

Quote from: adriannetwork on August 06, 2014, 03:06:39 PMBump. This is too awesome to let sink too low.

Quote from: Iiyola on October 06, 2021, 03:17:28 PMIts amazing and I never want anything else in my life anymore :D

Quote from: Katima on January 05, 2022, 01:07:20 PMStill as badass today as it was when I started using it in 2013 as a new player. I adored it as a player and I find its even surprisingly helpful when plugged in on my staffside avatar. Three cheers, Agent.


I've never used MUSHclient much but a few friends of mine use it and said there were cool addons for certain MUDs maps and stuff. I might check it out just for this, thanks for sharing.  ;) And MUSHclient only supporting 10 globally scoped vars hurts my brain..

Thanks for using LUA. It's the only scripting language that works under WINE.


This thread has got me wanting to install WINE on my macbook and see how that goes.

It took me 10 minutes to figure out that the reason it doesn't work was because I had an empty space in front of the pasted trigger. Just sayin' in case anyone else does the same thing :P

This thread should be archived ;)

Man.. I'm used to a 3-line prompt while playing Arm. This feels so weird. Kinda like carrying a heavy backpack everywhere, then not carrying it. Makes me feel naked.
Quote from: Rahnevyn on March 09, 2009, 03:39:45 PM
Clans can give stat bonuses and penalties, too. The Byn drop in wisdom is particularly notorious.

lol SMuz. Good man.

btw, customization requests are permitted until I get a backlog of them. So send your PMs now!

Quote from: Agent_137 on April 10, 2009, 02:42:18 AM
lol SMuz. Good man.

btw, customization requests are permitted until I get a backlog of them. So send your PMs now!
How about one that counts how many chalton boots you've gotten from corpses?
"Never was anything great achieved without danger."
     -Niccolo Machiavelli

lol. possible but i'll leave that one to you.

well, I could guess:

trigger:
^You (steal|get) the (.+) chalton boots from (.+)$
send to script: chaltonBoots

script:
chaltonBoots (thename, theoutput, wildcards)
if wildcards [1]&&[2]&&[3] then
write.appendChildNode.textNode("You ",wildcards [1], " some ",wildcards [2], " boots from ", wildcards[3], "!")
end
I just made up the write command. I don't know how to store stuff like that between sessions. and I might be mixing in javascript with my lua. I'm pretty new to this.

When I enable the trigger, the infobar shows up, but it keeps sending something to the game that is unrecognized (and invisible to me) so it comes back with >What? >What? >What?

I did everything in the thread, but Im not sure what is wrong.

it sounds like you put something in the send portion of the trigger. Make sure it's clean and you don't have an errant space or something. After that, PM if you are still having trouble.

I have this error:
Line   31: Value for attribute named 'site' not terminated (no closing quote) (problem in this file)
New Players Guide: http://gdb.armageddon.org/index.php/topic,33512.0.html


Quote from: Morgenes on April 01, 2011, 10:33:11 PM
You win Armageddon, congratulations!  Type 'credits', then store your character and make a new one

you have an old copy, mansa.  And you are using the "total mushclient" and not just this file linked in my original post for this thread. regardless, delete what you downloaded from me previously and get the latest.

I'd like a prompt that is this:

%n | %h(%H) %v(%V) %t(%T) | Speaking %o with a %a accent | You feel %O and the time is %e | %s

That could be up to 140 characters across the screen... but I play full screen anyways.
New Players Guide: http://gdb.armageddon.org/index.php/topic,33512.0.html


Quote from: Morgenes on April 01, 2011, 10:33:11 PM
You win Armageddon, congratulations!  Type 'credits', then store your character and make a new one

It works now. It was something in the send field. Thanks.
this is great.

Agent, you once posted a link to WINE for mac. I fail at GDB searching. Want to repost it here?

Quote from: http://wiki.winehq.org/MacOSX/InstallingMethod One: Prebuilt Binary

Since the apparent demise of the darwine project (no builds since wine 0.9.27 - mid 2006), another user has sprung up to continue developing the Darwine project (isn't free software grand?). This person builds prepackaged Mac ports of (Dar)Wine for Intel Macs. Currently, ports are being built OS X 10.4 and 10.5 (Tiger and Leopard), and the ports are in sync with the Wine source tree. This is probably the easiest way possible to install Wine on OS X.

Just download and install the latest Mac OSX application available from thisismyinter.net or kronenberg.org.

please note i don't have a mac and have never tested any of this on a mac.

If my laptop explodes, I'm still gonna blame it on you.

:-*

Wow... for being completely retarded when it comes to this sort've thing... that was VERY easy, thanks to your detailed steps.

I highly endorse this.  It's was an easy set up, and it looks neat.
After knocking back a mouthful of the contents of a full shot-glass, toking away on a rolled joint directly afterwards you say in desert-accented sirihish:
"They call me Tuber, and my son is Tuber-tot."

Hmm.. how about adding one where it displays language and accent?
Quote from: Rahnevyn on March 09, 2009, 03:39:45 PM
Clans can give stat bonuses and penalties, too. The Byn drop in wisdom is particularly notorious.

you'd have to change the prompt, the file itself, and the trigger, all to match. I'll eventually figure out one one for mansa and you that includes that, but if you have any regex experience at all you could probably figure it out sooner that I could.

Quote from: mansa on April 10, 2009, 11:50:19 PM
I'd like a prompt that is this:

%n | %h(%H) %v(%V) %t(%T) | Speaking %o with a %a accent | You feel %O and the time is %e | %s

That could be up to 140 characters across the screen... but I play full screen anyways.

With a little guide from Agent - which after a brief how-to and a lot of "OH"'s and "WAIT"'s  - I found it all rather simple to do... I've changed his infobar to look like this:



For something like that it would be following the same instructions, only changing the script in notepad and saving, IG prompt and trigger.

First: Let's Customize this file!!

Part A. Customize the colors of your HP, Stun, and Movement.
1. Scroll down to the code that looks like this:
if tonumber(wildcards [2]) < 40 then
InfoColour ("purple")
2. Freely change the number (40) and the color (purple) to match your character better.
3. There is one exception: The numbers must start out low and go higher.
4. For instance, if your health maxes at 100, you would want to change <72 to <60, <100 to <80, and <115 to <100.

Part B: Are you a magicker??
1. Go down to the Mana part of the code.
2. There you see the instructions on how to enable it in your infobar!
3. Not a magicker? Move to Part C.

Part C: Do you have any special visual considerations?
1. Add larger text:
a. Run a find and replace on this:
("Verdana",10,1)
b. Replace it with the exact same thing, except change 10 to the fontsize you want.
2. Change colors:
a. To change the default color from black to something else, find and replace this:
InfoColour ("black")
b. replace it with the exact same line, but with your preferred color.

Second: Getting the infobar installed!

Part A: Get your prompt correct in-game!
The infobar needs a certain prompt in-game to work.
So, here's the command for the right one:
prompt Mood:%O! %h %H %t %T %v %V %o %a %e %w %A %s\n>
                                      just enter that command in game and Part A is complete!

Part B:
Next we have to help MUSHclient find this very file you're looking at.
1. Move this file into the Mushclient scripts folder. That's usually this:
c:\Program Files\MUSHclient\Scripts.

2. go to the Game/Configure/Scripting menu.
3. Make sure the language is set to Lua (it's at the top)
4. Use the browse button to find this file. (you just moved it! Find it there.)
5. Make sure that "enable scripting) is checked.
6. Click OK to save your changes to the scripting tab.

Part C:
We need to make the infobar visible. Click the View menu and select the Infobar option.
This should create a gray bar below where you type in commands.
Part C complete!

Part D:
We have to create a trigger. This moves the info from your prompt to the code in this file.
1. Go to Game\Configure\Triggers
2. Click Add.
3. In the Trigger: field, paste this entire line below:
^.*?Mood:(.+)! (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\w+) (\w+) \b(unknown|before dawn|dawn|early morning|late morning|high sun|early afternoon|late afternoon|dusk|late at night|)\b (\w+) (\w+) \b(resting|sitting|standing|sleeping|fighting:.+)\b

                       4. Now check these boxes:
Omit from Output
Keep Evaluating
Regular Expression
Omit from Log (optional)
5. Most importantly, find the Script: field and enter infobar into the blank.
(this tells the trigger where to send the stuff it finds in your prompt.)
6. Click OK to save the trigger.
7. Click OK again to go back to your game window.
Part E:
1. Close this file and play!
2. Be sure to save any changes.
3. MUSHclient may ask you to "reload the script." Click yes!
4. Now on your next prompt you'll see that the prompt is gone and the infobar fills out!
5. If you have any trouble or questions: PM Agent_137 on the zalanthas.org boards.

Programmers: i think MushClient can only handle 10 global variables. So you can't add more. :(
Credits: Originally a vbs script from Delirium. Heavily modified & commented on by Agent_137. Testing by RogueGunslinger and Prodikus.
--]]

function infobar(thename, theoutput, wildcards)

InfoClear ()
InfoBackground ("wheat")

--Mood - Just add -- before each of the 3 lines below if you don't care about mood.
InfoColour ("black")
InfoFont ("Verdana",8,1)
Info (wildcards [1] , " | ")

--HP
if tonumber(wildcards [2]) < 40 then
    InfoColour ("purple")
elseif tonumber(wildcards [2]) < 72 then
    InfoColour ("firebrick")
elseif tonumber(wildcards [2]) < 100 then
    InfoColour ("darkorange")
elseif tonumber(wildcards [2]) < 133 then
   InfoColour ("darkgreen")
else
   InfoColour ("black")
end
Info (wildcards [2], "/" , wildcards [3], "(hp) ")

--Stun
if tonumber(wildcards [4]) < 50 then
    InfoColour ("firebrick")
elseif tonumber(wildcards [4]) < 100 then
    InfoColour ("darkorange")
elseif tonumber(wildcards [4]) < 132 then
   InfoColour ("darkgreen")
else
   InfoColour ("black")
end
Info (wildcards [4], "/" , wildcards [5], "(st)  ")

--Mana. Just remove the -- on each of the 3 lines below to add it back into your infobar.
--InfoFont ("Verdana",10,1)
--InfoColour ("black")
--Info (wildcards [6] , "(mn)  ")

--Movement
if tonumber(wildcards [6]) < 40 then
    InfoColour ("firebrick")
elseif tonumber(wildcards [6]) < 75 then
    InfoColour ("darkorange")
elseif tonumber(wildcards [6]) < 126 then
   InfoColour ("darkgreen")
else
   InfoColour ("black")
end
Info (wildcards [6], "/" , wildcards [7] , "(mv) ")

--Spacing
InfoColour ("black")
Info ("| You are speaking ")

--Language  - Add more as you like I just did two.
InfoColour ("black")
    if wildcards [8] == "sirihish" then
InfoColour ("magenta")
   elseif wildcards [8] == "mirukkim" then
InfoColour ("purple")
    elseif wildcards [8] == "allundean" then
       InfoColour ("blue")
     elseif wildcards [8] == "cavilish" then
       InfoColour ("green")
      elseif wildcards [8] == "bendune" then
      InfoColour ("red")
end
Info (wildcards [8] , " ")

--Spacing
InfoColour ("black")
Info ("in ")

--Accent
InfoColour ("black")
   if wildcards [9] == "northern" then
      InfoColour ("red")
    elseif wildcards [9] == "southern" then
       InfoColour ("purple")
     elseif wildcards [9] == "tribal" then
       InfoColour ("blue")
end
Info (wildcards [9] , " ")

--Spacing
InfoColour ("black")
Info ("accent | ")

--Time of Day
InfoColour ("black")
if wildcards [10] == "dusk" then
       InfoColour ("firebrick")
   Info (wildcards [10] , " ")
elseif wildcards [10] == "late afternoon" then
       InfoColour ("darkorange")
   Info (wildcards [10] , " ")
elseif wildcards [10] == "unknown" then
Info ("underground", " ")
elseif wildcards [10] then
InfoColour ("black")
Info (wildcards [10] , " ")
end

--Spacing
InfoColour ("black")
Info ("| ")

--Walking/Running Status
InfoColour ("black")
if wildcards [11] == "running" then
       InfoColour ("firebrick")
elseif wildcards [11] == "sneaking" then
       InfoColour ("darkorange")
end
Info (wildcards [11] , " ")

--Spacing
InfoColour ("black")
Info ("| ")

--Armed/Unarmed Status
InfoFont ("Verdana",8,1)
InfoColour ("black")
if wildcards[12] == "armed" then
       InfoColour ("firebrick")
elseif wildcards[12] == "unarmed" then
        InfoColour ("black")
end
Info (wildcards[12] , " ")

--Spacing
InfoColour ("black")
Info ("| ")

--Position. I.e. Standing or Fighting:Target Status
InfoColour ("black")
    if wildcards [13] == "Fighting" then
InfoColour ("firebrick")
   elseif wildcards [13] == "sleeping" then
InfoColour ("darkorange")
   elseif wildcards [13] == "resting" then
InfoColour ("darkblue")
   elseif wildcards [13] == "sitting" then
InfoColour ("darkgreen")
end
Info (wildcards [13] , " ")



end




Just copy and paste what's in there into your file that you've already downloaded.  Follow steps in parts A and D in section "Second: Getting the infobar installed!"

Only problem I can forsee is when my characters start fighting something it will run off my screen and I won't be able to see all of it.  To fix this matter I will personally be adjusting my font sizes, but that's pretty much it.  (PLEASE NOTE:  The various changes in position and language on this one have been tested, what I was not able to test was my prediction on the fighting matter.)
After knocking back a mouthful of the contents of a full shot-glass, toking away on a rolled joint directly afterwards you say in desert-accented sirihish:
"They call me Tuber, and my son is Tuber-tot."

Yay, it works! Haha, I don't really care what it displays when I'm fighting something.. all I want to see is "fighting..."

Hmm.. maybe I should try making my own customizations :D
Quote from: Rahnevyn on March 09, 2009, 03:39:45 PM
Clans can give stat bonuses and penalties, too. The Byn drop in wisdom is particularly notorious.

April 23, 2009, 08:39:25 AM #24 Last Edit: April 23, 2009, 09:36:02 AM by alicedavignon
Seems like there are some encoding issued under WINE. A pity really. :(