Display issues (doubling and delays).

Post Reply
User avatar
Alexander Divine
Posts: 65
Joined: Mon Dec 21, 2009 7:01 pm

Display issues (doubling and delays).

Post by Alexander Divine »

First off, love the client. I'm learning Lua by coding both in Mudlet and making AddOns in World of Warcraft, so I'm finding this a complete blast. :D That being said and done, I have a few simple qualms I hope you folks can help me straighten out.

First off, my display seems to be... doubling, I guess is what you can call it. This happens usually if I've tabbed out of Mudlet and tab in again -- I'll see a few lines that look like they've echoed twice, like:

Code: Select all

(Bloodloch): Desian says, "However, it is the Keeper's job, and therefore I did it. For nearly 50
(Bloodloch): Desian says, "However, it is the Keeper's job, and therefore I did it. For nearly 50
years now."
H:312/489 M:293/612 E:1263/1263 XP:2580/20052 [] [] [eb]
Scrolling down with my mouse will fix the issue, restoring it to normal.



My second problem is my prompt trigger itself. It fires absolutely fine, but it seems to be choosing if and when it does so! It is currently set up to simply track the value of my stats, and then update my gauges with the appropriate values.

Code: Select all

Pattern:

^H:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) XP:(\d+)/(\d+) \[(.*)\] \[(.*)\] \[(\w+)\]$

Script:

HP = matches[2]
MaxHP = matches[3]
MP = matches[4]
MaxMP = matches[5]
End = matches[6]
MaxEnd = matches[7]
XP = matches[8]
MaxXP = matches[9]
Pose = matches[10]
Stats = matches[11]
Balances = matches[12]

if string.find(matches[12],"e") == nil 
then EQ = 0 
else EQ = 1
end;
if string.find(matches[12],"b") == nil 
then BAL = 0 
else BAL = 1
end;

setGauge("healthBar", HP, MaxHP, "  Health: " .. HP .. "/" .. MaxHP)
setGauge("manaBar", MP, MaxMP, "  Mana: " .. MP .. "/" .. MaxMP)
setGauge("enduranceBar", End, MaxEnd, "  Endurance: " .. End .. "/" .. MaxEnd)
setGauge("experienceBar", XP, MaxXP, "  Experience: " .. XP .. "/" .. MaxXP)
As an aside, I'd love to know if I'm doing this right. Lua doesn't seem terribly hard but it's good to make sure everything's optimized.

Anyhoo, this trigger actually functions pretty nicely, but my gauges seem to only update every fifth prompt or so, it's very bizarre.

Thanks in advance for the help!

User avatar
Alexander Divine
Posts: 65
Joined: Mon Dec 21, 2009 7:01 pm

Re: Display issues (doubling and delays).

Post by Alexander Divine »

Wow, nevermind.

I checked both the "Fix new text to be on its own line" and "Force new line on empty commands" options and both problems were fixed. :D

User avatar
demonnic
Posts: 884
Joined: Sat Dec 05, 2009 3:19 pm

Re: Display issues (doubling and delays).

Post by demonnic »

Wonderful! I'm glad it's working properly for you now.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Display issues (doubling and delays).

Post by Vadi »

Everything in the matches[] table is stored as a string. So if you'd like to get a number out of it, best to do:

Code: Select all

HP = tonumber(matches[2])
MaxHP = tonumber(matches[3])
MP = tonumber(matches[4])
[...]

Code: Select all

if string.find(matches[12],"e") == nil 
then EQ = 0 
else EQ = 1
end;
This works fine too, but it's not really "the Mudlet" way. Give this a try: http://forums.imperian.com/index.php?sh ... t&p=392581. That way makes it be faster and it has less clutter in your scripts with more things represented visually.

Denarii
Posts: 111
Joined: Thu Dec 03, 2009 10:54 pm

Re: Display issues (doubling and delays).

Post by Denarii »

I'll update the metatable definition for matches in LuaGlobal for 1.1.0 so you can assign numeric matches to variables without having to explicitly convert them, as I did with comparisons and math operators.

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: Display issues (doubling and delays).

Post by Oneymus »

I am having similar issues with my display, in addition to disappearing MuD output. I believe I have it narrowed down to frequently updating my gauges, which I do whenever I get my prompt; obviously, this can happen a lot during combat. However, it doesn't happen exclusively during busy periods. I understand that this is a known bug; my question is this: is there a temporary fix for it, such as a function that I could call to rerender my output, as opposed to constantly scrolling the mousewheel?

I am running Windows 7, Mudlet 1.0.5.

Screenshots:
When it's beautiful and working right...
Image

When it's still beautiful, but not so much working right...
Image

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Display issues (doubling and delays).

Post by Heiko »

These issues have already been fixed in the 1.1.0 development tree, but cannot be backported easily.
For the time being, the easiest fix is to set a proper border on the right side of the screen and place your chat tabs + gui elements in the border. The render issues are not related to frequently updating the gauges, but to the gauges + chat tabs on the right overlapping the main screen.

Elriond
Posts: 6
Joined: Wed Dec 23, 2009 12:16 am

Re: Display issues (doubling and delays).

Post by Elriond »

I was just about to say it's not updating the prompt that causes that issue, but in fact when you're flipping back and forth between the chats. I noticed that earlier today when i was working on mine. Keep up the good work. :D

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: Display issues (doubling and delays).

Post by Oneymus »

I have had partial success. I thought I'd report it here, for the record.

As you can see, my scroll bar is neatly within my GUI elements. However, as you can also see, I lose half of the output. It is progress, at least.

Image

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Display issues (doubling and delays).

Post by Heiko »

Your problem is that your "changing" GUI elements overlap the main console. The current display is not made for overlapping mini console windows. Be careful to place them *fully* within the borders. Use different background colors for your mini console windows - including all chat tabs to see where they really are - not where you think that they are and how large they are.

The current 1.1.0 development branch does not have there limitations anymore.

Post Reply