[MISC/INFO] Dynmap-Towny v0.50 - Display Towny towns and nations on Dynmap's maps [1.5.2-R1.0+]

Discussion in 'Inactive/Unsupported Plugins' started by Mike Primm, Nov 23, 2011.

  1. Offline

    Mike Primm

    Version 0.50

    Current Release
    Latest stable and unstable builds
    Source Code
    IRC: #dynmap on irc.esper.net

    Supported versions:
    Dynmap-Towny provides a simple way to add visibility of Towny towns and nations on Dynmap's maps. The plugin depends on the presence of both Dynmap and Towny Advanced, and interacts directly with the Towny API. Updates to zones are automatically processed (on a settable period - default is once per 5 minutes (300 seconds)). By default, the plugin will be active after simply installing it (by unzipping the distribution into the plugins/ directory and restarting the server).

    Towns of any shape are supported, and a proper outline border is computed and displayed that will encompass all the contiguous blocks of a given town (limitation - 'holes' in the middle of a town may still be shaded to look like part of the town). Outposts, including outposts on other worlds, are supported. Clicking on the town will display a popup with a configurable set of data on the town.

    Dynmap-Towny will also show configurable icons for the home block of each town, including distinctive icons when the town is a capital of its country.

    Display style, including the color and opacity of the outlines and fill, as well as icons used for home markers, can be tailored. This can be done at the global default level, the per-nation level, or the per town level. Also, the Y coordinate used for the outline defaults to 64 (standard sea level), but can be adjusted by setting the 'y' attribute on the display style (globally, per town, or per nation) (requires Dynmap 0.29 to work properly).

    Visibility of towns can be controlled via the 'visibleregions' and 'hiddenregions' settings. Besides listing the names of the towns to be made visible or hidden, entries with the format 'world:<worldname>' can be used to make all towns on a given world visible or hidden.

    Also, the display of the town outlines can be restricted to a minimum zoom-in level, via the 'minzoom' setting. When non-zero, this setting causes the town outlines to only be displayed at or beyond the given zoom-in level.

    Note: If you are currently using the region component for Towny in Dynmap, you should disable that support while installing Dynmap-Towny.

    After the first load, there will be a config.yml file in the plugins/Dynmap-Towny directory. Details of the default configuration, and all the provided settings, can be found here

    Change Log:
    • 0.50 - Update for Towny, add 'boost' flag for resolution boosting of claimed areas
    • 0.40 - Updated for latest Towny. Improved integration with TownyChat (thanks to Kobata!)
    • 0.30 - Improve reload support; add anonymous usage reporting via mcstats.org
    • 0.20 -
      • Add support for visibility-by-town and visibility-by-nation (let players that are part of same town or nation see each other when player-info-protected is enabled in dynmap - requires dynmap 0.60+)
      • Add options for different fill color overlays for shops, arenas, embassies, wilds
      • Detect TownyChat, and disable default chat processing in dynmap
      • Handle /dynmap reload - reload config.yml
    • 0.17 - Update to CB 1.2.4R1.0
    • 0.16 - Update to CB 1.1 event model (1.1-R5 READY)
    • 0.15 - Update for Towny
    • 0.14 - Add spaces to player lists to fix formatting. Add 'y' coordinate setting for display styles (to control 'height' of outline - requires dynmap 0.29).
    • 0.13 - Add 'minzoom' setting to hide outlines below given zoom in level; add 'world:<worldname>' option for 'visibleregions' and 'hiddenregions'
    • 0.12 - Add non-recursive code for outline calculation - should fix issues with big, complex outlines
    • 0.11 - Added support for nationstyle:, to allow customization of towns based on their nation.
    • 0.10 - Initial Release
    kahlilnc and HockeyMike24 like this.
  2. Offline


    This is great, thank you!
  3. Offline


    Awesome! Testing this out now.
  4. Offline


  5. Offline


    Ohhh, very nice!
  6. Offline


    very nice but i cannoot get it to work hmmmm
  7. Offline

    Mike Primm

    Found a minor bug that is actually in dynmap itself. The specifics are that more complicated outlines (ones with lots of corners) may, at some zoom levels, be improperly 'smoothed' - that is, some corners may be dropped to simplify the shape. Its a behavior of the library we use (Leaflet) that I failed to disable. The latest dynmap dev build has a fix (0.26), or you can apply the following one line patch to line 107 of dynmap/web/js/markers.js:

    var style = { color: area.color, opacity: area.opacity, weight:  area.weight, fillOpacity: area.fillopacity, fillColor: area.fillcolor };
    var style = { color: area.color, opacity: area.opacity, weight:  area.weight, fillOpacity: area.fillopacity, fillColor: area.fillcolor,  smoothFactor: 0.0 };
  8. Offline


    im having trouble trying to get custom styles working.

    the following doesnt seem to work, every time i reload dynmap it resets to default configuration
    visibleregions: [townname]
    hiddenregions: []
        strokeColor: '#FF0000'
        strokeOpacity: 0.55
        strokeWeight: 2
        fillColor: '#FF0000'
        fillOpacity: 0.10
    even if i modify the default regionstyle opacity it still resets upon reload
  9. Offline


    I seem to be having an issue with towns that are in Nations being displayed consistently. It's completely random; at times these towns will simply disappear from the DynMap and only deleting and reinstalling the DynMap-Towny component will display them again, no errors are shown anywhere and I am using the default config, they just simply disappear for no apparent reason.

    EDIT: Something is extremely wrong with how Towns are displayed on the Dynmap. First towns within nations weren't displaying, not some towns in nations display while other standalone towns will not display. Again, no errors are being generated anywhere. Is this a problem with this add-on or is it a problem with Towny itself and how the two interact? I don't know; but this is extremely frustrating to say the least as I cannot track down the problem.
  10. Offline

    Mike Primm

    Have you had a chance to check out the latest release (0.12) on the new dynmap (0.26)?
  11. Offline


    Mike Primm likes this.
  12. Offline


  13. Offline

    Mike Primm

    All I see is an [​IMG]
  14. Offline


  15. Offline

    Mike Primm

    What version of dynmap are you running? You need 0.27
  16. Offline


    thank you!!!
  17. Offline


    Running the latest version of both DynMap, the Towny piece, and Towny.

    Is there anyway to get these names to wrap for larger towns?

  18. For some cities the outline appears displaced?. In the same map, there are cities that the contour is centered, and other boundary appears moved, as you see in the picture.


    Thanks for the help.... ;)
  19. Offline

    Mike Primm

    I should be able to fix that :)

    The 2D display is always at Y=64, so if the terrain is above that, it'll appear displaced. I could give you a way to specify the desired Y value for a give town, but it will not be practical for me to automatically detect it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 21, 2016
  20. Offline


    Hi towny has implemented new system when town plots can have other perms than actual town perms. While its nice feature it also adds lot of mess. there is no easy way to know perms on all plots now but map that could show such altered plots would mean great help. Also nice thing would be if borders for diffrent towns could have diffrent colors. ss its made on reall paper maps of states.
    Thanks for great plugin
  21. Offline

    Mike Primm

    You can set your own border colors - just use the 'custstyle' or 'nationstyle' attributes in the config.yml (see https://github.com/webbukkit/Dynmap-Towny/wiki for details).
    Displaying the distinct permissions for each plot would require showing the towns as a grid of square blocks versus an outline (and a potentially huge number of them) - I'm not sure this would be usable.
  22. Offline


    Thanks for re. You are right. Would be probably complicated to figure out some usable way to show it.
    I hope towny map will implement some marker for such plots at least there should be such functionalyty in the fist place.
  23. Offline

    Mike Primm

    Give it some thought - if you have any suggestions on the best way to present the data, I'll be happy to consider its implementability. I'm not a regular Towny user, myself (my personal server is too low population to justify it - I'm a WorldGuard guy), so I don't necessarily have the best perspective on what is most needed or most useful. I definitely am counting on you folks to guide me to add the right features.
  24. As I can do that?.

    Thanks and a greeting).
  25. Offline

    Mike Primm

    Yep, this is in the new release (0.14), although you'll need to move to the latest development build of dynmap 0.29 for it to work right.
  26. Offline


    HI ive got all the plugins uptodate however there is not generated files for this plugin on the server, also all plugins r uptodate
  27. Offline


    Just had a thought, possible to set plots different colors? I've noticed it's hard to tell where the borders are of, let's say Shop Plots.
  28. Offline

    Mike Primm

    Do you have the Dynmap-Towny.jar in the plugins directory? It will not generate its configuration file until after its loaded, Towny is loaded, and Dynmap is loaded, since both are needed.

    Been seeing some requests specifically or things like Shop Plots to be broken out - would you guys like the option to have "subzones" (extra outlines) for contiguous blocks of these special zones?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 21, 2016
  29. Offline


    Sounds fine to me. Not sure if this will make a difference for you or not, since in the towny config we can choose the size of plots, I have mine set 2x the normal plot size. Instead of 16x16 areas, I have mine set to 32x32.
  30. Offline

    Mike Primm

    I already handle that stuff - its more a matter of deciding which plots to group together (below the town level)

Share This Page