[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  MUSHclient generic graphical mapper module

MUSHclient generic graphical mapper module

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


Pages: 1  2  3  4  5  6  7  8  9  10  11 12  13  14  15  16  17  

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #150 on Sun 29 Aug 2010 09:08 PM (UTC)
Message
Jerrid said:

Right now I am playing (Lord of the Rings) The Two Towers. I was stuck in the Prancing Pony for three days! That is not fun to me. I get lost in real land nav, much less in a game where every thing is text based.


I totally know where you are coming from with this, and is part of my motivation for writing the mapper module. The problem is, with lots of MUDs which output stuff in different ways, it is hard to make a generic mapper that "just works", although I understand most players would want exactly that.

However it isn't really feasible as the client developer to sit there modifying the mapper for the 1000+ MUDs out there, so the best I can do is show the technique and hope someone from the MUD will do it.

Twisol said:

Put simply, every automapper needs, at the very least, two things from a room. One: It needs to be able to identify it uniquely. Two: It needs to be able to get its exits.


Well actually, uniquely identifying the room is all you really need. After all, you can manually read the exits and take each one, and the mapper is designed to detect you went west (eg. the last thing you typed was "west") and if you end up in a new room it can assume that the previous room has a west exit, and taking it leads you to the current room.

I don't know how the "other client" just handles all this, but from what I saw a while back you at least have to train or teach it what room descriptions look like. And I don't know for sure if it works out the fastest path from one room to another, or if you have to assist it in its map building. Maybe it does, maybe not.

I would take up Twisol's suggestion and ask in-game, or on their forums. Nowadays MUSHclient is pretty well known, and I would be surprised if someone isn't tackling the problem.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #151 on Sun 29 Aug 2010 09:11 PM (UTC)
Message
I found some maps here:

http://t2tmud.org/projects/maps/

These aren't in-game, but are so detailed it would seem that there must be way of getting the necessary information to make the mapper work.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #152 on Sun 29 Aug 2010 09:15 PM (UTC)
Message
Nick Gammon said:

I found some maps here:

http://t2tmud.org/projects/maps/

These aren't in-game, but are so detailed it would seem that there must be way of getting the necessary information to make the mapper work.


It's actually not too far-fetched that those are hand-crafted. Delphinus of Achaea has a truly massive hand-made map of Achaea's wilderness grid. And those maps you linked to seem to imply that the world is strictly grid-based, not a rather loose undirected graph like Achaea's [non-wilderness] world is.

Actually, a grid-based world would make a mapper somewhat easier to do. Give one room a coordinate (i.e 0,0), and base all others off of that one.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #153 on Sun 29 Aug 2010 09:58 PM (UTC)
Message
I made a character on Twin Towers to see what we are up against here. ;)

First obvious thing, it supports MXP. That is usually a good sign, as I hoped you would get room numbers or something.

However so far I only see exits, eg.


<x>north</x>, <x>east</x>


So that's a start, you can work out what the exits are.

Unfortunately, the room descriptions themselves don't seem to be tagged (unless it is an option), so it will be hard to generate unique room codes. Also, rather unfortunately, a fierce weasel is blocking my path. :P

According to their website, most players use MUSHclient or zMUD, so there should be someone you can ask if they got a mapper to work somehow.

I can't see in their help how to get a prompt/MXP tag or other way of identifying rooms. Without that, it is hard for a mapper to work.

After all, if you don't know where you are, it is hard to say how to get somewhere else. Maybe it can be done like this... Example room:


    You are outside of the east gate of Willowvale.  Civilization 
diminishes out here, being replaced by a peaceful, rural landscape.
The road continues off to the east.  Down the road a piece and on  
the south side you see a wagon. 
    The only obvious exits are southeast and west.


The final line is identifying ("The only obvious exits ...") so we could backtrack until an indented line ("You are outside ...") and therefore generate a room description.

That could be enough to get it to work. But I would ask around to see if someone has done it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #154 on Sun 29 Aug 2010 11:35 PM (UTC)
Message
Template:post=10536 Please see the forum thread: http://gammon.com.au/forum/?id=10536.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Mendaloth   (14 posts)  [Biography] bio
Date Reply #155 on Thu 23 Sep 2010 12:22 PM (UTC)
Message
You have really done an amazing job with this!! Are in room commands linking rooms (like entering portals) planned?

The MUD I play (Aardwolf) makes extensive use of those.

Would also be great to able to link an alias and a specific room UID. Could use that to make an alias that wears and enters a portal in my inventory or casts a spell that leads to my home or clan, and the mapper could use it in its pathfinding.

Regardless, you have done an amazing job with this!
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #156 on Thu 23 Sep 2010 11:42 PM (UTC)
Message
Mendaloth said:

You have really done an amazing job with this!! Are in room commands linking rooms (like entering portals) planned?


Well not exactly by me, but I believe Lasher is working on a version adapted for Aardwolf. Perhaps an in-game query (using their bulletin board or whatever) would find out the progress on that.

Mendaloth said:

Would also be great to able to link an alias and a specific room UID. Could use that to make an alias that wears and enters a portal in my inventory or casts a spell that leads to my home or clan, and the mapper could use it in its pathfinding.


There is currently (in the latest version) an alias:


mapper goto <room>


You could adapt that to do what you want, I think.

Mendaloth said:

Regardless, you have done an amazing job with this!


