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, 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.
 Entire forum ➜ MUSHclient ➜ Plugins ➜ 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 page


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

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #135 on Tue 01 Jun 2010 10:35 PM (UTC)
Message
If so, in mapper.lua at around line 763 is the code to draw the rooms, like this:



 if room.unknown then
    WindowCircleOp (win, 2, left, top, right, bottom, 
                    config.UNKNOWN_ROOM_COLOUR.colour, 2, 1,  --  dotted single pixel pen
                    -1, 1)  -- no brush
  else
    WindowCircleOp (win, 2, left, top, right, bottom, 
                    0, 5, 0,  -- no pen
                    room.fillcolour, room.fillbrush)  -- brush
  
    WindowCircleOp (win, 2, left, top, right, bottom, 
                    room.bordercolour, room.borderpen, room.borderpenwidth,  -- pen
                    -1, 1)  -- no brush
  end -- if 


Just comment-out that first one (room.unknown) so it draws nothing:



 if room.unknown then
--    WindowCircleOp (win, 2, left, top, right, bottom, 
--                    config.UNKNOWN_ROOM_COLOUR.colour, 2, 1,  --  dotted single pixel pen
--                    -1, 1)  -- no brush
  else
    WindowCircleOp (win, 2, left, top, right, bottom, 
                    0, 5, 0,  -- no pen
                    room.fillcolour, room.fillbrush)  -- brush
  
    WindowCircleOp (win, 2, left, top, right, bottom, 
                    room.bordercolour, room.borderpen, room.borderpenwidth,  -- pen
                    -1, 1)  -- no brush
  end -- if 



- Nick Gammon

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

Posted by Tripphippy   (3 posts)  Bio
Date Reply #136 on Wed 02 Jun 2010 04:34 AM (UTC)
Message
I re-read the draw_room function and noticed I wasn't passing a value for 'unknown' in my GetRoom function. it's fixed now. I wasn't getting dotted boxes at all just full ones before.
Top

Posted by Arcath   USA  (1 post)  Bio
Date Reply #137 on Thu 03 Jun 2010 02:20 PM (UTC)

Amended on Thu 03 Jun 2010 05:31 PM (UTC) by Arcath

Message
I tried both of the ATCP_Mapper and Simple_Mapper xml files and loaded them as plugins.

I got the map popup to work but it wont map any of the rooms.

I am trying to get this working on Ansalon but I am at a loss as I am just heading back to a mud after years away from it and only used to zmapper in zmud.

Edit: It has been so long since I have done any coding I really wouldn't know where to start with this. I included below the typical output below. Any help to get this to work on Ansalon would be wonderful. Thanks.


Imperial Square
  A finely crafted platinum dragon stands in the center of a large
fountain.  It dwarfs everyone and everything in sight.  The dragons
outstretched wings provide shelter from the elements.  The statue spits long
blasts of water into a large obsidian bowl.  Every half hour the bowl tips
and spills its contents into the fountain.  Righting its self just in time
to receive the next blast of water.  

[Exits:  north east south west]
     A signpost is here.
     A platinum dragon statue spits water into a fountain here.
     A tall lamp post stands here.
(Charmed) A young pseudodragon flits about here.
A citizen of Palanthas walks by on the way to the store.
A young cadet is here learning the ropes of the Palanthian guard.
A royal alchemist is here selling refreshing potions.
Top

Posted by Tripphippy   (3 posts)  Bio
Date Reply #138 on Thu 03 Jun 2010 04:46 PM (UTC)

Amended on Thu 03 Jun 2010 10:13 PM (UTC) by Nick Gammon

Message
It's still not working right. What am I supposed to return for unknown rooms, currently I return nil. I don't get any dashed boxes or lines at all. Here's my getroom function for reference.


function GetRoom (uid)
	if(tonumber(uid) == 0 or tonumber(uid) >= 200000) then
		Note("room id out of range")
		return nil
	end
	local record = {}
	local cur = db:execute("SELECT * FROM Rooms WHERE room_id = '" .. uid .. "'")
	cur:fetch(record, "a")
	room = {
		unknown = false,
		name = record["name"],
		hovermessage = uid .. ":" .. (record["name"] or ""),
		area = record["area"],
		bordercolour = ColourNameToRGB(record["color"] or "cyan"),
		borderpen = 0,
		borderpenwidth = 1,
		fillcolour = 0x000000,
		fillbrush = 1,
		exits = { n = record["north"], e = record["east"], s = record["south"], w = record["west"], u = record["up"], d = record["down"] }
		}
	if(currentarea == nil) then
		currentarea = record["area"]
	end
	--DumpRoom(room)
	return room
end
Top

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #139 on Thu 03 Jun 2010 10:16 PM (UTC)
Message
Tripphippy said:

It's still not working right. What am I supposed to return for unknown rooms, currently I return nil. I don't get any dashed boxes or lines at all. Here's my getroom function for reference.



If you return nil, which sounds right, internally the mapper module creates a dummy room with the unknown flag set.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #140 on Thu 03 Jun 2010 10:19 PM (UTC)

