Mapper for Achaea

Posted by Nick Gammon on Tue 09 Mar 2010 03:17 AM — 188 posts, 688,988 views.

Australia Forum Administrator #0
If anyone wants to play with the work-in-progress mapper plugin I am working on, you can grab a copy from here:

http://github.com/nickgammon/plugins/raw/master/Achaea_Mapper.xml (EDIT: changed name to ATCP_Mapper)

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

(Just save the contents of that page as Achaea_Mapper.xml and install in the usual way).

You also need the ATCP_NJG plugin which sends the current room location, name and exits:

http://www.gammon.com.au/forum/?id=10129

You probably also need the latest gauge.lua from here:

http://github.com/nickgammon/mushclient/raw/master/lua/gauge.lua

(put in the lua directory)

And also checkplugin.lua from here:

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


The mapper generates an empty mapping database if you don't have one (which you won't, yet). I am working with the Achaea admins to get a preloaded database which will show much more information without you having to walk around mapping rooms yourself.

Until that happens, the mapper only knows of the room you are in, and its current exits. If you take an exit, it then knows where the exit leads. If you then go back to where you came it knows the new room leads back to the old one. As you walk around, entering rooms, and then backtracking to where you came from, it will gradually learn the topography of the place.

  • A dashed line indicates an exit it knows exists, but doesn't know where it leads. In other words, follow the dashed lines, that make them become continuous lines, which indicates it knows where that exit goes.
  • You can RH-click on any room to speedwalk to that room.
  • A purple connecting line indicates an up/down connection. A cyan line indicates an in/out connection.
  • You can type "map zoom in" or "map zoom out" to zoom the map in or out (which makes the room boxes larger or smaller). I have those set up as a macro (F2 and F3) to make zooming fast and easy.
  • You can type "map find <place>" to search the room names for matching words, eg.

    
    > map find path
    
    Path north of the fire pit (road) - 1 room away
    Tree-lined path (road) - 2 rooms away
    There were 3 room(s) found which I cannot find the path to within 50 rooms from here.
    


    Click on any of the listed hyperlinks to speedwalk to that room. Speedwalking takes the shortest known path.
  • You can hover the mouse over any room on the map and an information box will pop up giving the room name, exits, room number and area.

    At present the area will be "Area 0" - in the preloaded database the areas will be known.
  • The mapper always draws the current room first, and then the rooms connected to the first room's exits, and then repeats for each of those rooms. The net effect is that sometimes the map appearance changes as you move around, because it doesn't draw rooms on top of each other. If the number of rooms shown seems to have decreased, try walking back to where you were before.
  • Sometimes fixing up one-way directions (those with a small arrow on them) by walking to and from a room will suddenly make a lot more of the map appear, as the mapper knows now where rooms lead.
  • Paths you have visited recently (in the last 5 minutes) are shown with a thicker line, so you can see which way you came from.

Amended on Sat 17 Apr 2010 01:39 AM by Nick Gammon
Australia Forum Administrator #1
If you click on the asterisk in the bottom left corner you can configure the colours used, the size of the map, and the number of rooms it draws outwards from where you are.

You can move the mapper around by dragging the title (the current room name).

You are always the black square in the center with the thicker border.
Amended on Tue 09 Mar 2010 03:23 AM by Nick Gammon
Australia Forum Administrator #2
Australia Forum Administrator #3
The mapper is subject to change, however comments are welcome.
#4
I have my own massive Lua/XML mapper (non-plugin) for MUSHclient, based on the MudBot mapper module. It's a bit sluggish, but it does what I want well enough.

That's an awesome screenshot, though! I want my mapper to do that!
Australia Forum Administrator #5

My mapper is pretty fast. Timing shows it renders in about 0.001 seconds.

This is what it looks like with the preloaded database, which shows area names:

Your current area is rendered in a different colour, to make it more obvious where area boundaries are.

Amended on Tue 09 Mar 2010 07:00 PM by Nick Gammon
USA #6
A configuration option to hide rooms that aren't in the same area might be nice. It looks incredibly good so far though!
Australia Forum Administrator #7

And this is the pygmy village, zoomed out:

Australia Forum Administrator #8
Twisol said:

A configuration option to hide rooms that aren't in the same area might be nice. It looks incredibly good so far though!


Since you can configure colours, just configure the rooms to be almost invisible. :)

Although you have a point, you can't configure line colours yet.
Australia Forum Administrator #9
I am wrong, you *can* configure line colours. However you can't configure line colours differently for different areas.
Australia Forum Administrator #10
Maybe in different areas the line colours should be the room box colours - that would make them lighter, and do you really care if a room, 20 rooms away, has an up/down exit?
USA #11
Since you have to create a new option one way or the other, why not go with the one clearer for the end-user? It's easier to say "Show only current area" than it is to say "Make non-area rooms invisible, and non-area exits invisible".
USA #12
Nick Gammon said:

Maybe in different areas the line colours should be the room box colours - that would make them lighter, and do you really care if a room, 20 rooms away, has an up/down exit?


That's a great idea, though I think there should still be the one-click option of hiding other areas altogether. For full views, though, visual cues like that are excellent.
Australia Forum Administrator #13
Until I get more info from Achaea, the map you make will put everything in Area 0, so there is no point in such an option just yet. However your idea is noted.
Australia Forum Administrator #14
The "map find" alias uses the Sqlite3 Full Text Search functionality, so you can do things like this:


545h, 440m ex- map find chief beku

Before Chief Beku's hut - 5 rooms away
Chief Beku's council room - 7 rooms away


545h, 440m ex- map find chief NOT beku

Reception room in the Chief's hut - 6 rooms away
Hall in hut of Tomacula chief - 22 rooms away
Chief of Tomacula's sleeping area - 23 rooms away
There were 8 room(s) found which I cannot find the path to within 50 rooms from here.


545h, 440m ex- map find bath* 

Caldinarius Street outside the baths - 42 rooms away
Atrium of the Citizens' Baths - 43 rooms away
Steaming pools of the Baths - 44 rooms away
Outside the resident bathhouse - 47 rooms away
The Shala'jen bathhouse - 48 rooms away
Bathroom in the House of Delights - 49 rooms away
There were 15 room(s) found which I cannot find the path to within 50 rooms from here.


545h, 440m ex- map find bedchamber OR bathroom

Bathroom in the House of Delights - 49 rooms away
A quaint bedchamber - 50 rooms away
There were 28 room(s) found which I cannot find the path to within 50 rooms from here.


Basically the full-text search lets you search for full words, words with a wildcard suffix (eg. bath*), one word OR another word, one word AND another word, one word but NOT another word, and one word NEAR another word. Plus you can use brackets to group stuff.

The special operators (AND, NOR, NOT, NEAR) have to be in caps for them to take effect.

Amended on Tue 09 Mar 2010 07:36 PM by Nick Gammon
Australia Forum Administrator #15
The database format may change (eg. to incorporate more information) so you are advised against spending hours running around mapping the joint just now. It is more for preliminary experimentation.
Australia Forum Administrator #16

With extra information now being sent down by Imperium we can now see terrain colours:

And shops and banks and stuff (the hatched squares):

Australia Forum Administrator #17
And search for nearby shops and places of interest:


H:49 M:45 <eb> mapper shops

Antioch Shuk (13224)  - 1 room away [Shop]
Forge of the Lion (13231)  - 2 rooms away [Shop]
Divine Gifts (13233)  - 2 rooms away [Shop]
The Desert Mirage is the room you are in
Clothing tent (13805)  - 2 rooms away [Shop]
Antioch Commodity Tent (14333)  - 3 rooms away [Shop]
Antioch Treasure Tent (13284)  - 4 rooms away [Bank]
The Antiochian Refinery (11801)  - 4 rooms away [Shop]
Gathering tent (13276)  - 6 rooms away [Newsroom]
A clean, brightly lit stable (8356)  - 7 rooms away [Shop]
A dusty kennel (8354)  - 7 rooms away [Shop]
Food stall (13277)  - 8 rooms away [Shop]
Butchery (13707)  - 9 rooms away [Shop]
Whittler under the western tower (13278)  - 9 rooms away [Shop]
Antioch Runners tent (13226)  - 9 rooms away [Postoffice]
Tent of Banaa's Fiyn Crafts and Masonry Shoppe (14675)  - 10 rooms away [Shop]
Heat of the Sands Metalworking (20869)  - 10 rooms away [Shop]
The Drunken Ibex Tavern (159)  - 10 rooms away [Shop]
Main table of the Meeting Hall (13246)  - 11 rooms away [Newsroom]
A sun-lit library (22558)  - 13 rooms away [Library]
There were 4 room(s) found which I cannot find the path to within 50 rooms from here.

Amended on Wed 10 Mar 2010 05:05 AM by Nick Gammon
USA #18
I'm just curious, but what is the purpose of adding a mapper module (commit 7aab1d6) to the MUSHclient distribution? A plugin I could understand, but as a module, it's very high-level compared to the other modules. Its use cases are rather limited; how many mapper-based plugins will people be using at once?

This is basically what I was asking about back during the PPI.lua code review. All of the other libraries get in so easily, and seemingly without much discussion. I'd even say that the mapper module has fewer general use cases than PPI (my version).

I'm not complaining, by any means. I'm just trying very, very hard to understand.
Australia Forum Administrator #19
Well I was going to do an announcement about it. I wanted to get it offsite in case the house came under alien attack overnight, and I lost all my work. ;)

After doing a couple of plugins with the mapper, and having enquiries from other MUDs, I wanted to abstract out the "core" mapper from the MUD-specific stuff like, where does the data come from, and what colour shops should be etc.

The core mapper, which you spotted in Github, is basically a mapper engine intended to be used by plugins (obviously only one mapper would be needed per MUD, although you might conceivably do a minimap and a big map).

Once it is right, it shouldn't need to change much. It uses function callbacks to obtain room data, and what colour you want the rooms to be in etc.

I don't want to get bogged down right now in discussions about why some modules are included and not others. I repeat what I said before, my attitude is a bit like the Lua developers who said, in effect, that they welcome contributions and suggestions from the community, but if incorporated, they will do it in their own way and in their own time. I note that various branches of Lua have sprung up, clearly the main Lua developers and some contributors could not reach agreement. I also note you are including your PPI module as part of your ATCP plugin. Nothing I am doing is really standing in the way of your distributing your plugins as you see fit.
#20
Are there any plans (If it's even possible? I'm too new to coding to know) to make the room connection lines extend further than one line, so the map can properly display room connections, exits, and layouts of certain areas?
#21
That's something I've already asked, and I will work on it, if Nick doesn't get to it before me. My current script handles variable length exit connectors, but it renders an ASCII map only so far.
#22
The plugin that converts the XML map to the SQLite database should change the way it does the room/area names. By default, the names all start with a lowercase letter, so they fit in with messages from things like scrying, and that initial letter is capitalized every time you do a LOOK in the game.

So, I borrowed a capitalize function and used that when inserting the area/room titles into the database...

function capitalize (x)
  return string.upper (string.sub(x, 1, 1)) .. string.sub(x, 2)
end -- capitalize


  dbcheck (db:execute (string.format (
    "INSERT INTO areas (uid, name, date_added) VALUES (%s, %s, DATETIME('NOW'));",
      fixsql (args.id), 
      fixsql (capitalize(args.name))
    )))


  room = { id = args.id, area = args.area, title = capitalize(args.title), terrain = args.environment }
#23
What steps would I have to take to get this plugin to use the www.achaea.com/maps/map.xml file to make the database instead of creating a blank one?
Australia Forum Administrator #24
Download this plugin:

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

(RH click the "raw" link and "save as" that, to get the raw XML plugin data).

Install that plugin.

Type: "create map database"

Navigate to the map.xml file you downloaded from Achaea. It should then create a proper database with area names etc.
#25
Alright, I did all that, and I get this Run-time error

[string "Plugin"]:289: Function 'io.lines' disabled in Lua sandbox - see MUSHclient global preferences
stack traceback:
[C]: in function 'error'
[string "Sandbox"]:39: in function 'lines'
[string "Plugin"]:289: in function <[string "Plugin"]:208>
Australia Forum Administrator #26
Go into the global preferences -> Lua and change the first couple of lines about trusting worlds and plugins from "false" to "true".

#27
The original link seems to be down. Could you add it again?

Thanks,
Australia Forum Administrator #28
It was renamed as ATCP_Mapper - so use this link:

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

