Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Plugins
➜ Mapper for Achaea
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2 3
4
5
6
7
8
9
10
11
12
13
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #15 on Tue 09 Mar 2010 07:54 PM (UTC) |
Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #16 on Wed 10 Mar 2010 04:58 AM (UTC) |
Message
| With extra information now being sent down by Imperium we can now see terrain colours:
And shops and banks and stuff (the hatched squares):
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #17 on Wed 10 Mar 2010 05:01 AM (UTC) Amended on Wed 10 Mar 2010 05:05 AM (UTC) by Nick Gammon
|
Message
| 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.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #18 on Thu 11 Mar 2010 06:04 PM (UTC) |
Message
| 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. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #19 on Thu 11 Mar 2010 06:40 PM (UTC) |
Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Noro
(1 post) Bio
|
Date
| Reply #20 on Wed 24 Mar 2010 02:01 AM (UTC) |
Message
| 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? | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #21 on Wed 24 Mar 2010 02:03 AM (UTC) |
Message
| 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. | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #22 on Thu 25 Mar 2010 01:39 PM (UTC) |
Message
| 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 }
| Top |
|
Posted by
| Indico
(16 posts) Bio
|
Date
| Reply #23 on Wed 14 Apr 2010 11:52 PM (UTC) |
Message
| 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? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #24 on Thu 15 Apr 2010 03:33 AM (UTC) |
Message
| |
Posted by
| Indico
(16 posts) Bio
|
Date
| Reply #25 on Thu 15 Apr 2010 09:48 PM (UTC) |
Message
| 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> | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #26 on Fri 16 Apr 2010 01:06 AM (UTC) |
Message
| Go into the global preferences -> Lua and change the first couple of lines about trusting worlds and plugins from "false" to "true".
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Ves
(8 posts) Bio
|
Date
| Reply #27 on Sat 17 Apr 2010 12:39 AM (UTC) |
Message
| The original link seems to be down. Could you add it again?
Thanks, | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #28 on Sat 17 Apr 2010 01:40 AM (UTC) |
Message
| |
Posted by
| Ves
(8 posts) Bio
|
Date
| Reply #29 on Sat 17 Apr 2010 05:31 AM (UTC) |
Message
| 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
| Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
501,814 views.
This is page 2, subject is 13 pages long:
1
2 3
4
5
6
7
8
9
10
11
12
13
It is now over 60 days since the last post. This thread is closed.
Refresh page
top