Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Aug 04, 2008 6:46 am   

Mud Sent XML Tags
 
Mume doesn't use MXP but wraps Room info in XML. I don't really know much about either, but for mapping I imagine that would be great, I could stop auto mapping and create rooms by triggers. That would be cleaner and I could forget nodirs and nomaps. Turning this option on makes the game unreadable though and to #sub on so much information seems formidable speed wise. Is there a way for ZMud to internalize those tags like MXP? Or can the auto mapper use them directly? If so where could I learn this?

Thanks
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Mon Aug 04, 2008 11:17 am   
 
There was a description of how to do it not that long ago. Search for ELEMENT. It lets you define a conversion from the tags your mud is using to the known MXP tags, and can be setup with the #MXP command in an onLoad event.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Aug 04, 2008 2:39 pm   
 
Awesome.

I am looking at ELEMENT in http://www.zuggsoft.com/zmud/mxp.htm. (how likely an address?) Seems the thing. I will see if I can use them in an onLoad event, as you suggest. Haven't found the thread yet, but this article explains a lot.

:)
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Mon Aug 04, 2008 7:23 pm   
 
The answer is that zMUD cannot do it due to the way the XML tags are formatted across lines. However, CMUD should, in theory, be able to handle these due to some additions (some, or possibly all, of which suggested by me) Zugg made. The key is the new MULTILINE option in MXP tags (elements). You may want to read this thread for all the details, background and other info. However, I have not actually tried to make a map configuration based on these new features as yet.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Aug 04, 2008 8:22 pm   
 
I have gotten this far, but thought I had it:

Example:

Code:
<!ELEMENT RName '<FONT COLOR=Red><B>' FLAG="RoomName">
<!ELEMENT RDesc FLAG='RoomDesc'>
<!ELEMENT RExits '<FONT COLOR=Blue>' FLAG='RoomExit'>


Where I would use:

Code:
<!ELEMENT name '<FONT COLOR=Red><B>' FLAG="RoomName">
<!ELEMENT description FLAG='RoomDesc'>
<!ELEMENT exits '<FONT COLOR=Blue>' FLAG='RoomExit'>


for


<room><name>A North-South Path
</name><description>The path winds through a field which is rarely used, as evident from the
patches of grass growing on it. Such a field is unusual in the country farmed
by hobbits. Usually the hobbits are very careful farmers, and catch all weeds
trying to invade their precious fields. The nearby fields confirm this
impression: this field is the only one not to be well-kept.
</description></room><exits>Exits: north, east, south, west.
</exits>

this could be an interesting tag (or element, still foggy about what is what.):
Code:
<movement dir=south/>


That is not sent if it is a #nodir.

So you are saying that the description would span lines and so this approach would fail.

Perhaps I can ignore endlines within paragraphs or maybe the mud has a no-wrap or super line length thing they do?

Anyway I will read the link now having spent a good amount of time on this very cool subject.

(I talked my friend into downloading CMud with me because I have some familiarity with ZMud code and can do his settings. Since I am providing and he is a bit code illiterate I thought to do some includes for my tells and display messages with font effects and/or images. bwa ha ha. Actually I will have those triggers in settings too, if I can manage all that)

Now to read the above link. TY



edit: ooops, I have CMud now
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Aug 04, 2008 10:21 pm   
 
I take it "<tag/>" is the standard XML closing bracket. I don't have that. I am going to just try to get the mud to effect some text first, then if that works I will see about the mapper.

I got the term XML from a dated thread and did not finish reading it as it pertained to alternative mappers. I would prefer to fix my system if I can.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Aug 04, 2008 11:08 pm   
 
That went badly.

I tried to make an alias with <!ELEMENT hit '<COLOR red><B>'>

That had no effect on this text:


<hit>You shoot a garden snake's body extremely hard and shatter it.
</hit>You receive your share of experience.


So I looked into system for the unload alias, which I thought might have been a convenience but now thing may not be. I didn't find one so created one and put the ELEMENT there.

and the loss of this poor little bunnies life did not help me either:

<hit>You shoot a cute, bouncing rabbit's body extremely hard and shatter it.
</hit>You receive your share of experience.

However these exits now show with two horizontal rules covering them even after I turned off the XML feature of the mud:

pleasant. However, you realize you could get lost, if not careful.
</description></room><exits>Exits: north, east, south, west.

And I would try to delete the element that isn't working but would much prefer to understand what happened then further mess things up
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Tue Aug 05, 2008 3:41 pm   
 
Leitia wrote:
I take it "<tag/>" is the standard XML closing bracket.

Actually these tags are called Empty (Element) Tags.

Leitia wrote:
That went badly.
I tried to make an alias with <!ELEMENT hit '<COLOR red><B>'> ...

Well, it doesn't look like you read the thread I pointed out.

Leitia wrote:
However these exits now show with two horizontal rules covering them even after I turned off the XML feature of the mud:

pleasant. However, you realize you could get lost, if not careful.
</description></room><exits>Exits: north, east, south, west.

I don't know what you mean by this. If you turned off the XML feature of the MUD, you won't get XML output like you have quoted.

Leitia wrote:
And I would try to delete the element that isn't working but would much prefer to understand what happened then further mess things up

You need to read all the MXP documentation available in z/CMUD (including the #MXP command) and the thread I pointed out and it should then make sense.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Tue Aug 05, 2008 4:34 pm   
 
I really did read it and made mht of any defining thread and article I could find. I will give it another read and not make assumptions. I thought you had to use secure types for open ones in secure mode or something like that, all new and confusing to me, and that seemed to not be what I had for output. I am glad to hear I missed the point. I felt at a dead end.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Tue Aug 05, 2008 4:49 pm   
 
The strike out (I think that is now) didn't show by pasting text, that text with the XML was badly put there, I don't know why I used it, sorry
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net