Mushclient Infobar Plugin - WIP

Discussion of MUD clients, plugins, the website, and other technical stuff.
Post Reply
Beargasm
Posts: 5
Joined: Mon Mar 20, 2023 1:33 am

Mushclient Infobar Plugin - WIP

Post by Beargasm »

Hello! I have been tweaking an infobar plugin that I used to use on Armageddon, written by Robert Pate.

It pulls the prompt from the text of the game and moves it to the bottom of the client, making your text area one line less spammy. The original plugin for Armageddon would send a command that customized your prompt and then parsed it - Cogg's prompt is dynamic and I have had to use some creative regex to get it working. Right now, I have it barely running - but I could use some help.

The infobar adds color to the text depending on how far from optimal the value is - low energy, full experience bucket, low nutrition - these are all shades of red. What I don't know is how Encumbrance and Balance scale. If anyone could give me ballpark values of badness, I can tweak them appropriately.

I have not seen my risk level change, so if someone could post an example so I see where in the order it falls, and ranges of badness, I can add that as well. Same for sanity.

The last one that was a surprise was environmental? I noticed I became drenched at some point, so if anyone could give me an idea of other terms that might fill that spot it would be very helpful.

Any other things that may dynamically pop up into the prompt as well would be helpful to know.

Right now, when a variable I have not accounted for appears in the prompt, it breaks the trigger and the prompt shows up back in game text. As soon as I have an idea of all potential prompt variables, their order in prompt (hidden or not) and some ranges - I will post a download for the plugin.

Like the original, I will be adding a descriptive version - which replaces all number values with flavored text descriptions.

Image
User avatar
Volinn
Posts: 85
Joined: Wed Jul 20, 2022 2:51 am
Location: Texas

Re: Mushclient Infobar Plugin - WIP

Post by Volinn »

Nice! Looking forward to it.
Navi
Posts: 350
Joined: Sat Apr 18, 2020 7:07 am

Re: Mushclient Infobar Plugin - WIP

Post by Navi »

One in game system you might find useful is the pluginator system.
Type pluginator to turn it on. It will give you direct values for everything including wound location values.
I released a simple plugin somewhere on the BBS for Mushclient if you want to use it and improve it.
wander without wanting, thrust into lands unknown. the shadows shift and change, and the worlds with them.
I'm not a soldier but I'm fighting
Can you hear me through the silence?
I won't give up 'cause there will be a day
We'll meet again
Beargasm
Posts: 5
Joined: Mon Mar 20, 2023 1:33 am

Re: Mushclient Infobar Plugin - WIP

Post by Beargasm »

Pluginator was a huge help. Now I can pull the numbers from a non-dynamic prompt! I ended up using a trigger to parse pluginator, and then a second trigger to grab combat mode, position, and whatever field the 'drenched' status came from.

Will continue tweaking and I'll start the descriptive prompt.
Gorth
Posts: 581
Joined: Sat Nov 13, 2021 11:53 am
Location: Michigan

Re: Mushclient Infobar Plugin - WIP

Post by Gorth »

a lot of these variables you request don't particularly scale from zero to one-hundred, so it's difficult to really shade them on some simple curve. However:
Encumbrance negatively affects defense rolls (dodge/block/parry) at different levels of severity. A lot of builds get affectively hamstrung by having two or above encumbrance. Perhaps about two is a good time to start coloring bad.
- Risk goes up fast, and stops displaying a number with the RISK command about at one-hundred, but I think Pluginator at least displays it regardless of number. Risk is more severe for Nightblade than any other stealth build, and starts being a problem around fifty or so. Otherwise normal builds hurt around 100, maybe? I'd compremise at about 65 or 75.

Otherwise, the prompt is very nebulous and a lot of things, like disguised, will often pop on and off. I'd recommend making the function safe for invalid input (Which you should be doing in most cases anyway). Not a huge worry, though, because the prompt is a weird thing.
:undm_scales_key: :shagerd:
Proud owner of the ten thousandth post.
Beargasm
Posts: 5
Joined: Mon Mar 20, 2023 1:33 am

Re: Mushclient Infobar Plugin - WIP

Post by Beargasm »

These are my current values, any suggestions on cutoffs?

Code: Select all

 -- Round Time
    if (CurrentRT) 	> 20 then    crimson
    elseif (CurrentRT) 	> 15 then    firebrick
    elseif (CurrentRT) 	> 10 then    darkorange
    elseif (CurrentRT) 	> 5  then    darkgreen
    else black

	
	-- Travel Time

    if (CurrentTT) 	> 20 then    crimson
    elseif (CurrentTT)	> 15 then    firebrick
    elseif (CurrentTT)	> 10 then    darkorange
    elseif (CurrentTT) 	> 5  then    darkgreen
    else black



    -- Current Energy
    if (CurrentEnergy/MaxEnergy) 	< 20/100 then    crimson
    elseif (CurrentEnergy/MaxEnergy) 	< 40/100 then    firebrick
    elseif (CurrentEnergy/MaxEnergy) 	< 70/100 then    darkorange
    elseif (CurrentEnergy/MaxEnergy) 	< 90/100 then    darkgreen
    else black



    -- Current Balance
    if CurrentBalance 		< -10 then    crimson
    elseif CurrentBalance 	< -7  then    firebrick
    elseif CurrentBalance 	< -3  then    darkorange
    elseif CurrentBalance 	< 0   then    darkgreen
    else black



    -- Current Encumbrance
    if CurrentEncumbrance 	> 3 then    crimson
    elseif CurrentEncumbrance 	> 2 then    firebrick
    elseif CurrentEncumbrance 	> 1 then    darkorange
    else  black    



    -- Current Nutrition
    if (CurrentNutrition/100) 		< 20/100 then    crimson
    elseif (CurrentNutrition/100) 	< 40/100 then    firebrick
    elseif (CurrentNutrition/100) 	< 70/100 then    darkorange
    elseif (CurrentNutrition/100) 	< 90/100 then    darkgreen
    else black


	
	-- Current Morale
    if CurrentMorale 		< -3   then    crimson
    elseif CurrentMorale 	< -1.5 then    firebrick
    elseif CurrentMorale 	< 0    then    darkorange
    elseif CurrentMorale 	> 0    then    darkgreen
    else    black

	
	-- Current Sanity
    if (CurrentSanity/100) 	< 20/100 then    crimson
    elseif (CurrentSanity/100) 	< 40/100 then    firebrick
    elseif (CurrentSanity/100) 	< 70/100 then    darkorange
    elseif (CurrentSanity/100) 	< 90/100 then    darkgreen
    else  black



    -- Current Exp
    if (CurrentExp/100) 	> 70/100 then    crimson
    elseif (CurrentExp/100) 	> 40/100 then    firebrick
    elseif (CurrentExp/100) 	> 20/100 then    darkorange
    elseif (CurrentExp/100) 	> 0 then    darkgreen
    else black

Additionally, Risk does not show up in pluginator which I found interesting. I suppose it is not tracked unless you have some amount of Risk > 0. Would anyone happen to know where in the prompt or pluginator output it is? I could catch it with an optional regex.
Gorth
Posts: 581
Joined: Sat Nov 13, 2021 11:53 am
Location: Michigan

Re: Mushclient Infobar Plugin - WIP

Post by Gorth »

Most of this looks fine, if insanely verbose. Much easier, I think, to set cuttoff points with color coordination in a hashmap, but i'm not your programming instructor.

Risk only shows up in Pluginator if there is any, correct. It's just the same as any other: "risk": 1
:undm_scales_key: :shagerd:
Proud owner of the ten thousandth post.
Post Reply