Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Plugins ➜ CMUD dbm map file and where should it go

CMUD dbm map file and where should it go

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Crate   (9 posts)  Bio
Date Wed 15 Oct 2014 08:32 PM (UTC)
Message
I have been using mushclient ver 4.94 on Ubuntu under wine for a while now and it is awesome. I recently started playing muds and this was one of the first clients i tried.

My question surrounds me recently acquiring a Zmud map database, which I converted to dbm and can view it in sqlitebrowser.

What I want to know is how do i integrate the database to mushclient's mapper?

Which map plugin should I use to display the db and update the db given the output below?

appreciate any assistance and advice.

Fields Beside the Path [ N E S W ]
You trample through a field of oat which seems to have been sewn by some
wild and unorganized people. Their ways of agriculture seem to be rather
primitive for there seems to be no order within these fields. It is quite
foggy here. The field continues to the north and south. To the west there is
the path leading to Moonglow. To the east you can leave the oat fields and
enter another grain field.
An orcish scout is snuffling on the ground here. (Red Aura)
|447(79%)H|384(73%)M|160(100%)V|1536054 TNL|0 TNQ|4am|
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 15 Oct 2014 09:59 PM (UTC)
Message
The CMud database and the one my plugin uses will be quite different. I have no idea of the format of the CMud one so it is hard to advise.

The first thing you really need to do is make the mapper work with an empty database, just to make sure it recognizes moving around etc. Then you could try to get the data from the CMud one, if you could work out things like how the data is stored.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Crate   (9 posts)  Bio
Date Reply #2 on Wed 15 Oct 2014 11:46 PM (UTC)
Message
I turned on the mapper, under game, and the mxp_roomdesc, mxp_roomexit and mxp_roomname are all populated with the current room I'm in when i check the world properties.

From my reading, I know these are entered into a database, can you direct me to it?

Note though, when i turn on the mapper, I dont see a window with it drawing the places I've been, I am guessing, I'm supposed to use a plugin to get the display.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 16 Oct 2014 04:38 AM (UTC)
Message
Crate said:

Note though, when i turn on the mapper, I dont see a window with it drawing the places I've been, I am guessing, I'm supposed to use a plugin to get the display.


Turn on the mapper? It is a plugin.

Oh, that mapper. That just builds up aliases. It isn't a graphical mapper. The graphical mapper is separate and somewhat newer.

Which MUD are you playing?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Crate   (9 posts)  Bio
Date Reply #4 on Thu 16 Oct 2014 06:48 AM (UTC)

Amended on Thu 16 Oct 2014 06:55 AM (UTC) by Crate

Message
Playing one of the many really awesome muds, called Realm of magic. lots of zones and really cool people.

Regarding the mapper building aliases, I'll definitely need to read more about it, but at a glance assuming its function is to gets data based on certain criteria.

But in terms of the graphical mappers, based on the excerpt in my first post for the location, which mapper plugin would you recommend to be able to work for mine though.

And also, from the recommendation, where would the database be located.

Almost forgot to mention, the mud uses MXP for certain tags, but for Rooms, only Room Name, Exits and Room Description are shown, no room Numbers.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Fri 17 Oct 2014 05:19 AM (UTC)

Amended on Tue 21 Oct 2014 04:47 AM (UTC) by Nick Gammon

Message
I've been having a bit of a play on Realm of Magic, because making the mapper work with MXP could be useful for quite a few MUDs. Here is the current version, it's a bit flaky but seems to work reasonably well:

Template:saveplugin=Realm_Of_Magic_Mapper To save and install the Realm_Of_Magic_Mapper plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as Realm_Of_Magic_Mapper.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Realm_Of_Magic_Mapper.xml (which you just saved in step 3) as a plugin
  7. Click "Close"


Initial version:

https://github.com/nickgammon/plugins/blob/6c36f332db9/Realm_Of_Magic_Mapper.xml

Current version:

https://github.com/nickgammon/plugins/blob/master/Realm_Of_Magic_Mapper.xml

(Instead of "copying between the lines" grab the source from GitHub. Click on the "Raw" button to get the pure plugin source, or RH-click it to get a file to download).