(RH-click, and save contents of link as ATCP_Mapper.xml)
#29
Thanks for the link, got it working nicely. Only issue is when I right click I get this error: Ive noticed the shops and what not aren't showing up. mapper shop says nothing is found.

Error number: 0
Event: Run-time error
Description: [string "Plugin"]:871: bad argument #1 to 'WindowInfo' (string expected, got nil)

stack traceback:

[C]: in function 'WindowInfo'

[string "Plugin"]:871: in function 'room_click'

C:\Program Files\MUSHclient\lua\mapper.lua:261: in function <C:\Program Files\MUSHclient\lua\mapper.lua:253>
Called by: Function/Sub: mapper.mouseup_room called by Plugin ATCP_Mapper

Reason: Executing plugin ATCP_Mapper sub mapper.mouseup_room
Australia Forum Administrator #30
You may not have the latest mapper module, which this plugin uses. Please download it from here:

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

(RH click, save as, and put in the "lua" directory, under the MUSHclient directory, replacing the existing one),

When the mapper first starts up it should announce version 1.7 (or higher) in the map window.

If it still has the problem, let me know.

As for the shops, I think from memory that you have to discover them first (by going into the room) and after that they should have saved to the database.
Amended on Sat 17 Apr 2010 05:47 AM by Nick Gammon
#31
I was just about to ask the same question, not about the shops, but about the right clicking. Now that I've installed the latest version, I'm noticing white circles around some rooms. What do these mean?
Australia Forum Administrator #32
I think they are a faint cyan. :)

They are area exits. Near the start of the plugin is this line:


 <!ENTITY show_area_exits "true" > 


Change "true" to "false" to not show them.
#33
How do I make it so when I left click or mapper goto that I can put a slight pause in between each movement. I constantly get "slow down" and it exits the speed walk.
Amended on Fri 23 Apr 2010 04:11 AM by Ves
USA #34
Ves said:

How do I make it so when I left click or mapper goto that I can put a slight pause in between each movement. I constantly get "slow down" and it exits the speed walk.


There should be a configuration option to change the period of time between movements. Click the blue star (*) at the bottom-left corner of the map, and click the "Walk delay" option. It's in seconds, I use 0.7 myself (700 miliseconds)
USA #35
The mapper isn't mapping like it used to. After I updated everything (mapper.lua etc.) It's not scanning the exits and when I walk in a unmapped room the mapper windows becomes blank with only the room I'm standing in shown. I have to LOOK or something before it brings everything back up. Also, It's not registering areas. Everything I map and have mapped is always labeled "area 0". I have always had that problem though.

But, when left-click on a room I no longer get an error! That's great.

EDIT: I should add that it IS mapping... just doesn't map unexplored exits ahead of time.

EDIT2: Ok. Forget that last edit. It seems that it might not be mapping... because if I go back one room and re-enter it acts like it maps again. This time the way it's supposed to. Still doesn't register the exits though.
Amended on Fri 07 May 2010 11:14 AM by Windmill_Man
Australia Forum Administrator #36
It is possible Achaea have changed the way they are sending mapping information. There have been very lengthy discussions in another forum about design changes, and maybe they have been implemented. Perhaps Twisol will know, he is usually abreast of what Achaea is doing.
#37
There have been a few changes to the basic ATCP features recently, but I don't know of anything that would cause this sort of behavior. (Disclaimer: I'm not using this plugin myself and haven't tested it online.)
USA #38
I haven't seen any major shift in how ATCP (v1) is transmitted, though oddly enough I am having the same problem as Windmill Man.

To compare the ATCP sent on movement and on look:

move
Room.Brief In the shade of the Hierophants' Complex
Room.Num 6787
Room.Coordinates 51,12,-2,0
Room.Environment Trees
Room.Area Eleusis
Room.Exits e,s,nw
Room.FullExits e(6786),s(6788),nw(6782)
Client.Map www.achaea.com/irex/maps/clientmap.php?map=51&building=0&level=0 16 8
Room.Brief In the shade of the Hierophants' Complex
Char.Vitals H:3439/3001 M:3408/3658 E:13903/13905 W:17190/17190 NL:25/100 


look
Room.Brief In the shade of the Hierophants' Complex
Room.Num 6787
Room.Coordinates 51,12,-2,0
Room.Environment Trees
Room.Area Eleusis
Room.Exits e,s,nw
Room.FullExits e(6786),s(6788),nw(6782)
Client.Map www.achaea.com/irex/maps/clientmap.php?map=51&building=0&level=0 16 8
Room.Brief In the shade of the Hierophants' Complex
Char.Vitals H:3439/3001 M:3408/3658 E:13905/13905 W:17190/17190 NL:25/100 


Apparently, no difference. The only obvious change between now and before is that Room.Brief is sent twice now.
Amended on Fri 07 May 2010 08:43 PM by Twisol
Australia Forum Administrator #39
Windmill_Man said:


EDIT: I should add that it IS mapping... just doesn't map unexplored exits ahead of time.



It can't very well map unexplored exits, until you go into it, and then back again. I may be wrong, but the unknown exits tend to take more work.
USA #40
Hi, so I started playing around with this plugin the other day, most of this is way over my head but I'm a good swimmer so I jumped right in.

I noticed that the mapper wasn't recording the 'area' of the room and so I started tinkering with it. I noticed that ATCP provides this info, e.g. "Room.Area the Western Ithmia". So I added in the handlers in ATCP_NCJ that were missing, the handlers list on my copy looks like this now.

edit: not 'ATCP_NCJ', 'ATCP_NJG' haha. I'm guessing those are nick's initials.


handlers = {
  ['Auth.Request']     = got_auth_request,  -- handled here

  ['Room.Num']         = got_room_number,
  ['Room.Brief']       = got_room_brief,
  ['Room.Exits']       = got_room_exits,
  ['Room.FullExits']   = got_room_fullexits,
  ['Room.Area']        = got_room_area,
  ['Room.Environment'] = got_room_environment,
  ['Room.Coordinates'] = got_room_coords,
  ['Room.Info']        = got_room_info,
  ['Char.Vitals']      = got_vitals,
  
  } -- end handlers


As a result, I had to create a few functions here too..


function got_room_fullexits (s) -- eg. "n(1234),s(4321)"
  BroadcastPlugin (5, s)
end -- got_room_fullexits

function got_room_environment (s) -- eg. "Forest"
  BroadcastPlugin (6, s)
end -- got_room_environment

function got_room_coords (s) -- eg. "77,-7,3,0"
  BroadcastPlugin (7, s)
end -- got_room_coords

function got_room_area (s) -- eg. "the Western Ithmia"
  BroadcastPlugin (8, s)
end -- got_room_coords

function got_room_info (s) -- eg. "shops,postoffice"
  BroadcastPlugin (9, s)
end -- got_room_info


