Page 1 of 1

SlothMUD Mapper

PostPosted: Sat Oct 11, 2014 12:14 pm
by Akaya
It's finally here! The SlothMUD Mapper!
SlothMUD Mapper is a mapping script that automatically maps rooms as you move through the world of Jord.

* Auto-mapping based on MSDP information
* Double click any room to run there
* Customize room colors by terrain type
* Zoom in/out
* View any room or area from anywhere
* Create custom run paths

To get it to work:
    1 ) I recommend a new profile.
    2 ) Create a new script and copy/paste the following into it:
    Code: Select all
    function initialise_msdp()
      local vars = {
      for k,v in pairs(vars) do

    3 ) Before logging in, enable MSDP in Mudlet Settings and restart the profile.
    4 ) Install the attachment via the Package Manager on the Mudlet toolbar.
    5 ) Login.
    6 ) Enter lua initialise_msdp() send("\n") from the command line.
    7 ) Enter mapping mode on from the command line.
    8 ) Enter map start from the command line.

That should create your first room. You can then move around the script will do everything for you.

* Some locations won't map perfectly on a square grid in which you can right click the room you need to move and drag the mouse in the direction you wish.
* You can alter the room colors in the appropriate script by altering setCustomEnvColor(17, 0, 0, 0, 100) to whatever you want. The last four parameters are the rgba values. In this case it would be 0, 0, 0, 100 which is black with 100 transparency.
* Special exits (such as flying via dragon/phoenix/griffon) will not work with the speedwalk function just yet.
* If you need to connect two rooms that the mapper may have missed, use the alias CONNECT [room1] [room2] [direction] So for example, connect 126 150 east will connect room 126 to 150 in a eastward direction.

Re: SlothMUD Mapper

PostPosted: Sun Oct 12, 2014 8:12 am
by DarkArtist
YESS! You're the man Akaya. This is big news!

Question: Do I have to update to the new Beta version for it to work?

Re: SlothMUD Mapper

PostPosted: Sun Oct 12, 2014 12:02 pm
by Akaya
Yes. It requires Mudlet 3.0 beta+ as it utilizes the new sendMSDP function and requires that you enable the new 'Enable MSDP' feature in Mudlet's settings.

Re: SlothMUD Mapper

PostPosted: Mon Oct 27, 2014 5:02 pm
by Calex
I have been using Akaya's mapper. Brilliant effort! A few things I needed to do to get it to work for me (I'm using OSX 10.10). Note. This mapper requires MSDP functionality. You must be using mudlet 3.0.0-beta 2 or later and have selected MSDP in the Settings/General window. (If you are doing that as you read this, you must restart mudlet for the MSDP functionality to be in use).

In the package Akaya has provided, import it as he specifies.

Then, before you do anything else, open the editor window (any pane e.g. Alias, Trigger, Script will do) and search on RNUM. There is a box to type this in at the bottom left of the editor. If you find any files that reference RNUM (they will be in the form ROOM_RNUM), change the occurrences to ROOM_VNUM.

Akaya also provides a lua function you can copy and paste into a mudlet Script file. The function's name is initialise_msdp(). Note the british 's', not the american 'z' in initialise if you ever want to run this manually. Create a script file with that function. One of the items in the local_vars table is "ROOM_RNUM". Just delete that line in the table. Further down you will see that "ROOM_VNUM" is provided, which is what you want.

Once you have done the preceding steps, you can enter the command, MAPPING ON, at the command line. You should get a message back that all is ok.

Then enter the command, MAP START, at the command line. You should get back a message saying that initialisation must be done first and the command will do it for you and report it done.

If you open the mudlet mapper now, and you've not used the mapper before, you should see a single room that is highlighted because you are in that room. Move in one of the exit directions and you should see a second room created on your map. If you see this, congratulations, everything is working!

Note: Each time you log back in to SlothMud, execute the MAPPING ON and MAP START commands

Below are instructions for installing a starter map for SlothMud that has many newbie areas already mapped for you. If you want to use this starter map, then you need to exit from mudlet like you would normally and save your contents

The first challenge is to find the folder you want to put this .dat file in.

On a mac, you will find your SlothMud profile using ~/.config/mudlet/profiles/

On a pc, you fill find your SlothMud profile using User/<your login name>/.config/mudlet/profiles

In the profiles directory, you will have one or more profiles for SlothMud. Open the profile for the SlothMud you were using when you created the initial room mappings

There should be a folder/directory there called 'map'. Inside the map directory you will find one or more .dat files. You will want to put my .dat file in the 'map' directory, but change the date time in the name to one that is later than your latest .dat file, but on or before the current date time.

When you go back into SlothMud, open the map window, do MAPPING ON and MAP START. At the very bottom of the map window there is a small arrow shaped like ^ or v. If you don't see the settings window in the map window, click on that arrow. In the settings window you will see a dropdown for various areas that have been created with some mapping. If there are a lot of them, you have loaded my map.dat successfully.

Re: SlothMUD Mapper

PostPosted: Mon Oct 27, 2014 5:06 pm
by Calex
The map.dat file did not upload. Trying again. Can't upload. Here's a link ... -35map.dat

Re: SlothMUD Mapper

PostPosted: Tue Oct 28, 2014 5:15 pm
by Akaya
Thank you for this! Most appreciated! Still adding some new features.
I'll have an update soon (with fixes that should make installation easier :lol: )

New features will include (but not limited to):
- door display
- window display
- special exit creation API (so you can ride boats, dragons, griffons, etc. with speedwalk)
- renovated path creation API

Re: SlothMUD Mapper

PostPosted: Sat Jul 09, 2016 1:10 am
by Akaya
With the removal of msdp.COORD#, this script is broken. I'll need to rewrite it using msdp.ROOM_EXITS instead.