It uses the MXP tags to find when it changes rooms. It generates a room ID by hashing up the room name, description and exits.

Because we don't know where rooms lead, you have to "train" it by going from one room to another (eg. go east) and then go back again so it knows they connect both ways (eg, go back west).

After you've done this a bit the map should start to fill out in a reasonable way. Type "mapper help" to see the sorts of things you can do.

You have to manually enter shops and trainers by RH-clicking on the map square and selecting "toggle shop" or "toggle trainer". You can bookmark interesting places.

Example of it in use:


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #6 on Fri 17 Oct 2014 06:55 AM (UTC)
Message
Crate said:

My question surrounds me recently acquiring a Zmud map database, which I converted to dbm and can view it in sqlitebrowser.


The mapper plugin above also uses SQLite3, using a fairly simple system, so if you are keen you could work out how to import all your rooms. The tricky part might be working out what sort of unique ID Zmud used for rooms, it almost certainly won't be what I did.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Crate   (9 posts)  Bio
Date Reply #7 on Sat 18 Oct 2014 09:12 PM (UTC)
Message
Nick you are AAAWWWEEESSSOOOMMMEEE!!!,
I sincerely appreciate this!!!

I installed the plugin and got two errors thus far, but sorted it out by moving the previous .db, .db-shm and .db-wal files which were created previously when i was testing other mappers. On my to-do list will be to determine what the shm and wal files do exactly.

Logged in, when I arrived in the world, i was in my mud apartment with no visible exits, which the mapper updated the db, then when i opened the door, it mapped the room south of my apartment, and then i got back into the apartment, it mapped a different id since the number of exits had changed from nil to [S].

At this point i confirmed the db file was recreated and the other 2.

Time was short since i had to leave, I walked up and down the apartment complex, went onto the street, then retraced all the steps, but nothing past my apartment exit room and apartment were mapped, though.

Had to head out at this point, and after seeing at least the apartment created, I am seriously stoked to test some more, and am feeling anxious to get home, honestly.

Will test and let you know.

As a side note, is it possible to add an input section in the mapper window, or iirc, you had created a plugin to create another miniwindow to show the current room u were in and the respective exits.
Possibly have it there to be able to input notes on how to open certain scripted room doors, push button, knock certain pattern, ... etc, and send this to the db as additional notes.

Probably over thinking due to my excitement.
I'll test and let you know how it goes.

Thanks again Nick
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #8 on Sun 19 Oct 2014 08:02 AM (UTC)
Message
Let me know how it goes. :)

If the number of exits changes, try changing:


  uid = utils.tohex (utils.md5 (roomname .. roomdesc .. exits_str))


to:


  uid = utils.tohex (utils.md5 (roomname .. roomdesc))

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #9 on Sun 19 Oct 2014 08:11 AM (UTC)
Message
Crate said:

On my to-do list will be to determine what the shm and wal files do exactly.



Temporary files used by SQLite3.

https://www.sqlite.org/wal.html

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #10 on Sun 19 Oct 2014 09:05 AM (UTC)

Amended on Sun 19 Oct 2014 07:58 PM (UTC) by Nick Gammon

Message
Found a bug. Change:


    table.remote (moves, 1)


to:


    table.remove (moves, 1)


And also:

Change:


    room.exits [last_direction_moved] = current_room


to:


    if room then
      room.exits [last_direction_moved] = current_room
    end -- if room


Both changes made in above post, now.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #11 on Sun 19 Oct 2014 08:09 PM (UTC)
Message
I've been wandering around a bit. The database entries grow quite quickly:


