|
Odeon Novice
Joined: 17 Nov 2008 Posts: 30
|
Posted: Mon Nov 17, 2008 8:11 am
Mapping - Room names, descriptions, ... |
Hi,
Could you help me configure the mapper ?
I'm using Mutlimud : www.multimud.net
and i've difficulties with map preferences :
i've checked multiline descriptions
i've configured
exit line keyword : exits :
It recognizes rooms exits (in blue with wizard)
but i can't grab the room name wich is in middle of the line with <( )>
Furthermore, i think i will be annoyed with Weather (Daylight, Night...)
or with lines like : "You enter..."
Could you give me some advice ?
Thanks,
Code: |
34H 133M 70V >n
<(---< Daylight >---------------------------------------< Thundering >---)>
<( Cathedral Square )>
<(-------------------------------------------------------------------------)>
This is the big market square in front of the famous Freyburg Cathedral.
There are lots of farmers selling their stuff. From the number of people
walking around here you guess it must be quite the heart of town. The
breathtaking view of the Cathedral to the east makes your feeling of
homyness complete. You can enter the Guild House to the north. There is
a large building with arcades and a sign to the west.
[ Exits: N E S W ]
A huge crystal in the shape of a man is standing here. ..It has a soft glowing aura!
A slimy, greenish blob is crawling along, invaginazing stuff lying around.
A farmer is standing here, selling her stuff.
34H 133M 69V >n
You enter the House of the Guilds.
<(-------------------------------------------------------------------------)>
<( The Guild House )>
<(-------------------------------------------------------------------------)>
You are standing inside the Guild House of Freyburg.
The exits to the four guilds are written on a sign hanging from the
ceiling:
Warriors - North
Mages - East
Clerics - West
Thieves - Up
SHOPS - Down
There is a LOCKER here next to a SIGN.
[ Exits: N E S W U D ]
A locker is here, you can store your eq in it!
A Cityguard stands here.
32H 127M 87V >w
<(-------------------------------------------------------------------------)>
<( The entrance to the Cleric's guild )>
<(-------------------------------------------------------------------------)>
You are standing in the entrance room of the Cleric's Guild. Nice
carpets are hanging on the walls. The sanctum is to the west.
[ Exits: E W ]
A knight templar is guarding the entrance.
... he glows with a bright light!
|
[/code] |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Nov 17, 2008 2:25 pm |
Shouldn't be too hard actually. Try:
#trig {^<~(---} {}
#cond {^ \<\(\s+(.+?)\s+\)\>} {#tag name %1} {regex|within|param=1}
#cond {^[ Exits: ([NESWUD ]+) ]} {#tag exit %2} {regex|within|param=20}
Enter this on the command line and reconfigure the mapper (remember to uncheck the Room Description box) and hopefully it'll start working. You might need to adjust the param=20 to something higher if you have room descriptions longer than 20 lines. |
|
|
|
Odeon Novice
Joined: 17 Nov 2008 Posts: 30
|
Posted: Mon Nov 17, 2008 4:38 pm |
Thanks for your answer but i still have problems :)
I've entered the trigger in the command line (line by line) but it is not "triggered" i think :o
Here is the trigger thing (states tab):
Code: |
^<~(--- Pattern 0
^ \(\s+(.+?)\s+\)\ Within Lines 1 #tag name %1
^[ Exits: ([NESWUD ]+) ] Within Lines 20 #tag exit %2
|
Only the exits are validated (because of setting exit line keyword ...) and room name and description are blank
i've tested without any check (room, description, exit) [in the configuration wizard] it doesn't work better.
Could you give a try with an "offline setting" ? Thanks, O
PS : i've tested in the "real multimud" - doesn't work better than in "offline mode" though |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Nov 17, 2008 11:19 pm |
A character, >, has disappeared from the end of the second pattern. Put it back.
|
|
|
|
Odeon Novice
Joined: 17 Nov 2008 Posts: 30
|
Posted: Tue Nov 18, 2008 3:27 pm |
Thanks, i've corrected and i've just changed the pattern for the exits :
Code: |
~[ Exits: [NESWUD ]* ~] |
and now they are all in red in the configuration wizard :) and the name is in blue :) it works perfect
How can i save now the room description ? It surely ends with
? but i don't know how to write it :o) Thanks |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Nov 19, 2008 1:07 am |
Ahh, balls, the quotes disappeared from the pattern in my post above - the forums ate them. Quote my post to see what I actually meant.
The trouble with doing the description is that you need to trigger on all those lines separately, so it's more difficult (read: unreliable) than just doing the name and exits. Do you really need the description for something? The mapper will work just fine with it unchecked. |
|
|
|
Odeon Novice
Joined: 17 Nov 2008 Posts: 30
|
Posted: Wed Nov 19, 2008 8:24 am |
Sure it will work fine and that's great ^^
But, i would like some descriptions because some names are rather obscure : "dark home", "dark cavern"... and i know i will not remember the content (description) in a month or so. Furthermore, i would like to research the description of the room : if someone (maybe a mission produced by the bot) tells me "hey go to the cavern where you see a red sign on the wall, dig, and you'll find the red pearl then...", i would be crazy
So, maybe i've an idea, can't we say with a pattern : take all the signs
between the blank line (line with nothing on it (just after the title)
and the line with [ E on it
and store it with tag desc ?
Thanks |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Nov 20, 2008 12:31 am |
Something I have done on one mud I play is to capture everything between the prompts.
Here is a list of the general steps required.
I'm not going to elaborate this into an actual script someone else might though.
These triggers can generate HUGE amounts of lag as well as eat memory so they should turn themselves on and off using trigger Ids and #T- #T+
The room name trigger should use %maplocked() to determine if the map is in mapping mode or not. If it IS then it should do the following.
1. Capture the room name into a variable.
2. Turn on a trigger that captures everything after the room name into a variable using #var description %concat(@description," ",%1)
If you find that the room name is being captured into the variable just to a description=%replace(@description,@name,"") before you use #Tag.
Use the same for the Exit line if needed.
3. Turn on a trigger that turns OFF the above mentioned trigger when a prompt is received, in your case you should do it when the Exit line is received.
This trigger should do the following.
1. Turn off the description trigger
2. Remove the Exit information from the description variable if it is present.
3. Parse the Exit information into it's own variable.
4. #Tag Name @Name
5. #Tag Desc @Description
6. #Tag Exits @Exits
7. Turn itself off.
The trick is remembering that the mapper really does not care if the information appears on screen or not, or even when. So long as the information it needs is provided within the number of seconds that you tell it to wait during the configuration.
Good Luck |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Nov 20, 2008 1:47 am |
Actually, this shouldn't be very difficult at all to write since we already know where the description begins and ends:
#trig {^<~(---} {}
#cond {^ \<\(\s+(.+?)\s+\)\>} {#tag name %1;#t+ DescTrig;Desc=""} {regex|within|param=1}
#cond {^[ Exits: ([NESWUD ]+) ]} {#t- DescTrig;#tag desc @Desc;#tag exit %1} {regex|within|param=20}
#trig "DescTrig" {*} {desc=%concat(@desc," ",%line)} "" {disable}
Should capture the descriptions as well. Only trouble is that all the descriptions will have the line of hyphens under the name at the start - if that bothers you, you can use replace or %subregex to remove it.
EDIT: And quote this post to see what I really meant with the pattern. |
|
|
|
Odeon Novice
Joined: 17 Nov 2008 Posts: 30
|
Posted: Thu Nov 20, 2008 6:17 am |
Thanks Fang it is really working great. I will tell you if i encounter a problem but that works perfect :o)
Thanks Arminas too for your ideas :) Maybe a little difficult but that should work too :)
Thanks for your help |
|
|
|
|
|