Generic Mapping Script

All and any discussion and development of the Mudlet Mapper.
Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

So, I can definitely help set that set up for you, but the layout looks decidedly different from what I normally see, so I think it would be simpler on my end if you could tell me what MUD you play (and the address obviously), so I can get things working generally on my own, and then just let you know what you need to do to adapt the script to your game.

Jevak
Posts: 6
Joined: Mon Dec 25, 2017 5:55 am

Re: Generic Mapping Script

Post by Jevak »

it's called "The Void" fair warning, it's an adult MUD. void.greenfinch.com:1234
and also you may have to take into account that players can summon each other to different rooms, not sure if that would break the mapping. and it seems some items may also teleport the player.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

Being randomly teleported around WHILE making the map could cause issues (nothing that can't be fixed though), but the script is built to allow for teleportation during normal use. It constantly checks the current room and the room you just came from to try to correct its best guess as to where you are, whenever it notices a discrepancy. I'll give it a look, and see what I can come up with. As it is the holidays, it may be a week or two before I have something for you, FYI.

Jevak
Posts: 6
Joined: Mon Dec 25, 2017 5:55 am

Re: Generic Mapping Script

Post by Jevak »

Thats understandable thanks so much, and Merry Christmas

Ornir
Posts: 31
Joined: Thu Apr 07, 2011 8:15 am

Re: Generic Mapping Script

Post by Ornir »

Which MUD is this, and do they support MSDP or similar?

max4260
Posts: 2
Joined: Sat Jan 06, 2018 2:55 pm

Re: Generic Mapping Script

Post by max4260 »

Hey everyone, I was hoping someone could point me in the right direction for getting this script up and running on the mud i play.

I updated the three triggers that auto install and can get rooms added when I'm mapping. My issue is that every time i move it adds a new room (even when i have already been in it before) and it only links up a single exit (the one that was used to enter the room).

thanks for the help!

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

So, to answer the easiest portion first, the fact that only a single exit is linked when you move is a function of the map mode you are using, and can be easily changed via an included alias. There are three modes, simple, normal, and complex. Normal mode is the default, and connects the room you move from to the one you move to, in the direction you moved, and vice versa. Complex mode is for especially confusing areas, and it does not create a connection back the way you came, only creating the connection that must exist based on your movement. Simple mode connects exits to all appropriately positioned adjacent rooms when a new room is created, and is especially good for wide open areas with simple room connections. To change map modes, use the following command: map mode simple -- or normal, or complex

The more complex issue is preventing duplicate room creation, and that could depend on what exactly is going on. When you enter a room, the mapper gets the room name and exits, and looks in the direction you moved from the room you are currently located in for a match, if there is no match found along that line, a new room is created. So there are two common reasons why you might be getting a unique room created more than once. The first and easiest to address is a failure to align rooms properly, because games frequently do not have equal room spacing. So, for example, you could start in a room, go north twice, east three times, south three times, and west twice, and find yourself back in the room you started in. However, the mapping script cannot know that this is not a new room that happens to have the same name and exits (a not uncommon occurrence in certain areas in certain games). To make it properly use the existing room, you need to use the shift command (shift e , for example), or drag rooms around manually to give them proper positioning. Note that the shift command only acts on the room you are standing in, but it can be handy when you need to make small adjustments while creating a map. Once the room you are coming from, and the already existing room you are about to move to are lined up properly, the script should use the existing room, rather than creating a new one. For this reason, I often recommend a person figure out how they need to lay out a map before actually mapping it using the script.

The other major possibility is some mismatch in room name or exits. Most commonly, this happens with doors that keep an exit from showing when closed, but then reveal it when opened, so that the room appears to have a different set of exits when entered the second time than when it did originally. But, it can also be due to issues with triggers, causing the actual name or exits captured to vary to some degree or another. If the problem you are talking about ISN'T the first one I mentioned, then we can dig into this in more detail, to help figure out what is going on.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

Jevak wrote:
Mon Dec 25, 2017 5:01 pm
it's called "The Void" fair warning, it's an adult MUD. void.greenfinch.com:1234
and also you may have to take into account that players can summon each other to different rooms, not sure if that would break the mapping. and it seems some items may also teleport the player.
So, I'm finally getting around to trying to make things work, and I find I'm getting stuck in character creation. When it asks if I'm using one of a number of different MUD clients, I respond, and it just sits there. Any idea what is going on with that, or how to get around it?

phyirie
Posts: 2
Joined: Sat Jan 06, 2018 4:32 pm

Re: Generic Mapping Script

Post by phyirie »

Hey Jor'Max

I'd really like to get this script up and running on the mud that I play (66.85.147.85:4000) and I have no idea how to set up the aliases/triggers to get started or if I need to alter the script to make it work for my mud.

Any help would be appreciated.

Thanks!

mordormud dot net port: 4000

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

Okay, so I connected, moved around a bit, and got everything working within the scope of my relatively limited exploration (in and around the school area and the trading village you recall to as a new character). To make that happen, I took the basic install, added one trigger, and modified the other three, as follows:
For the Room Name Trigger, I changed the type to perl regex
I changed the pattern to this: ^.*
And the code to this:
Code: [show] | [select all] lua
map.prompt.desc = map.prompt.desc or {}
table.insert(map.prompt.desc,line)
For the Exits Trigger, I changed the pattern to this: \[Exits: ([\w\s\(\)]+)\]
And the code to this:
Code: [show] | [select all] lua
map.prompt.exits = string.gsub(matches[2],"[%(%)]","")
raiseEvent("onNewRoom")
For the Prompt Trigger, I changed the pattern to this: ^<\d+hp \d+m \d+mv[^>]*>
And the code to this:
Code: [show] | [select all] lua
map.prompt.room = map.prompt.desc[1]
map.prompt.desc = {}
raiseEvent("onPrompt")
And then I added a Blocked Movement Trigger, with three "begin of line substring" patterns, as follows:
Alas, you cannot go that way.
The door is closed.
That room is private right now.

And I set the code to this:
Code: [show] | [select all] lua
raiseEvent("onMoveFail")

Post Reply