Achaea use for Nick's mapper engine

Posted by Kevnuke on Tue 07 Aug 2018 01:06 AM — 10 posts, 36,557 views.

USA #0
I recently started playing Achaea again after several years, and I was wondering if anyone ever used Nick's mapper engine to make a GUI mapper specifically for Achaea, since they now provide GMCP messages about the RoomID and grid coordinates, among other things. I messed around with the GUI mapper on Mudlet for a couple hours and found it really functional. Especially not needing to map as you go, like I've seen some other mappers make you do. I'm a very visual and spacial learner so I get lost easily if I don't have a map to look at while traveling. I think if I had to rewrite all of my triggers and such and learn to use a whole new client just to play Achaea with a map I'd just stop playing at this point. I was kinda hoping MUSHclient's regulars found a way to combine the best of both. They'd probably be better at taking apart Mudlet's mapper and porting it to MUSHclient than I ever would be. Thank you in advance for any replies
Australia Forum Administrator #1
I haven't tested it recently, but the one I did a while ago should work:

https://www.gammon.com.au/forum/?id=10132


On GitHub: https://github.com/nickgammon/mushclient/blob/master/plugins/ATCP_Mapper.xml
USA #2
Over the past few days I've read all the posts in the original thread from 2010 and looked at the code for the two plugins needed to make it work. My curing system is running on GMCP, so I'll have to see if I can get it to work with those messages instead. I'm assuming the version that came with MUSHclient 5.05 is the most recent version of the mapper. Would you be okay with me copying it into the plugin I use to handle GMCP negotiations so I don't have to mess with plugin broadcasts? Or maybe there's a way to have my script file handle GMCP so I wouldn't need plugins to begin with.

I tried following the links in the post Kairuni did for his mapper but it looks like his site is no longer active. I was hoping to look at his code, too.
Australia Forum Administrator #3
I don't mind what you do, but trying to combine them makes it more complex, if you ask me.

The plugin broadcast is just a simple function call that lets the mapper know you have changed rooms.
USA #4
Yea I just didn't know if the raw values sent by GMCP are the same as they were for ATCP, like the room numbers and area names, etc that they'd be in the database. I'll probably end up broadcasting GMCP data to your plugin and see if it works as is, first.
USA #5
Nick, you actually made a GMCP mapper plugin for Achaea in 2015. I found this by accident. :)

http://www.gammon.com.au/forum/bbshowpost.php?id=12873

After searching for the last few days I'm pretty sure every feature I'd ever want in a mapper has been done somewhere. so if I see a feature that I want that isn't in the mapper I'll try to reverse engineer it into this mapper. Dontarion probably did a lot of that already, but it doesn't look like he ever finished the "goto" feature he planned to add.

One other thing I was wondering. Mudlet's map downloads a database from achaea.com. I'm not sure if it's SQLite3 but I wanted to see if that would let me skip the process of filling in the rooms myself.
Australia Forum Administrator #6
Didn't I describe how to use the Achaea data? I think it is in XML format, and I wrote a plugin to convert that into a database.

Here, I think:

https://www.gammon.com.au/forum/?id=10132&reply=24#reply24
USA #7
I'm sure you did. I've just been reading so much trying to make sense of everything that it got lost in the sea of disorganized thoughts in my head.

I really like the map. I'm just a little thrown off while moving by some of the rooms disappearing due to them overlapping. I think I found a simple solution, I'm just not sure how simple it would be to implement.

Coordinate multipliers!
Example: Room A has x, y, z coordinates 11, 1, 0
Room B is west of Room A. and has coordinates 13, 1, 0

Just draw the line between them a distance equal to what it would have been to draw two rooms consecutively in the same direction, but without the 10x10 room between them.

So, from right to left, starting at the left side of Room A the length of the line connecting them would be:

2 x (DISTANCE_TO_NEXT_ROOM - HALF_ROOM)

Similar calculation for rooms at diagonal directions, except use the Pythagorean Theorem to determine distances and directions for rooms more than one vertical and horizontal from the previous room.

I'm pretty sure the database already has the coordinates for each room stored but not I don't know how to use it for this. I've never used SQL.
USA #8
So, funny story, I took a couple of classes my first semester at university completely by accident that'll help me with making changes to the mapper plugin and possibly the module too. Database Systems and Computer Graphics.

In Computer Graphics, we're literally doing the stuff your mapper.lua module does to draw rooms and lines. Except we're using X11.

Oh quick question. When a float is used as an argument to draw a point, does it round up or down? Since you can't draw to pixel 5.75, for example.
Australia Forum Administrator #9
I’m not absolutely certain, but I think it would be truncated, in other words rounded down.