Now, after I did this much, the mapper started recording the room info (stores for instance) and the room environments all by itself. I thought I had solved the problem, but I noticed that there was still no area recording. So I went to ATCP_MAPPER and had a look around. I noticed that there were no functions specific to the Room.Area package so I tried making one based on what the others were doing. I came up with this (I have no clue what I'm doing.)


function got_area (s)

  if not current_room then
    return
  end -- if
  
  local room = rooms[current_room]
  
  -- not cached - see if in database
  if not room then
    room = load_room_from_database (current_room)
  end -- not in cache
  
  if room and room.area == nil then
    save_area_to_database(current_room, s)
	mapper.draw (current_room) -- redraw room with area
  end -- need to save area

end -- got_area


and


function save_area_to_database (uid, s)
  local room = rooms[uid]
  
  local area = s
  
  if s then
    dbcheck (db:execute (string.format ([[
		UPDATE rooms SET area = %s WHERE uid = %s;
	  ]], fixsql(area), fixsql(uid)
	  )))
	  
	if show_database_mods then
	  mapper.mapprint ("Fixed room", uid, "to have area:", area)
	end -- if
  else
    mapper.maperror ("Cannot make sense of area:", s)
  end -- if
end -- save_area_to_database


It doesn't seem to be working. I was hoping someone could give me a newbie spanking and show me what I'm doing wrong.
Amended on Sat 08 May 2010 12:43 AM by Baatti
USA #41
The mapper works fine without areas but I thought it would be so much better with areas. So I fixed the areas.

http://sites.google.com/site/dontarion/atcp_mapper_working.jpg

The ATCP_NJG needs handlers, like Baatti said
handlers = {
  ['Auth.Request']     = got_auth_request,  -- handled here

  ['Room.Num']         = got_room_number,
  ['Room.Brief']       = got_room_brief,
  ['Room.Exits']       = got_room_exits,
  ['Room.FullExits']   = got_room_fullexits,
  ['Room.Area']        = got_room_area,
  ['Room.Environment'] = got_room_environment,
  ['Room.Coordinates'] = got_room_coords,
  ['Room.Info']        = got_room_info,
  ['Char.Vitals']      = got_vitals,
  
  } -- end handlers


The ATCP_Mapper also needs its handlers changed:
This is why the info may have shown up as the area for you Baatti.
handlers = {
  [1] = got_vitals,             -- eg. "H:496/496 M:412/412 E:1380/1380 W:960/960 NL:89/100"
                                --      health    mana      endurance   willpower experience
  [2] = got_room_name,          -- eg. "Continuing on the Parade of Zarathustra"
  [3] = got_room_exit,          -- eg. "n,s"
  [4] = got_room_number,        -- eg. "401"
  [5] = got_room_full_exits,    -- eg. "ne(8564),w(8428)"
  [6] = got_environment,        -- eg. "Urban"
  [7] = got_coordinates,        -- eg. "38,3,1,0"
  [8] = got_area,				-- eg. "Mhaldor"
  [9] = got_info,               -- eg. "shops,postoffice"
  }



You need to add in the room.area = area line in the save_area_to_database function in ATCP_Mapper.
function save_area_to_database (uid, s)
  local room = rooms[uid]
  
  local area = s
  
  if s then
    dbcheck (db:execute (string.format ([[
		UPDATE rooms SET area = %s WHERE uid = %s;
	  ]], fixsql(area), fixsql(uid)
	  )))
	 
	room.area = area
	 
	if show_database_mods then
	  mapper.mapprint ("Fixed room", uid, "to have area:", area)
	end -- if
  else
    mapper.maperror ("Cannot make sense of area:", s)
  end -- if
end -- save_area_to_database


The last fix is to your got_area function in ATCP_Mapper:
This will write over areas names for you if they're Area 0. The change is at the very end with regards to if there is a room name. I dislike using not and ~= so you can see my nesting for elses.
function got_area (s)

  if not current_room then
    return
  end -- if
  
  local room = rooms [current_room]
  
  -- not cached - see if in database
  if not room then
    room = load_room_from_database (current_room)
  end -- not in cache
  
  if room then
	if room.area == s then
	else
		--Note("Check inside got_area, saving_room_to_db")
		save_area_to_database(current_room, s)
		mapper.draw (current_room) -- redraw room with area
	end
  end -- need to save area

end -- got_area



Baatti you almost had it.
Amended on Thu 01 Jul 2010 05:33 PM by Dontarion
USA #42
A few observations and or changes I will be making:

The mapper would look better if the directions weren't so prone to overlapping. My suggestion and what I may try to do is extend or double the length of the e, w, n, and s lines as well as others that require it from that. This will fix issues with ne, nw, se, and sw.

I'm also going to look at trying to stop it from displaying things on different levels and if so, color them differently. If that is already built in I'm not quite sure it's working but I haven't checked.

One thing I'm also going to do is stop the mapper from displaying down directions when the location is a shop. These are something you will rarely ever get into and don't need to be shown. They just clutter up the screen.

I think I may alter the plugin too for tabs like I've seen for Mudlet so that the chat screens can be captured to there as well.
#43
I made a minor change to use the X,Y coordinate pairs you get from the XML data files, and it greatly improves my map visualization, except when the two halves of a diagonal don't quite meet in the middle because they're not 45 degree angles.

Ideally, you could determine whether you had drawn the exit from room N to M so you don't have to then draw the same exit from M to N, and you could just make all the lengths the full exit length rather than half.
USA #44
I'm trying to think of a way to do this to give better visuals because it's a bit difficult right now.

I think to accomplish the no above/below shown go into the function that is controlled by the depth set, 30 deep right now, and make it stop at up directions. I could also make Up/Down rooms have something special like they already do such as a pink top or bottom border.

Larkin: You downloaded the Achaea map file and went from there I take it from your post? I don't quite follow what you meant by that though.

One thing I'm about to alter is the ability to pick up wormholes. If it sees me warp it'll store the last room in for the current and the current in the last under room.wormhole. This would make me so happy because my 400+ wormhole triggers are a pain to wade through.
#45
I downloaded the Lusternia map XML and used Nick's plugin to convert it to a database, and that's where the coordinates come from. (Haven't played Achaea in over five years!)

I always liked zMUD's mapper and how it showed one layer above/below as a sort of shadow set of rooms offset just a little bit. That would be really cool, but I realize how tricky that probably is to actually implement.
USA #46
I never could get into the others primarily because they lacked a large player base and achaea is so far ahead in terms of development but that's because it was the original and is the money maker.

I got the no shop displaying down set. I've just about got the echoing wormholes it records you warping through set but I had to delete the db file and restart. Having some issues right now with other stuff though in that area.

I didn't like how room echoes for wormholes came out (before room info came up) so I moved them to being displayed on the map itself.

http://sites.google.com/site/dontarion/mush-map-module

I haven't posted the code for download yet because I wanted to make sure Nick is cool with me posting it online.
Amended on Fri 02 Jul 2010 06:03 AM by Dontarion
Australia Forum Administrator #47
Dontarion said:

Screenshot:
http://sites.google.com/site/dontarion/actp_mapper_working.jpg


That link gives:


Page not found
We're sorry, but we were unable to locate the page you requested.
USA #48
I imagine he meant:

http://sites.google.com/site/dontarion/atcp_mapper_working.jpg

Typo'd ATCP.
USA #49
Didn't think anyone was paying attention so I edited the earlier posting again.
USA #50
Worked out a few bugs on my wormhole stuff. The only issue I'm really having now is making the thing save the wormholes. It inserts them into the DB but its like the DB doesn't save the updates.

Found the issue with that dealing with loading up the database. I forgot to tell it to load the wormhole rows.

The RH-click menu now works correctly.

Next is tackling the sometimes not drawing lines for no good reason issue.

Nick do you mind if I post my altered files on my site?
Amended on Fri 02 Jul 2010 07:32 PM by Dontarion
Australia Forum Administrator #51
Go ahead.
Canada #52
I had a few questions about how to change the functionality of the mapper.

Currently, if start a speed walk using the goto command (or left clicking) and get the "Now, now, don't be so hasty!" message, the speedwalk cancels.

Could we switch this so that it attempts to resume the speedwalk? I tried doing this by changing the function called from the trigger to "map_resume" but this doesn't work because the previous speedwalk is still loaded (because the trigger no longer cancels it).

I tried meddling with it myself, but couldn't get it to work.
Canada #53
Dontarion said:

Worked out a few bugs on my wormhole stuff. The only issue I'm really having now is making the thing save the wormholes. It inserts them into the DB but its like the DB doesn't save the updates.


Hi Dontarion,

First, thanks for the altered files. It's been a lot of fun checking it out.

The wormholes are saving for me, but I noticed a problem at first because the wormholes weren't actually showing up on the map after being used for the first time. I hunted down the problem:

You have a trigger for "The wormhole spits you out at the other end." This, for some reason, is set to call "no_wormhole" which didn't make sense to me as this is a line you get when you successfully go through a wormhole.

I deleted this trigger and now the wormholes show up successfully on the map (and are saved upon exit). Could this be part of the problem?
Australia Forum Administrator #54
Bobble said:

Currently, if start a speed walk using the goto command (or left clicking) and get the "Now, now, don't be so hasty!" message, the speedwalk cancels.


The mapper has an option to delay issuing commands to avoid that message. Click on the "configuration icon" (the star in the bottom LH corner) and change Walk Delay to be around 0.3 seconds.

See screenshot below:
Amended on Sun 11 Jul 2010 10:46 PM by Nick Gammon
Australia Forum Administrator #55
Canada #56
Nick Gammon said:

The mapper has an option to delay issuing commands to avoid that message. Click on the "configuration icon" (the star in the bottom LH corner) and change Walk Delay to be around 0.3 seconds.

See screenshot below:


Thanks Nick. I've adjusted this already. I was hoping to find some way of automatically resuming the queue in cases where there's some lag that causes the commands to bunch up.
Australia Forum Administrator #57
The mapper in its current state only ever sends one command at once. That is, to speed walk it sends the first direction, waits for a room change, adds on the specified delay, and then sends the next direction. Thus, the speed walks can't bunch up, as they require the room change for the next one to be sent.
USA #58
The delay isn't always a perfect match - sometimes there are effects that change how quickly you can move - and some way to re-send the last move would be really useful. Anyone could then write a trigger for their MUD's "slow down" message that would retry the last move, and thus continue the speedwalk.
USA #59
I've upgraded a few things and I'll upload the new files. Bobble I don't always upload my upgrades so that was likely fixed already.

It has farsight integration now.

I'm going to try and fix a wormhole bug regarding two things: checking if the wormhole existed in one output that I need to hunt down and a trigger for wormholes that are destroyed or semi-destroyed. This will take some time since I need to find wormholes that have been destroyed to some extent.

<img src="sites.google.com/site/dontarion/mush-map-module/mapper.jpg">

Apparently that doesn't work for me.
Amended on Sat 24 Jul 2010 02:44 AM by Dontarion
USA #60
Pretty new to MUSHclient and trying to make the switch from zMUD, and the mapper's been the show-stopper up to now, so I'm eagerly trying this out, and very impressed so far. The ability to import the XML map that Lusternia provides is an amazing advantage, and ATCP is so much slicker than all that trigger trickery we used to have to do.

I have a few questions:

= The output from the MAPPER command comes out in an almost unreadable color for me, which doesn't correspond to any of my ANSI or custom colors. Can this be configured?

= Does the Create Map Database plugin overwrite the existing database, so any changes you make are lost any time you import a new map? Does that include bookmarks?

= If one moves by abnormal means such as teleporting, being summoned, sprinting, etc. will ATCP make the map reflect the movement, or do we need triggers to account for every such situation?

Generally I'm very impressed with the mapper even though I know it's still in development. If I can get to where I can do the things I need to to do to get by, I'll probably be working on scripting and hopefully be able to eventually contribute a little to these kinds of things. A few features I hope we see, if they're not already there:

= A command like MAPPER WALK SHRINE to walk to a previously-bookmarked location by name.

= The ability to set rooms and exits with costs and "do not enter" for pathing, including a way to set that from a script or trigger.

= Recovering from "Now, now, don't be hasty".

= Exits that use special commands like "touch wall" or "enter archway", especially if they can handle losing balance without losing the path.

= A way we can build upon the imported map from IRE games, by adding those special exits, bookmarks, costs, or even rooms we had to add ourselves, without losing them when we reimport an updated map.
Australia Forum Administrator #61
Hunter Green said:

= The output from the MAPPER command comes out in an almost unreadable color for me, which doesn't correspond to any of my ANSI or custom colors. Can this be configured?


If you click on the configuration "star" symbol on the bottom LH corner of the map window, and then on the swatch for "Messages" you can change the colour of the messages.


Hunter Green said:

= Does the Create Map Database plugin overwrite the existing database, so any changes you make are lost any time you import a new map?


Yes it overwrites the existing database, as rooms may have changed.

Hunter Green said:

Does that include bookmarks?


No, by design bookmarks are in a separate database (eg. achaea.com_23_bookmarks.db) which is not overwritten. Thus things you note for your own reasons will stay there.


Hunter Green said:

= If one moves by abnormal means such as teleporting, being summoned, sprinting, etc. will ATCP make the map reflect the movement, or do we need triggers to account for every such situation?


The ATCP message should report your new location (I noticed when making a new character this did not always happen). There was something that forced it out (eg. "map" or something).


Hunter Green said:

= A command like MAPPER WALK SHRINE to walk to a previously-bookmarked location by name.


Currently "mapper book" shows your bookmarks and you can click to go there. What you suggest could easily be added.

Hunter Green said:

= The ability to set rooms and exits with costs and "do not enter" for pathing, including a way to set that from a script or trigger.


An interesting idea. Setting "do not enter" should be easy enough.

Hunter Green said:

= Recovering from "Now, now, don't be hasty".


It currently cancels the speedwalk when it sees that. You shouldn't see it anyway if the delay is configured correctly. However a modification would be to send "mapper resume" after a delay of a second perhaps.

Hunter Green said:

= Exits that use special commands like "touch wall" or "enter archway", especially if they can handle losing balance without losing the path.


Again, perhaps a "mapper resume" could be sent after a short delay.

Hunter Green said:

= A way we can build upon the imported map from IRE games, by adding those special exits, bookmarks, costs, or even rooms we had to add ourselves, without losing them when we reimport an updated map.


Bookmarks are already handled. Costs and special exits could be written to the bookmarks database.
USA #62
The idea of the MUDs publishing their own maps is brilliant, what a huge, huge improvement in effort and accuracy and usefulness. But those maps can never be entirely complete, due to things like private residences; so having any additional rooms lost any time you get an update will be a big limitation.

It might be better if the Create Map Database would amend the existing database, if it's present, instead of replacing it (or at least if that were an option). Since the rooms have a unique number which should remain the same from one dump to another, it could simply overwrite records in place. It would add records for any room number that wasn't already present. That way, we could import a new map file periodically while preserving any rooms we'd made ourselves (and it would also help with preserving special exits).

Perhaps I'll learn enough to look over the Create Map Database plugin and see if I could amend it to work that way, in fact. But I thought I'd let you think on the idea first.
Australia Forum Administrator #63
One problem I foresee is that it might be hard to tell the difference between an exit you added yourself (which should stay) and an exit that was there already, but the MUD realized was wrong (or had changed).

So maybe it would be better for user-added rooms and exits to be in their own database (either the bookmarks one, or a third one), which would not be replaced. Or maybe just flag user-added rooms and exits, that might be simpler.

So when the mapper does an SQL "INSERT INTO" to add a room and its exits, it sets a "user" flag as well. Then instead of deleting all rooms and exits, the database creation program would simply delete rooms and exits which did *not* have that flag set. This would be a fairly minor change.
USA #64
Heh, I actually wrote my post three times, once with a second database, then I thought "that's too hard, we could just use a flag", so I wrote it again with a boolean "Imported" flag, then I thought, that's still probably making it too complex.
USA #65
I was thinking it would be the server-provided rooms that would have the flag, not the user-mapped rooms, because that keeps the mapper itself from having to know about the origin of the rooms, and the flag only has any meaning to the importer. The default for the flag in the database would simply be user-provided.
Amended on Mon 26 Jul 2010 10:42 PM by Twisol
Australia Forum Administrator #66
You are right, that means changing only one plugin, not two.
#67
I'm not seeing where/what the plugin uses the coords for, other then putting them in the database. What am I missing?
Australia Forum Administrator #68
It doesn't use them. The server supplies them so it stores them. But the map is drawn based on east being to the right and west being to the left etc.
#69
I'm no expert, and by that I mean I know almost nothing, but if ATCP is so powerful, couldn't it pull "survey" up and use that as a reference for marking areas?

survey
You discern that you are in Hashan.
Your environment conforms to that of Urban.
You are in the Prime Material Plane.

I know you've probably already thought of this, and I really only read the first page, so I'm not fully up to date, but I lose my ideas quickly so I had to type it up before I forgot.

Not sure if you'd want to do anything with 'planes' but it's possible too if area labelling is possible.

Also, the alert that the database has been updated is a bit intrusive, is there a built-in way to gag it that I missed?
Amended on Fri 19 Nov 2010 10:16 PM by Faedara
Australia Forum Administrator #70
Faedara said:


Also, the alert that the database has been updated is a bit intrusive, is there a built-in way to gag it that I missed?


Near the start of the plugin, change this line:


  <!ENTITY show_database_mods "true" > 


Change true to false.

USA #71
Faedara said:
I'm no expert, and by that I mean I know almost nothing, but if ATCP is so powerful, couldn't it pull "survey" up and use that as a reference for marking areas?

survey
You discern that you are in Hashan.
Your environment conforms to that of Urban.
You are in the Prime Material Plane.

Nope. That's not ATCP data. ATCP only sends us hidden data (and with GMCP, its successor, you can request data on demand too), but you can only receive the data that the server -wants- to send. If IRE hasn't added a survey-analogue message, you can't get it over ATCP. But of course, you can fairly easily use the normal SURVEY command and capture/gag the output.
#72
Thank Nick, I understand that but I wouldn't know how to code it into the plugin, so I'll just smile and nod, and one more thing that just came up:

Why can you only search for room nearby? Performance issues, speedwalking bugs, or something else entirely?
Australia Forum Administrator #73
You open the plugin file with a text editor, near the start is that line. Change it. Save the file.

As for the search, it searches by "walking" outwards from where you are (to the current search depth). If it can't find the room you want inside the search depth, it doesn't know how to get there.
#74
Oh, sorry, that part after thanks Nick was directed at Twisol, I know how to modify scripts fairly well now. Not good at making them, but I can edit like a pro.

Is there a way to customize the walk radius, or do you have plans on making it so that you can search a wider area at a later point in the design?
Australia Forum Administrator #75
If you click the configuration icon (the asterisk in the bottom-left of the mapper) you can change the search depth.
#76
Ah, so that's what depth means!

Also, is there any way you could incorporate a more in-depth search at some point? I think it would be amazing to be able to locate a room across the world when I need to move between cities or from a city to a hunting spot. Then again it could also be a bad thing in the long run, since I'd get lazy after mapping the world and just speed everywhere.
Australia Forum Administrator #77
It's in the database, so you could easily enough search for the room and at least report what zone it is in, which would probably help you get into the general area.
#78
Hehe, alright. Thank you very much Nick, your innovations make MUDs more enjoyable every day!
#79
Same subject, new question, what line of the plugin do areas go in? I tried editing the area from the mapper window but it says "no areas exist"
Australia Forum Administrator #80
If you got the Achaea database (which it sounds like you might not have) then it had the areas in it. Maybe Twisol can advise, there is probably a simple bit of SQL that would add them to your database.
USA #81
Unfortunately, I haven't really used the mapper extensively. I never needed it much myself, and I like walking places manually (I know, I'm weird). I'm not sure how I can help here.
#82
I'm mapping everything out myself, actually, it came completely blank
USA #83
Nick can probably advise you on how to download and prepare the published room database, then. It's been discussed in the past though - and I wouldn't be surprised if it was in this very thread - so you might want to do a forum search.
#84
The thing is, I'd rather add areas by hand, since this allows me to know where I have and haven't explored (good for discovering new areas and exploration rank)
USA #85
Ah. I'm confused, can you explain the question again? (Also, I totally agree with your reasoning; that's why I like to do things manually and draw my own maps)
#86
There's an option to 'set area'
If I can manually input area names, I should be able to label the areas myself using this option. I'm assuming, the way Nick was talking earlier, this requires a database of some sort. I'm also considering figuring out a way to add music depending on the area you're in, but I'm foreseeing a problem with the music starting over every time you move too.
Amended on Thu 25 Nov 2010 08:31 AM by Faedara
USA #87
The mapper automatically creates a database if one didn't already exist, so you should be okay on that front. The part I don't know much about is figuring out how to set the area name for each room in the database.

