Generic Mapping Script

All and any discussion and development of the Mudlet Mapper.
Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

Install an mpackage file with the package manager while you have existing temp aliases, and they all get displayed in the alias pane, as if they were perm aliases.

User avatar
ulysses
Posts: 43
Joined: Fri Jan 05, 2018 7:43 pm

Re: Generic Mapping Script

Post by ulysses »

I have an issue similar to Eraene's above. In my mud, CthulhuMUD, there are lots of exits which are for want of a better word 'temporary'. They can be there or not, depending on a whole range of scenarios:

- A hidden exit that appears after searching (I imagine a lot of other muds have that)
- An exit which appears if fly spell has been cast
- Exits which depend on a characters alignment
- Exists which depend on the time of day
- Exists which depend on the phase of the moon
- ....

Coping with all of these individually would be impractical so it would be good to be able to either label an exit as a 'possible but not mandatory' or merge rooms together which have two possible sets of exits. Taking the second possibility with the fly spell example above:

I have a room which has N and W and UP exits (id 982), which I created when I had the fly spell on. Now I don't have the fly spell active. I start the mapper, in the room N of 982 and go S. The room description has N and W only (no UP as I'm not flying). The mapper creates a new room. I drag the new room over the existing one and type merge rooms. I stop the mapper. End result is that I've still got a room with id 982 with N W and UP. If I move away and into that room again now the current room marker jumps to another part of the map since it doesn't recognise a room with N and W.

Is there any easy way of dealing with this kind of mapping issue?

Thanks!
Wod.
Wod :mrgreen:
CthulhuMUD
www.cthulhumud.com
A hugely entertaining MUD based on the horror writings of HP Lovecraft.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Generic Mapping Script

Post by SlySven »

Well, we do not have a means of hiding an exit but you could always mark it as having a locked (red) door (and also set the exit as "locked" so it does not get used for speed-walking routes until it is unlocked) - but your mapping system would also have to be revised to respond appropriately when that exit is entered by you by accident from the keyboard when you are not permitted to go that way...

User avatar
ulysses
Posts: 43
Joined: Fri Jan 05, 2018 7:43 pm

Re: Generic Mapping Script

Post by ulysses »

SlySven wrote:
Sun Apr 29, 2018 5:59 am
Well, we do not have a means of hiding an exit but you could always mark it as having a locked (red) door (and also set the exit as "locked" so it does not get used for speed-walking routes until it is unlocked) - but your mapping system would also have to be revised to respond appropriately when that exit is entered by you by accident from the keyboard when you are not permitted to go that way...
The problem is more fundamental than having a locked exit. The problem is having an exit which is not normally present and is only visible under special conditions. I think the ideal way of dealing with this is to be able to mark an exit as temporary or optional (depending on which word one prefers), since that could be applied to all different kinds of situations. I've read through Jor'Mox's mapping script and nothing obvious struck me how to do this. I've also looked through the lua Mudlet functions and again nothing obvious. I'm hoping that someone has an idea to make this work.
Wod :mrgreen:
CthulhuMUD
www.cthulhumud.com
A hugely entertaining MUD based on the horror writings of HP Lovecraft.

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

Re: Generic Mapping Script

Post by Jor'Mox »

With the script AS IS, you would need to add a door to the exits that aren't always present, as that is how it determines if an exit is optional when checking to see if a room matches what is expected. If this type of exit is extremely prevalent, then it would probably make more sense to modify the script to allow any exit to be absent when checking to see if a room matches what is expected, instead of only ones with doors. That will make things a bit less reliable when mapping something out, but you should be able to avoid too much trouble by just being careful about how you map out an area. To do that, I would go into the check_room function (found on line 354), and in the last line of the function (which looks like this: return table.is_empty(t_exits) or check_doors(roomID,t_exits)) change it to this: return true
That way, any exits being visible that aren't allowed for the room will still prevent a match, but existing exits that aren't seen won't cause any problems.

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

Re: Generic Mapping Script

Post by Vadi »

What about using room userdata to mark the exit as a temporal one? Then your script will go through the rooms when conditions change and modify them as needed.

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

Re: Generic Mapping Script

Post by Jor'Mox »

If someone were making a completely custom mapping script for that game, it may be possible to capture the apparently wide variety of different factors that influence the appearance of an exit, and manage the map as such. However, that goes far beyond the scope of what this script does. Also, unless there are specific indicators to make it obvious which exits are influenced by which factors, such things would need to be inputted by hand, which would be no less tedious than using the existing capabilities to create a door for each such exit. Given that the implication is that there are a LOT of this sort of exit, I figured a simpler strategy would likely be appreciated.

Scolius
Posts: 10
Joined: Mon Apr 30, 2018 7:24 am

Re: Generic Mapping Script

Post by Scolius »

Hey Guys,

I was wondering if someone might be interested in helping me tailor the bare bones into something usable for The Legends of Darkstone?

My issue for starters is when I try to begin this happens

start mapping The Main Stage
Start Mapping Error: No room detected!

The room is called The Main Stage. I'm guessing the program doesn't know how to recognize a room in this MUD yet?

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

Re: Generic Mapping Script

Post by Vadi »

That would be correct - as the first post states, you need to add triggers to teach it how to recognize rooms in your game. Give it a go, and let us know if you get stuck!

User avatar
ulysses
Posts: 43
Joined: Fri Jan 05, 2018 7:43 pm

Re: Generic Mapping Script

Post by ulysses »

Jor'Mox wrote:
Sun Apr 29, 2018 11:33 am
With the script AS IS, you would need to add a door to the exits that aren't always present, as that is how it determines if an exit is optional when checking to see if a room matches what is expected. If this type of exit is extremely prevalent, then it would probably make more sense to modify the script to allow any exit to be absent when checking to see if a room matches what is expected, instead of only ones with doors. That will make things a bit less reliable when mapping something out, but you should be able to avoid too much trouble by just being careful about how you map out an area. To do that, I would go into the check_room function (found on line 354), and in the last line of the function (which looks like this: return table.is_empty(t_exits) or check_doors(roomID,t_exits)) change it to this: return true
That way, any exits being visible that aren't allowed for the room will still prevent a match, but existing exits that aren't seen won't cause any problems.
Hey Jor'Mox, I didn't try the second solution yet, as I'm happy to mark unusual exits manually for the time being. The first solution appears not to work however; with the UP exit visible in the room (i am carrying an object which bestows fly on me) then I move into the room and see W,N,UP as I created the room when flying, and the glowing 'you are here' pointer on the map is showing the correct room. I type 'add door up' and enter, move away, take off all my gear including the items which makes me fly, move back into room and the glowing pointer jumps to an incorrect room. How can I check the door got created ok?

Thanks!
Last edited by ulysses on Fri May 25, 2018 6:16 pm, edited 1 time in total.
Wod :mrgreen:
CthulhuMUD
www.cthulhumud.com
A hugely entertaining MUD based on the horror writings of HP Lovecraft.

Post Reply