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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Hobox
Newbie


Joined: 15 May 2006
Posts: 3

PostPosted: Mon May 15, 2006 3:15 pm   

XML
 
I play MUME and can't figure out how to use XML with ZMUD. Can anyone help me?

Below is an example of how the output can look like.

<room><name>Felak Baruk
</name><description>All along this passage hang axes. From floor to ceiling, they hang
majestically, testament to times of war and glory long since passed from these
proud people. The axes are of all shapes and sizes, lengths and widths. You
can spot legendary axes, from tales told of heroes long gone, their only link
back to the living world. The axes line the way, separated only by white
stones, carved bowl-like into the wall, emitting a faint glow like muted
candle-light into the hall.
</description>A cup has been set here.
A large torch lies here among the dust.
A well-crafted white fountain is here, water pouring forth from it.
A traffic sign is here, giving directions.
</room>
<prompt>!#></prompt>
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon May 15, 2006 6:08 pm   
 
I'm at work so I can't verify.. but I think you simply need to enable MXP in your preferences.
_________________
Asati di tempari!
Reply with quote
Hobox
Newbie


Joined: 15 May 2006
Posts: 3

PostPosted: Mon May 15, 2006 8:06 pm   MXP
 
Tech wrote:
I'm at work so I can't verify.. but I think you simply need to enable MXP in your preferences.


If you meen Preferences-General-Emulation so is MXP/HTML checked. Is there any other place that this has to be enabled?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon May 15, 2006 8:36 pm   
 
No, but unless your MUD specifically enables MXP and tells the client, then ZMud will assume you are operating without MXP. This moreorless means that you have to do all the setup work with elements, entities, and tags.

The tags look simple enough, though, so it shouldn't be much of a problem:

#MXP <!element name FLAG="roomname">
#MXP <!element description FLAG="roomdesc">
#MXP <!element prompt FLAG="prompt">

I think you might have to include a TAG=20+ in there, where 20+ = a unique number greater than or equal to 20, which is where the user/game-defined tags start up. And, if you want to do something visual to the text, you need to put that in single quotes after the tag name:

!element name '<color red>'
_________________
EDIT: I didn't like my old signature
Reply with quote
Hobox
Newbie


Joined: 15 May 2006
Posts: 3

PostPosted: Tue May 16, 2006 11:00 am   
 
I've read all the tutorials but I cannot figure out where to put the above statements. Embarassed

Could someone explain or maybe give me a link to a step-by-step guide.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue May 16, 2006 11:23 pm   
 
Just enter them at the command line. The results will appear in the Elements/Entities/Tags tabs of MXP preferences and ZMud will handle them automatically.
_________________
EDIT: I didn't like my old signature
Reply with quote
Nightmare
Newbie


Joined: 19 May 2006
Posts: 1

PostPosted: Fri May 19, 2006 8:31 am   
 
I also have a problem with MUME XML output. I've tried manually adding elements (including TAG numbers) as stated above but ZMUD doesn't seem to recognize them anyway. I tried to highlight "prompt" (#MXP <!element prompt '<color red>' TAG=20 FLAG="prompt"> ) in different colour just to try if it works but nothing happened.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri May 19, 2006 9:06 am   
 
MUME's 'XML' mode is NOT MXP. I've been pushing the management since just after the XML mode was introduced for it to be changed to (or depracated in favour of) MXP mode. If you have tried adding these tags as custom elements and they are still not working, it might be the fact that MXP also uses line tagging via MXP escape sequences (like ANSI escape sequences). MUME obviously does not send these escape sequences at the moment. I've not actually tried getting zMUD to recognise the XML tags as MXP tags myself.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri May 19, 2006 11:05 pm   
 
Actually, Seb, that's not a problem. Both the mud and the user can create all the tags they want, but the user can basically only create open tags. By default, tags are created in secure mode and you can't override those from the user side. Thus, since the game isn't sending any definitions you need to create them and include the OPEN keyword:

#MXP ~<!element prompt 'stuff' TAG=20 FLAG="prompt" OPEN>

I forgot to mention that, as well as direct the discussion to the MXP spec article found here: http://www.zuggsoft.com/page.php?file=zmud/mxp.htm#ELEMENT
_________________
EDIT: I didn't like my old signature
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat May 20, 2006 1:11 am   
 
Ah that's it. Thanks MattLofton. I've actually already read the whole MXP spec, but I've not yet read anything about MXP in the zMUD manual (since I didn't think I could use it on a MUD that didn't use MXP), so I wasn't sure if prompt flagged elements would work in OPEN mode.

Anyway, with the OPEN keyword at the end, the prompt XML tag is absorbed, rather than transmitted, by zMUD.

BTW, these are the correct commands to put into the command line to create the right elements (you can view them under Preferences, MXP, Elements) (the TAG=xx is optional - if the FLAG is working properly, it shouldn't be needed):
Code:
#MXP <!element prompt FLAG="Prompt" OPEN>
#MXP <!element name TAG=10 FLAG="RoomName" OPEN>
#MXP <!element description TAG=11 FLAG="RoomDesc" OPEN>

However the name and description tags don't work properly (and I also tried "tell") - the opening tag is still transmitted. I think this is because of the line break before the closing tag. The absence of the line break before the closing </prompt> tag means that this tag does work. If I simulate MXP output with the #MXP command, I can get the name and tell tags to work when there are no line breaks. Perhaps it is possible to make some triggers to remove these line breaks and put them back in later...

So in short, it may be possible to get a working MXP set-up working for MUME XML mode, but it's not going to be a walk in the park, and I can't be bothered with it, particularly while there is a reasonable chance of getting MXP implemented in the server.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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