Thanks!

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Crowe   (21 posts)  [Biography] bio
Date Reply #157 on Sun 26 Sep 2010 11:18 AM (UTC)
Message
I was wondering. With the mapper goto, could there be a mapper runto which puts the string into a runto format?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #158 on Sun 26 Sep 2010 10:10 PM (UTC)
Message
I did that already for use on Aardwolf. If you set the speedwalk_prefix value (in the ENTITY for ATCP_Mapper.xml) to something (eg. "runto ") then it just sends "runto xxx" where xxx is the speedwalk string.


<!ENTITY speedwalk_prefix "" > 

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Crowe   (21 posts)  [Biography] bio
Date Reply #159 on Sun 10 Oct 2010 11:50 PM (UTC)
Message
Thank you for point that out.

I have another question about the Mapper Plugin. Does it have the ability to open directionally or doors, enter portals, and enter special exits? If it does, how do you set it up to do this?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #160 on Mon 11 Oct 2010 02:18 AM (UTC)
Message
It doesn't have that right now. It could be tricky detecting if a door was open or not.

However when testing on the IRE Muds (like Achaea) I made some triggers that assisted in opening doors, for example:


 <trigger
   enabled="y"
   regexp="y"
   match="^There is a door in the way"
   send_to="12"
   sequence="100"
  >
  <send>
    if last_direction_moved then
      Send ("open door " .. last_direction_moved)
    end -- if
  </send>
  </trigger>


This worked by detecting which way you last tried to move (last_direction_moved) which was done in the plugin in the OnPluginSent function, like this:


valid_direction = {
  n = "n",
  s = "s",
  e = "e",
  w = "w",
  u = "u",
  d = "d",
  ne = "ne",
  sw = "sw",
  nw = "nw",
  se = "se",
  north = "n",
  south = "s",
  east = "e",
  west = "w",
  up = "u",
  down = "d",
  northeast = "ne",
  northwest = "nw",
  southeast = "se",
  southwest = "sw",
  ['in'] = "in",
  out = "out",
  }  -- end of valid_direction
  
-- try to detect when we send a movement command
function OnPluginSent (sText)
  if valid_direction [sText] then
    last_direction_moved = valid_direction [sText]
  end -- if 
end -- function


So what happens is, the plugin is speedwalking you somewhere, the last thing it sends is (say) "west", and then it gets the message:


There is a door in the way ...


The trigger then fires, and sends "open door west".

I'm not sure about whether the speedwalk resumes at the point but sending the alias "mapper resume" could get it going again if necessary.

It doesn't handle portals or special exits at present, the closest you could probably go is to speedwalk to the portal and manually go through it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Hunter Green   USA  (16 posts)  [Biography] bio
Date Reply #161 on Mon 11 Oct 2010 02:24 AM (UTC)
Message
How high are things like those special exits, resuming speedwalks, mixing the .xml data with your own data, etc. on your guesstimated project list? (So I can think about my own project list according to whether those are on a near horizon or a very far one.)
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #162 on Mon 11 Oct 2010 04:43 AM (UTC)
Message
Resuming speedwalks is already there (mapper resume).

The XML data loading is in a plugin I described further back (in this thread I think), and after that it justs adds more things to the database. That's assuming IRE haven't changed the format of the XML too much, but in any case you should be able to work it out.

The special exits: I have that as low priority so if you want to tackle it, that would be great.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by LezChap   (36 posts)  [Biography] bio
Date Reply #163 on Mon 11 Oct 2010 06:02 AM (UTC)

Amended on Mon 11 Oct 2010 06:03 AM (UTC) by LezChap

Message
If I'm reading my Zmud map database properly, Zmud stores portals in another table separate from the exits table.

For implementing portals, I'd suggest adding a Portal table, with Portal Name (I'm assuming you use portals by entering them, ie "enter gate"), fromID, and toID. Then copy/paste and adjust the portion of the existing code that reads and adds exits to the map to read and add the new portals database.

As for door exits...I think we'd have to add an extra pair of fields to the exits database (ExitType, 1 = normal, 2 = door, 3 = locked door; and Name for the doorname), then adjust the speedwalk portion of the code to react to those fields (a nice addition would be to set a config option to avoid locked doors, or a threshold of movements that you'd have to take to avoid them...like if going through that locked door to get to the point is 25 moves, but avoiding the door is only 30, take the 30 moves, but if avoiding the locked door is 75 moves, then that's too far out of your way).

Also might want to add PortalType to the portal field, in case the portal can also be closed/locked, or there's different commands to go through different portals (touch stone vs enter warpgate)?

Well, that's my solution(s)...probably more complex than it sounds, but I'm working on a few other things at the moment and can't make it work yet.
[Go to top] top

Posted by Ruthgul   (18 posts)  [Biography] bio
Date Reply #164 on Tue 12 Oct 2010 12:46 AM (UTC)
Message
Hello :)

Trying to make a plugin for Materia Magica, based on the Two Towers plugin by Nick.

I'm not an expert, so I'm having some problems.

* First, got it to parse room names and exits OK, but it's only drawing/showing the current room.

* Second, it's recognizing some rooms OK, but not others (problem you already have covered with some MUDs using the same room name + same description for different places).

Any help would be appreciated. As I said, I'm no expert. But if we can make it work, it would make things so much easier...
[Go to top] 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.


678,558 views.

This is page 11, subject is 17 pages long:  [Previous page]  1  2  3  4  5  6  7  8  9  10  11 12  13  14  15  16  17  [Next page]

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]