Learning Mapper and Doors

Posted by Funkenstein on Fri 01 May 2020 10:47 AM — 4 posts, 17,904 views.

#0
Hi,

I have been testing out the learning mapper over the last week or so and have got it mostly working with the mud I play. I'd like to use this mapper to replace the currently large excel sheet I'm using which also contains all the door names that I have.

An example room showing a closed door denoted by the brackets around the exit.

Eastern Road Exits are: (N) E W
The road here begins to incline slightly as it leads away from Vinyanost. A
small hastily constructed shack stands dominant on the northern side of the
road here casting long shadows, giving passing travellers a cool shady place
to rest. Branches from the trees on the southern side of the road hang over
the path here, home to many kinds of wildlife.

Trying to go north fails and gives me the doorname in the flavour:

The woodendoor seems to be closed.

I've setup triggers already to capture this door name and set it as as a variable. An alias is used to grab the variable and open the door.

Is there a way to store the door name into the mapper so that next time I am in this room trying to go north, the doorname is tied to the room and if i choose to go north, it will automatically open the door prior to moving. Due to doors potentially being hidden, locked or need picking, it would be nice to store and use that information also. Any help on how to tackle this is greatly appreciated.

Cheers
Australia Forum Administrator #1
There is nothing there for doors right now. You could conceivably have it detect the brackets and put (say) "open north" as an extra command. That wouldn't handle picking though.
#2
Is it possible to store extra information into the room on the mapper? I'm thinking of storing the doornames and actions to take for the door in a particular direction so that whenever I am in a room with doors, I grab the required information and store it in variables that I can use with aliases.
Australia Forum Administrator #3
Yes. See: http://www.gammon.com.au/forum/?id=14607#functions

In particular, see the this part:

Quote:

set_room_extras

Sets user-supplied extra information for the nominated room by UID. The extra information can be anything you wish, logically a table would be supplied with many entries, such as mobs found in this room, what shops sell, and so on).



If you look at the example there, you could set a table of data, such as whether there is a door, if it needs to be picked, that sort of thing.