sqlite> select uid, name, notes from rooms;
41EF698D31|Temple Board Room|
5D593169E4|Center Temple|
460E5AD455|Temple Board Room|
88E724CA80|Center Temple|fountain
7817DB52E5|Main Road|
DFAE45D29A|Small Alley|
58A6CB4095|Small Alley|
6736B0875A|Main Road|
F0416F0F94|Side Road|
4144968C51|Side Road|
D19E4FB517|Main Road|
F17D66856B|Welcome to Entrancity|
BF43E49DF5|Treasure Store|
6FAC92C612|Small Alley|
60C5555AA5|Cleric Guild|
AAFF032A6F|Druid Guild|
6EFE98C603|Mage Guild|
BB9BFBF3C5|Small Alley|
57901EB3AC|Side Road|
DFAAD45422|Side Road|
E154E4B390|Armor Store|
4A1C413773|Weapon Store|
BCF1171A19|Entrancity Map Room|
64FF28D2D0|Entrancity Shrine Room|
399B0C232B|General Store|Food, containers, torches etc.
C3CC8CC073|Thief Guild|
ED40B2706E|Warrior Guild|
9391FE5E36|The Entrancity Academy|
2C9D29FEC7|First Step of Knowledge|
E66CFB07B6|The Large MUD Clock|
FB51A4BFEF|Before A Tattered Tent|has ladder to next level
7ABB9C28A4|Bags, Boxes and Chests|
20264E6B0D|Time for a Good Rest|
C20E24A2CD|The Greyish Light|
1E2D7291F3|Your Equipment and You|
5BC50580BA|The Dark Corner|
167C05ABFF|The Meat Locker|
850540B413|A Peaceful Inn|
E937CCD182|Main Road|
A5D9B2B45D|The Great Temple of Moonglow|
B9D771B0C5|Temple Street|
341BDD7BFA|Palace of the Advisors|
7262DE865E|A Hallway|
1738B0FEA0|The Moonglow Donation Room|
6E86078D74|The News-Reading Room|
3ED7399FD4|The Reading Room|
A1107211CF|Small Alley|
850903311D|Practice Arena Entrance|
3BBE6437B3|Southwestern Corner|
DCE87271D4|Southeastern Corner|
EEF56F5324|Practice Arena Center|
9C9ECABE62|Western Arena Wall|
AB8C4E7259|Eastern Arena Wall|
9070CE36DF|Northwestern Corner|
5828CD7751|Battle Master's Throne|ladder up to next level
5B188E6F0B|Northeastern Corner|
19D34F0728|The Basics of Skills and Spells|
88EAA599D1|Using Skills and Spells|
A9F2AF9AFB|Spells of Harm|
C1DA5539D4|Skills for Combat|
ED093C894E|Miscellaneous Skills|
6B3946FB3C|Miscellaneous Spells|
57FB3603E4|Spells of Healing|
09909CF703|Master Illusionist's Sanctuary|ladder up to next level
1F36964BD6|Helpful Skills|
75A9D69ED2|Travelling the World|room with maps
0AF76F3327|Swimming the Channels|
A559BFBB11|Help From Others|
0985E549EB|Walking Around|
4407283A26|Powerful Rings of Stone|
400EFD3262|Study Full of Maps|ladder up to next level
C5EAB778B6|Sailing the Seas|
91FC30DA94|Travel by Magic|
A9ED2B1D56|Coach Travel|
09FA61764A|Exploring Your Surroundings|
591CA9A601|The Box|
4DE9C06019|Large Library|
F31A0B280D|Harbour-Street|
43C97BB1BC|Temple Street|
5256DFCE24|Market Hall|
5D1B5ADA4C|A Passageway|
77FEB7DEB5|A Passageway|
73FD7B3B29|An Alley Near the Harbour|
6DFA477830|River Road|
4A150C0624|A Dark Passageway|
D0FF6EFCF4|Large Library|
A5BF50E425|Room of Infinite Space|
F73253C0AC|Little Buttons Everywhere!|
12C0F16C20|Gallery of Art|
A2EC9ACD47|Lair of the Golden Dragon|
31B3CFE5DA|Simple Bedroom|
A77BE00922|The Center-Place of Moonglow|
176774981B|Market Hall|
19EA584AC0|Market Hall|
C1CC6FE5B7|Market Hall|
5B19FBDA1F|Main Street|
08D67DF9AF|The Big Intersection|
7499122B78|Market Hall|
044C522F92|The Old-Map-Shop|
3E9C23D994|Before the Great Blue Bridge|
927A8CA62C|Market Hall|
5F7ED42410|Market Hall|
0152257D3D|Sailor Shop|
BEC21DED18|General-Store|
288F6925D1|Town Street|
EB1D68DC8C|Town Street|
F92B92D9D5|Town Street|
A8ACA553B2|An Intersection|
CC473A413E|Weapon Shop|
D4C21B9D1F|The Great Blue Bridge|
293C40FA1E|The Great Blue Bridge|
E4BC11F326|River Inn|Inn
B1707B6C4A|The Stairs|
0A8C8D3530|An Underground Way|
C33CD78600|An Underground Intersection|
30E6CD4691|Market Hall|
935D41F990|Magic Shop|
6A0C6D5060|Armour Shop|
DB7B275080|Treasure Shop|
D6CC4EFD54|The Northern Wall Road|
0CF42B5B5F|Before the Great Blue Bridge|
78F1820320|The Chamber of Fun|
1C5C5BFB65|The Shrine of the Holy Token|
F3C2612865|River Road|
46AE85DDFE|River Road Bridge|
2C3B8C45AA|Main Street|
ED0CB77814|Main Street|
BA71FB9A45|The Post Office of Moonglow|
033E89FFD6|Entrance Hall of the Library of Moonglow|
DA1A579F87|The Lawyers Part of the Library|
6F03082AD7|The History Part of the Library|
C5C2D16687|The Town Part of the Library|
239C5D3244|The Story Part of the Library|
5E3FF8664A|The Item Part of the Library|
4B512A9CAE|The Weapon Part of the Library|
5ED42562A6|The Armor Part of the Library|
B5146A978B|The Social Part of the Library|


