About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Fri Jul 29, 2011 4:12 am   

Automapping Discworld (LPMud)
 
I know LPMuds are difficult to map, but I'm hoping I can set up cMUD to map Discworld nonetheless. Discworld does use MXP, but I'm not sure how extensively - I see no information about MXP tags in the help files, just options to work with MXP colors. I'm also not sure what the precise distinction is between a "line" and a "paragraph" is in the Automappoer configuration. Clearly a line is terminated with a carriage return, and is not defined by how many 'lines' it takes up on the output window, which is, after all, variable. So what characterizes a paragraph? White space between paragraphs perhaps? That's my working assumption, used in the schematic below, which shows output after a move. All lines (CR terminated) use 3 whitespaces of indentation in the output window if they continue past the last display column, so only the beginning of the line of text is flush with the left window border.

[Mud prompt, followed by echoed direction text, unless the echosed text is preempted by something else]
-----------The following may appear in any order----------
[Communication and or notification text, any number of lines or none at all -- color: changeable]
[Dynamic text - mob movement, etc., any number of lines, or none at all -- color: white, unchangeable]
[Echoed direction text, 1 line or none at all -- color changeable]
----------------------------------------------------------------
[Text minimap, any number of lines, or none at all -- color: multicolored, unchangeable]
[Description text, 1 line-- color: white, unchangeable]
[Dynamic Description text, 1 line or none at all -- color: white, unchangeable]
[Weather text, 1 line -- color is changeable]
[Exit text, containing "obvious exit", 1 line -- color changeable]
[Room contents - mobs, dynamic text, 1 line or none at all -- color: white, unchangeable]
[Room contents - immobile, possibly dynamic, 1 line or none at all -- color: white, unchangeable]
[Communication and or notification text, any number of lines or none at all -- color: changeable]
[Mud prompt, 1 line]


No blank lines appear in the output. Here is an example, with all possible types of lines showing:

>
The short priest recites a prayer.
The short priest asks: Have you seen the High Priest of Sandelfon?
A witty student assassin arrives from elsewhere.
ne
The witty student assassin saunters off southwest
$-
| /|
*- $- @
|
Here at its eastern end, Filigree Street enters Peasant Parade. It's a far cry from the hustle and bustle of
Short Street, far to the west, and the citizens here seem to have a more refined air about them than the
riff-raff ... houses line the street.
Several groups of people can be seen walking past, quite energetically. Either this neighbourhood is near one
of the busier areas of the city, or people are just in a hurry to get away.
It is a reasonably hot summer prime's afternoon with almost no wind and a beautifully clear sky.
There are three obvious exits: southwest, east and south.
A black moon dragon is standing here.
A street lamp is emitting a grimy light here and a wooden pole with a green note attached to it is trying to
be noticed, and an oil can is on the ground.
The black moon dragon glances about menacingly.
>

Because this is an LPMud, the Room Name doesn't appear in verbose output. As I understand paragraphs, all output is paragraph number 0, and the line positions of all Automapper elements are indeterminate. So it seems to me that only the Exit text can be consistently captured by the Automapper (at least that's something). If I can match color with a trigger, I think I can capture the Description using a regular expression with a \n (newline) and keying off the Weather text. Maybe color triggers are MXP triggers? I don't see much information about MXP triggers in the help file. Even with a color trigger, the captured Description text may include some dynamic text, but I gather the Automapper can deal with that, presumably only if I also capture the Room Name.

I think I can use a trigger on entering glance to get the Room Name, because the resulting output looks something like this:
The courtyard of the Assassins' Guild [w,nw,n,ne,e,se,s,sw].
So I can match the brackets and direction abbreviations, and capture the preceding Room Name. I don't mind glancing once in every room to get this to work.

Any insight on matching color with a trigger would be appreciated, as well as any suggestions to improve my strategy otherwise. I'll now see what I can get working, and update this thread if I figure anything else out. Thanks in advance to all experienced cMUDDERS who might want to help.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4740
Location: Pensacola, FL, USA

PostPosted: Fri Jul 29, 2011 5:23 am   
 
Have you thought about mapping it in brief mode? 'brief look'
Thats much easier.
_________________
Discord: Shalimarwildcat
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Fri Jul 29, 2011 5:38 am   
 
