Generic Mapping Script
Re: Generic Mapping Script
Unrelated, but you can right-click "Copy to HTML" and paste to https://ada-young.appspot.com/pastebin to get it nicely formatted.
Re: Generic Mapping Script
Okay, so time for me to get a bit more info. Is the room name always IMMEDIATELY BEFORE the exits line? If so, that should make it very easy to capture reliably. Multi-line exit info can take a bit more work, and even more so given how what you are getting clearly needs to be cleaned up, but nothing overly complicated. If there are these "down-south" exits that you mentioned, that will get extra tricky, because neither Mudlet's Mapper nor my script currently have support for exits in those directions. Something could be cobbled together to make it work, but that part will take more time than everything else combined, FYI. The directions supported currently are the cardinal directions (n,s,e,w), the ordinal directions (nw, sw, ne, se), up, down, in, and out. As well as special exits that are treated as portals.freon wrote: ↑Tue Oct 10, 2017 11:57 amFrom my understanding: The mapper needs to capture the following things:
Room name
Room Description
Exits
And I can see that there are triggers for those. Great!
I don't understand how they work *cries*
This is how the mud lays stuff out:
You begin walking southward, with a smooth and even stride.
Command is entered to move and it gives you the movement echo with a slight delay
<**** / ^^^^^ / ||||||> <-- prompt
A Cramped, Bunk-Set Male Dormitory <-- room name
Exits: north (open door) up (closed female-dorm-door) <-- multiline exit, includes 4 cardinal directions, 4 in-betweens, up, down, and I think stuff like upsouth, downsouth etc.
This dormitory has been rammed full of double bunks, leaving little room for
guards to pass through the room unhindered by traffic or room for furniture.
One such route does however wind its way around the western edge of the room
and northward where it meets a set of creaky wooden stairs leading to another
room above. In the eastern side of the room torches burn an orange glow in
their sconces, set above a series of low lockers which are latched with small
wooden doors. <-- Room desc
Guards come and go, squeezing through the narrow path between bunks.
There are several furnishings here.
A rough, linden bin is marked with a huge, crudely drawn hammer.
A rough, birch bin is marked with a stone wall design.
A rough, brownish-cream bin is marked with a sword design.
A rough, linden bin sits here.
A rough, crabapple bin has been tucked under a bunk-bed with brown coarse
wool sheets.
A rough, beech bin sits here.
A patrolling guardsman keeps a watchful eye on the entryways here.
<**** / ^^^^^ / ||||| >
The way the prompt works:
<****** <-- the *s represent health from 0 asterisks to 6
^^^^^^ <-- the ^s represent trauma from 0 chevrons to 6
|||||| <-- the |s represent stamina from 0 horizontal lines to 6
walking, fighting, getting hurt, falling, etc reduce these, as you can see in the output, I'm down to 4 stars of health.
I was thinking of manually creating the rooms instead of having them automatically done, and then creating aliases to move and travel through the rooms, but I can't quite create the rooms, try as I might.
To grab that prompt, I would use this regex pattern: ^\<\s*\**\s*\/\s*\^*\s*\/\s*\|*\s*\>
Room descriptions don't need to be captured.
Re: Generic Mapping Script
There's usually a delay of a few seconds after the movement command is put in and the movement echo is given. In that time, stuff can happen, like other characters walking into the room or performing other actions.
The room name is always served immediately before Exits:, though.
Exits are a bit predictable in the order that they are shown and the upsouth downsouth etc exits don't really happen very often.
The room name is always served immediately before Exits:, though.
Exits are a bit predictable in the order that they are shown and the upsouth downsouth etc exits don't really happen very often.
Re: Generic Mapping Script
Occasionally there is a line between the room name and the exits but that's rare.
exits go in this order: NESW UD NENWSESW
exits go in this order: NESW UD NENWSESW
Re: Generic Mapping Script
The order of exits doesn't matter, so don't worry about that part. The line between room name and exits, is it a blank line, or can it have content?
Re: Generic Mapping Script
It's blank and will not have content or anything there.
Re: Generic Mapping Script
Okay, can you post an example of the multi-line exits please? I need to make sure I can capture all the right things when designing the triggers for this.
Re: Generic Mapping Script
If there are doors on many of the exits, the lines can get pretty long:
Outer Courtyard and Training Yard of the Guardhouse
Exits: north (open infirmary-door) east (closed door) south
(closed door) west (open large-heavy-door)
When there are many exits, the line breaks:
At a Thick, Knotted Wall of Twisted Trees to the North
Exits: east south west northeast northwest
southeast southwest
Note: first line is the room name.
Outer Courtyard and Training Yard of the Guardhouse
Exits: north (open infirmary-door) east (closed door) south
(closed door) west (open large-heavy-door)
When there are many exits, the line breaks:
At a Thick, Knotted Wall of Twisted Trees to the North
Exits: east south west northeast northwest
southeast southwest
Note: first line is the room name.
Re: Generic Mapping Script
Okay, so I put together two triggers that should work to get things rolling for you. The first is going to handle capturing the room name and exits, while the second will be the prompt trigger.
The first trigger has two patterns, in the following order (both of type perl regex):
Pattern 1: ^Exits: (.*)$
Pattern 2: ^(.*)$
And it has this code:
The first trigger has two patterns, in the following order (both of type perl regex):
Pattern 1: ^Exits: (.*)$
Pattern 2: ^(.*)$
And it has this code:
The prompt trigger will have the pattern I gave you previously for it, and will have the following code:
Re: Generic Mapping Script
Thank you so much! I'll give these a try.