As for the music, I'd expect there to be code like this:
if current_area ~= new_area then
  start_music(new_area) -- just an example function
  current_area = new_area
end
Amended on Thu 25 Nov 2010 08:37 AM by Twisol
#88
Alright, I guess I'll wait for Nick's input and then get to work on developing a snippet to slip into the plugin
Australia Forum Administrator #89
I've changed the mapper to allow you to add areas (assuming the rooms already have an area code).

A copy available here:

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


Here are the diffs:

https://github.com/nickgammon/plugins/commit/da02034d35a


In the case of the IRE MUDs you already have an area code (eg. 49 for "The City of Ashtan"). What this code does is let you assign a description to that code.
#90
I get:

"There are no available areas to choose from."
When I try to "edit area" from the RH click

and

"This room already belongs to area 0"
When I try to "add new area" from the RH click

Also, the autowalk will only move me one room at a time now, as in I move one room closer to my goal and have to search again


Edit: During testing I've found it still locates areas fine (using where) and it knows where I'm supposed to be going, it just never enters the next command in the queue
Amended on Fri 26 Nov 2010 03:14 AM by Faedara
Australia Forum Administrator #91
Try getting the latest version from the link:

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

I've made a couple of changes:

  • You can change the name for an existing area (thus you can correct spelling if you get it wrong)
  • Rooms with an existing area code of zero (as in your case) will now be correctly updated as you walk around to be the correct area number. So first I would walk into a room, getting a non-zero area number. Then add an area description for that room. Then all rooms in that area should then automatically join that area (once their area number is updated by visiting them).