The UIDs on the left are the generated "room numbers" used to identify rooms uniquely. If exits change it will mistake one room as two rooms, which is why you might want to omit the exits from the UID hash.

Some of the exits are:


267|n|08D67DF9AF|5B19FBDA1F|2014-10-19 10:52:05
268|e|08D67DF9AF|F3C2612865|2014-10-19 10:52:05
269|s|08D67DF9AF|2C3B8C45AA|2014-10-19 10:52:05
270|w|08D67DF9AF|46AE85DDFE|2014-10-19 10:52:05
...
339|n|2C3B8C45AA|08D67DF9AF|2014-10-19 19:59:46
340|s|2C3B8C45AA|ED0CB77814|2014-10-19 19:59:46
341|n|ED0CB77814|2C3B8C45AA|2014-10-19 19:59:48
342|w|BA71FB9A45|5B19FBDA1F|2014-10-19 19:59:53
343|n|033E89FFD6|DA1A579F87|2014-10-19 19:59:56
344|e|033E89FFD6|5B19FBDA1F|2014-10-19 19:59:56
345|s|033E89FFD6|6F03082AD7|2014-10-19 19:59:56
346|w|033E89FFD6|C5C2D16687|2014-10-19 19:59:56
347|u|033E89FFD6|239C5D3244|2014-10-19 19:59:56
348|d|033E89FFD6|5E3FF8664A|2014-10-19 19:59:56
349|s|DA1A579F87|033E89FFD6|2014-10-19 20:00:01
350|n|6F03082AD7|033E89FFD6|2014-10-19 20:00:05
351|e|C5C2D16687|033E89FFD6|2014-10-19 20:00:09


That is basically saying that, for example, going north from from 2C3B8C45AA takes you to room 08D67DF9AF. And, further up, going south from 08D67DF9AF takes you to 2C3B8C45AA (the same room) which makes sense. Thus those two rooms are linked in a logical way.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #12 on Sun 19 Oct 2014 08:38 PM (UTC)
Message
I've mapped out part of the town of Moonglow. You're on your own after this, but if you find some bugs, and fix them, it would help others if you post what they are.



Once you mark rooms as shops (RH click them to do this) try typing:


mapper shop


... to see where they are.


Sailor Shop (0152257D3D) - 3 rooms away
General-Store (BEC21DED18) - 3 rooms away
Armour Shop (6A0C6D5060) - 3 rooms away
Weapon Shop (CC473A413E) - 3 rooms away
The Old-Map-Shop (044C522F92) - 3 rooms away
Treasure Shop (DB7B275080) - 3 rooms away
There were 4 matches which I could not find a path to within 30 rooms.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Crate   (9 posts)  Bio
Date Reply #13 on Mon 20 Oct 2014 10:11 PM (UTC)
Message
Nick, Again many many thanks.