Yeah, I have, but then I wouldn't have Descriptions in my room properties. I don't yet know enough about the mapper to be sure that this won't be a problem when speedwalking, or for something else.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4740
Location: Pensacola, FL, USA

PostPosted: Fri Jul 29, 2011 6:54 am   
 
It shouldn't be an issue, so long as you have a step confirmation (#OK) and safe mode.
I usually make a trigger for the exit line to cover this.
_________________
Discord: Shalimarwildcat
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Fri Jul 29, 2011 8:21 am   
 
Glad to learn that Shalimar, thanks.

I'd still like to come up with a complete solution -- I can imagine situations where having the descriptions available for all rooms will be handy.

I have learned more about MXP triggers, and how Discworld uses MXP tags. It tags the exits, but not the Description or the Room Name. It seems clear that I'm not going to be able to match the color of the weather text, and reference the previous line or two to capture the Description. But using Lua, I can imagine another solution. I could use a regular expression to match 4 lines, the last of which is the Exits text, which contains consistent characters. The first two lines would be candidates for the non-dynamic Description. If I can save them into variables, and then process them as strings. With Lua, I should be able to compare their lengths. The longer one will be the static description, and the shorter one will be either a snippet of dynamic description, or a line about mob movement, communication, or a system notification which preceded the Description. A line of communication could conceivably be quite long, but I could check for that with a limited set of string patterns ("tells", "whispers", etc).

From google searches, it seems that people have been struggling with mapping Discworld for years. I don't know how many succeeded, and how many settled for a halfway working kludge, but I'd really like to lick this thing.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4740
Location: Pensacola, FL, USA

PostPosted: Fri Jul 29, 2011 9:47 am   
 
Well I said how I did it.
I don't find the room descriptions all that relevant unless you are questing anyway, besides, don't some of the room descriptions themselves change pretty often? That messes up using the room description to confirm you moved.

Once the map is made, go back to verbose and it should follow fine.

As far as priest/wizard/witch travel... #TELE is useful when you go to the right room.
_________________
Discord: Shalimarwildcat
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Fri Jul 29, 2011 4:46 pm   
 
> score quests
You have not completed any quests.

I'll be doing a good bit of questing. Not having much experience on Discworld, I didn't realize that many of the Descriptions change; I just haven't been in enough rooms yet to notice anything changing but the second line of Description text. Thanks, again, for sharing the benefit of your experience. I would like, though, to remove the distinction be tween "mapping" and "not mapping" as much as possible. I don't plan on fully exploring an area, and only afterwards starting to interact with the explored rooms and mobs. Finding a complete solution would largely remove that distinction. I don't expect to never turn off the Automapper and mapping triggers, just not to micro-manage them too much.

To get all information, I realize I'll have to get both brief and verbose output for each new room. I could, I imagine, run in verbose mode all the time, and after entering each room check to see if the Room Name property is blank. If so, I could send glance and capture Name text via trigger.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4740
Location: Pensacola, FL, USA

PostPosted: Fri Jul 29, 2011 6:38 pm   
 
Well... if you dont mind a bit of extra text.... leave it in brief mode and use the following as well

#EVENT onRoomEnter {look}

That should pop the verbose description as well... or is that the 'glance' command?
_________________
Discord: Shalimarwildcat
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Fri Jul 29, 2011 10:39 pm   
 
Thanks for that tip. I've been working on a comprehensive trigger to do get everything I want, and #EVENT will work nicely to tie it all together. I've managed to get a regex and script which consistently captures the static Description from a verbose look, and the Room Name from a glance. I''ll try now to turn it into a multistate Zscript pattern, so I can use ANSI color mathcing to make it more specific, eliminating potential bugs with output I've not seen yet. I also realized that at night, outside, there's a line between the text minimap and the Description text that describes the lighting from the moon, and inside there's no weather text. I've incorporated these complications into my trigger.

I think soon I'll have a full solution for mapping Discworld without fiddling with the room properties or the brief/verbose settings -- a single alias to turn the fully working mapper on and off. There may be yet more lines of text that get inserted into the minimap-to-exits sequence on occasion, but I'm confident I can update the trigger to handle them.

