Odd line breaks in the middle of sentences

sighfigh
Posts: 11
Joined: Wed Mar 22, 2017 2:35 pm

Re: Odd line breaks in the middle of sentences

Post by sighfigh »

So I completely removed my Mudlet install and installed fresh again. I double-checked that there were no triggers or packages loaded and there is still an issue. I know of other people that use Mudlet and do not seem to have these issues. I have tried other characters as well, including freshly made characters.

While testing today I noticed that it wasn't just extra line breaks that it was adding but it was also jumbling up words.
Here is the replay: Dropbox link

Notice that when I go home there is an issue with the room exits, that I can make go away with a double look command. When I type 'gs' to view my guild stats, you can see that some of the text is all layered over the top of itself. These issues do tend to become worse when the connection is worse, I am in Australia so I don't have the greatest connection to the mud in the first place.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Odd line breaks in the middle of sentences

Post by Jor'Mox »

Try creating a new profile to connect to the MUD. Then any issues linked to the profile being potentially messed up should disappear.

sighfigh
Posts: 11
Joined: Wed Mar 22, 2017 2:35 pm

Re: Odd line breaks in the middle of sentences

Post by sighfigh »

Tried as you suggested but still have the issues. I also loaded up an Ubuntu VM and installed mudlet on there, getting the same issues through that.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Odd line breaks in the middle of sentences

Post by Jor'Mox »

So, just to be certain, you are connecting to 3k.org port 3200, using Mudlet 3.0.0 or better, right?

sighfigh
Posts: 11
Joined: Wed Mar 22, 2017 2:35 pm

Re: Odd line breaks in the middle of sentences

Post by sighfigh »

Yes
3k.org port 3200
Mudlet 3.0.1

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Odd line breaks in the middle of sentences

Post by Jor'Mox »

So, the layered text is something that I recognize, but which was supposed to have been fixed in this release of Mudlet, which is tabs. The game I play had issues with Mudlet 2.1 because tabs (\t) were being sent by the game, but they weren't being interpreted by Mudlet properly, causing some text to overlap other text, and things to generally not be laid out correctly. Potentially, this could be contributing to other issues as well, though I can't be certain. Fortunately, you should be able to handle tabs yourself (or at least you could in 2.1).

First, make a regex trigger that looks for \t
In the code, you want it to do this:
Code: [show] | [select all] lua
    local text = line
    local pos = string.find(text,"\t")
    repeat
        selectString("\t",1)
        replace(string.rep(" ",8 - math.fmod(pos,8)))
        text = string.gsub(text,"\t",1)
        pos = string.find(text,"\t")
    until not pos

sighfigh
Posts: 11
Joined: Wed Mar 22, 2017 2:35 pm

Re: Odd line breaks in the middle of sentences

Post by sighfigh »

Thanks for that, I managed to fix the layered text using your code.

Still got the line break weirdness but one issue if fixed :)

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Odd line breaks in the middle of sentences

Post by Jor'Mox »

When I looked at your replays, I see the unusual line breaks, and when I opened them up and viewed what was coming from the game, there are some abnormal characters showing up, that I don't understand. If I had to guess, this is probably due to malformed packets that you are receiving, which would help to explain why they occur more often the worse your lag gets. That said, I don't really know how to go about addressing the problem, nor why these mistakes in the transmitted text get translated into line breaks.

It does go a long way toward explaining why no one else has been able to replicate the issue though.

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

Re: Odd line breaks in the middle of sentences

Post by Vadi »

I think the packet issues get translated into linebreaks because Mudlet gives up and has to display whatever data it got in leiu of a proper GA or a linebreak, and it can't just display half a line and add more later.

Thanks so much for looking into this Jor'Mox!

sighfigh
Posts: 11
Joined: Wed Mar 22, 2017 2:35 pm

Re: Odd line breaks in the middle of sentences

Post by sighfigh »

Thank you both for looking into it. I thought I was just going mental for a while there.

Post Reply