About the autowalk - do you get an error message? If so, what is it?
#92
No error messages unless I move in the wrong direction (In other words if I manually walk the path I would get from "where" while the autowalk is queued then it counts down the queued actions as if I were autowalking.

Edit: if I stop/resume/stop/resume continuously I move (albeit slowly) along the determined path to the location one room at a time.

More edit: area exits are shown as 'unexplored exits' (that circle around the nearest room with an unexplored exit)

Even More Edit: The area system is working great now! As long as you name an area (eg. 55 is Hashan, so if it's still 55 it returns nil in the list of areas, but when renamed Hashan it has a value), you can change the area of a room at will.
Amended on Fri 26 Nov 2010 03:53 AM by Faedara
Australia Forum Administrator #93
What timing delay do you have for speedwalking? Are timers enabled?

As for the area exits, that should clear up a bit as you explore and have the area numbers updated.
#94
Yeah, timers were off because I was returning a bad value on a timer I had to stop immediately and forgot about, haha! I feel pretty dumb on that one.

As for the 'updating' do you mean once I've explored an entire area, or once I've given the area number a name?
Australia Forum Administrator #95
Hmmm. Thought they might not be. I amended the mapper.lua module to check timers are enabled so others don't get caught the same way.

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

The "area change" circle is drawn on a transition from one area to another (eg. area 49 to area 50). This shows an "area exit". You can configure the mapper to not show those, or to hide areas other than the current one.

The area change refers to the room's area info. If you are seeing a lot of them you probably have a lot of rooms with area 0 in them still. To make them go away you need to revisit the room and get this message:


Fixed room 3736 to have coordinates: -2 -7 0 and area 49


(That's if you have the database updating message enabled).

Then once each room has the correct area number associated with it, the circles should go away. In your case the circles might help you know where you have to go to update the area information.
#96
Good thinking, you've done some amazing work with this mapper!

And the circle shows exits unexplored (missing info) but it also appears at area edges, even after explored, and that's annoying when I use the circle to update info. Also, in the earliest posts I saw that the mapper showed areas around your current area, but in this version it doesn't, is there something I have to configure for that?
Australia Forum Administrator #97
All that stuff is at the very start of the mapper:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient [
  <!ENTITY show_vnums "true" > 
  <!ENTITY show_timing "false" > 
  <!ENTITY show_completed "false" > 
  <!ENTITY show_database_mods "true" > 
  <!ENTITY show_other_areas "false" > 
  <!ENTITY show_area_exits "true" > 
  <!ENTITY show_up_down "false" > 
  <!ENTITY speedwalk_prefix "" > 
]>


eg. "show_other_areas"

Once you have that set to true, and reload the mapper, you should be able to mouse-over the rooms in question and see if they are area 0, or simply in a different, but explored, area.
#98
Alright, with other areas shown it looks fine, thank you!

Edit: Actually... after using it a bit I see that there's always two circles on an area exit, and that gets very distracting when you're in an area like the forest with the river through it, where the river becomes completely lit up
Amended on Fri 26 Nov 2010 05:48 AM by Faedara
Australia Forum Administrator #99
I noticed that. I hoped you wouldn't <grin>.

[EDIT]

Both rooms are on the boundary, right? The first room is the boundary (say 49/50) and the second room is also on the boundary. Technically, the boundary is between the two rooms.
Amended on Fri 26 Nov 2010 06:33 AM by Nick Gammon
#100
It's very noticeable when you start remapping everything to add the areas to it, but damn if you don't have a good point.

And I would disable area borders if it weren't so *damn* useful knowing I haven't explored an exit yet. I know you've put so much work into this already, but would it be possible to have a different colored circle for rooms with unexplored exits? ((I'm thinking purple or violet))

edit: ((And Sorry Nick, it's now my life goal to criticize your every move while begging for your help in every little code snippet I do ;3 ))
Amended on Fri 26 Nov 2010 06:45 AM by Faedara
Australia Forum Administrator #101
Well the nice thing about scripts is they do what *you* tell them to do. Feel the power!

Now in your case, you want a visual indication of rooms that have area 0, right? So you can go revisit them?

So, in the get_room function, down near the end, tell it to do that.

For example, change the lines:


 if uid == current_room then
    room.bordercolour = config.OUR_ROOM_COLOUR.colour
    room.borderpenwidth = 2
  elseif room.area ~= current_area then
    room.bordercolour = config.DIFFERENT_AREA_COLOUR.colour
  end -- not in this area
  
  return room  


To:


 if uid == current_room then
    room.bordercolour = config.OUR_ROOM_COLOUR.colour
    room.borderpenwidth = 2
  elseif room.area ~= current_area then
    room.bordercolour = config.DIFFERENT_AREA_COLOUR.colour
  end -- not in this area
  

  -- unknown area?
  if tonumber (room.area) == 0 then
    room.fillcolour = ColourNameToRGB "cornflowerblue"  -- or whatever
  end -- if no area known


  return room  

Australia Forum Administrator #102
I noticed the code actually changes an unknown area to either of "Area 0" or "Area <unknown>" so if my suggested change doesn't work, try:



 -- unknown area?
  if room.area == "Area 0" then
    room.fillcolour = ColourNameToRGB "cornflowerblue"  -- or whatever
  end -- if no area known



Amended on Fri 26 Nov 2010 07:20 PM by Nick Gammon
#103
That's wonderful! But I still can't find the 'circle' snippet.

Also, your code stops working if you name area 0 ((I named it "Unknown" before you gave me that snippet))
Amended on Fri 26 Nov 2010 09:02 PM by Faedara
Australia Forum Administrator #104
What is this circle snippet of which you speak?

And as for area 0, change the if test to check for "Unknown".
#105
Tried that, it worked until I walked into a different area. And the snippet is the code that draws a circle around boundaries between two different areas.
Australia Forum Administrator #106
OK, try this then:



  -- unknown area?
  if tonumber (ourroom.area) == 0 then
    room.fillcolour = ColourNameToRGB "cornflowerblue"  -- or whatever
  end -- if no area known




Note changed room.area to ourroom.area - ourroom is what we looked up on the database, so that should still have 0 in it.

As for the double exit circles, I think that will go away (maybe annoyingly late) when you explore the areas. Normally you should only see one, but I think the coordinates being missing (on the unexplored rooms) is throwing out the code.

For now you could just disable the showing of area exits, as with the change above you should simply see the unexplored rooms in a different colour.
#107
Everything looks great now!

Also, the double circle doesn't seem to ever go away, except when there's multiple area exits in which case one or more circles might not appear ((Though some still do))
#108
Also, working off Twisol's script for music by areas



if current_area ~= new_area then
  current_area = new_area
  PlaySound (7, current_area".wav", true, -6, 0)
end


But I'm wondering if this would work, and if so where to put it. I don't want to modify something too much if I don't fully understand it.


Also, in case I messed up entirely, it's supposed to check if the room's area is now different than it was before, in which case it will play "area.wav" where area will be the label given to that area. For example, if my current_area is Hashan, then it will play Hashan.wav
Amended on Sat 27 Nov 2010 05:14 AM by Faedara
Australia Forum Administrator #109
Well in the plugin (not mapper.lua) is the code to handle room changes:


-- here when location changes, eg. : Room.Num 7476
function got_room_number (s)
  
  local room_number = s
    
  if not room_number then
    return
  end -- no room number

  current_room = room_number
  mapper.draw (room_number)
  
  if expected_exit == "0" and from_room then
    fix_up_exit ()
  end -- exit was wrong

end -- got_room_number


So after the line for mapper.draw, we have just drawn a new room (or maybe an existing room, if we just did a "look").

So after that line, let's grab the room info, and work out the area:


local ourroom = rooms [current_room]
if ourroom then
  local area_name = areas [ourroom.area]  -- get area name
  if area_name then
    if current_area ~= area_name then
      current_area = area_name
      PlaySound (7, current_area .. ".wav", true, -6, 0)
    end  -- area change
  end -- area found
end -- room found


I haven't tested it but that is the general idea.
Amended on Sat 27 Nov 2010 05:57 AM by Nick Gammon
#110
Run-time error
Plugin: ATCP_Mapper (called from world: Achaea)
Function/Sub: OnPluginBroadcast called by Plugin ATCP_Mapper
Reason: Executing plugin ATCP_Mapper sub OnPluginBroadcast
[string "Plugin"]:1079: attempt to index global 'room' (a nil value)
stack traceback:
        [string "Plugin"]:1079: in function 'f'
        [string "Plugin"]:1256: in function <[string "Plugin"]:1250>
Error context in script:
1075 :   mapper.draw (room_number)
1076 : 
1077 :   local ourroom = rooms [current_room]
1078 :   if ourroom then
1079*:     local area_name = areas [room.area]  -- get area name
1080 :     if area_name then
1081 :       if current_area ~= area_name then
1082 :         current_area = area_name
1083 :         PlaySound (7, current_area .. ".wav", true, -6, 0)


I'm no expert, but I've returned my fair share of 'nil', it's not getting the table 'room'
Australia Forum Administrator #111
ourroom.area

Shows what comes of not testing. I amended the post above.
#112
Testing now. Also, have you ever considered adding Midi function to PlaySound? Midi files are much smaller and less processor hungry than Wav

((I know, not the place to ask, but I'm a curious kitty))
#113
Also, I've come up with this:


local ourroom = rooms [current_room]
if ourroom then
  local area_name = areas [ourroom.area]  -- get area name
  if area_name then
    if ourroom.area ~= area_name then
      sound = area_name
      PlaySound (7, sound .. ".wav", true, -6, 0)
    end  -- area change
  end -- area found
end -- room found


Which will actually play sound ((Something with checking if the area has changed in your code isn't working))

So far, if I move around in an area with a music file labeled for that area ((eg. moving around in Hashan with a Hashan.wav in sounds)) it will play every time I move in that area (starting from the beginning) and keep playing continuously if I move into an area without a sound file.
USA #114
From what I can see, it looks like this is testing a truism. It seems like you're testing our current area against the current area's code, which are bound to be different. You need to store the current area somewhere, and whenever you move, compare it to the current room's area. If it's changed (i.e. you passed to another area), update the current area you've stored and play the sound.
#115
Twisol said:

From what I can see, it looks like this is testing a truism. It seems like you're testing our current area against the current area's code, which are bound to be different. You need to store the current area somewhere, and whenever you move, compare it to the current room's area. If it's changed (i.e. you passed to another area), update the current area you've stored and play the sound.


I'm pretty sure that's what Nick did, only it wasn't updating anything.
Australia Forum Administrator #116
You changed it. You have:


 if ourroom.area ~= area_name then
      sound = area_name


Well, you haven't remembered the new area name. Or more accurately, you aren't testing on the remembered name. It needs to be more like:



 if sound ~= area_name then
      sound = area_name  -- now they are the same 


Inside that "if" you need to remember the new area, so you don't keep thinking the area has changed.
#117
I changed it when yours didn't update =owo=

I'll try it again with that modification when I have time.
#118
I think I broke the mapper... I accidentally put in a number instead of a name for an area when I was trying to add an exit and the database broke down. Now I'm getting this:

Run-time error
Plugin: ATCP_Mapper (called from world: Achaea)
Function/Sub: OnPluginBroadcast called by Plugin ATCP_Mapper
Reason: Executing plugin ATCP_Mapper sub OnPluginBroadcast
[string "Plugin"]:470: bad argument #5 to 'format' (string expected, got nil)
stack traceback:
        [C]: in function 'format'
        [string "Plugin"]:470: in function 'supplied_get_room'
        ...and Settings\Gizmo\Desktop\MUSHclient\lua\mapper.lua:210: in function 'get_room'
        ...and Settings\Gizmo\Desktop\MUSHclient\lua\mapper.lua:923: in function 'draw'
        [string "Plugin"]:1075: in function 'f'
        [string "Plugin"]:1246: in function <[string "Plugin"]:1240>
Error context in script:
 466 :   if tonumber (areaname) then
 467 :     areaname = areas [tonumber (areaname)]
 468 :   end -- convert to name
 469 :     
 470*:   room.hovermessage = string.format (
 471 :       "%s\tExits: %s\nRoom: %s\nArea: %s%s%s%s",
 472 :       room.name, 
 473 :       table.concat (texits, ", "),
 474 :       uid,


Is there any way to fix this without deleting the existing database I've been working on?
Amended on Fri 17 Dec 2010 06:01 PM by Faedara
#119
Figured it out, I removed:
Area: %s%s%s%s

So that the mapper would show, and then edited the area. Now I'm going to try putting
Area: %s%s%s%s

back into the code.
Australia Forum Administrator #120
The relevant part of the code is:


 local areaname = room.area
  if tonumber (areaname) then
    areaname = areas [tonumber (areaname)]
  end -- convert to name
    
  room.hovermessage = string.format (
      "%s\tExits: %s\nRoom: %s\nArea: %s%s%s%s",
      room.name, 
      table.concat (texits, ", "),
      uid,
      areaname,
      terrain,
      info,
      notes
      -- depth,
      -- table.concat (path, ",")
      )


I think I would convert the first line to read:


 local areaname = room.area or "Unknown"


It was complaining about bad argument #5 to 'format' (string expected, got nil). The 5th argument is areaname, which must have been nil. The change I made would at least make it display as "Unknown".
Australia Forum Administrator #121
Change is uploaded to git here:

https://github.com/nickgammon/plugins/commit/e344b9f01ad
#122
This mapper is ABSOLUTELY INCREDIBLE and I have suggested it to everyone I talk to about maps. Nick, you are freaking amazing.
Australia Forum Administrator #123
Thanks for the supportive comments!
USA #124
I read through the comments but I'm sure I missed some.

Nick or anyone: Why does the mapper only draw one level now instead of just drawing until the max length limit is reached or a collision is detected? That is how an older version I had worked and I'd like to be able to turn that back on; suggesting that there is even a toggle for this. I haven't looked in the code yet.
Australia Forum Administrator #125
At the start of the plugin are a few lines like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient [
  <!ENTITY show_vnums "true" > 
  <!ENTITY show_timing "false" > 
  <!ENTITY show_completed "false" > 
  <!ENTITY show_database_mods "true" > 
  <!ENTITY show_other_areas "false" > 
  <!ENTITY show_area_exits "true" > 
  <!ENTITY show_up_down "false" > 
  <!ENTITY speedwalk_prefix "" > 
]>



Change true/false as required to enable various features. You might want to change "show_other_areas". Then reload the plugin.
USA #126
Thanks.

Something you may want to implement is adding another true/false option there to eliminate the down dashed lines when the room is classified a shop. Fairly easy to code as I put it in an older version of the map.
#127
Quick question. I installed the mapper and it works great. But later I connected to Achaea through a program called VadiSystem and the mapper stopped working. Does anyone know why or how to fix this? There's a companion program to the MushClient mapper called VadiMap, but given the choice between the two, I'd much rather have the one I got from this site.
USA #128
I believe it's because Vadisys filters out certain ATCP messages that the mapper requires, because I remember dealing with this with someone else.

You can try setting this configuration option in the config.txt file:
atcp_info "yes"
#129
Much better. Thanks a million.
USA #130
I've noticed now the new plugin isnt reading ATCP correctly. Every new room is being classified as black forest. I will test some more tonight and make sure I updated all pieces of the new mapper correctly.

#131
Hours have brought me no closer to making the map simply not show other areas... (sigh)I love coding.
Australia Forum Administrator #132
Near the start of the plugin does it say:


<!ENTITY show_other_areas "false" > 


#133
Nick Gammon said:

Near the start of the plugin does it say:


<!ENTITY show_other_areas "false" > 





Aye, it does. Tried changing it to true as well, just to see, but yes it is at false.

Edit: I was using Dontarion's modified mapper plugin, with Kairuni's length stuff scripted in. I thought that might be the hold up so I did try to tinker with the default mapper plugin as well, but I could not figure out how to hide other areas with either.

Edit 2: I have completely wiped everything and reinstalled the latest version of MUSHCLIENT. Out of the box, the mapper is now properly hiding areas (that are now instead numbered).

Problem Found: Dontarion's beautiful but lethal mapper.lua.
Amended on Thu 24 Feb 2011 09:51 AM by BeardedBuddhist
USA #134
@ Nick:

Think you could work in a permanent solution for tracking wormholes? I'm going to re-add my wormhole solution into the current version but IIRC the last time took quite a bit effort but this is because I don't do SQL at all.
#135
Dontarion said:

@ Nick:

Think you could work in a permanent solution for tracking wormholes? I'm going to re-add my wormhole solution into the current version but IIRC the last time took quite a bit effort but this is because I don't do SQL at all.


Aye, that would be nice for the snakes out there.


Personally, I would pay to see the following happen(or have someone help me with the following):

1. The mapper reading and displaying area name instead of a number, such as has been accomplished by Dontarion. (Shouldn't it be this way already?) (he accomplishes this with both of his atcp plugins, and I have yet to pinpoint how)

2. The ability to control the length of the exit lines, as has been accomplished by Kairuni. (Shouldn't it be this way already?) (I managed to accomplish this, thanks to the info in Kairuni's post)

3. Unexplored exits to show path and room border of unexplored room in style of dash line, instead of that giant ugly cyan ring, as was accomplished by Dontarion. (because it looks 1000x better) (he accomplishes this with his mapper.lua, that does not support hiding areas it seems)

4. Farsight support, as accomplished by Dontarion. (because that would be too cool) (I haven't messed with this task yet because it pales in comparison)


Edit: Ahh, did I mention how kick@$$ MUSHclient is yet.

Still #3 eludes me. I changed the circle to match the background colour, which works well enough to make the mapper bearable, though I would love to figure a real solution.

Oohh, I wonder if it would be possible to label area exits somehow...?
Amended on Fri 25 Feb 2011 02:15 AM by BeardedBuddhist
Australia Forum Administrator #136
Quote:
Think you could work in a permanent solution for tracking wormholes?


Wormholes? Are they like teleports? The mapper was deliberately designed to be fairly generic. I knew, for example, that some MUDs have "enter" and "leave" which wouldn't be handled by it directly because it only knows the directions N/S/E/W, NE/NW/SE/SW, up and down. After that it starts to run out of places it can automatically place exit lines.

Quote:
The mapper reading and displaying area name instead of a number ...


I think it does that (see screen shot on page 1 of this thread) if you populate the correct field for the room when it asks the room info.

Quote:
The ability to control the length of the exit lines ...


Well that's hard to get right. If someone has, I take off my hat to them. You really need to know coordinates, not every MUD has that.

Quote:
Unexplored exits to show path and room border of unexplored room in style of dash line, instead of that giant ugly cyan ring ...


The ring was an "area exit" ring. I think you can configure to turn that off.

Quote:
Farsight support ...


I'm not sure what that is.




I'm pleased everyone likes the mapper (well mainly like it) and the fact that it is just there in source form means that you are most welcome to adapt it to more precisely meet the needs of a particular MUD.
#137
Quote:
"The mapper reading and displaying area name instead of a number ... I think it does that"


Ahh. I meant more of reading it properly automatically, out of the box. I tried both the older version on the downloads page and the latest version [of MUSHCLIENT], of which neither does this, with Achaea at least. Simply switching out the 2 ACTP plugins with the ones provided by Dontarion fixes this for me though. My thanks to you, Dontarion.


Quote:
"The ability to control the length of the exit lines ... Well that's hard to get right. If someone has, I take off my hat to them."


This has been accomplished already, in a seemingly universal manner with a couple dozen lines of script addition, by Kairuni, here: http://pastebin.com/3L421QyT
This was a feature I could not imagine having a mapper without, major thanks to Kairuni.


Quote:
"Unexplored exits to show path and room border of unexplored room in style of dash line, instead of that giant ugly cyan ring ... I think you can configure to turn that off."


I figured out the perfect solution for me. I extended the length of the exit lines and removed the ring entirely, with the area exits solid and the unknown exits dashed. Now it looks awesome.


Quote:
"Farsight support ... I'm not sure what that is."


Farsight is a skill that names the location of another player. It requires a trigger that is game specific though... so it is not really something I imagine you'd put in.



Yes, I especially love the mapper. It is way too cool, I mean waay too cool.
Amended on Fri 25 Feb 2011 08:15 PM by BeardedBuddhist
#138
Argh! MUSHCLIENT is amazing, but also infinitely frustrating in its magnificence.

So I had the exit extender stuff by Kairuni scripted in and working beautifully.. then all of a sudden it stopped saving the extended lengths.

Fresh install, re-script the mapper length stuff, but still it is not reproducing the extended exits after restarting the client.

What happened?



Also I noticed when redrawing a new mapper database that it is giving the coordinates. Is there a way to get the map to place the room at the ATCP coordinates given?
Amended on Sat 05 Mar 2011 03:44 PM by BeardedBuddhist
Australia Forum Administrator #139
I don't know the answers to any of those. Maybe you got the wrong script. Maybe it is something to do with the plugin state file, if it has one.
#140
I am using your default v4.72 atcp plugins. In these 2 file I put in some script by Kairuni, which you can view here:
http://forums.achaea.com/index.php?showtopic=40651&pid=1228934&st=0&#entry1228934
(more specifically, here:)
http://pastebin.com/3L421QyT

Everything was working just fine. I could manually change the exit length using the alias scripted from the above, and it kept these changes through many restarts.

Recently, as in last night, the exit lines are no longer lengthened. I reinstalled all the default stuff and added the few lines of script that worked so beautifully before, but still it is not saving the exit lengths.

I have studied the scripts for many hours, restarted and reinstalled many times. I am not a programmer, I am a kung fu instructor. This stuff is way beyond me, I barely managed to add Kairuni's script stuff to begin with, so why it stopped working is entirely beyond me at this point. I am sure if you take a look at whats going on, anyone really, it wouldn't be hard to figure out.

Edit: All I need at this point is for the mapper to function as any mapper should, that is for it to have adjustable exit lengths. Rather this is achieved automatically through recognizing the atcp/gmcp coordinates and drawing it accordingly, or having to adjust it manually through an alias like was working before, matters little to me, so long as I can do it.

Any help you can provide is greatly appreciated. Seriously, any.


Thanks guys.



Amended on Sat 05 Mar 2011 10:30 PM by BeardedBuddhist
Australia Forum Administrator #141
I didn't have anything to do with the variable exit lengths code. Perhaps the person that did can comment. I haven't even seen it.
#142
Nick Gammon said:

I didn't have anything to do with the variable exit lengths code... I haven't even seen it.



Aye. That is why I put the link(s), for you, to check out the script (if you were so inclined).


The real issue that I am having doesn't seem so much to be with the script, though it may be. It seems to be with the fact that it is no longer storing the information like it was.. or redrawing the room now regardless of what the script that used to work is telling it to do. But like I said, I am not scripter.

It is frustrating to finally get the mapper configured, and have it work well for a week, only to have it take a shit on me without touching it. Adding to that frustration is knowing a decent scripter with a few minutes could fix what I have spent literally an entire day trying to just figure out.

... at this point I am quite willing to pay someone to help end my frustration (via Achaea credits or paypal donation link).
Amended on Sun 06 Mar 2011 01:43 AM by BeardedBuddhist
USA #143
BeardedBuddhist said:
It is frustrating to finally get the mapper configured, and have it work well for a week, only to have it take a shit on me without touching it. Adding to that frustration is knowing a decent scripter with a few minutes could fix what I have spent literally an entire day trying to just figure out.

I haven't looked at the code either, but I can tell you that debugging is one of the more onerous parts of programming. Usually a bug means one of the assumptions you made was wrong, which means you have to use the process of elimination to figure out what you did wrong. It's not as simple as looking at the code and saying "Oh, I'm adding 1 instead of 2."

There's a point where you have a kind of intuition for where the problem might be, but it only really applies to code you've written or algorithms you're familiar with.


The way I see it there are two places there could be a bug. The first is in the core code written by Nick, and the second is in the room-length patch written by Kairuni. Last I saw of Kairuni's work it was mathematically dense (all sorts of weights and balancing and whatnot), so I'm not touching that. I'd be more inclined to poke around Nick's code, but I have more to do than play with MUSHclient these days, sadly.


Sorry, I'm rambling. Tl;dr: it's not always that simple, and I wish I could help but I don't have the time.
Amended on Sun 06 Mar 2011 03:26 AM by Twisol
#144
Twisol said:


I haven't looked at the code either, but I can tell you that debugging is one of the more onerous parts of programming. Usually a bug means one of the assumptions you made was wrong, which means you have to use the process of elimination to figure out what you did wrong. It's not as simple as looking at the code and saying "Oh, I left out a parenthesis."

There's a point where you have a kind of intuition for where the problem might be, but it only really applies to code you've written or algorithms you're familiar with.




For god's sake would y'all just look at the bloody script.. it would take less time than to type out to tell me you haven't seen the script.

I am disappointed that all I keep hearing is "oh well."

(sad when I am asking so little.. and willing to pay for help.)
Amended on Sun 06 Mar 2011 03:28 AM by BeardedBuddhist
USA #145
forums.achaea.com seems to be down. My best guess right now, based on the symptoms, is that you should delete and recreate the database. Make sure you add the database table mentioned at the bottom of the pastebin, as that's where the line lengths seem to be stored.
#146
Twisol said:

forums.achaea.com seems to be down. My best guess right now, based on the symptoms, is that you should delete and recreate the database. Make sure you add the database table mentioned at the bottom of the pastebin, as that's where the line lengths seem to be stored.


Excellent, thank you for your help. I am not sure how to delete and recreate the database outside of deleting the <worldname>.db in and along with the mushclient folder each time I reinstalled the client. Each time I start with a clean map, with no drawn rooms. I have been putting in the table at the end, I assumed that part was important and figured that to be where the exit_len #s where stored (or supposed to be stored).


On another note: the client receives the coordinates, which seem to be accurate for the area number.. is it possible to get the mapper to draw the room at the atcp coordinates (such as Kairuni's mapper does).


Thanks again for the help.
USA #147
BeardedBuddhist said:
I am not sure how to delete and recreate the database outside of deleting the <worldname>.db in and along with the mushclient folder each time I reinstalled the client.

Just the .db file should suffice.

BeardedBuddhist said:
I have been putting in the table at the end

End of what, again?
#148

BeardedBuddhist said:
I have been putting in the table at the end

End of what, again?


I should have said the table at the bottom [of the pastebin link].
USA #149
Right, but where are you putting it? It's not Lua code, and the .db file is a binary format. The CREATE TABLE etc. stuff is an SQL command used to configure a database.
#150
Twisol said:

Right, but where are you putting it? It's not Lua code, and the .db file is a binary format. The CREATE TABLE etc. stuff is an SQL command used to configure a database.


Hrmm.. I have been putting it in the ATCP_Mapper.xml, in between the other CREATE TABLE IF NOT EXISTS <blah>.
USA #151
Hmm, yeah. That looks right. I'm not sure what the problem is, particularly if it was working previously. Maybe Nick can weigh in.

(I may as well note that I've been trying to solve this for an hour. My original post took about ten minutes.)
#152
Twisol said:

Hmm, yeah. That looks right. I'm not sure what the problem is, particularly if it was working previously. Maybe Nick can weigh in.

(I may as well note that I've been trying to solve this for an hour. My original post took about ten minutes.)



Yeah, I am really stumped on this one.

Twice I have been able to follow the instructions and have it work, saving between sessions. A week plus later, now when I do the same way, numerous times (to minimize chance for error), it still won't save the extended exits.

My initial, and reoccurring, thought is that perhaps something has changed in the atcp output from the mud (that is perhaps over-riding the tabled additions), but I am still new to this ATCP stuff.



How is everyone else dealing with the mapper's lack of exit length functionality? I am certain everyone doesn't walk around with an entirely jacked up map..
USA #153
BeardedBuddhist said:
How is everyone else dealing with the mapper's lack of exit length functionality? I am certain everyone doesn't walk around with an entirely jacked up map..

Honestly, I don't really use a map. When I play Achaea I use a simple plugin that copies the output of the MAP command as I walk, gags it, and displays it in a miniwindow off to the side. I don't need anything more full-featured because I always made ASCII maps of places I've been to, so I have most of Achaea's geography committed to memory.
Australia Forum Administrator #154
BeardedBuddhist said:


For god's sake would y'all just look at the bloody script.. it would take less time than to type out to tell me you haven't seen the script.

I am disappointed that all I keep hearing is "oh well."



To be fair to those of us that aren't leaping in to solve this ...

  • What you posted, as far as I can see, isn't the script, it is changes, and not as a "diff" file, but you have to manually go and apply them to the mapper. And it doesn't specifically say which version.
  • When something works, and then stops working for no obvious reason, is generally one of those bugs you will spend the next two days on, not 10 minutes.
  • I haven't looked at the mapper personally for a while, so I would have to come back up to speed at what it does.
  • Then I would have to work out what the changes were, to draw different length exits.
  • Then I would have to log onto Achaea and walk around for a while (assuming my character isn't dead, which I think it is) to build up the database
  • Then I would have to hope the problem occurs, and work out why, or if it didn't, try to work out why not
  • It might be your database, as Twisol is suggesting, I think. If you close the client, and then rename the database, and then restart it so it recreates it, that may or may not solve the problem.
  • It's Sunday afternoon. It's hot. It's been a long week.


I don't want to seem unhelpful, but when people modify my mapper and add fancy new features, that then stop working for some reason, I think it is reasonable to approach the authors of the changes to ask why the new feature isn't working.
#155
Nick Gammon said:


I don't want to seem unhelpful, but when people modify my mapper and add fancy new features, that then stop working for some reason, I think it is reasonable to approach the authors of the changes to ask why the new feature isn't working.


I clearly worded myself incorrectly. It was never my intention to find out why the specific changes weren't working. It was my intention to get your program's mapper to function as anything that calls itself a mapper should. I had it doing what it was supposed to, and if you would have looked at the bloody script changes I linked you, twice, you would have clearly seen that was simply creating a table and then rereading the table upon drawing the exit lines. And to be fair, why isn't this feature in the mapper already?.. Kairuni's mapper plugin automatically sets the room where it is supposed to be based off the same information your mapper plugin gets.


Sorry if I sound a little offended, I am. You have offered no help, sitting there telling me oh well the whole time. Hell, you didn't even bother to read the script changes, which even as a complete other-than-tinin noob, I could understand.

I guess it all wouldn't have mattered if I hadn't set myself on giving you a donation already. I have to apologize that my disappointment came out.

Amended on Sun 06 Mar 2011 05:39 AM by BeardedBuddhist
USA #156
Nobody here is paid to work on MUSHclient. Nick and other contributors work on these components because they either want them personally or they want to help other users. The fact that Nick spent the time writing a mapper at all is fantastic, and it works very well. What doesn't work well is demanding changes and flinging epithets.

Since you already resolved to part with some cash/credits, Vadimuses is selling a curing system, which also includes a mapper with built-in exit lengths, downloadable map updates, and full technical support [1]. You'll have to track down Baatti's plugin to put the mapper output into a miniwindow, but it shouldn't be hard to find on the Achaea forums.

(There's also a free vadimapper separated from the curing system, but it blocks all ATCP data from coming in to MUSHclient, so I don't recommend it.)

[1] http://vadisystems.com/vadi-m/
Amended on Sun 06 Mar 2011 05:56 AM by Twisol
Australia Forum Administrator #157
BeardedBuddhist said:

And to be fair, why isn't this feature in the mapper already?


Many MUDs don't supply coordinates. So there is no way of working out exit lengths.

Quote:

Hell you didn't even bother to read the script changes ...


I read them. Nothing struck me as obviously wrong. And you said yourself it used to work.
#158
Twisol said:

Nobody here is paid to work on MUSHclient.



Ahh, my mistake. I was under the assumption that MUSHclient was written primarily and owned by Nick, along with the website and the account linked to the donation button.


It is one thing to not know and I can even appreciate not helping me.. but do me a favour and don't tell me you're not going to bother to helpe me, it only adds to the frustration already experiencing.

Again, my apologies for not walking away it before my emotions showed.
Amended on Sun 06 Mar 2011 06:02 AM by BeardedBuddhist
Australia Forum Administrator #159
Thanks Twisol.

My post was a bit shorter than the original (I thought better of some of it). But to summarize the bits I deleted, it worked when I wrote it. Then people change things, including the way IRE sends data to the client. I don't have any control over that. IRE makes money out of MUDs. I don't, unless you count a couple of donations a month, which don't even pay for maintaining this web site.
USA #160
BeardedBuddhist said:
Seriously though, I can appreciate not helping me.. but do me a favour and don't tell me you're not helping me, it only adds to the frustration already experiencing.

I'm glad to know my hour of debugging went to a good cause.
Amended on Sun 06 Mar 2011 06:01 AM by Twisol
Australia Forum Administrator #161
BeardedBuddhist said:

... but do me a favour and don't tell me you're not helping me, it only adds to the frustration already experiencing.


The thing that isn't working was written by someone else. I thought it might speed things up to suggest you contact them.
#162
Twisol said:

BeardedBuddhist said:
Seriously though, I can appreciate not helping me.. but do me a favour and don't tell me you're not going to bother to help me, it only adds to the frustration already experiencing.

I'm glad to know my hour of debugging went to a good cause.


Uh, it did, I thought so anyway. That comment was definitely more directed at Nick, who has seemingly been apathetic from the start. Sure you were initially dismissive of me, but you did end up trying to help, which vastly helped to relieve some frustration. I'll have to thank you again for that, if it is worth anything to you I have credits on Achaea ready for transfer.


@Nick about coordinates from muds:
Sure not all muds give coordinates, but IRE muds do. Judging from what I can gather, IRE mudders make up at least half of the mudding community and probably a huge percentage of the people who use MUSCHclient. I would venture to guess that if the default mapping plugin didn't draw rooms on top of each other when there are already proven ways to fix it, it would probably be a lot more popular.


Since I prefer the default mapper setup to other mappers people have created (so far, anyways), I had hoped to get it functioning. ..But it is starting to feel like a lost cause, judging from that Nick seems to be uninterested in his own and that the community's reputable scripters have decided to create their own mapper plugins.

I don't want to sound like an ingrate. I appreciate all the help so far, and I would still love to get it working again since it fit so well with the custom layout I was building, and I could figure out how to change the background image. Again, thanks for every bit of help, it is not for naught (if nothing else, I am learning more about scripting).
USA #163
BeardedBuddhist said:
Uh, it did, I thought so anyway. [...] I'll have to thank you again for that, if it is worth anything to you I have credits on Achaea ready for transfer.

No, please don't worry about it. If I want to volunteer I'll do it because I like helping people, not because I want to be paid. (I have a job for that!)

BeardedBuddhist said:
Since I prefer the default mapper setup to other mappers people have created (so far, anyways), I had hoped to get it functioning. ..But it is starting to feel like a lost cause, judging from that Nick seems to be uninterested in his own and that the community's reputable scripters have decided to create their own mapper plugins.

His mapper is a pretty recent addition (at least on the MUD timescale). I've had my MapWindow plugin for ages, and Vadi's had an automapper as long as I can remember. Nick wanted a generic mapper that could have different frontends plugged into it. Putting aside the disparity between what the mapper has and what you think it should have, it does take effort to design a good solution that can be used for many MUDs.

IIRC he developed it primarily while playing on Aardwolf, which goes back to my point about building something because you want it. (Aardwolf has no exit-length issue, as adjacent rooms are the same distance apart.)
Amended on Sun 06 Mar 2011 06:41 AM by Twisol
Australia Forum Administrator #164
Quote:

BeardedBuddhist (15 posts) [Biography] bio
Date Sun 06 Mar 2011 02:43 AM [Edit message] edit [Delete message] delete [ bbpost_id=66599 ]

Amended on Sun 06 Mar 2011 02:44 AM by BeardedBuddhist
Message
Argh! MUSHCLIENT is amazing, but also infinitely frustrating in its magnificence.


...
15 hours later ...
...

Quote:

BeardedBuddhist (15 posts) [Biography] bio
Date Sun 06 Mar 2011 05:29 PM [Edit message] edit [Delete message] delete [ bbpost_id=66644 ]

Message
Twisol said:

BeardedBuddhist said:
Seriously though, I can appreciate not helping me.. but do me a favour and don't tell me you're not going to bother to help me, it only adds to the frustration already experiencing.

I'm glad to know my hour of debugging went to a good cause.


Uh, it did, I thought so anyway. That comment was definitely more directed at Nick, who has seemingly been apathetic from the start.


Sorry then if I seemed apathetic, on Sunday, when your problem with code I didn't write, wasn't resolved within 15 hours. The initial post was at 2:43 am my time, when I was asleep.

Perhaps use cMUD? They have a mapper. And they advertise good customer support.
#165
Nick Gammon said:


Perhaps use cMUD? They have a mapper. And they advertise good customer support.



Hmm, maybe that is why Zugg makes more than enough from it to host his site, even enough to quite his job entirely and work solely on building a game client. Unfortunately, he spent an abundance of time on the mapper, creating features that I don't need, instead of creating a program that can correctly parse the intense sort of game that I play.


And your apathy had nothing to do with timeframe, if you are implying something with that. You apathy was well revealed in the 2 posts from stating you didn't have any clue was wrong because you couldn't be bothered to read over the script changes I linked.

Anyways... I do love MUSHclient, and I am sure I will get it work somehow, someway, or eventually settle. I stand by that it is awesome, and I would still recommend it to anyone with patience.
USA Global Moderator #166
Jeeeeesus. What has happened here? Is it too much to expect even a tiny bit of respect from someone who demands so much and offers so little in return?

Quote:
How is everyone else dealing with the mapper's lack of exit length functionality?
Welcome to the world that doesn't revolve around what YOU think is important.

Quote:
Sure not all muds give coordinates, but IRE muds do. Judging from what I can gather, IRE mudders make up at least half of the mudding community and probably a huge percentage of the people who use MUSCHclient.
I, in representation of the Aardwolf community, wish you would kindly fork yourself. And no that is not a mean-spirited euphemism. We're quite happy with the work that Nick has done. We have our own well developed fork of it that suits our needs, and we're rather glad that Nick never demonstrates IRE-specific myopia. If you want IRE specific additions, please consult with someone who actually understands how to code and who is interested in dealing with verbal abuse from someone who doesn't. Maybe they will make a fork for you in the same way that I have done for Aardwolf.

And now for a little lesson on how to ask for help:
http://www.catb.org/~esr/faqs/smart-questions.html

See specifically the sections on "When asking about code" and "On Not Reacting Like A Loser"

I swear, if anyone started pissing and moaning about something they were getting from me for free the way you're doing here with Nick I'd tell them to go flower themselves with a giant rusty flower.
Amended on Sun 06 Mar 2011 11:06 AM by Fiendish
#167
Okay, so in the midst of all the posting, there is a lot that went unaddressed. I hope to bring things to close with this.


@Nick: I have read through some of your forum, looked at some of your responses to people's question, and I have to say that I am disappointed, in myself. I should not have thought you would be completely helpful, and that is apparent when I see you refuse to help people, instead questioning their motives entirely, when even I, as a total lua/mush noob, can figure the solution. As helpful as you are in many instances, I have also noticed you often spend more energy refusing to be helpful. Had I had this in mind, I would surely have had more patience in my responses.

My apologies also for bothering you with my issue. I posted on this forum in hopes that someone, anyone, might help me, so I have to apologize that you seem to have taken it as a personal request to you. In hindsight, perhaps I should have made a new topic, or posted somewhere else, like the Achaea forums.

Also, man, you come at me like I am some kind of scripter. The truth is, while I could break a handful of ribs with one shin kick, then backflip over you, I simply cannot script my way out of a wet paperbag using anything other than tintin or zscript. I came here as a noob, and a frustrated one at that, asking for help about your program that I fell in love with, entirely ignorant. I didn't even know you could not tell what someone else's script did. So cut me a little slack will ya? ;)




@Twisol: You are awesome. Thank you so much for your help. After looking through your posts on the internet, I had you pegged as a scripting guru of sorts. I was certain if anybody could help me extend the exit lengths, it would have been you (and that you could not is very disheartening). Thanks again, your helpful responses did wonders for my frustration.



About the exit lengths, I still don't know what is going on. I can put Kairuni script addition in (which seems pretty straight forward, adding am alias to build a table that is read upon drawing room) and it works, but when I quit MC and restart, the exits are not drawn extend.. it is as if it not reading from the table or it is not saving it upon exit.

Yeehaw! ..maybe someday I will get it figured out.
Amended on Sun 06 Mar 2011 11:10 AM by BeardedBuddhist
USA Global Moderator #168
BeardedBuddhist said:
... blah blah blah ...

https://secure.wikimedia.org/wikipedia/en/wiki/Victim_playing

Quote:
I didn't even know ... So cut me a little slack will ya? ;)

From what I remember of the writings of Miss Manners, being uneducated as a programmer is not an excuse for disgusting behavior.
Amended on Sun 06 Mar 2011 11:17 AM by Fiendish
#169
Fiendish said:

Jeeeeesus. What has happened here? Is it too much to expect even a tiny bit of respect from someone who demands so much and offers so little in return?

Quote:
How is everyone else dealing with the mapper's lack of exit length functionality?
Welcome to the world that doesn't revolve around what YOU think is important.

Quote:
Sure not all muds give coordinates, but IRE muds do. Judging from what I can gather, IRE mudders make up at least half of the mudding community and probably a huge percentage of the people who use MUSCHclient.
I, in representation of the Aardwolf community, wish you would kindly fork yourself. And no that is not a mean-spirited euphemism. We're quite happy with the work that Nick has done. We have our own well developed fork of it that suits our needs, and we're rather glad that Nick never demonstrates IRE-specific myopia. If you want IRE specific additions, please consult with someone who actually understands how to code and who is interested in dealing with verbal abuse from someone who doesn't. Maybe they will make a fork for you in the same way that I have done for Aardwolf.

And now for a little lesson on how to ask for help:
http://www.catb.org/~esr/faqs/smart-questions.html

See specifically the sections on "When asking about code" and "On Not Reacting Like A Loser"

I swear, if anyone started pissing and moaning about something they were getting from me for free the way you're doing here with Nick I'd tell them to go flower themselves with a giant rusty flower.




I came here with patience, asking a sincere question. I apologize to you if I was a tiny bit rude without meaning to be, the only thing I can think of is maybe my frustration of not being able to fix something that had no reason to be broken took over. As far as asking questions, when you ask someone about something and they respond with basically "I don't know because I didn't bother to click on the link you gave you" then you have the patience of a saint not to let it bother you in the slightest. I apologized many times for letting my frustration show, but apparently that wasn't enough for you.

By the way, did you have anything to add, or are you just here to berate me?


----------------------
"I am a buddhist not because I was born with inner peace, but because it is something I am searching for."
Amended on Sun 06 Mar 2011 11:23 AM by BeardedBuddhist
USA #170
BeardedBuddhist said:

@Nick: I have read through some of your forum, looked at some of your responses to people's question, and I have to say that I am disappointed, in myself. I should not have thought you would be completely helpful, and that is apparent when I see you refuse to help people, instead questioning their motives entirely, when even I, as a total lua/mush noob, can figure the solution. As helpful as you are in many instances, I have also noticed you often spend more energy refusing to be helpful. Had I had this in mind, I would surely have had more patience in my responses.

My apologies also for bothering you with my issue. I posted on this forum in hopes that someone, anyone, might help me, so I have to apologize that you seem to have taken it as a personal request to you. In hindsight, perhaps I should have made a new topic, or posted somewhere else, like the Achaea forums.

Wow, this is classic passive-aggressive behavior. Let me translate:
BeardedBuddhist said:
No wonder you didn't help me, those other poor saps hardly got any help either.

It's pretty obvious at this point that you're a jerkwad, so I'll take my questions elsewhere next time.


FWIW, I'm glad I could help at least somewhat. I'm just disappointed that you had to act this way.
Amended on Sun 06 Mar 2011 11:36 AM by Twisol
#171
Twisol said:

BeardedBuddhist said:

@Nick: I have read through some of your forum, looked at some of your responses to people's question, and I have to say that I am disappointed, in myself. I should not have thought you would be completely helpful, and that is apparent when I see you refuse to help people, instead questioning their motives entirely, when even I, as a total lua/mush noob, can figure the solution. As helpful as you are in many instances, I have also noticed you often spend more energy refusing to be helpful. Had I had this in mind, I would surely have had more patience in my responses.

My apologies also for bothering you with my issue. I posted on this forum in hopes that someone, anyone, might help me, so I have to apologize that you seem to have taken it as a personal request to you. In hindsight, perhaps I should have made a new topic, or posted somewhere else, like the Achaea forums.

Wow, this is classic passive-aggressive behavior. Let me translate:
BeardedBuddhist said:
No wonder you didn't help me, those other poor saps hardly got any help either.

It's pretty obvious at this point that you're a jerkwad, so I'll take my questions elsewhere next time.


FWIW, I'm glad I could help at least somewhat. I'm just disappointed that you had to act this way.




Your age is now obvious, but thank you for translating. What kind of a dick would I have been if I said what you said (but am I lying?). Yeah, I probably should have kept my opinion to myself, even refrained from posting at all, but honestly at first I didn't think I was at all being a jerk. Oh well, this proves I should just keep to myself.
Amended on Sun 06 Mar 2011 11:41 AM by BeardedBuddhist
USA Global Moderator #172
BeardedBuddhist said:
I came here with patience

No you didn't. You came here with crass expectations and demands and insults.

Quote:
asking a sincere question

And you provided, sincerely, a very poor level of information.

Quote:
I apologize to you if I was a tiny bit rude
More than just a tiny bit. Stop trying to play the victim.

Quote:
the only thing I can think of is maybe my frustration...
Again, stop trying to play the victim. Your expectation that people should just drop everything and rush to your aid is appalling.

Quote:
As far as asking questions, when you ask someone about something and they respond with basically "I don't know because I didn't bother to click on the link you gave you".

They didn't know because they couldn't evaluate the code. You did not provide the code. You provided some worthless garbage in the form of zero context snippets. Your links are useless. Get angry at yourself being ignorant of that fact.

Quote:
I apologized many times for letting my frustration show, but apparently that wasn't enough for you.
Forgive me for not believing in the sincerity of an apology that is preceded by and followed with rather direct insults.

Quote:
or are you just here to berate me?

It seems like you need it.

Quote:
I didn't think I was at all being a jerk.

Time to re-evaluate yourself, then. You now have several people telling you that you're being a jerk.
Amended on Sun 06 Mar 2011 11:53 AM by Fiendish
USA #173
BeardedBuddhist said:
I apologize to you if I was a tiny bit rude without meaning to be

Please. Really? You were downright insulting at times and you know it. Get some sleep and re-read the thread after you've woken up and you might be able to have a little empathy.

BeardedBuddhist said:
the only thing I can think of is maybe my frustration of not being able to fix something that had no reason to be broken took over.

Nick's mapper isn't what's broken, it's the patch created by someone else. Blizzard doesn't offer support for Warcraft mods, so there's no reason to expect him to solve a problem some third-party introduced. I even looked at the patch and couldn't really understand what it was doing (largely because it depends on understanding the relevant mapper.lua code around it).
#174
Fiendish said:

Fiendish says, "blah blah blah."



Thank you, vigilante, for teaching me a lesson! I will sleep better now knowing you are out there, patrolling the internet for people to show a thing or two!

Got any more wikipedia links for me?

Pfft, I am done with this, that is, contributing to internet pollution with my garbage. Flame on, troll.
Amended on Sun 06 Mar 2011 11:53 AM by BeardedBuddhist
USA Global Moderator #175
Would it be wrong of me to vote that last post as spam?
#176
Twisol said:

BeardedBuddhist said:
I apologize to you if I was a tiny bit rude without meaning to be

Please. Really? You were downright insulting at times and you know it. Get some sleep and re-read the thread after you've woken up and you might be able to have a little empathy.

BeardedBuddhist said:
the only thing I can think of is maybe my frustration of not being able to fix something that had no reason to be broken took over.

Nick's mapper isn't what's broken, it's the patch created by someone else. Blizzard doesn't offer support for Warcraft mods, so there's no reason to expect him to solve a problem some third-party introduced. I even looked at the patch and couldn't really understand what it was doing (largely because it depends on understanding the relevant mapper.lua code around it).



I was simply trying to fix the ability to fix the exit lengths, by whatever means. I am sorry, I clearly mispoke if I said that Nick mapper was specifically broken (I remember clearly stating that I thought from the beginning it might be an issue with information from the mud itself).

I tried to achieve this with Dontarion's mapper, and I asked him specifically for help with it. He could not help me. I did get help from Kairuni himself even, but we weren't able to fix it and he had moved on to his own plugin so wasn't too much interesting in figuring out why mc wasn't reading and drawing from a table that it used to. So I came here... but apparently I am an asshole, so, whatever.
USA #177
BeardedBuddhist said:

Twisol said:

Wow, this is classic passive-aggressive behavior. Let me translate:
BeardedBuddhist said:
No wonder you didn't help me, those other poor saps hardly got any help either.

It's pretty obvious at this point that you're a jerkwad, so I'll take my questions elsewhere next time.


FWIW, I'm glad I could help at least somewhat. I'm just disappointed that you had to act this way.


Your age is now obvious, but thank you for translating. What kind of a dick would I have been if I said what you said (but am I lying?). Yeah, I probably should have kept my opinion to myself, even refrained from posting at all, but honestly at first I didn't think I was at all being a jerk. Oh well, this proves I should just keep to myself.

I obviously took some comedic liberties, but it's pretty obvious that you don't have the highest opinion of Nick. (I also didn't say you were a jerk; I suggested you thought Nick was one. What I did say is that you're passive-aggressive.)

I'm trying to be civil, but after a certain point it gets ridiculous. Here are my parting thoughts:

1) Don't treat volunteers like they're obliged to help you. We reserve the right to refuse service.
2) Track down Kairuni and tell him what the problem is. The ideal situation would be to have a collaboration between Nick and Kairuni (since code from both of them is involved). [EDIT]: I guess you already did this.
3) I don't hold grudges, and I'd be glad to help you next time you stop by. Just stop it with the veiled aggression: I'd rather be told I'm a jerkwad to my face than it be subtly insinuated.

Anyways, I should go to bed. In fact, by all rights I should have stopped posting a while ago, but then we all know what happens when someone is wrong on the Internet [1].

[1] http://xkcd.com/386/
Amended on Sun 06 Mar 2011 12:09 PM by Twisol
USA #178
Fiendish said:

Would it be wrong of me to vote that last post as spam?

To be fair you weren't exactly a soothing influence. :P


[EDIT]: I can barely make a decent response without being ninja'd by two more replies, which suggests that tempers are hot and fingers hasty. BeardedBuddhist, I stand by my suggestion for you to take a break from this thread for a while.
Amended on Sun 06 Mar 2011 12:12 PM by Twisol
Australia Forum Administrator #179
I try to stay calm and usually find that helps keep other people calm as well.

BeardedBuddhist said:

For god's sake would y'all just look at the bloody script.. it would take less time than to type out to tell me you haven't seen the script.


This one?

http://pastebin.com/3L421QyT

Perhaps I was assuming too much when I said it was a patch. Maybe I assumed you knew what that meant. However I did look at it, I don't know how you could know I didn't.

A patch is like a list of changes. In itself, it won't run. It goes like "add this, change that". So you can't just read it and see the problem. You have to go back to the original, apply all the changes, to get the amended version.

Let me explain like this ... say you have a Kung Fu manual, and you get a message from HQ saying "change the word on line 5 of page 3 from 'always' to 'sometimes'".

In itself that tells you absolutely nothing about what the manual said to do before, and what it says to do now.

So to get anywhere I would have to get the original mapper (and it didn't say which of the versions I released this applies to), make the patches, log onto Achaea, and try to reproduce the problem.

And it is these "it used to work, I didn't change a thing, and now it doesn't work" problems that are notoriously hard to solve. And experience has shown that after a week of to-ing and fro-ing you often get the response of "well, yes I did re-install Windows, oh and I deleted the entire MUSHclient folder and reinstalled it, and I added a plugin from someone else's site - would that matter?" that you gradually get a clue as to the problem.


BeardedBuddhist said:

I have also noticed you often spend more energy refusing to be helpful ...


I don't think many forum visitors would agree with that. Often people respond along the lines of "wow! - I didn't expect such a detailed response, so quickly".

Sometimes however, when people post a question which is answered in the "getting started" sections, or in the YouTube videos I spent hours making, I think they haven't made the slightest attempt to find the answer for themselves. So sometimes my responses are a bit curt.

BeardedBuddhist said:

Adding to that frustration is knowing a decent scripter with a few minutes could fix what I have spent literally an entire day trying to just figure out.


Well you are guessing there, aren't you? Ask any programmer ... we can all tell how long it takes to boil a 3-minute egg, it is a well-defined problem. But finding bugs? And ones in code modified by other people, or that you didn't write in the first place?

The thing is, in your case, since there is a mapping database, the problem might be there. Looking at the code might tell absolutely nothing. You might need to look at the interrelationship between the database, the code, and the particular part of the MUD you are in. And perhaps the way you have configured your personal player options. Like the GMCP or ATCP options. For all I know, if you typed in some MUD command it would all come good. And bearing in mind that IRE change the way their MUDs work, and the protocols being sent to the client. They don't keep me abreast of those changes.

Australia Forum Administrator #180
Yes I see what's happened now. The "script" you linked to (which is actually a list of changes) is only 153 lines, so you probably thought "won't take long to fix that".

But the actual mapper is 1600 lines of code, and the plugin which calls the mapper is another 1948 lines of code. So that's 3548 lines of code, before modifications. So add in the extra lines (say, 150) and we get around 3700 lines of code.

The mapper itself is fairly complex as it involves a lot of loops and recursive/iterative calculations as it "walks outwards" from where you are to draw the map. It was complex enough with fixed length exits, and having to take into account room coordinates when deciding where to draw each room would have added to the complexity.
USA #181
All/Nick:

I'm trying to build in a few things into the mapper but I'm having trouble. Achaea has an odd method of doing the subdivision/wilderness so it takes up non-used room numbers to generate them on the fly. Eventually when they build new rooms these UIDs get used but the mapper already has them filled. I'm trying to build a method to completely wipe the room from DB's and have other tables erased too (room exits, etc). Currently I've learned a bit about delete. Anyone else attempted this?

I'm also looking at making the update area list pool from the rooms db and not just a second db of the area names. I think this is how it's being populated now because the listing is area names that aren't being used and were just pulled from the achaea map converter.
#182
I had to do a system restore to 2 days ago to fix an issue on my PC. Now, the mapper no longer works. I tried reinstalling everything, and the commands like MAPPER HELP still work but the plugin no longer tracks me. Also, unless I'm doing something wrong, MUSHClient is no longer understanding the plugin map.xml (lifted from www.achaea.com/maps/map.xml) The flow I'm using goes like this:

File -> Plugins... -> Add... -> ATCP_NJG -> ATCP_Mapper -> Create_ATCP_Map_Database -> map.xml

Everything loads up until the end. Mush tells me map.xml is not a plugin and thus will not be loaded. Even without map.xml, it won't create even a generic map for me. Anyone have any ideas?
USA #183
map.xml isn't a plugin, though. It's an XML dump of (almost) all of the rooms in Achaea. The Create_ATCP_Map_Database plugin converts map.xml into a database that the ATCP_Mapper can use.

Also, make sure that "Convert IAC EOR/GA to newline" is checked, in Game -> Configure -> Output.
Amended on Sat 26 Mar 2011 01:30 AM by Twisol
#184
Actually, I fixed the problem. With the same answer you gave me last time. That atcp info in VadiSystem was configured to No (I had to get the system again and forgot to update) so everything is peachy again.
USA #185
I've successfully converted the mapper over to working with GMCP. I used the Aardwolf GMCP plugin to handle data with a few tweaks for Achaea.

I added the ability to update room names if they're not the same as Achaea constantly goes through room name changes.

Soon I will be trying to change two things:
A: No more trying to map wilderness and subdivision rooms
B: Yanking area from GMCP data.
C: updating exits if they're wrong --> This may or may not happen.

--

I figured out how to avoid updating on wilderness rooms and area is already updating from GMCP now.
Amended on Sat 07 May 2011 07:01 AM by Dontarion
USA Global Moderator #186
I've been meaning to ask this for a really long time. Why did you originally make a second database file just for bookmarks?
Australia Forum Administrator #187
I identified two sorts of data you would want to store:

  • Data supplied by the MUD (that is, the maps, area information, connecting exits, etc.)
  • Data entered by the player (eg. favourite shop, guild info, notes about mobs)


The easiest way of repopulating the MUD-related data is to rebuild the database from the MUD's supplied file (if any). And the most reliable way it just to clear the tables and start from scratch. But I didn't want to lose all the player-entered data.

I suppose you could clear everything, except bookmarks, which would have worked. But it would make it hard for you to distribute the built database, or if the MUD didn't supply the whole database, to give a friend the room info without your notes.

Hence the two databases.