Generic Mapping Script

All and any discussion and development of the Mudlet Mapper.
Brahmus
Posts: 4
Joined: Thu Jun 21, 2018 6:16 pm

Re: Generic Mapping Script

Post by Brahmus »

I keep getting: 'No room detected' when i enter the start mapping command via prompt. Im on DBE as well with Allaboard.

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

Re: Generic Mapping Script

Post by Jor'Mox »

Do you have all the triggers set up the way he does? Because those are central to making the whole thing work, and they have to be modified from the original ones that come with the script, because all games are different in important ways.

Brahmus
Posts: 4
Joined: Thu Jun 21, 2018 6:16 pm

Re: Generic Mapping Script

Post by Brahmus »

I believe that i do, im playing DBE as with Allaboaord and have been reading and copying his but have had no luck at all.

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

Re: Generic Mapping Script

Post by Jor'Mox »

Okay, so let's go through the same process I used with him. At this point, you should have 4 triggers that the script NEEDS to get things started, one to get the room name, two to get the exits, and one to capture your prompt. Please post a screenshot of each of those 4 triggers, as well as some example text from the game showing you walking around.

If I remember correctly, he mentioned that there are multiple different prompt options, and the script needs to detect a prompt before it updates the room name and exits, so in my mind the most likely culprit here is that you are using a prompt that doesn't match the prompt trigger I set up for him. That is fine, we will just need to modify the pattern it uses to match the prompt you are using. But, just in case there is something else going on, getting all of the info at once will make things a lot easier.

Brahmus
Posts: 4
Joined: Thu Jun 21, 2018 6:16 pm

Re: Generic Mapping Script

Post by Brahmus »


Brahmus
Posts: 4
Joined: Thu Jun 21, 2018 6:16 pm

Re: Generic Mapping Script

Post by Brahmus »

Everything is exactly the same as his, I even use the same prompt. I'll screen capture a video and post it.

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

Re: Generic Mapping Script

Post by Jor'Mox »

I look forward to seeing the video. There has to be at least something that is different, because otherwise things would work properly for you. The script is actually pretty predictable, as far as it goes.

Eraene
Posts: 42
Joined: Wed Nov 27, 2013 10:18 pm

Re: Generic Mapping Script

Post by Eraene »

Hi! Back with another question.

This mapper doesn't seem to want to recognize exits as single letters, which is a little frustrating. I sort of jerry-rigged it to in my exits capture trigger, but it's causing little hiccups I'm not sure how to solve. Is there an ideal way to get this functionality working?

Right now all I've done is use string.gsub to substitute single letters for full words in the exits trigger, but that causes issues for anything besides n/s/e/w exits. I need a smarter way to do this.

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

Re: Generic Mapping Script

Post by Jor'Mox »

It definitely needs exits as the full names, but it should be possible to substitute those for the abbreviated versions. What exactly do you see for your exits?

By the way, one potential strategy, so long as your abbreviated exits are all separated from each other, is to use a relatively simple string.gsub call, like this:
Code: [show] | [select all] lua
local long_dirs = {n = 'north', s = 'south', e = 'east', w = 'west', u = 'up', d = 'down', ne = 'northeast', nw = 'northwest', se = 'southeast', sw = 'southwest'}
exits = string.gsub(exits,"%a+",long_dirs)
This bit of code will look for any set of consecutive letters, and try to replace them with their corresponding entry in the table. So if you started with "n e s ne", you would get "north east south northeast". Conveniently, this method leaves out anything that isn't an exact match for one of those directions. Alternatively, if you never have to worry about extra characters (like say the word 'and' shoved in there like some games use), you could use this simplified version.
Code: [show] | [select all] lua
local long_dirs = {n = 'north', s = 'south', e = 'east', w = 'west', u = 'up', d = 'down'}
exits = string.gsub(exits,"%a",long_dirs)
Note that here is looks for each individual letter, and replaces it with the matching value. When given something like "ne", it replaces the 'n' with 'north', and the 'e' with 'east', producing 'northeast'. But, as noted, this will replace any instance of 'n', 's', 'e', 'w', 'u', or 'd' with the corresponding longer term, which may or may not be desirable.

Eraene
Posts: 42
Joined: Wed Nov 27, 2013 10:18 pm

Re: Generic Mapping Script

Post by Eraene »

Got it working! I used the first option, since exits in the mud are shown in

Code: Select all

[N, E, S, W]
this format. Odd non-exit words like quit, leave, etc are properly ignored by the system, and everything seems to be going smoothly.

Post Reply