Generic Mapping Script

All and any discussion and development of the Mudlet Mapper.
Tehuti
Posts: 6
Joined: Fri Jun 19, 2020 6:09 am

Re: Generic Mapping Script

Post by Tehuti »

Vadi wrote:
Fri Jun 19, 2020 1:19 pm
The ignore command uses Lua patterns, so try

Code: Select all

map ignore ^You walk .+
Thank you! I learned something new too.

Taneg
Posts: 1
Joined: Wed Aug 26, 2020 12:27 am

Re: Generic Mapping Script

Post by Taneg »

I have something of a newbie question to this script--I've tweaked it to capture the prompt and room exits on the MUD I play well, but I keep running into an issue with capturing the room name. The MUD I'm playing usually but not always has the first line after the prompt as the room name. A large number of system messages ("you wade out into water," "you're getting hungry", etc) frequently are the first line after the prompt though and get mistaken for the room name, messing up any map that's been made. There are far too many to make adding ignore filters for all of them viable.

I did notice that the room names are always one of a handful of colors, so I created a few color triggers to try and capture the room name that way. The code I've been using on a foreground color match is:

Code: Select all

if not map.prompt. name then
   map.prompt. name = true
   map.prompt. room = matches[1]
Since there's other text in between prompts that can be the same colors (e.g. exits and room names can both be magenta) the idea is to set map.prompt. name at the first "catch" of the text color so that map.prompt. room can't be overwritten if the color appears a second time. Either way it's not working and I'm still always getting the first line after the prompt saved as the room name. (Also there are no spaces in those variable names)

I feel like I'm missing something obvious here--any suggestions? I'm a rank LUA beginner unfortunately.

jtg0285
Posts: 2
Joined: Tue Sep 29, 2020 2:10 pm

Re: Generic Mapping Script

Post by jtg0285 »

Is there any way to make the generic mapping script look at gmcp info for the room name or perhaps capture part of the room description to help differentiate the rooms? I am playing AVATAR MUD and the room names are very commonly duplicated, which makes the script get confused and keep adding rooms where they don't belong. Here is an example of a GMCP room info:

RoomInfo {
"name":"Approaching Wayward Marina, Unofficial \"Bank\"",
"zone":"{23 30} Zahri Mervue",
"environment":"city",
"exits":{
"North":"O",
"South":"O"
},
"details":[
"bank"
]
}

breakone9r
Posts: 24
Joined: Sun Jul 26, 2020 1:39 am

Re: Generic Mapping Script

Post by breakone9r »

Use the IRE mapper script, it uses gmcp. The generic one uses triggers, rather than gmcp events.

karhuso
Posts: 4
Joined: Fri Nov 11, 2011 7:49 pm

Re: Generic Mapping Script

Post by karhuso »

Where do I find a IRE mapper script?

User avatar
Vadi
Posts: 4962
Joined: Sat Mar 14, 2009 3:13 pm

Re: Generic Mapping Script

Post by Vadi »


jbrumble
Posts: 13
Joined: Sat Jan 09, 2021 4:31 am

Re: Generic Mapping Script

Post by jbrumble »

Hello Folks!

I've been incredibly excited to start using the mapping component of Mudlet. Thus far I have been unable to get past these errors:

map basics (quick start guide)
----------------------------------------

Mudlet Mapper works in tandem with a script, and this generic mapper script needs
to know 2 things to work:
- room name ❌ ()
- exits ❌ ()
(mapper): (error): Room detection not yet working, see map basics for guidance.
(mapper): (error): Prompt not auto-detected, use 'map prompt' to set a prompt pattern.

I've attempted to set the prompt manually:
{
[""] = "^< (.*)H (.*)M (.*)V (.*)X > "
}

But this hasn't accomplished anything. I'd really appreciate some guidance! Thank you for anything you can offer. I've attached a photo of what a room looks like in this MUD.

https://imgur.com/nGbzDdL

User avatar
Vadi
Posts: 4962
Joined: Sat Mar 14, 2009 3:13 pm

Re: Generic Mapping Script

Post by Vadi »

What does it look like when you turn map debug on?

jbrumble
Posts: 13
Joined: Sat Jan 09, 2021 4:31 am

Re: Generic Mapping Script

Post by jbrumble »

Hello Vadi,

I believe that was with map debug turned on. Here is another image with debug turned on.
https://imgur.com/a/iHM43dm

karhuso
Posts: 4
Joined: Fri Nov 11, 2011 7:49 pm

Re: Generic Mapping Script

Post by karhuso »

Hi Vadi,

thanks for the link.
Unfortunately it doesn't work for me very well,... to much to translate into German.

I've found this viewtopic.php?f=13&t=2177 from Heiko and it's working for me (Avalon deutsch).
Some functions are outdated and doesn't work correctly, so it has to be updated, but the mapper works fine.
I'm an absolutly beginner in LUA-Scripting, hope I can handle this :-)

Post Reply