I got back home after my small trip, away from keyboard lol and finally got to do some testing with the plugin.

Based on my testing, I started to map only moonglow, there were some issues encountered where when training the mapper, some rooms were mapped incorrectly, where rooms would change their exits in the mapper and the db entries, but I had no issue with it since I could manually edit same using the RH menu. My main thing using the plugin thus far is not having to copy and paste Room names, or even use pen and paper to map lol.

I am thinking of a miniwindow noting your current room and its relevant exits. Thinking I could use this to do edits for the rooms next to it in case of issues. From what I've seen, it should be to setup another miniwindow and call the exits using the fromuid and touid as well the exits. Side note though, Was wondering if instead of using a dir to list individual directions for the touid, I can probably manipulate it to do a single fromuid and multiple dir columns, dirN, dirS, ...etc where a touid would be stored in the relevant dir.

One other thing I was thinking of, was tagging zones to the maps. I think there exists possibly over 130 different zones of which I know off, City of Moonglow is one of those zones which is part of the continent Omelas, so for the initial map I would tag the zone to the rooms.
Maybe possibly create a subminiwindow to get the zoneID or create a new zone if it isn't in the table.

Also, in the mud there are skills called spy and wizards' eye which allow you to peak at the rooms around and view the rooms names and description. When I looked into the room using these skills, in the mapper miniwindow it moved my position to there instead of the current. Will try and check into it some more.

Note also, from the code you did, I am feeling abit more empowered lol, and from this I am thinking of adding a spell/skill and item tables so I can list the spells/skills/items at trainers or shops and have them recorded. Again, I possibly add another subminiwindow to the mapper where I can search for the relevant skill,spell or items and add to the shop or have an option to create a new one.

Still learning to understand lua, and mushclient, as well as mxp, but I am extremely glad for all the work you put in and definitely am very appreciative of the results As I said before, it gives me a great stepping stone to possibly start building some of my ideas into the plugin.

Again many many thanks for the help, and definitely big big thanks for MushClient.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #14 on Mon 20 Oct 2014 11:43 PM (UTC)

Amended on Tue 21 Oct 2014 04:50 AM (UTC) by Nick Gammon

Message
I've been having a bit more of a play today. There was definitely an issue about rooms being linked to the wrong exits, and I think the main reason for that was not interpreting all the messages about "you can't go that way".

For example, if you type E and get the message:


You need a boat or be an excellent swimmer to go there.


Then the mapper thinks you went east when you didn't.

I've added a few more of those to the "Cannot_Go" triggers.

I've also added the concept of reverse exits. That is, if you go east from A and get to B, then it assumes that going west from B gets you back to A. This helps the map fill out faster without walking backwards and forwards all the time.

You may be able to import your CMud database if you have enough information in it to generate the room UIDs. At present (in this version) I am hashing the room name combined with the description. Now if the CMud database has both of those then you should be able to generate the same UIDs (it might need fiddling to add/subtract carriage-returns maybe).

If you want detailed debugging information change this line near the top:


  <!ENTITY debugging "false" > 


Change "false" to "true".

There is also a new alias "mapper rooms" which echoes back all of the room information (all rooms and where the exits go).




Template:saveplugin=Realm_Of_Magic_Mapper To save and install the Realm_Of_Magic_Mapper plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as Realm_Of_Magic_Mapper.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Realm_Of_Magic_Mapper.xml (which you just saved in step 3) as a plugin
  7. Click "Close"


This version:

https://github.com/nickgammon/plugins/blob/1ec1843da8e/Realm_Of_Magic_Mapper.xml

Current version:

https://github.com/nickgammon/plugins/blob/master/Realm_Of_Magic_Mapper.xml

(Instead of "copying between the lines" grab the source from GitHub. Click on the "Raw" button to get the pure plugin source, or RH-click it to get a file to download).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


78,825 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.