webbukkit / dynmap

A set of Minecraft mods that provide a real time web-based map system for various Minecraft server implementations.
https://www.reddit.com/r/Dynmap/
Apache License 2.0
2.06k stars 421 forks source link

[Feature] Towny integration #328

Closed Enf0 closed 13 years ago

Enf0 commented 13 years ago

Would it be possible to highlight Towny towns in the same way WorldGuard regions are?

The "town-blocks" (default 16x16x128 i.e. chunks) are stored in /Towny/data/towns/NameOfTown.txt It is stored in the following format: townBlocks=world:x,yy;a,bb; | Where x,yy is is a town-block and a,bb is another town-block. They are separated by semi-colons. Example: /Towny/data/towns/ImperialCity.txt townBlocks=voltron:4,29;3,29;3,28;4,28;4,30; |

The size of a town-block is 16 by default (meaning it uses chunks) but it can be changed in /Towny/settings/config.yml town_block_size: 16

It would be great if you could also utilize the popups in dynmap to show information about the town.

Let me know if you need to know anything else.

Enf0 commented 13 years ago

Also, NameOfTown.txt also contains a value called homeBlock which is basically the "center" of a town, where residents of the town will respawn etc.

homeBlock=voltron,4,29

mikeprimm commented 13 years ago

Cool - is there anything to do with the Nation stuff, or is a nation just a set of towns?

Enf0 commented 13 years ago

Yes, a nation is just a group of town and I don't think there's anything you could do with it. Maybe show which nation a town belongs to if you decide to add that information popup? I don't find it very needed, but I guess you could do it if you wanted.

We don't have any nations on our server yet, so I don't know how the syntax looks. I'm pretty sure the files are being saved under /Towny/data/nations/NameOfNation.txt

Enf0 commented 13 years ago

I gotta stop hitting the "Comment & Close" button.

mikeprimm commented 13 years ago

Yep - I do that a lot, too :) I'm thinking that maybe having a config option for the outlines to be color-coded based on which nation the town is in?

Enf0 commented 13 years ago

Yes, great idea! Let me know when you get a dev build going and I could help you test it.

uncovery commented 13 years ago

This would be great to have. I already implemented that for my own map system like this:

http://minecraft.uncovery.net/admin/index.php?function=create_map&world=kingdom

Of course a dynmap system would be preferred. There could be information about which lots are for sale and which are sold already etc. Different (random) colors for town which are grouped together by whatever means to show that they belong to one nation would be perfect. I simply colored all blocks of a nation the same.

mikeprimm commented 13 years ago

First pass of towny support went in to 0.21 last night. I'm planning on adding options for different color coding based on which nation the towns are in - hopefully tonight.

mikeprimm commented 13 years ago

Towny support should be functionally complete now - added color-coding options for per-nation coloring, various fixes, etc. Also, added option for hide/show of the region layer, so you can hide or show the outlines on the map interactively.

mikeprimm commented 13 years ago

We just released 0.21, which includes Towny Advanced 0.74.1 support. There is a patch in 0.22 (which will also be in 0.21.1, which will be released in the next day or so) to handle format changes in the just-released 0.75.1.