|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Wed Jul 15, 2009 1:49 pm
Manual Map Creation (Multiline Descriptions) |
The mapper refuses to work for my MUD. It won't even fail in a consistent manner. It just randomly messes up. (Which is odd, because the autoconfiguration gave me the name/desc/exits colorized just right, and yet outside of the autoconfigurator it screws up completely.) I also can't get keyboard creation to work. It's quite a struggle. Oh well.
The output is trivial so it's no problem at all to make triggers to parse it. Here's the format.
Name
Desc
Desc
Desc
Exits
I've looked at commands like #makeroom and #tag but while it's easy for me to make triggers to take in and process all that information, I'm having nontrivial issues trying to get it into the mapper.
Basically what I want to do is create an alias that will issue a "look" command and create a new room off to the side with the name and description. Being able to edit exits manually by script would also be wonderful, but I won't hold my breath, and I'm ready to just have to connect all the rooms myself.
So basically, how do you specify a command parameter that is multiple lines while preserving the newlines? |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jul 15, 2009 4:01 pm |
Show us a real example of a room from the MUD so we can help more. The basic format you showed above is what the mapper was designed to handle and overriding *all* of the mapper is non-trivial and a huge job.
You might want to give us more information and examples of what rooms the mapper messed up on. Also, have you read all of the help topics in the mapper Help menu to learn how to properly use the #NODIR command in a trigger to keep the mapper in sync when you move in an invalid direction, and using the #NOMAP command in triggers to ignore various lines from the MUD that might change the room description, such as weather info, etc.
To answer your question, you would need to create a multi-state trigger with the first pattern that matches the room name line and then a second state that captures each description line and appends it to a variable, and then a final state that matches the exit line, stores the accumulated room description and does all of the #tag commands. But honestly, that's probably going to run into the same "random" problems as the real mapper since I think your problem is that certain rooms on your MUD are not following that exact syntax or are getting other text mixed up in the process.
You'll probably spend more time trying to do this yourself than in trying to use the existing mapper and get it tweaked to work better on your MUD. |
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Wed Jul 15, 2009 4:25 pm |
Okay, here's some text.
Academy Courtyard
{coords}-1
The courtyard wall curves around here and meets the Academy proper. The
marble walls of the Academy rise above you, shadowing this scenic corner of
the courtyard. Tall yew trees stretch upwards, dwarfed by the building, and
cool grass stretches south to meet a flagstone path. Bright windows glimmer
from the second floor of the academy, but there are none to allow viewing on
the first floor.
[Exits: east south]
Not counting mobs and crap in the room which might be confused with the description, which is trivial and easily manually-corrected. So the triggering is trivial: The line before ^\{coords\} is the name, the ^[Exits: *]$ line is the exits (closed doors are parenthesized), and everything between is the description. I haven't paid attention to whether mobs are shown before or after exits, but it doesn't matter anyway.
What happens when I try to use the mapper in Map mode to auto-detect rooms, sometimes when I go into a room it will not detect it at all and will just sit there. If it does detect that I've moved a room, it manages to get the description okay, but the name it gets is a random selection of the actual name, and a corrupted partial string of the {coords stuff. (When I did the autoconfiguration, it correctly colour-hilighted the name, description, and exits line, and the {coords line was uncolored, presumably because it recognized it as irrelevant.)
As a result of the faulty detection, the map gets all messed up, like an Escher painting. I start getting offset duplicated subzones with names like "0,31,40}" all over the place.
Other issues:
1) Keyboard creation does not work. Docked, undocked, focused, unfocused, it just plain does not work.
2) Tried using #makeroom with just foobar data to at least test it and it failed. It made my windows blink a little but no room was created. At all.
(I can make correct rooms manually by typing everything in and clicking by hand, and I can make corrupted rooms with the automapping (sometimes), and cannot seem to make rooms by any other means.)
*) I already knew how to collapse the entire description into a single variable with multiline triggers, but I don't understand how to preserve the newlines and whitespace. Some descriptions are multiple paragraphs and are indented. All descriptions are wrapped server-side, and all other text is wrapped client-side (which is good, so the rooms look better, really). |
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Wed Jul 15, 2009 7:35 pm |
Been screwing around with it some more, and I got it to at least get the room title right, but it's still lagging out in weird ways. I have tried gagging my prompt without #tag, gagging it with #tag, and not gagging it at all. If I turn off Automatic Detection Of Prompt in the mapper config, even if I have a prompt #tagged, it stops detecting rooms at all. If I leave that on, it actually detects my [Exits: line as my prompt, even if I #tag it.
And half the time it will update the room name and description, but it won't update the exits, until I've 'look'ed half a dozen times, or gone back and forth in the area. |
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Wed Jul 15, 2009 7:53 pm |
This is just not going to work. Even if I #tag every single thing except the description, it still screws up. I realized that the autoconfigurator was deciding that all room descriptions were going to be the same number of lines long, so it keeps putting Exits Paragraph at 0 and Exits Start Line at 5. If I put on the checkbox that says Exit Line Contains Key, it still uses the previous room's exits half the time, and suddenly starts putting in blank descriptions for some of the rooms! This is just impossible to debug in this condition of randomness.
Not to mention that now I can't even get it to autocreate the rooms in even a messed-up fashion. If I create a blank room and manage to get it to believe I have entered a room so it sees the name/desc/exits, there is no save option. I add and delete a character to get a Save Changes button, but it saves it into /dev/null or wherever and the room is still blank. It won't autocreate a single room even when it updates the name/desc in the box.
I even got it to do it before, and now it won't, that I've removed any extra crap from the text that it could possibly be choking on. It would be a matter of minutes to create my own triggers to parse this; I don't need the AI at all. But putting it in manually won't work either, even if you can put whitespace and newlines into a variable. |
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Wed Jul 15, 2009 8:30 pm |
I completely purged CMUD and all my settings from my system, and reinstalled, and did not upgrade to the beta. Opened it up, configured it, boom, it works flawlessly. Obviously something is very, very broken in the beta, somehow, with my MUD. (Aardwolf.) Or perhaps with mapping with gagged prompts and tagging and so forth. If you have anything specific you'd like me to do to try to test this further, I can do so and move the discussion to the Beta forum. I have to admit, that behavior completely baffled me.
|
|
Last edited by jakj on Wed Jul 15, 2009 8:56 pm; edited 1 time in total |
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Wed Jul 15, 2009 8:55 pm |
I was wrong. The stable-release one is screwing up too, just not as bad.
First problem: Without prompts gagged at all, it works great...if the walk mode is set to fast. Don't ask me why or how, but when I have it set to Slow, it lags out, screws up trying to map rooms, and can't track me running in them either. It does SOMEtimes, but not every time, in no pattern that I can figure. But if I switch to fast, it works perfectly, both mapping and walking. How could the walking mode possibly affect the mapping of rooms in the first place?
Second problem: It just absolutely shuts down if I gag my prompt. Gagging the prompt without reconfiguring it make it simply stop working. Reconfiguring after gagging the prompt makes it go completely insane: I'll actually be mapping and I'll go north and it'll put a room south, I'll go east and it'll put one north, then I go west and it'll put a new room over top of the previous. Worse than Escher. Finally, if I turn off automatic prompt detection and #tag my gagged prompt, it stops working entirely again. I just don't get it. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Jul 16, 2009 1:11 am |
A couple things you can try. First, is there a setting on your mud which will turn off wrapping? If so, turn it off and let cmud do the wrapping for you. If you do that, does your room description go into a single "line" from the mud? That will help greatly. Reconfigure the mapper and see if that helps.
If you gag your prompt, or do anything else to change the output from the mud, you need to reconfigure the mapper.
Are there often lines like "{coords}" in the mud output? If so, you can make a trigger with a value of "#nomap", to force the mapper to ignore those extraneous lines.
Do any of your room descriptions change, with nighttime, weather, or lighting? If so, make sure the "Room Description Changes" checkbox is marked. Or even uncheck "Room Description" so it doesn't try to capture it.
If you are still having problems, you can try manually editing some of the configuration parameters. Check the Room Exits parameters. If all the exit lines start with "[Exit", then make sure that keyword is in the configuration, and checkmark "Exit line contains key" and "Exits after key". Make sure the other parameters make sense. Adjust them if you think they might need it. If the mud prompt sometimes ends up on the same line as the room name, you can try unchecking "Match Room at Start of Line". Perhaps "Match Room at End of Line" would work better. Test various possibilities out. Getting the map configuration right can take a bit of patience. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jul 16, 2009 5:53 am |
As Rahab mentioned, you just need to use #NOMAP on the {coords} line. His other advice is also good.
Aardwolf is the MUD that I personally play most of the time, and the mapper works flawlessly for me. And I'm not doing *any* #Tagging. Do not mess with the various "Start Line" and "Paragraph" values. Most of the values you can set these too manually will not work. These are advanced configuration arguments and should be left at the values detected by the auto-config.
I don't have the {coord} line in Aardwolf myself, so that must be some sort of special flag you have enabled. But it's exactly the kind of line that will confuse the mapper that you need to use with #NOMAP.
Quote: |
I realized that the autoconfigurator was deciding that all room descriptions were going to be the same number of lines long |
No, that isn't how it works at all. Room Descriptions are always a variable number of lines. The names of some of those configuration parameters are very misleading since they are mostly used for internal debugging and are not meant to be messed with. Obviously if CMUD used a fixed number of lines for a description, then it wouldn't work very well...that would just be stupid.
Quote: |
it works great...if the walk mode is set to fast |
In fast mode, the mapper is ignoring the configuration and never tries to match room names. Safe mode is the normal default, which will match room names on the map with the rooms you travel into. Slow mode is for advanced scripting.
Quote: |
It just absolutely shuts down if I gag my prompt. |
The prompt is extremely important for reliable working of the mapper. If you change your prompt, update the regular expression for the prompt line in the mapper configuration. However, using "#tag prompt" works fine for me here when I try it. |
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Thu Jul 16, 2009 10:38 am |
Yes, I got it working perfectly fine in terms of room names/descriptions (in the normal; beta still fails completelysomehow and I don't know what I'm doing wrong...so I just won't use the beta for now). My current temporary solution is, when I want to make a map, I ungag my prompt, make the map, log off and tweak it as necessary, log back on and test it completely, then freeze it and gag my prompt again. Fast/Safe mode track the map 100% successfully because it makes those room name triggers; I bet I could make an #OK trigger to get Slow mode to work too if I needed it.
Really, the last annoyance is having to ungag my prompt to map. Couldn't you just make a #MAPOK or something that works the same way as #OK except for the mapper? I mean, Aardwolf is so straightforward. I didn't even have to use the #nomap on the {coords} line in fact; I just triggered on it to parse and gag it, and the mapper ignores gagged lines. Aardwolf, after some testing I did, always outputs the name/desc/exits as an atomic chunk, so it's not possible (so far as I can tell) for any weather, mob, combat, or any other information to mess up the description. So the simple [Exits: keyword config in the mapper works perfectly.
If I could just manually issue an OK to the mapper, that would be all that is necessary. (And incidentally, if you made #tag descstart and #tag descend, you could give a great way for someone to specify that to the mapper. It is working for me now, though, as I said.) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jul 16, 2009 4:35 pm |
In theory, the "#TAG prompt" command should be doing the "ok" for the prompt if it is gagged. But it sounded like you tried that and it didn't work.
Also, if you could post to the beta forum about what isn't working with the beta mapper, that would help get it fixed. I haven't had any issues with the beta mapper on Aardwolf myself, so I'm curious about what the problem is.
The map configuration stuff isn't any different between 2.37 and the 3.08 beta. Improving the configuration wizard and the #tag command stuff is part of the Phase-2 of the mapper rewrite, which I haven't started yet. That's the other reason I'm curious about why 3.08 doesn't work..because that part of the code hasn't changed. |
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Thu Jul 16, 2009 5:26 pm |
Is there a way to install the beta separately from my regular one so I don't screw up everything while I test and I can keep actual MUD play on the stable?
|
|
|
|
jakj Novice
Joined: 30 Apr 2006 Posts: 45
|
Posted: Fri Jul 17, 2009 12:43 pm |
Well, here's a good example of a description it still messes up on. (Though it's working on 99% of rooms now, with my prompt ungagged.)
*-*-*
The Grand City of Aylor (G)
You stand on the edge of the beautiful City of Aylor.
A bright light shines down from the heavens, pouring over you, bathing you
in its warm glow. Everything around you seems rich and pure in color. An
enormous, white temple stands to the north, taking up most of your view.
To reach the Aylorian Academy, you must travel up the large staircase that
stands just off the side of the church. (Type 'UP' to learn how to play the
game.)
Below you are large piles of armor and equipment discarded by other
adventurers.
[Exits: north east south west up down]
*-*-*
Now, when the mapper gets that, this is what it finds.
Name: "game.)"
Description: "
Below you are large piles of armor and equipment discarded by other
adventurers.
"
Exits: neswud
I just finished mapping almost all of the rest of that zone, and every other room worked fine. (Some of them required a couple tries, because they were pulling part of the prompt as the room name and giving just "0" as the name, but when I went back out and in again they worked.)
Any ideas what's up with that one room? If I edit the name/desc manually, it works for walking, of course, since it triggers on the name I gave it, but I can't use the "Find" for it because it keeps seeing the name/desc wrong. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jul 17, 2009 6:29 pm |
Quote: |
Is there a way to install the beta separately from my regular one |
Unfortunately it's a bit tricky. Both versions use the same directory pointer to store your sessions (packages, mapper config, etc). What you would want to do is create a new session and copy your scripts across so that the 3.08 version wouldn't mess up your scripts and settings from the 2.37 version. Copy your current map file and let 3.08 convert it in the folder for the new session.
You will also get an error message when you run 2.37 after using the Beta. Something about "limegreen" not being a valid color. Just click the "Continue Application" button to get past this. Or you can delete the STYLES.INI file in your CMUD directory. The issue with this bug is that the 3.08 version stores the color *name* in the STYLES.INI file instead of the raw RGB value, and the 2.37 version doesn't know how to handle the color names.
Scripts for Aardwolf mapping
Here are some of my actual scripts that I use for mapping Aardwolf:
Code: |
#TRIGGER {Alas, you cannot go that way.} {#NODIR}
#TRIGGER {In your dreams, or what~?} {#NODIR}
#TRIGGER {Nah... You feel too relaxed...} {#NODIR}
#TRIGGER {You are entangled in an invisible web!} {#NODIR}
#TRIGGER {You are too exhausted.} {#NODIR}
#TRIGGER {You aren't allowed in there.} {#NODIR}
#TRIGGER {You can't fly.} {#NODIR}
#TRIGGER {You need a boat to go there.} {#NODIR}
#TRIGGER {The door is closed.} {#NODIR}
#TRIGGER {~*~*~* Minimum Level For} {#NODIR}
#TRIGGER {It is pitch black ... } {#OK}
#TRIGGER {^You can't see a thing!} {#OK}
#TRIGGER {^(%w*)} {#TAG Name {%1}}
#TRIGGER {tnl~] ~> %e[1;32m(%w*)} {#TAG Name {%1}} "" "ansi" |
This assumes the internal ASCII map is disabled. I have other triggers that use #NOMAP to ignore the ASCII map and to capture it to another window if you use that.
As you can see, most of the triggers are #NODIR to handle various wrong movements. The key triggers that you want are the last two #TAG triggers. They capture the room name either on a line by itself (first one), or after the prompt (second one). In my prompt the "tnl] >" is the end of my prompt, and it's an ANSI color trigger.
The reason for the #TAG Name triggers is to handle the case on Aardwolf where there can be a (G) at the end of a room name (for rooms with graffiti). The (G) confused the normal mapper because room names do not normally contain punctuation like ( and ). So the #TAG Name triggers override that and pull in the entire line as the room name. Remember that in zScript, the (%w*) pattern says to capture a string that starts with a word character and then capture everything after it. This is a bit confusing for people who normally work with Regular Expressions who might think that this only matches zero or more words but not white space. The * in zScript matches anything and doesn't modify the previous wildcard like in RegEx.
But except for dealing with the ASCII map, that is all the triggers that I use, and I've mapped a large portion of Aardwolf. Now, I'll admit that I did most of my mapping last year and haven't played much recently, so if they have changed anything on the MUD, there might still be some quirks.
Finally, here is my mapper config:
Code: |
Version: 211
Name Start: 0
Desc Start: 1
Desc End: 4
Exit Start: 5
Exit End: 5
Exit in Prompt: 0
Exit in Name: 0
Exit contains key: 1
Name paragraph: 0
Desc paragraph: 0
Exit paragraph: 0
Bracket prompt: 0
Short exit names: 0
vNum in Name: 0
Exit keyword: exit
Exit after keyword: 0
Match room name mode: 1
Use Descriptions: 1
Entire exit paragraph: 0
Single char exit: 0
Autoprompt detect: 1
Complex prompt: 1
Prompt char: [
Name ends in period: 0
Number prompt: 0
No MUD Prompt: 0
Room Name Propercase: 0
Prompt trigger: ^\[\s+\d+\/\d+\w+ \d+\/\d+\w+ \d+\/\d+\w+ \d+\w+\] \>\s+
Prompt Regex: 1
Description changes: 1
[Map Script]
[Map Explore Script]
[End] |
|
|
|
|
|
|
|
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
|
|