Just started using mudlet, and I am attempting to make sense of the generic mapping script. Need some very basic assistance.
First of all, I should point out that although I am a (self-taught) software developer with medium-length teeth, and a few decades coding experience, this is my first time using lua, and my first time using mudlet. I confess to finding the scripting/triggers/aliases mudlet UI extremely messy and confusing, and still haven't worked out some very, very basic features, but I am getting used to it gradually.
So... I understand that the generic mapper simply does not work "out of the box", and requires a little MUD-specific hacking to get up and running. This was not at all obvious from the docs.
Code: Select all
map.start_mapping
Next: I am attempting to map a very, very old MUD. Actually, the very first commercial MUD, called "Shades", from the late 1980s, if you're into retrogaming and MUD history, you may know it already. The game was heavily featured in the (superb) book "Cybergypsies" by Indra Sinha.
I assume that the primitive output of this ancient game is not working in my favour when using the generic mapper. It's plain ascii, with no color codes or anything like that. There is no obvious way of matching room names, or fishing exits out of descriptions, but I have a kind of plan for mapping Shades which I'd like to run by you guys:
The "look" command reliably returns the room name at the next line in the prompt. GOOD.
The "exits" command reliably returns all the exits from the room (multiline), with the exact name of the room they lead to.
I built a primitive alias which calls "look" followed by "exits" and gathers the name into a string, and the exit map into a Lua table. I made a tiny state machine to choreograph all this, and to prevent the triggers firing under "normal" play. So far, so good.
I've also been successful calling the built in mapper API to create a couple of rooms "manually", with hardcoded values in tiny lua scripts, but of course, this does not actually do any speedwalk tricks, which is kind of the point of building the map in mudlet.
What I am missing now is how to connect all these fragments together.
How do I call
Code: Select all
start_mapping
Code: Select all
create_room
What is the point/purpose of the onNewLine trigger in the generic mapper? Should I be using this to build the map? How?
My plan is to wander around Shades calling my special alias in every room, and thereby build the map room by room, rather than try to work out how to trigger a map building script automatically. I think this should work ok, though it is a little tedious. Please advise about the wisdom of this approach.
Editing the map in the mudlet GUI is pretty horrible, tbh, but I know my way around regex in a text editor. Is it viable to build a rough map in mudlet, export it, then tweak the XML to tidy it? Then reimport? Wisdom of this?
Once my map is built, can I share it in a 'read-only' fashion with other Shades players?
Final question: Some of the rooms in Shades have duplicate names. This is very likely to screw up any automatic exit linking that looks up rooms by name. Is there a smart way to anticipate or handle this? I know they can have unique IDs and all that, so I am confident that mudlet can handle the finished result, I'm just wondering how to get there. I've seen a room merge call, but is there a 'room split'?
Thanks in advance for any assistance.