Line lengths?

All and any discussion and development of the Mudlet Mapper.
Post Reply
Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Line lengths?

Post by Nyyrazzilyss » Fri Oct 23, 2015 6:37 pm

By zooming in/out of the map, I can increase/decrease the size of both rooms and line lengths connecting them.

Is there a way to change those values independently? setMapZoom will also allow me to decrease both sizes, but what if I want to keep all rooms at a certain size, but shorten the length of all the lines connecting all the rooms?

For example in the attached sample image, the rooms (without changing room size) could easily use half or less spacing to fit much more of the map on the screen.
Attachments
linesample.jpg

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

Re: Line lengths?

Post by SlySven » Sun Oct 25, 2015 10:47 pm

Sounds like you could use the GUI commands shrink and spread {and possible move to fixup individual rooms by juggling odd rooms around afterwards} to actually change the coordinates (X & Y only) of multiple rooms proportionally from a fixed point:
Mudlet map spread & shrink screen shot.png
Mudlet map spread & shrink screen shot2.png
Yours won't look quite like this as this is from an unreleased prototype that I had to hand (that actually runs). Older versions of the code did not make it obvious which room was the center of the expansion or contraction - though I think it would be the one with the Id number shown in the info box at the top of the 2D mapper. :D

If you are doing map maintenance you may not want to actually be connected while you do it - the easiest way to arrange that is to replace the server URL on the connections page temporarily with "localhost" and then click connect - (just remember to note down what WAS in the box - so you can put it back when you are done! :o )

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Line lengths?

Post by Nyyrazzilyss » Mon Oct 26, 2015 1:17 am

Thanks!

I'd not previously looked out how the spacing/line length was determined: It's the x/y positioning. I used the shrink command on a couple sample rooms, and it changed spacing to an acceptable amount.

The entire map however is imported using a modified version of the cmud import script in another thread here. It determines the x/y values from the cmud map file by dividing the x/y values by 30. I can change that to a larger number to get the final x/y values stored in the mudlet map file to be what I want.

I would guess i'm using a docked map: While the script itself will move the map/resize the mapper depending on other events, I don't allow the end user to move the map themselves.

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

Re: Line lengths?

Post by SlySven » Mon Oct 26, 2015 11:28 pm

Closer inspection suggests that you've got a map with rooms on a 6 unit spacing (i.e. 5 "spaces" between) - I'd recommend dropping that down to 2 or 3 - some mapper features really don't show well {doors, one way arrows, stubs} with NO space between rooms - which is one reason that "gridMode" area maps - where rooms are visually assumed to have exits to their immediately adjacent rooms do not show exits at all (and the room size is overridden to fill the entire 2D mapper "square" allocated for the room { room-size is FORCED to the equivalent to the "10" value on the spinbox}).

If the map is incorporated into the GUI then it isn't the "dockable" one - instead a script is using stuff from the GeyserMapper.lua file or calling the Lua command "createMapper" itself to put the map in a console window. Actually the ability to float the map to another screen some might find useful so you might want to consider allowing your package users to have the option - which could free up space in the main console area for something else - for those fortunate to be multi-monitored (including on a laptop with both external display and the built in LCD active). :P

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest