Login    Register

Mudlet Mapper

Greetings and salutations. Say hello to your fellow players!
  • Author
    Message

Mudlet Mapper

Postby Votrepatron » Thu Aug 10, 2017 12:21 pm

I have been interested in getting the mapper for Mudlet working here in GNSmud. I am unaware if somebody has already done so, but here is where i am with it.

I found this generic Mudlet Mapping script: https://forums.mudlet.org/mudlet-mapper ... 9bb0f3c713

I have been working on creating the aliases and commands tailored to GNSmud.

I dont have too much time to work on it and only started 2 days ago, but does anyone know how to find the Room ID for the current room. I have been reading the mudlet lua functions documentation (here: https://wiki.mudlet.org/w/Manual:Lua_Functions) and think i need to find the room ID hash in order to convert it to a room ID. That or choose it from a list of all rooms.

Will post updates if i find out more.

Update: I have gotten it working, have posted a guide here attached to this thread. Enjoy!
Last edited by Votrepatron on Thu Aug 24, 2017 12:53 pm, edited 2 times in total.
Votrepatron
 
Posts: 10
Joined: Wed Aug 09, 2017 5:35 pm

Re: Mudlet Mapper

Postby Matero » Thu Aug 10, 2017 4:54 pm

If you look a few pages in (I want to say page 10 or 11) the author mentions that you don't have to create the aliases, they get created automatically in a temp db when the mapper begins. I have been looking into getting the mapper working as well, but haven't had much time to really dig into it. The most time I've had to play is during calls while I'm at work, and at least then I could move to a safe room and keep an eye on my food/drink while waiting to play again.
Matero
 
Posts: 1
Joined: Tue Aug 08, 2017 3:44 pm

Re: Mudlet Mapper

Postby Votrepatron » Thu Aug 10, 2017 11:29 pm

Matero wrote:If you look a few pages in (I want to say page 10 or 11) the author mentions that you don't have to create the aliases, they get created automatically in a temp db when the mapper begins. I have been looking into getting the mapper working as well, but haven't had much time to really dig into it. The most time I've had to play is during calls while I'm at work, and at least then I could move to a safe room and keep an eye on my food/drink while waiting to play again.


Found this on page 4: "copy both this script and the Simple Window Manager script into new, blank scripts in Mudlet. Create relevant triggers to capture room name, exits, and assorted move events, as detailed in the documentation at the top of the script. Use the supplied aliases to start creating your map, also as explained in the documentation at the top."

Working on creating those triggers now.
Votrepatron
 
Posts: 10
Joined: Wed Aug 09, 2017 5:35 pm

Re: Mudlet Mapper

Postby Torhild » Fri Aug 11, 2017 2:48 am

Nifty! I can't say that I'm too helpful with building and stuff, but if you need a tester, I'm game.
User avatar
Torhild
 
Posts: 4
Joined: Thu Aug 10, 2017 3:41 am

Re: Mudlet Mapper

Postby Votrepatron » Fri Aug 11, 2017 2:52 am

Here is what I have found for the triggers:

For the Exits capture trigger:
Pattern (perl Regex): ^Exits\: ([\w\s]+)\.
Code:
map.prompt.exits = matches[2]
raiseEvent("onNewRoom")

For the Prompt Trigger:
Pattern (perl Regex): ^\d+/\d+hp \d+/\d+m \d+mv \d+xp.*$
Code:
raiseEvent("onPrompt")

For the Move Fail Trigger: (I don't have much experience as to why you wouldn't be able to move, but here is what I got)
Pattern (Exact Match) : Alas, you cannot go that way.
code:
raiseEvent("onMoveFail")

For the room name capture trigger: -- I am not sure how to figure this one out yet. The Room name could be anything and it is the exact same color as most other text.
Pattern: Like I said I am unsure
Code:
if not map.prompt.name_found then
map.prompt.name_found = true
map.prompt.room = matches[1]
end

Extended extits Capture Trigger -- I am unsure what this one is for. But it was included in the documentation so its here too.
pattern (perl regex): ^([\w,\s\(\)]+)\.$
code:
map.prompt.exits = map.prompt.exits .. " " .. matches[2]
map.prompt.exits = string.gsub(map.prompt.exits,"%([%a%s]+%)","")
disableTrigger("Extended Exits Capture Trigger")

If anyone has any ideas how to set a trigger to find the room name, please let me know. Maybe reference the Lua function getRooms (https://wiki.mudlet.org/w/Manual:Lua_Functions#getRooms) I don't know. I'm tired I will look into it more later.
Votrepatron
 
Posts: 10
Joined: Wed Aug 09, 2017 5:35 pm

Re: Mudlet Mapper

Postby Votrepatron » Fri Aug 11, 2017 1:57 pm

Here is a package command created that i missed on my first readthrough of the generic mapper thread.
I Have not verified if it works as intended yet, as i am at work in between calls. But i will update when i find out.

Enter this as a single line in mudlets command prompt (the same terminal used to play the game):

lua function downloaded_package(a,b) if not b:find("generic_mapper",1,true) then return end installPackage(b) os.remove(b) end registerAnonymousEventHandler("sysDownloadDone","downloaded_package") downloadFile(getMudletHomeDir().."/generic_mapper.mpackage","http://dslpnp.altervista.org/Generic_Mapper.mpackage")

This will install the proper packages for the generic mapper. It is supposed to be a good start, instead of copy pasting the scripts.
Votrepatron
 
Posts: 10
Joined: Wed Aug 09, 2017 5:35 pm

Re: Mudlet Mapper

Postby dresdor » Fri Aug 11, 2017 3:27 pm

One thing I have noticed is that (unless I missed something) the mapper will only work for places you've obviously been to, as it maps your route. Would there be any interest in a community mapping project, where we share our data together?

Obviously, anyone with dev access would have knowledge of the whole map in some way, and I'm not interested in that, but I would be interested in creating a visual representation of the game world (which likely would help the devs as well, if they don't already have something like that). I've not looked to see what sort of software would be best used to model the game world, but it would be very handy to know, for example, that if I am on the north ride, and the path to the mountains is to the north, then I am likely 10 rooms from shadowdale if I follow the north ride to the south east (completely making that up, I've got no idea the distances).
dresdor
 
Posts: 11
Joined: Thu Aug 10, 2017 3:11 am

Re: Mudlet Mapper

Postby Votrepatron » Sat Aug 12, 2017 3:58 am

I think I've done it.

The prompt pattern perl regex is: ^Shadowdale: \(type help prompt\) H\:[0-9]+ M\:[0-9]+ V\:[0-9]+\>
The code is still the same.

The room name capture trigger will have 2 patterns it will be looking for. The first is color trigger. white fg and black bg. The second being a perl regex: ^\s+\w+

Follow the notes I put previously and it will be mapping for you, the aliases listed in the script will teach you how to use it. I am not sure how to solve an issue I had with the window not handling going back in the direction you came from very well.

once again I am tired. Will look into mapping more later. Good Luck!
Votrepatron
 
Posts: 10
Joined: Wed Aug 09, 2017 5:35 pm

Re: Mudlet Mapper

Postby Scath » Sat Aug 12, 2017 8:54 am

That regex wouldn't work for anyone who's restrung their prompt.
Scath
 
Posts: 1
Joined: Tue Aug 08, 2017 8:00 am

Re: Mudlet Mapper

Postby Votrepatron » Sat Aug 12, 2017 12:15 pm

Scath wrote:That regex wouldn't work for anyone who's restrung their prompt.


True, i didn't know you could do that.
Votrepatron
 
Posts: 10
Joined: Wed Aug 09, 2017 5:35 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 14 guests