Incidentally, I noticed that Discworld defines MXP elements useful for automapping on login, as well as stuff for communication, but then doesn't use any tags with the output of those types of lines. I wonder why the creators started implementing MXP mapping, then abandoned it. Since Discworld has been known to be hard to map for much of its 20-year history, and the automap-friendly MXP implementation was abandoned, I can't help but wonder if the creators are for some reason trying to discourage automapping. They did add the nifty MXP-clickable text minimap, which reacts to the in-game visibility conditions, so I suppose they are trying to encourage a more IC experience than automapping provides. New players will be constantly looking at online atlases anyway to find things, and I think an integrated CMUD map is a hell of a lot better than alt-tabbing a lot, so I'll share my mapping script when it's done nonetheless.

Do you know if sharing a CMUD map database for Discworld is against the rules? I don't see any specific rule covering this, but the lack of any map packages online suggests it's also frowned upon.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4740
Location: Pensacola, FL, USA

PostPosted: Sat Jul 30, 2011 12:19 am   
 
I would make a #NOMAP trigger for the lighting level and weather affects
_________________
Discord: Shalimarwildcat
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Sat Jul 30, 2011 1:12 am   
 
That can be done for the weather effects, since the color of the text is changeable. #NOMAPPING the lighting text is not so easy. I don't know all the possible strings for the lighting text, or if they always contain "moon." I haven't seen any indoor lighting effects, but I've visited very few rooms. Even if there are no indoor lighting effects now, and all outdoor lighting effects contain "moon" (or perhaps "moonless") at the moment, Discworld can surely grow, and there's no telling what might be added.

The central idea here is that I think it's more reliable to rely on output format than content. Both can change from room to room and over time, but the rate of change of format is much slower, and changes are much easier and simpler to spot while you play without constantly thinking of your automapping scripts. For me, with my very limited knowledge of content, focusing on format makes even more sense. I'm trying to make a durable, reliable mapper than can be easily adjusted for changes on the MUD (or just things I newly discover). Adding individual exceptions for each content difference in content is a generally bad coding practice, to boot.

A simple #NOMAP for colored weather does work great, but I've already found that incorporating the weather line into my patterns reduces the possible results. The range of possible inputs, that I know about, is lighting (maybe), static Description (definitely), dynamic description (maybe), weather (maybe), along with matching the last line of the text minimap and the exit text, to anchor things and give a consistent frame. That's quite a few possible combinations, and, oddly enough, keeping the certainly-identifiable weather text in the patterns makes the possibly empty parameter variables more consistent across all possibilities, and makes comparing the actual content of the parameter variables unnecessary (aside from empty or non-empty). Which goes back to relying on format, rather than content.

As always, your insight is still valuable to this Discworld newbie.
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Sat Jul 30, 2011 8:43 pm   
 
Well, I got things working last night, but not exactly how I'd like. I have follow up questions about CMUD that are more general in nature, so I'm going to start new topic(s) for them. I'll post my solution when I've got it working the way I want it to.
Reply with quote
Mnem
Beginner


Joined: 30 Jul 2011
Posts: 16

PostPosted: Tue Aug 02, 2011 10:18 pm   
 
Hey Hazram, I've been working on the same problem. We have probably duplicated each other's efforts. Are you going to post your solution any time soon? It would likely save me a lot of time.
Reply with quote
Hazram
Wanderer


Joined: 24 May 2005
Posts: 71

PostPosted: Tue Aug 02, 2011 10:47 pm   
 
I'm still testing my code, and have made a few adjustments, though in general it is working as designed. I'm also working on extending it. For example, I'd like to move the text minimap info to the CMUD map. The heart of my solution is a carefully crafted, multi-line regex pattern, just as you discussed in your MXP Trigger thread. The key to getting the room description is considering everything from the last line of the minimap to the exits line together, as a group, with one pattern. I'll send you my regex in a message, though to use it and adjust it if necessary you really need to understand it, and it's long and fairly complex. At some point I'll write up a some help-text for it, deconstructing the regex and explaining where minor adjustments might need to be made, but I haven't done that yet.

I've decided to share my full mapper as a package, so I'll publish that with the shared library when it's at some point of completion.
Reply with quote
Arangar
Newbie


Joined: 21 Oct 2011
Posts: 2

PostPosted: Fri Oct 21, 2011 11:10 am   
 
Any news on this? I just picked discworld back up and can't quite get to grips with either zMUD or cMUD mapping it....
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