Page 33 of 38

Re: Generic Mapping Script

Posted: Tue Jun 26, 2018 3:03 pm
by Brahmus
I keep getting: 'No room detected' when i enter the start mapping command via prompt. Im on DBE as well with Allaboard.

Re: Generic Mapping Script

Posted: Tue Jun 26, 2018 10:11 pm
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.

Re: Generic Mapping Script

Posted: Fri Jun 29, 2018 3:37 pm
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.

Re: Generic Mapping Script

Posted: Fri Jun 29, 2018 3:51 pm
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.

Re: Generic Mapping Script

Posted: Fri Jun 29, 2018 7:35 pm
by Brahmus

Re: Generic Mapping Script

Posted: Fri Jun 29, 2018 7:36 pm
by Brahmus
Everything is exactly the same as his, I even use the same prompt. I'll screen capture a video and post it.

Re: Generic Mapping Script

Posted: Fri Jun 29, 2018 7:58 pm
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.

Re: Generic Mapping Script

Posted: Tue Jul 10, 2018 2:34 am
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.

Re: Generic Mapping Script

Posted: Tue Jul 10, 2018 11:04 am
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.

Re: Generic Mapping Script

Posted: Thu Jul 12, 2018 7:12 pm
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.