Amended on Mon 07 Jun 2010 10:53 AM (UTC) by Nick Gammon

Message
Arcath said:

I tried both of the ATCP_Mapper and Simple_Mapper xml files and loaded them as plugins.

I got the map popup to work but it wont map any of the rooms.



Ansalon doesn't look like it is an IRE game, so the ATCP_Mapper won't work. May as well remove that. As for the other mapper, I used the colouring of the room name to detect that. For the simple mapper to work you need to be able to detect different rooms so it can generate a room number (unless you can get that from the game somehow).

- Nick Gammon

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

Posted by Archangel   USA  (1 post)  Bio
Date Reply #141 on Thu 08 Jul 2010 04:33 AM (UTC)
Message
I've been using Mush for a number of years now on a small mud called legendmud, and sadly in the last week only adding plugins. One thing that I have been trying to do is to do is to get the simple mapper to work on game. All I seem to get is the first screen as posted here: http://i983.photobucket.com/albums/ae320/saross0219/screenshot.png. My coding is well... lacking as any of my teachers will admit. yet I can program a router. Anyways just looking for a bit of guidance on what is lacking for this to work. From what I can tell there isn't any UID that the mud gives that I can use and I know there isnt a map file sent out that I can utilize to automatically build a map from so the file has to be built from the ground up basically. To throw in a new twist to the feat this game has 3 different eras that one can "transfer" to, so in essence the code would need to be a bit smarter and be able to differentiate the eras by an indication or a drop down of a sort that it can be used to link that room to a certain era and find it self on the map when that trans is used.
Top

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #142 on Thu 08 Jul 2010 04:53 AM (UTC)
Message
Unfortunately it goes beyond the scope of what I can offer here, to go into each of the 1000 or so MUD games, and adapt the mapper to work with each one.

As mentioned earlier, for the mapper to have any hope of working you need to be able to uniquely identify rooms, otherwise it won't know if you have gone back into the same room, or entered a new one.

A simple method is if the MUD in question sends some sort of room number (currently the IRE games do, and Aardwolf). Also PennMUSH variants had some sort of "database number" which could uniquely identify rooms. Given this, you could adapt the simple mapper I presented earlier fairly simply.

Without a room number you have to try to build one by doing what I did with Smaug, and hash up the room description and exits, hoping that is different for each room.

A little while back I was participating in a "MUD standards" forum, in an attempt to standardize the way MUDs sent out things like room numbers, to make mapping easier. Unfortunately, to say the least, consensus was not easily reached. There were a considerable number of objections to the proposals to make things work in a more standard way, including that older clients would not be able to use them, some MUDs did not want to, or could not, adapt to them, some MUDs don't have rooms and thus couldn't supply room numbers, and so on and so on.

If you can convince your MUD admins to follow some of the tentative proposals (dubbed ATCP, ATCP2, or GMCP) there might be some hope of having a standard mapper work with them. Indeed, Aardwolf have started sending something along those lines, making the mapper work for them quite nicely.

