[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Overriding newlines in output window.
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Overriding newlines in output window.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by hogarius   USA  (22 posts)  [Biography] bio
Date Sun 24 May 2015 01:37 AM (UTC)
Message
The web page describing MUSHclient's Tell() function...

http://www.gammon.com.au/scripts/doc.php?function=Tell

...states the following:

Quote:
A new line will automatically be started by output from the MUD, or a command that you type being echoed to the output window.


Can this behavior be overridden? In other words, is it possible for text coming from the MUD to be appended immediately after the text output by the Tell() function, with no intervening new line?
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #1 on Sun 24 May 2015 03:34 AM (UTC)
Message
As a default behavior, I'm pretty sure it's not possible. With the use of some ridiculously complex triggers and rewriting absolutely everything as it comes in from the mud, it might be but I wouldn't swear to that even.

That said, I have to ask why you'd want a giant block of text that you can't tell one source of from another.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by hogarius   USA  (22 posts)  [Biography] bio
Date Reply #2 on Sun 24 May 2015 12:23 PM (UTC)
Message
Simutronics' propietary game client uses GemStone Language tags to mark off items such as bold face text, room names, internal timers, etc. The tags are built as follows:

<28>GSx00000000<10>

(<28> and <10> indicate ASCII characters 28 and 10 respectively. The 00000000 alphanumeric data is not always present.)

Here is a snippet of game output with part of the text marked off to be displayed in bold.

You also see a trellis arch, the sidewalk,<28>GSL<10> Genievieve Dalton<28>GSM<10>, a watering can and some low ground cover with bright flowers.

Ideally, all the text in the above snippet should show in the output window as one line. However, the line feed characters at the end of the GSL and GSM tags make the text show as three lines.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #3 on Sun 24 May 2015 06:23 PM (UTC)
Message
What do your triggers look like? That text shouldn't be creating newlines after the closing tags unless there's a newline embedded in the tag (something I doubt very highly).

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Sun 24 May 2015 08:49 PM (UTC)
Message
Can you turn on "debug packets" and post here a packet or too with this markup in it? (See the Edit menu).

Turn off the debugging when you are done or it will gradually slow down.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by hogarius   USA  (22 posts)  [Biography] bio
Date Reply #5 on Sun 24 May 2015 09:19 PM (UTC)
Message


Sent  packet: 6 (6 bytes) at Sunday, May 24, 2015, 6:07:54 PM

look..             6c 6f 6f 6b 0d 0a

Incoming packet: 28 (654 bytes) at Sunday, May 24, 2015, 6:07:54 PM

.GSo..[24 Flame    1c 47 53 6f 0d 0a 5b 32 34 20 46 6c 61 6d 65 20
Tree Road, Porch   54 72 65 65 20 52 6f 61 64 2c 20 50 6f 72 63 68
]...GSp...GSH..T   5d 0d 0a 1c 47 53 70 0d 0a 1c 47 53 48 0d 0a 54
he grey paint of   68 65 20 67 72 65 79 20 70 61 69 6e 74 20 6f 66
 the floorboards   20 74 68 65 20 66 6c 6f 6f 72 62 6f 61 72 64 73
 flakes into del   20 66 6c 61 6b 65 73 20 69 6e 74 6f 20 64 65 6c
icate curls, and   69 63 61 74 65 20 63 75 72 6c 73 2c 20 61 6e 64
 the entire porc   20 74 68 65 20 65 6e 74 69 72 65 20 70 6f 72 63
h sags gingerly    68 20 73 61 67 73 20 67 69 6e 67 65 72 6c 79 20
under your weigh   75 6e 64 65 72 20 79 6f 75 72 20 77 65 69 67 68
t.  A wooden swi   74 2e 20 20 41 20 77 6f 6f 64 65 6e 20 73 77 69
ng facing the st   6e 67 20 66 61 63 69 6e 67 20 74 68 65 20 73 74
reet takes up mo   72 65 65 74 20 74 61 6b 65 73 20 75 70 20 6d 6f
st of the availa   73 74 20 6f 66 20 74 68 65 20 61 76 61 69 6c 61
ble area, leavin   62 6c 65 20 61 72 65 61 2c 20 6c 65 61 76 69 6e
g only enough ro   67 20 6f 6e 6c 79 20 65 6e 6f 75 67 68 20 72 6f
om to open the s   6f 6d 20 74 6f 20 6f 70 65 6e 20 74 68 65 20 73
creened door lea   63 72 65 65 6e 65 64 20 64 6f 6f 72 20 6c 65 61
ding into the ho   64 69 6e 67 20 69 6e 74 6f 20 74 68 65 20 68 6f
use.  The flame    75 73 65 2e 20 20 54 68 65 20 66 6c 61 6d 65 20
tree in the fron   74 72 65 65 20 69 6e 20 74 68 65 20 66 72 6f 6e
t yard extends o   74 20 79 61 72 64 20 65 78 74 65 6e 64 73 20 6f
ne bough, burnis   6e 65 20 62 6f 75 67 68 2c 20 62 75 72 6e 69 73
hed silver by th   68 65 64 20 73 69 6c 76 65 72 20 62 79 20 74 68
e light of the p   65 20 6c 69 67 68 74 20 6f 66 20 74 68 65 20 70
orch fixture, to   6f 72 63 68 20 66 69 78 74 75 72 65 2c 20 74 6f
ward you, shield   77 61 72 64 20 79 6f 75 2c 20 73 68 69 65 6c 64
ing you from the   69 6e 67 20 79 6f 75 20 66 72 6f 6d 20 74 68 65
 night..GSI..  Y   20 6e 69 67 68 74 2e 1c 47 53 49 0d 0a 20 20 59
ou also see a tr   6f 75 20 61 6c 73 6f 20 73 65 65 20 61 20 74 72
ellis arch, the    65 6c 6c 69 73 20 61 72 63 68 2c 20 74 68 65 20
sidewalk,.GSL..    73 69 64 65 77 61 6c 6b 2c 1c 47 53 4c 0d 0a 20
Genivieve Dallon   47 65 6e 69 76 69 65 76 65 20 44 61 6c 6c 6f 6e
.GSM.., a wateri   1c 47 53 4d 0d 0a 2c 20 61 20 77 61 74 65 72 69
ng can and some    6e 67 20 63 61 6e 20 61 6e 64 20 73 6f 6d 65 20
low ground cover   6c 6f 77 20 67 72 6f 75 6e 64 20 63 6f 76 65 72
 with bright yel   20 77 69 74 68 20 62 72 69 67 68 74 20 79 65 6c
low flowers...Ob   6c 6f 77 20 66 6c 6f 77 65 72 73 2e 0d 0a 4f 62
vious paths: non   76 69 6f 75 73 20 70 61 74 68 73 3a 20 6e 6f 6e
e....GSj           65 2e 0d 0a 1c 47 53 6a 20 20 20 20 20 20 20 20
            ..     20 20 20 20 20 20 20 20 20 20 20 20 0d 0a

Incoming packet: 29 (16 bytes) at Sunday, May 24, 2015, 6:07:55 PM

.GSq1432503398..   1c 47 53 71 31 34 33 32 35 30 33 33 39 38 0d 0a

Sent  packet: 7 (13 bytes) at Sunday, May 24, 2015, 6:08:13 PM

go sidewalk..      67 6f 20 73 69 64 65 77 61 6c 6b 0d 0a

Incoming packet: 30 (36 bytes) at Sunday, May 24, 2015, 6:08:13 PM

.GSPK              1c 47 53 50 4b 20 20 20 20 20 20 20 20 20 20 20
                   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
  ..               20 20 0d 0a

Incoming packet: 31 (523 bytes) at Sunday, May 24, 2015, 6:08:14 PM

.GSFB0000000000.   1c 47 53 46 42 30 30 30 30 30 30 30 30 30 30 1c
GSFM0000000000.G   47 53 46 4d 30 30 30 30 30 30 30 30 30 30 1c 47
SFP0000000000...   53 46 50 30 30 30 30 30 30 30 30 30 30 0d 0a 1c
GSo..[Downtown,    47 53 6f 0d 0a 5b 44 6f 77 6e 74 6f 77 6e 2c 20
Flame Tree Road]   46 6c 61 6d 65 20 54 72 65 65 20 52 6f 61 64 5d
...GSp...GSH..Th   0d 0a 1c 47 53 70 0d 0a 1c 47 53 48 0d 0a 54 68
e faint creaking   65 20 66 61 69 6e 74 20 63 72 65 61 6b 69 6e 67
 of a wooden por   20 6f 66 20 61 20 77 6f 6f 64 65 6e 20 70 6f 72
ch swing draws y   63 68 20 73 77 69 6e 67 20 64 72 61 77 73 20 79
our eye towards    6f 75 72 20 65 79 65 20 74 6f 77 61 72 64 73 20
a quaintly situa   61 20 71 75 61 69 6e 74 6c 79 20 73 69 74 75 61
ted house which    74 65 64 20 68 6f 75 73 65 20 77 68 69 63 68 20
is surrounded by   69 73 20 73 75 72 72 6f 75 6e 64 65 64 20 62 79
 an immaculate y   20 61 6e 20 69 6d 6d 61 63 75 6c 61 74 65 20 79
ard.  Light from   61 72 64 2e 20 20 4c 69 67 68 74 20 66 72 6f 6d
 the fixture nea   20 74 68 65 20 66 69 78 74 75 72 65 20 6e 65 61
r the screen doo   72 20 74 68 65 20 73 63 72 65 65 6e 20 64 6f 6f
r spills onto th   72 20 73 70 69 6c 6c 73 20 6f 6e 74 6f 20 74 68
e lawn and is ga   65 20 6c 61 77 6e 20 61 6e 64 20 69 73 20 67 61
thered by the lo   74 68 65 72 65 64 20 62 79 20 74 68 65 20 6c 6f
wer limbs of a l   77 65 72 20 6c 69 6d 62 73 20 6f 66 20 61 20 6c
arge flame tree,   61 72 67 65 20 66 6c 61 6d 65 20 74 72 65 65 2c
 painting the bl   20 70 61 69 6e 74 69 6e 67 20 74 68 65 20 62 6c
ossoms in a dull   6f 73 73 6f 6d 73 20 69 6e 20 61 20 64 75 6c 6c
 bronze..GSI..     20 62 72 6f 6e 7a 65 2e 1c 47 53 49 0d 0a 20 20
You also see a w   59 6f 75 20 61 6c 73 6f 20 73 65 65 20 61 20 77
alkway leading t   61 6c 6b 77 61 79 20 6c 65 61 64 69 6e 67 20 74
o the house...Ob   6f 20 74 68 65 20 68 6f 75 73 65 2e 0d 0a 4f 62
vious paths: sou   76 69 6f 75 73 20 70 61 74 68 73 3a 20 73 6f 75
th, east, west..   74 68 2c 20 65 61 73 74 2c 20 77 65 73 74 2e 0d
..GSjECG           0a 1c 47 53 6a 45 43 47 20 20 20 20 20 20 20 20
         ...GSq1   20 20 20 20 20 20 20 20 20 0d 0a 1c 47 53 71 31
432503418..        34 33 32 35 30 33 34 31 38 0d 0a

[Go to top] top

Posted by hogarius   USA  (22 posts)  [Biography] bio
Date Reply #6 on Sun 24 May 2015 09:54 PM (UTC)
Message
Mercleer said:
What do your triggers look like? That text shouldn't be creating newlines after the closing tags unless there's a newline embedded in the tag (something I doubt very highly).


Mercleer, that is the problem. Simutronics uses newlines to close the GS tags. Usually the tags occur at places in the text where a newline might not be a bad thing in the output window. In the case of the tags to mark bold text (GSL at the beginning of the text to be bold, GSM at the end of text to be bold), I would prefer to not have line breaks at those points.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #7 on Sun 24 May 2015 10:07 PM (UTC)
Message
Well, the good news is, Nick can help you with some triggers to remove the new lines based on that packet info you provided. It's going to be slightly more complicated than anything I've personally ever needed so I'm going to step aside and let him do his thing :) You're in very capable hands though, I've seen Nick do some amazing things with lua.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Mon 25 May 2015 04:33 AM (UTC)
Message
hogarius said:

Simutronics' propietary game client uses GemStone Language tags to mark off items such as bold face text, room names, internal timers, etc. The tags are built as follows:


First, can't you turn that off? It seems odd that you can't.

Or do you not want to turn it off? If so, what information are these tags providing you?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by hogarius   USA  (22 posts)  [Biography] bio
Date Reply #9 on Mon 25 May 2015 01:45 PM (UTC)

Amended on Mon 25 May 2015 01:47 PM (UTC) by hogarius

Message
No, I do not want to turn off the GSx tags. I want to use that information.

I'll have to do some research on exactly what information the various GSx tags provide, and how to interpret that information.

In the meantime, do you have any advice on how I can make the GSL and GSM tags work to show boldface or colored text in the output window, without line breaks?

Currently, the following sequence,

You also see a trellis arch, the sidewalk,<28>GSL<13><10> Genivieve Dalton<28>GSM<13><10>, a watering can and some ground cover with bright yellow flowers.

shows as

You also see a trellis arch, the sidewalk,GSL
 Genivieve DaltonGSM
, a watering can and some ground cover with bright yellow flowers.


I'd like it to show as

You also see a trellis arch, the sidewalk, Genivieve Dalton, a watering can and some ground cover with bright yellow flowers.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #10 on Mon 25 May 2015 06:05 PM (UTC)
Message
Actually, what might be really useful is packet info of the login process. The downloads page for Gemstone offers screenshots of 4 clients that don't follow the behavior you're seeing in MC and I suspect there's a protocol negotiation in play that MC isn't designed to deal with. I'm not curious enough to spend $15 to be certain though.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by hogarius   USA  (22 posts)  [Biography] bio
Date Reply #11 on Mon 25 May 2015 06:41 PM (UTC)
Message
Meerclar, I have a world package for logging into Simutronics games. However, it's crude, clunky and only works if you have a paid subscription to one or more of the games. Thank you for your help, but I agree that asking someone to set up an account and pay $15 a month to help with this is too much to ask.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #12 on Mon 25 May 2015 11:07 PM (UTC)
Message
What little I can find about GSL indicates they use Ruby which isn't currently built in for support in MC. Unfortunately, that means we're going to see some unusual activity like what you're asking how to fix here. Given a list of expected tags, Nick (and a few others probably) could probably build you a set of triggers to fix the output to show on a single line as expected.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Tue 26 May 2015 06:19 AM (UTC)
Message
I think you can probably solve this by making a plugin that translates the Gemstone tags into ANSI sequences. There are various examples of handling incoming packets.

Something like this: http://mushclient.com/forum/?id=7430&reply=5#reply5

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


5,322 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]