Moving mud's prompt to the bottom line.

ftpd
Posts: 8
Joined: Wed Feb 01, 2017 10:13 am

Moving mud's prompt to the bottom line.

Post by ftpd »

Hi there.
I'm playing Polish LP MUD, Arkadia. I've always been TinyFugue fan, but recently I've decided to give Mudlet a try because of great GMCP support ootb and possibility of creating separate windows inside the main client.

My MUD sometimes shows a 'special' prompt - when the command's output is longer than screen height or when in special "post office" mode. Here are an example:
1) from TinyFugue: https://i.imgur.com/QshC3ow.png
2) from Mudlet: https://i.imgur.com/O7z2PTk.png
The line that I'm talking about is this "[1-1 afwerweter] (aktualny: 1) --" string (sorry for Polish content ;-))

So the question is: is there any chance to move this 'special' prompts to the very bottom line of the screen?

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

Re: Moving mud's prompt to the bottom line.

Post by Vadi »

There is, you could make a miniWindow, and selectCurrentLine() copy() paste("my miniwindow"). Let us know if you'd like help with that.

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

Re: Moving mud's prompt to the bottom line.

Post by Jor'Mox »

I do something similar with a label, which allows more creative freedom when it comes to controlling how the text is displayed. Don't think it works with the copy/paste functionality though, so you have to do any coloring via code (not super hard, but a bit tedious).

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

Re: Moving mud's prompt to the bottom line.

Post by Vadi »

Hm, it would be cool to have a function that could paste() into a label and auto-convert all the colouring. It'd be doable...

User avatar
SlySven
Posts: 996
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Moving mud's prompt to the bottom line.

Post by SlySven »

A quick question to the OP - does Polish use any non-ASCII (the basic 52 a-z, A-Z) characters?

I am aware that we have some short-comings in support of accented or other characters outside of that set at the present and it is something we want to resolve for Mudlet 4.0 - eventually we will need a team of bi- or multi-lingual volunteers to help to iron out both the User Interface (working out what non-Americanish words to use for each other language) and to test Mudlet with those languages. Perhaps you might be a candidate for the pl-PL case?

ftpd
Posts: 8
Joined: Wed Feb 01, 2017 10:13 am

Re: Moving mud's prompt to the bottom line.

Post by ftpd »

Vadi wrote:There is, you could make a miniWindow, and selectCurrentLine() copy() paste("my miniwindow"). Let us know if you'd like help with that.
Thanks for your answer. I don't think if it will solve my case. It looks like more global problem, as Mudlet seems to display all not-really-ended-with-\n lines at the main window and waits for input for them in the bottom line; TinyFugue in such case moves the line which is waiting for input to the bottom, and there are just too many cases to write a trigger(s) for all of them. Also, the lenght of those lines is different, so this miniwindow could be sometimes too narrow and sometimes way too wide. Also, it would just look ugly when the window shows nothing - some percent of the bottom line unused and a cursor blinking in the half of the screen ;-)

I'm sorry if my English is too bad to explain it clearly. I've done one more screenshot: https://i.imgur.com/K9Rv0Z5.png
and each time I've added this red line this is an example of the case, when the mud sends me a line without CRLF and it would be great to have it on the very bottom. For those of you familiar with Genesis mud: my game is very similar, the marked lines are mostly post office interface, so 'Adresat:' means 'To:', 'Temat' = 'Subject', 'CC' = 'CC' ;-), '1]' and '2]' are just numbers of lines in the letter composing menu and '[1-1 adefFhHmnpqrsRux.!?] (aktualny: 1) -- ' is the control line showing number of letters, selected one and possible operations shortcuts. I can't explain with in other way, sorry for that ;-)

SlySven wrote:A quick question to the OP - does Polish use any non-ASCII (the basic 52 a-z, A-Z) characters?

