TownyAdvanced / Towny

Towny Advanced Minecraft plugin for Bukkit/Spigot.
https://townyadvanced.github.io
Other
527 stars 354 forks source link

Suggestion: Monospaced ASCII map #6114

Closed MilesBHuff closed 2 years ago

MilesBHuff commented 2 years ago

Please explain your feature request to the best of your abilities:

It would be awesome if the ASCII map were monospaced. However, I'm not sure Minecraft has a monospaced font option. So, as an alternative, you could change the existing symbology to use fullwidth letters, which would have the effect of making the map monospaced, without requiring a special monospaced font.

I would do this in my own config, but not all the symbols in the ASCII map are customizable; see #6113.

LlmDl commented 2 years ago

2022-08-15_14 19 35 Seems to be some-what possible.

MilesBHuff commented 2 years ago

Currently it's possible to "monospace" (use fullwidth characters for) all of the configurable symbols. But not all of the symbols are configurable (see #6113).

The upside of the fullwidth characters is of course that they allow for a perfect grid. The downside is that they use Minecraft's ugly unicode font.

LlmDl commented 2 years ago

2022-08-15_14 28 49 I've made it so that it can read in unicode characters. It can get pretty messy depending on what you use.

MilesBHuff commented 2 years ago

Yeah, going partial fullwidth and proportional is not going to look good. It really has to be all one or the other.

LlmDl commented 2 years ago

I am making it possible to use unicode. I don't have the time to go hunting down all the symbols. If you manage to find a character set that doesn't make it look terrible and go over the allowable linewidths, let me know.

MilesBHuff commented 2 years ago

@LlmDl See below:

Proportional:

--------------------------- ----------CHJ+------------- ---------++A+J+------------ ---+H+-----++I+------------ ---+++------+++------------ ---+++-----++++------------ ---------------------------

True monospace:

---------------------------
----------CHJ+-------------
---------++A+J+------------
---+H+-----++I+------------
---+++------+++------------
---+++-----++++------------
---------------------------

Fullwidth:

--------------------------- ----------CHJ+------------- ---------++A+J+------------ ---+H+-----++I+------------ ---+++------+++------------ ---+++-----++++------------ ---------------------------

LlmDl commented 2 years ago

I understand it fully, I just don't have the time to get that done today. Monospace would be best, probably not cause linebreak issues.

MilesBHuff commented 2 years ago

Ah, got it -- thanks for the clarification. What can I do to help you with it? I know you've got bigger fish to fry.

LlmDl commented 2 years ago

Ideally if you can find a monospaced character set: I would take your characters and probably make it the towny default. The only one that really sets things askew is the Inn plot I, which isn't as wide as other chars.

You can try it out here: https://cdn.discordapp.com/attachments/669247087329673228/1008824955565252618/towny-0.98.3.6.jar

use \uFF02 to drop in unicode characters if you'd like

MilesBHuff commented 2 years ago

Ah, if it's just the characters you need, I gave an example of them (with the I) in the fullwidth example above: --------------------------- ----------CHJ+------------- ---------++A+J+------------ ---+H+-----++I+------------ ---+++------+++------------ ---+++-----++++------------ --------------------------- The above is not in a code block at all -- it is just a collection of Unicode symbols, and every one of them has the same width.

A list of all fullwidth symbols needed to complete the ASCII map:

Type Symbol Address
For Sale \uFF04
Default \uFF0B
Wilderness \uFF0D
Arena \uFF21
Bank \uFF22
Shop \uFF23
Embassy \uFF25
Farm \uFF26
Home \uFF28
Inn \uFF29
Jail \uFF2A
Wilds \uFF37
LlmDl commented 2 years ago

I did use that in testing, if you try it out you'll find the full width makes the lines too wide to fit in the chat box. I also did not have any luck with \uFF0B for default plots for some reason.

MilesBHuff commented 2 years ago

@LlmDl Ahh, I see now -- thanks for the clarification.

I guess one option would be to reduce the width of the map by one or two symbols. While it would mean a reduced FoV, it would also mean a squarer map and better performance -- so this reduction can be a good thing or a bad thing, depending on point of view.

And huh. Maybe a different symbol for default plots would work? and seem like a potentially viable options; alternatively, we could do for default and for wilderness. I wonder why wouldn't work, though; that's odd. Minecraft is pretty inconsistent with its Unicode support -- I wish it had more emojis, because then we could make the textual map quite pretty.

LlmDl commented 2 years ago

At this point, the code supports anything unicode so you can play around with it. Note that the home, forsale and wilderness symbols are only loaded at startup/server reload. So do that on a test server.

Edit: I don't really want to make the map less-wide, it is vital to be able to see far out when trying to get around min-distances between plots and what not.

MilesBHuff commented 2 years ago

Got it -- thanks, @LlmDl. I'll play around with it some, and report back with some screenshots.

Edit: Maybe a parameter to configure the map width, or even height? Some servers might want to tweak these anyway. I'll file a separate issue for this, so it can be discussed or closed individually. (Edit: #6117)

MilesBHuff commented 2 years ago

@LlmDl

The only one that really sets things askew is the Inn plot I, which isn't as wide as other chars.

Side-note: a really easy fix for that, is just to have Inns be "N" by default, which should be about the same width as the hyphens. Conveniently, "En" even sounds similar to "Inn".