Some MUD admins are certainly open to new ideas, and if yours are amongst them, you might be able to get them to add the appropriate codes (via telnet sequences, it isn't too hard) and then the mapper will just jump into life. :)

- Nick Gammon

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

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #143 on Sat 14 Aug 2010 11:36 PM (UTC)
Message
I don't suppose anyone knows how to make a "GoTo" command for the mapper, i.e. I have the id of the room I want to go to... I just want it to walk there.

And the second question is... the hyperlinks are lovely, but is there an easy way to use the mapper to make a "Directions" command. i.e. I input the room id I want to reach, and it returns directions from the current room?
Top

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #144 on Sun 15 Aug 2010 12:45 AM (UTC)

Amended on Sun 15 Aug 2010 01:35 AM (UTC) by Nick Gammon

Message
LupusFatalis said:

I don't suppose anyone knows how to make a "GoTo" command for the mapper, i.e. I have the id of the room I want to go to... I just want it to walk there.


The existing mapper does that. From the help:

Quote:

MOVING

mapper goto <room> --> walk to a room by its room number





LupusFatalis said:

is there an easy way to use the mapper to make a "Directions" command. i.e. I input the room id I want to reach, and it returns directions from the current room?


Well, fairly easy. This one isn't built in right now.

I think I would take the current find function, and copy the first bit. Basically the line:


  local paths, count, depth = find_paths (current_room, f)



... gives you a table "paths" which is the paths of all the found rooms. If only one, then that entry has item "path" in it, which itself has all the room IDs and the way to get to them.

So a bit of work and you could display that. There is a function build_speedwalk that takes a path table, and converts it into a speedwalk. So yeah, in a few lines of code you could do it.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #145 on Sun 15 Aug 2010 01:23 AM (UTC)
Message
I added the "mapper where" command to the mapper. See:

http://github.com/nickgammon/plugins/blob/master/ATCP_Mapper.xml

You also need a slightly modified mapper.lua file:

http://github.com/nickgammon/mushclient/blob/master/lua/mapper.lua

- Nick Gammon

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

Posted by Jerrid   (20 posts)  Bio
Date Reply #146 on Sun 29 Aug 2010 07:06 AM (UTC)
Message
Sorry in advance, I am a newbie at MUDs and coding. I have never really played a MUD before, but I am giving it a honest try. But a lot of these MUDs do not have an in game map.

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.

Regardless, I was directed to use this mud client many times, but every one told me there was no auto mapper. So I was directed to go some where else which I wont name so I wont be promoting. But needless to say, however, you have to pay for it after 30 days, so it isn't free anyway.

I am having trouble using it and if I try to go north, even though there is no exit north, from then on it goes west instead of north, east in stead of west etc.on the map screen, until I redo the recalibration and erase all the rooms.

Long story short for why I am here. After being told you did not have an auto mapper some one else said you did so I downloaded the client. Come to find out pressing CTRL, ALT, M isn't an auto mapper it just tells me where I have been or came from, but not graphically, that doesn't help me at all. I saw this thread and what I thought was a downloadable plug in. But all I see is some thing made in word pad or some thing like it. How do I even add that into MUSHclient? Do I just simply copy and past it some where or do I have to manually type it into it?

Any help would be appreciated, but it would have to be put into laymen terms other wise I wont understand it. I am pretty much at my wits end. I have went to different mud sites, asked off the game I play and even searched for free auto mappers and I am pretty much about to just stop playing MUDs altogether. No matter how big a game is, if I can not navigate it, there is no point in playing it. Again, I got lost in an INN that had probably only 13 rooms max... I would hate to see what happens when I travel the wilderness or in a dungeon.

Thank you for your time and patience and thank you for making a free mud client.
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #147 on Sun 29 Aug 2010 07:19 AM (UTC)

Amended on Sun 29 Aug 2010 07:21 AM (UTC) by Twisol

Message
The mapper developed here needs some configuration to work with any given MUD. It only provides the machinery to displaying a map, but it doesn't handle how the rooms are actually mapped or how to get the information. A plugin needs to be created that manages this. Unless someone else steps forward who's done the legwork for your LotR MUD, you probably won't have much luck.

If you're willing to try configuring it yourself, I'm sure we'd be glad to lend you a hand. You'd need to be fairly familiar with scripting and/or your MUD, though, and from the sound of it you're neither. :(

*sigh* People like you make me want to work even harder on my own client. It really needs to be a lot easier to just play. ([EDIT] Sorry, this isn't a jab at MUSHclient! MUSH is totally awesome, but my client will actually give a lot of power to the admins too. The admins would have the ability to create something like this themselves, so nobody else needs to deal with the hassle.)

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Jerrid   (20 posts)  Bio
Date Reply #148 on Sun 29 Aug 2010 07:57 PM (UTC)
Message
I would have assumed, people like me would make you want to slap people like me. I know this probably wasn't the first time some one has asked this question and it probably wont be the last...

No... I have no idea how to script or code at all and generally speaking, have no desire to. My extent of scripting or coding has been in Everquest when I would press a button or macro and say "TRAIN!!!".

In any case, I really like the idea of being able to go into a world and have at the start 30 different races, dozens of classes, 1,000s of items and equipment, many gods etc, with like 1,000s upon 1,000s of rooms.

But as I said I get lost way too easily. Heck, I would get lost in EQ and that was fully graphical. Regardless, thank you for your answer. I saw other threads, but I was assuming that those plug ins were for those games they were made for only.

I think some one is making an in game map for The Two Towers, but it wont be ready for a while. I do not care if it was straight plain boxes or stick figures, just some thing with a simple auto mapper is all that I ask for. I would figure with as many mud clients that are out there or were at one time some one would have done it for free... but then again perhaps for other people there are other priorities in the games, I just need to navigate. Hahahaha.

Anyway, my next solution is to either continue playing the one game I am now with the 30 day free auto mapper and not go into a direction that is not there so it does not screw it up and hope that the game then has it's own mapper by the time the client I am using is no longer free or I will just have to find another MUD that has an automapper. I really want to find a D&D one with an automapper. Any one know of any?.

Unless some one can give me more help here directly about the automapper for MUSHclient I will not reply here any more unless for a simple thank you in case some one provides me with info, because I do not want to hijack the thread. Thank you for your time and patience.
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #149 on Sun 29 Aug 2010 08:14 PM (UTC)
Message
Jerrid said:
I would have assumed, people like me would make you want to slap people like me. I know this probably wasn't the first time some one has asked this question and it probably wont be the last...

Not at all! You're polite, have clearly tried a lot of things, and have given a great explanation of your problem. No support person could ask for more.

Don't worry about hijacking the thread. Comments can always be pruned and moved to a separate topic, and this is as good a place as any to ask about the mapper.

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. Anything beyond those two points is fluff.

Does your MUD have a public forum of some kind, where you can ask gameplay questions? That would be a great place to ask for help, since most people there would be familiar with the game. You only need one MUSHclient power-user who's willing to help. :)

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
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.


747,696 views.

This is page 10, 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 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.