Thank you! I learned something new too.Vadi wrote: ↑Fri Jun 19, 2020 1:19 pmThe ignore command uses Lua patterns, so tryCode: Select all
map ignore ^You walk .+
Generic Mapping Script
Re: Generic Mapping Script
Re: Generic Mapping Script
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:
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.
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]
I feel like I'm missing something obvious here--any suggestions? I'm a rank LUA beginner unfortunately.
Re: Generic Mapping Script
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"
]
}
RoomInfo {
"name":"Approaching Wayward Marina, Unofficial \"Bank\"",
"zone":"{23 30} Zahri Mervue",
"environment":"city",
"exits":{
"North":"O",
"South":"O"
},
"details":[
"bank"
]
}
-
- Posts: 24
- Joined: Sun Jul 26, 2020 1:39 am
Re: Generic Mapping Script
Use the IRE mapper script, it uses gmcp. The generic one uses triggers, rather than gmcp events.
Re: Generic Mapping Script
Where do I find a IRE mapper script?
Re: Generic Mapping Script
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
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
Re: Generic Mapping Script
What does it look like when you turn map debug on?
Re: Generic Mapping Script
Hello Vadi,
I believe that was with map debug turned on. Here is another image with debug turned on.
https://imgur.com/a/iHM43dm
I believe that was with map debug turned on. Here is another image with debug turned on.
https://imgur.com/a/iHM43dm
Re: Generic Mapping Script
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
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