|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Wed Jul 09, 2008 3:05 am
Redisplaying mud output with Color in tact. |
I have line
{rname}[ 3 ] The Aylorian Temple of Ivar (G)
Everything after {rname} is colored various ways. I want to strip the {rname} and still show the line as it was meant to be displayed.
Any help?
Thanks
PS I also want to use #TR {^~{rname~}(*)} {#TAG name %1} to tag the room name for the mapper so whatever solution from above can't mess up that functionality please.
Thanks |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Wed Jul 09, 2008 3:37 am |
I got it to work by using an ansi trigger pattern. let me know if theres an easier way tho, I hate using ansi
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jul 09, 2008 9:28 am |
#TR {^(~{rname~})(*)} {#PSUB {} %x1;#TAG name %2}
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Jul 09, 2008 2:33 pm |
I have an irrational hated of #psub, so I'd've probably done it like this:
#trig {^~{rname~}} {#sub ""}
#cond {(*)} {#tag name %1} {reparse}
If you're using an ANSI trigger and want to stick with it, you'll probably want to use %stripansi on the %1 result before you #tag it. You might end up with ANSI codes in your room names otherwise. |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Wed Jul 09, 2008 11:09 pm |
Vijilante wrote: |
#TR {^(~{rname~})(*)} {#PSUB {} %x1;#TAG name %2} |
This doesnt work.
EDIT: Yes it does, I'm an idiot. Thx again! |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Thu Jul 10, 2008 5:00 pm |
Id have to agree here with Fang. PSUB is horrid to use. It didn't always fire, and sometimes when it did fire it didn't work correctly. Meh it was just a mess. Your example Fang, works fine as well. Thanks.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jul 10, 2008 5:08 pm |
There are not any current bugs on my bug list regarding PSUB. Yes, PSUB is an "advanced" command because the %x1 syntax is a bit obscure. But if you have specific problems with PSUB, please post them to a new thread so they can get added to the bug list.
But please don't just scare people away from it because of either "superstitions" or past bugs in old versions. That kind of "folklore" just makes fewer people want to use CMUD. |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Thu Jul 10, 2008 5:13 pm |
I havn't tested it in 2.30 but Im assuming it will work the same in 2.29. My main problem is using the trigger provided above by Vij and stacking commands in Aardwolf like e;n;e;n in the command line it would not always sub properly. You should be able to test this out on the live server now Zugg since that tag just went live there this morning. Im assuming its from the rapid rate the output is coming in from the mud. You only have to move 2 or 3 rooms in that fashion to see it happening... the 2 main things it was doing was either gaging the entire line or showing the entire line, and then sometimes it worked properly and stripped the {rname} as intended, when walking slowly it ALWAYS worked, but like I said when I stacked the commands for rapid movement it didn't
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jul 10, 2008 5:31 pm |
I always like to be up front about my superstitions. I have no idea why I don't like #psub, it's worked fine whenever I've needed to use it - I just don't like to. It's like how some people prefer calling an event to calling a function *shrug*.
The problem with Viji's script and the stacking of commands is probably to do with the ^ at the start, because when you stack commands (depending on the way your MUD sends prompts) this can cause a prompt and the next line to appear on the same line. It'll presumably affect any other way of doing it as well.
Also, is the only purpose of printing this {rname} thing so that people can trigger off it in their clients if they want to and then hide it? Because it seems to me that MXP would be much better for that. |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Thu Jul 10, 2008 5:36 pm |
Fang, yes thats the only purpose. Lasher doesn't want to commit to implementing MXP yet. Believe me, we went over it 1000 times heh.
Also to further produce this bug you need to have this setup.
Code: |
<window name="Aardwolf" usesession="false">
<uid>{737539AD-D060-4002-AC62-ED32AD03559E}</uid>
<packages>English Keypad|English Directions|Clickable URLs|Aardwolf</packages>
<trigger priority="10" id="1">
<pattern>^(~{rname~})(*)</pattern>
<value>#PSUB {} %x1
#TAG name %2</value>
</trigger>
<trigger priority="20" id="2">
<pattern>^~{rdesc~}</pattern>
<value>#T+ No_Map
#NOMAP
#GAG</value>
</trigger>
<trigger name="No_Map" priority="30" enabled="false" id="3">
<pattern>^(*)</pattern>
<value>#NOMAP</value>
</trigger>
<trigger priority="40" id="4">
<pattern>^~{~/rdesc~}</pattern>
<value>#T- No_Map
#GAG
#NOMAP</value>
</trigger>
</window>
|
Then turn on the mapper, and do a fresh configure. Then stack commands. The PSUB no longer works properly.
This was just tested in a fresh session in 2.30 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jul 10, 2008 6:52 pm |
It's a guess, but have you tried comining the two rname triggers you've got? It shouldn't really be causing any problems, but there's no reason not to, and it'll be faster as well :)
And fair enough. I presume you've at least done it in such a way that it's easy to convert the {rname} into <rname> if you ever reach that point. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jul 10, 2008 7:23 pm |
Toxic: How do I turn on the {rname} stuff in Aardwolf? Or is it on by default (I can't imagine that it would be on by default since it just clutters the screen with stuff).
I know that Lasher is very interested in the new mapping protocol for CMUD and wants Aardwolf to be on the cutting edge, and since the mapping protocol will likely be build upon MXP, it seems like he might as well get started with it now.
After all, why invent yet another syntax. Why use:
Code: |
{rname}Room name here |
rather than the standard:
Code: |
<rname>Room name here</rname> |
If he doesn't like the extra text, he can always define a MUD-specific tag and make it shorter, like:
Code: |
<rn>Room name here</rn> |
I just don't understand the need or desire to invent yet another MUD-specific syntax for this when standards like MXP already exist.
Anyway, that's a side rant. It's his MUD so he can do what he wants. It just doesn't make me feel good/confident that he'll be on-board implementing the new mapper protocol later this year.
But let me know what commands to use on Aardwolf to test your script and I'll give it a try to see if there is a problem with PSUB. |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Thu Jul 10, 2008 8:03 pm |
Use Tags roomnames on and tags roomdescs on to turn on those tags.
And I KNOW what you mean by the rant, me and Forestseer (Alluran here I think) Went around and around trying to get him to just fully support MXP but no. I think the problem is, is that he's using these tags for many different mud specific things, and he doesnt want to change the format of them just for the ones that would benefit MXP. He has said that he would like to impliment the MXP stuff we talked to him about but that i would come as a seperate option. I also think he was worried about supporting non mxp clients.
but anyways yeah use those above commands to test the tags sorry, also use just tags without any arguements to see the many types of tags he has implimented. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jul 10, 2008 8:50 pm |
Well, supporting non-MXP clients can be done using MXP just by giving users the option of forcing the MXP tags on. That way they can trigger off <rname> rather than {rname} and real MXP users get the benefits of their MXP client.
MXP tags don't have to do anything special, and most don't - they can just be used to mark out different things to give the client an easy way to recognise (and then trigger off) certain things. You could have tags for channels, tags for says, tags for auction items... it's just that they're automatically hidden by MXP-supporting clients and that MXP clients usually offer special ways of handling them (like z/CMUD's MXP triggers, element handling with %mxp and %mud, and so on). Provided that users not using MXP clients can force the tags on, they can get all the benefits of doing it the way you currently are, just with a different character surrounding the tag.
I understand that you've probably already discussed these things and it's pretty much settled, but it seems to me that you don't need two systems if you use MXP on its own, and that's got to be more convenient. |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Thu Jul 10, 2008 8:57 pm |
Yeah Like I said, I went round and round. Just not what he wanted at the time *shrug*
|
|
|
|
Zhiroc Adept
Joined: 04 Feb 2005 Posts: 246
|
Posted: Thu Jul 10, 2008 9:46 pm |
Fang Xianfu wrote: |
Well, supporting non-MXP clients can be done using MXP just by giving users the option of forcing the MXP tags on. That way they can trigger off <rname> rather than {rname} and real MXP users get the benefits of their MXP client.
MXP tags don't have to do anything special, and most don't - they can just be used to mark out different things to give the client an easy way to recognise (and then trigger off) certain things. You could have tags for channels, tags for says, tags for auction items... it's just that they're automatically hidden by MXP-supporting clients and that MXP clients usually offer special ways of handling them (like z/CMUD's MXP triggers, element handling with %mxp and %mud, and so on). Provided that users not using MXP clients can force the tags on, they can get all the benefits of doing it the way you currently are, just with a different character surrounding the tag. |
While I'm all for more use of an XML-like syntax to tag things (not just including maps), I would have to say that for users who know nothing about such things, and don't use an MXP-enabled client, they would probably much rather see:
{rname} Room name
than
<rname> Room name </rname>
The latter is just ugly and cluttered to the unwashed masses It's that end tag that makes it so... |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Thu Jul 10, 2008 9:52 pm |
yeah he didnt want to endtag something that would always be 1 line.
|
|
|
|
Zhiroc Adept
Joined: 04 Feb 2005 Posts: 246
|
Posted: Thu Jul 10, 2008 10:10 pm |
FYI, whenever it comes up on Top Mud Sites, there's one person in particular that soundly bashes MXP (more the zMUD implementation than the merits of the protocol, I think). I don't personally have an opinion, since I don't play much on a MUDs that use it (and just recently came across one that uses Pueblo, which I thought was the same thing, but isn't). But with anti-marketing like that on the admin boards, there isn't going to be a lot of uptake.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jul 10, 2008 10:37 pm |
AFAIK you can use <rname /> to end the tag without closing it. Slightly more ugly than <rname> on its own, but only slightly.
It'd be nice if they could be convinced to bash MXP here, where the discussion happened that created it, so we can talk about the criticisms of it and perhaps even, you know, change it for the better. If it's the zMUD implementation in particular, though, I expect it'll be niggling things and it's just unfortunate that a particularly mouthy person can't get over them. I guess it's just wishful thinking :( |
|
|
|
Zhiroc Adept
Joined: 04 Feb 2005 Posts: 246
|
Posted: Thu Jul 10, 2008 10:56 pm |
Fang Xianfu wrote: |
AFAIK you can use <rname /> to end the tag without closing it. Slightly more ugly than <rname> on its own, but only slightly. |
That wouldn't work though, because "<rname /> Room name" wouldn't (or shouldn't) be valid MXP (there's no value to the tag--it's the same as doing "<rname></rname>"). |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jul 10, 2008 11:48 pm |
Well, it wouldn't make it easy to get the name out, that's true - but as we've already demonstrated in the first few posts of this thread, it's pretty non-trivial to get the name out properly using any text prefix for room names. The main thing is that it gives you a solid anchor that you know is a room name, from which point you can apply the same principle as earlier in the thread, using a reparse trigger to get at the meaty part of the line. MXP has the bonus of being automatically hidden and available to MXP-sensitive clients, however the client choose to react to tags.
Neither {rname} nor <rname> on its own nor <rname /> gives an easy way to get at the room name - you've got to use <rname> with a proper closing tag for that. And, in fact, Toxic's implementation acknowledges that when it uses the {/rdesc} tag ;P
EDIT: Actually, thinking about this more, you could probably use an MXP trigger on rname that does #tag name %line to have it work with <rname />. I'm not sure if that'd work properly, but I have my hopes. |
|
|
|
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: Fri Jul 11, 2008 12:18 am |
After this thread was brought to my attention, I'd just like to say, where did said "particularly mouthy person" actually say that they won't support MXP, or dislike MXP? Given the development that we're seeing at the moment, and the intentions of the projects, I think you'd do well to eat your own words and perhaps rely more on firsthand experience rather than "a friend of a friend said this". The very fact that these projects have been initialized suggests to me that there is every intention to support MXP in the future, but that initially, the intentions are just to get the data and information out there to the public.
I know what I'd do if I was said Admin. I'd stop development right away and probably take the recent features out and tell everyone to just stick it.
He's working on a customized client atm, there's no reason he couldn't put all the stuff he wants into telnet opts, which i can almost guarantee would be a bitch to capture in c/zmud, and also would help discourage the development of un-authorised scripts, and give his client an edge on all the rest.
Wow, all these things he could have done instead of saying "Hey, this is what we're doing at the moment, and we plan to support MXP down the line" ....
You know, it really does sound like he's living up to this nasty rep you all are giving him... |
|
_________________ The Drake Forestseer |
|
|
|
Nick Gammon Adept
Joined: 08 Jan 2001 Posts: 255 Location: Australia
|
Posted: Fri Jul 11, 2008 12:38 am |
Let's try to stay calm.
At present Aardwolf is not an MXP-enabled server, and to properly make it one Lasher would need to do MXP negotiation, handle secure mode, convert the < > & symbols to < > and & and consider a heap of other issues.
The present implementation, which I have been assisting with, is designed to work with any client that is able to take a line like {stats}1,2,3,4,5 , save the figures, and omit the line from output. I would suggest all clients that are any good can do that, and thus the current implementation is neither favouring, or working against, anyone.
At a future date, MXP may well be supported, and it would probably only take a minor flag change to change {stats} to <stats> ... </stats> if that was required. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jul 11, 2008 12:58 am |
I'm sorry if I caused some kind of offence, Alluran, but I've no idea how I did so. My comment was in response to Zhiroc, when he said "whenever it comes up on Top Mud Sites, there's one person in particular that soundly bashes MXP (more the zMUD implementation)". I have no idea who that person is or what exactly their comments were; in my post, in fact, it could be a purely hypothetical person who complains about zMUD's MXP implementation. My point was just that if someone - anyone - has a complaint about zMUD (or CMUD, since zMUD isn't in development any longer), they should do it in this forum where something can be done about it.
None of my comments were meant to accusatory towards any particular person, and if you'll explain which were, I'll be happy to recant or rephrase them. My intention all along has just been to argue the merits of MXP, which I think we can agree is lovely. I think we've safely established that there're pros and cons to both implementations, and I don't think anyone, at any time, has really been complaining about Aardwolf's system. We're just talking around the reasons that it was chosen over MXP, and the reasons that MXP is also a strong candidate, and I don't think that sort of discussion can really be a bad thing. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jul 11, 2008 1:01 am |
Well, like I said, it's his MUD so he can do what he wants. But in my opinion, tagging the entire line is just a plain bad idea. What if you want to put some sort of flags after the name of the room? Or put the vnum after the room name when in builder mode? For example:
Code: |
{rname} This is the name of the room (flags) [1234] |
Assuming that the entire line will just contain the name of the room and nothing else is short-sighted and could make adding stuff in the future a real pain. That's why XML was invented as a standard in the first place.
And on Nick's argument, it's just as easy for any MUD client to strip the <rname> MXP tags as it is to strip the {rname} at the beginning of a line. It's a simple substitute command in any case. Also, using XML/MXP tags makes the MUD faster on clients that support MXP since no extra substitution is needed to get rid of the {rname} stuff. Requiring the player to strip out that tag themselves just creates more triggers to slow down the client. And with zMUD/CMUD/MUSHClient taking the majority of the client market (and MXP clients on Linux also available), I'm still just not sure why those clients are being ignored. It's really not that hard to implement MXP on the server at all.
Alluran: Is it Aardwolf Lasher that is working on a customized client? That's news to me. I'd be interested in getting that confirmed from someone who really knows the truth. I can't actually imagine that he has time to work on a client with all of the v3 server stuff that takes up his time.
Oh, and btw, anything with telnet options is trivial to capture and handle with CMUD these days (see Telnet triggers). |
|
|
|
|
|