Generic Mapping Script

All and any discussion and development of the Mudlet Mapper.
GErswin
Posts: 17
Joined: Fri Jun 09, 2017 6:12 am

Re: Generic Mapping Script

Post by GErswin »

Jor'Mox, everything works now that I added the Window Manager. I've got a lot of stuff mapped. Thanks for all of your time and help!!

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Generic Mapping Script

Post by demonnic »

Ok, I reworked this to a Geyser template, placing the mapper window in the top-right corner. Very basic, if you wanna put it in a container you'll need to edit line 162 of "Map Script" to add the container argument, or add it to the container later. one liner to install is
Code: [show] | [select all] lua
lua local a="https://raw.githubusercontent.com/demonnic/MiscMudlet/master/GenericMapperGeyser.xml"function d(b,c)if not c:find("GenericMapperGeyser",1,true)then return end installPackage(c)os.remove(c)cecho("<lime_green>Package installed!\n")end registerAnonymousEventHandler("sysDownloadDone","d")downloadFile(getMudletHomeDir()..(a:ends("xml")and"/GenericMapperGeyser.xml"or"/GenericMapperGeyser.zip"),a)
All I really did was change the two calls to window manager to one call to create the geyser mapper. It autoshows on creation. oh and I adjusted a couple of the map.config table keys for consistency with what Geyser is looking for.

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Generic Mapping Script

Post by demonnic »

And now one which has 0 ties to any UI framework of any sort, allowing you to have the popout map window, or create a mapper in the UI framework of your choice.
Code: [show] | [select all] lua
lua local a="https://raw.githubusercontent.com/demonnic/MiscMudlet/master/GenericMapperBackendOnly.xml"function d(b,c)if not c:find("GenericMapperBackendOnly",1,true)then return end installPackage(c)os.remove(c)cecho("<lime_green>Package installed!\n")end registerAnonymousEventHandler("sysDownloadDone","d")downloadFile(getMudletHomeDir()..(a:ends("xml")and"/GenericMapperBackendOnly.xml"or"/GenericMapperBackendOnly.zip"),a)
[lua]

Rann
Posts: 7
Joined: Wed Jul 19, 2017 2:17 am

Re: Generic Mapping Script

Post by Rann »

Thank you for making and sharing this, and writing SWM.

I'm getting the same error GErswin was getting. I installed the package that includes SWM, and I can activate aliases like stop mapping and load map, but typing start mapping Zone shows no message and simply sits there. Would you please help with what is happening here?

I took three screenshots of what I see, but the forum won't let me post them (maybe because I'm new?)

The curious thing to me is that no aliases show in the aliases window (I did see some there a few times, interestingly, each time after I uninstalled the package), but I am still able to call the stop mapping alias without it appearing there.

Thank you for writing this and for your help. I'm very excited to use this.

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

Re: Generic Mapping Script

Post by Jor'Mox »

So, firstly, the aliases don't show up in the aliases window because the script creates all tempAliases, to keep people from messing them up.

As for why nothing is happening when you use the start mapping command, this suggests to me that you don't have the necessary room name and exit information captured for the script to use. The fact that this comes up so often tells me I should put in an error message, instead of letting it fail quietly. Though, to be fair, it does put an actual error message into the error pane of the script window when it happens.

What do you have in place for capturing the room name, the room exits, and the onNewRoom and onPrompt events? Those four things form the essentials that have to be in place before anything will work with the script.

Rann
Posts: 7
Joined: Wed Jul 19, 2017 2:17 am

Re: Generic Mapping Script

Post by Rann »

Thank you for responding, and so quickly! I will look into those things. The MUD I play offers complex prompts, and the prompt is two lines. I am not well-versed in perl regex, though I am happy to learn. Is there a way to make it account for the entire prompt without escaping a majority of the characters?

Another issue, the color of some of the prompt letters match the room letters in the game. Will this cause the script to mis-understand room names, or is that what onPrompt is for? I will look into onNewRoom and onPrompt. Thank you.

Rann
Posts: 7
Joined: Wed Jul 19, 2017 2:17 am

Re: Generic Mapping Script

Post by Rann »

Sorry, I forgot to post the prompt. This is the prompt that I use in my MUD:

Opponent: / Tank:
481(481)hitp 735(850)forcep 186(186)move>

Rann
Posts: 7
Joined: Wed Jul 19, 2017 2:17 am

Re: Generic Mapping Script

Post by Rann »

I think I need to edit the regex for reading exits, as well. The exits in my MUD are displayed like this:

Obvious Exits: North East South[closed] West

Rann
Posts: 7
Joined: Wed Jul 19, 2017 2:17 am

Re: Generic Mapping Script

Post by Rann »

Sorry for posting so much. I have a longer post in moderation, that will explain the prompt message I posted.

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

Re: Generic Mapping Script

Post by Vadi »

I'm afraid I don't see anything in the moderation queue - is it still there?

Post Reply