Generic Mapping Script

All and any discussion and development of the Mudlet Mapper.
Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

I have a retina display (very high resolution), so I probably can't tell the difference. I suppose that makes sense, though mentioning by the check box that it is just turning on anti-aliasing might be helpful.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Generic Mapping Script

Post by SlySven »

Humm, the proportion of the map display area that is taken by the room selection widget is quite significant at small mapper sizes but it designed to go down as the map is made wider with a total clamped to be around 300pixels width so if you can make the widget larger (have you considered/or are you using the mapper as a free floating but dockable widget, don't forget as such it can be tabbed with other dockable console windows/tool bars though placement/sizing of these is not something that can be scripted which GUI designers won't be so keen on)!

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

Yes, I'm sure I could just make it larger, but it is already taking up 35% of the total Mudlet window width, which is pretty substantial, especially considering that I don't run Mudlet full screen. Docking the mapper would similarly get in the way of the stuff that I'm trying not to cover up with Mudlet in the first place by not running it full screen, and my Mac has a habit of only bringing the window I click on to the front, as opposed to all windows belonging to the given application, so if the map were in a separate window from the rest of Mudlet, I would have to find it behind whatever stuff it got buried behind in order to show it whenever I switched back to Mudlet (which is rather inconvenient). But, even if I had room to make it bigger, I know that several people who use the script package I created do so on laptops with relatively small screens, so at least some people would be unable to do as suggested.

Here is a screenshot of my setup with a few rooms selected in the mapper. The centered room is roughly behind the last "H" on line 6. So, if I happen to want to move more than 5 rooms at a time, including the room I'm in (pretty common when creating a map), I can't. Having an option to turn off room names would make it significantly easier to do what needs to be done. Perhaps another check box at the bottom of the mapper would work?

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Generic Mapping Script

Post by Vadi »

That definitely looks like a problem. I'd like to think up of a solution that doesn't involve manually fiddling with buttons, but nothing comes to mind right now.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Generic Mapping Script

Post by SlySven »

Humm, that isn't ideal, whether it might be possible to allow the right margin of that widget to be drag-able or to have a preference to NOT show the room names is something to investigate...

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Generic Mapping Script

Post by Vadi »

Maybe dynamically scale the font down as the widget gets smaller, down to a certain minimum?

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Generic Mapping Script

Post by SlySven »

It uses the same font as the rest of the 2D mapper - and the vertical size adjustment is predicated on knowing the size of the font as well as how many lines want to be shown - it might be possible to change the font size but I think it would be easier to just allow the right boarder to be adjustable by user setting as well as by the overall width of the mapper widget as is currently the case.

You might be able to at least partially address the issue by revising the void T2DMap::resizeMultiSelectionWidget() method - perhaps the 2/3 width allocation for small mapper sizes could be paired down, but note that the changes in dwidget-width/dmapper-width occur at the exact widths where the two ratios produce the same width {effectively there are no jumps in widget width as the mapper width is altered} - you will want to ensure any revisions produce the same effects. I think with the current font size you will still want 80-100 pixels for room Id and possible somewhere in excess of 100 for room names - unless you introduce extra logic to hide the room names if the mapper widget is too narrow {you will need to fit code into two of the three places where this method is called: in T2DMap::mouseMoveEvent(...) and in: T2DMap::mousePressEvent(...)}

Azmodian
Posts: 5
Joined: Fri Nov 07, 2014 2:09 am

Re: Generic Mapping Script

Post by Azmodian »

IS there a good step-by-step guide on how to install and run the scripts for the mapper? I seem to be having a difficult time getting this to work.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

It should be something like this: copy both this script and the Simple Window Manager script into new, blank scripts in Mudlet. Create relevant triggers to capture room name, exits, and assorted move events, as detailed in the documentation at the top of the script. Use the supplied aliases to start creating your map, also as explained in the documentation at the top.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Generic Mapping Script

Post by Jor'Mox »

Made a few changes to the script. It should now handle in and out exit stubs properly, and I added in the option to disable/enable the map stretching that occurs when a room is in the same place that a new room is being added. As always, let me know if there are any issues, and I'll do my best to remedy them when I can.

Post Reply