I am aware that we have some short-comings in support of accented or other characters outside of that set at the present and it is something we want to resolve for Mudlet 4.0 - eventually we will need a team of bi- or multi-lingual volunteers to help to iron out both the User Interface (working out what non-Americanish words to use for each other language) and to test Mudlet with those languages. Perhaps you might be a candidate for the pl-PL case?
Yes, Polish uses some special characters: ą, ć, ę, ł, ń, ó, ś, ź, ż.
But the good news is: I don't know any 'living' Polish MUD, which really uses them. There is one that I remember, but I have no idea, if anyone still plays it (it has a choice for the player: special characters can be encoded in UTF-8, ISO-8859-2, cp1250 (windows format), cp852 (dos format) and with converting special to latin (so 'ż' and 'ź' are converted to 'z', 'ą' to 'a' and so on)), so to get a _full_ support you would have to support them all - but I suppose in modern times support for UTF-8 will be enough.
To be honest, we (as: 'Polish mud players community) are mostly used to the last 'choice', with converting non-latin to latin. It's the common way on the biggest Polish LP-Mud, Arkadia.

Sure, I can help with the user interface, feel free to contact me here or via my private e-mail: ftpd 'at' insomniac 'dot' pl with the details. Also, I can help with testing Mudlet on MUD with Polish chars, so if you have some very-very-alpha builds of 4.0 with support for accented characters, please let me know and I'll perform the tests for you.

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

Re: Moving mud's prompt to the bottom line.

Post by Jor'Mox »

So, it sounds like a case where the game is waiting for a "go ahead". I don't have any real experience with that, but potentially the specific characters involved in that might be able to be targeted. The really tricky part is that from what I can see, TinyFugue basically puts those lines on the input line, i.e. where you type. Mudlet, however, doesn't even have that as a possibility. While you can certainly put text into the input line, it would then be sent to the game as if you had typed it, when all you really wanted to send was whatever you typed after it. The closest you could really get would be to put a blank label along the bottom, and push everything else up a bit. Then when you don't have one of these lines, it is just a black space above your input line. When you do have one, it would go there. But since the label would be the same color as the background, you wouldn't see something sitting there, waiting for input.

Now that I think about it, though, assuming you could make the necessary triggers to capture the lines you want... you could potentially put those lines in the input line, and then go in and remove them from the command being sent, without needing any extra consoles or labels. You would need to store the full text of the line you were capturing, then use the appendCmdLine function to write it to the input line, and then have an event handler for the sysDataSendRequest event, in which you would then strip the stored text out of the command being sent, before letting it continue on through. Still, that all hinges on being able to trigger off of the "go ahead" signals coming in from the game.

ftpd
Posts: 8
Joined: Wed Feb 01, 2017 10:13 am

Re: Moving mud's prompt to the bottom line.

Post by ftpd »

As I've mentioned earlier, there are simply too many possibilities to have it all catched and put into trigger.

Btw. it's kinda odd for me, because as far as I know, all DIKU MUD's have prompts with health/mana/something with them and - after years of using TF - it was rather obvious for me to have it on input line, always visible despite of what happens on the screen (i.e. quick, multi-line fight). I've even created char in Achaea (because this mud is sometimes mentioned in faq/wiki) and look how clear and handy it looks in TF: https://i.imgur.com/ouLe8ko.png
and in Mudlet: https://i.imgur.com/0wwlPVu.png

I mean, if it's not possible now without tricky labels+triggers thing, maybe it's worth to consider recognizing mud's prompt and putting it into input line by default (or even as an option)?

(One more thing: please, don't think of me like saying 'wtf, TF is so much better, what is this crap bla bla bla'. I really like Mudlet, want to fully switch to it and just pointing on a handy feature.)

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

Re: Moving mud's prompt to the bottom line.

Post by Jor'Mox »

So, I think the key, assuming your MUD supports it, is to use the GA signal to detect the prompt, rather than looking for a pattern to match the prompt text. To do that, you would make a trigger of the Lua function type, and use "return isPrompt()" for the function it will call. Once you determine if that trigger successfully triggers on each line you want (I suggest just putting in a simple echo at first), then you can use that to erase the line from where it is in the main window, and write it somewhere down below, either in a label or mini console as has been suggested, or in the command line.

ftpd
Posts: 8
Joined: Wed Feb 01, 2017 10:13 am

Re: Moving mud's prompt to the bottom line.

Post by ftpd »

I don't have any clue, what GA is and how to use it. Could you provide some examples?

Post Reply