dynmap icon indicating copy to clipboard operation
dynmap copied to clipboard

deftemplatesuffix in the configuration.txt file doesn't change the settings for the `uwater` map in worlds.txt, resulting in inappropriately high-definition underwater maps

Open Cassolotl opened this issue 6 years ago • 14 comments

I noticed that the fullrender was taking a long time (it's been a couple of days now and our world is only 10,000 blocks wide), so I checked the console and it's been running the "uwater" render for ages.

In the config I've got deftemplatesuffix: lowres, which results in this:

Screenshot 2019-12-17 at 11 32 10

But the same scale shows this for the underwater map:

Screenshot 2019-12-17 at 11 15 14

... which seems a lot more fancy!

So I guess what I'm asking is, is that how it is supposed to be? Is there a separate setting for changing the resolution of the underwater map? (If so, I can't find it.)

While we're here, is there a way to turn off particular maps to save memory?

Edit: Our dynmap

Cassolotl avatar Dec 17 '19 11:12 Cassolotl

You can change all this and disable maps in the template files. Here's a couple useful documentation pages:

Worlds and Templates: https://github.com/webbukkit/dynmap/wiki/World-and-template-settings

Maps: https://github.com/webbukkit/dynmap/wiki/HD-Map-Configuration

the templates contain the map configurations. I personally copied the templates closest to my needs to files prefixed with custom-, i.e. custom-nether.txt. Then modify to your liking. Maybe the underwater map is accidentally being rendered at high res in the template, for example.

Simply remove the map sections you want gone from dynmap.

MitchTalmadge avatar Dec 18 '19 06:12 MitchTalmadge

Oh man, I knew it was going to be something stressful and complicated!! Thanks, I hate it. :D

I haven't changed the template files at all, so I feel like the config setting should have taken care of this issue. I'm leaving this open as a bug report.

Much appreciated, @MitchTalmadge!

Cassolotl avatar Dec 18 '19 13:12 Cassolotl

Okay, so I'm looking at these documentation pages, and I'm looking at my dynmap folder on the server, and here are some things I'm noticing.

  1. The documentation doesn't say where the templates are or what they are.
  2. There is no document in the dynmap folder called "templates" or anything like that, but there is a folder called "templates".
  3. When I open the folder called "templates", there is no obvious underwater map template. There's only files starting with normal, nether, and the_end.

I assume that since the underwater map is in the "normal" section it's in there somewhere... So since I'm set to "lowres", if I go into normal-lowres.txt it contains config stuff for only three maps - Flat, Surface and Cave. I checked vlowres and hires, and neither of those have underwater map sections either.

So I guess I have to add the underwater map section to the normal-lowres.txt file, but I have no idea how to do that...

Cassolotl avatar Dec 18 '19 13:12 Cassolotl

Should I rename this issue "underwater map is not included in normal-lowres.txt, normal-hires.txt, etc. templates"? I don't know enough to know whether this is the actual problem.

Cassolotl avatar Dec 18 '19 13:12 Cassolotl

What is your config for the underwatermap?

ionstorm66 avatar Dec 18 '19 19:12 ionstorm66

@ionstorm66 I don't know where to find it so I don't know! It doesn't seem to be affected by the overall configuration file, and it isn't in any of the templates, so I'm stuck.

Cassolotl avatar Dec 18 '19 21:12 Cassolotl

Do you have a worlds.txt file or a configuration.txt file hanging around? You'll want to find a part that says maps: and underneath that search for name: uwater.

sodaplayer avatar Dec 20 '19 04:12 sodaplayer

Ahhhh got it!

In worlds.txt, there was this:


    -   class: org.dynmap.hdmap.HDMap
        name: uwater
        title: uwater
        prefix: uwater
        perspective: iso_SE_30_hires
        shader: stdtexture-underwater-keep-land
        lighting: default
        image-format: default
        mapzoomin: 1
        mapzoomout: 7
        boostzoom: 0
        append_to_world: ''
        protected: false

So I changed perspective: iso_SE_30_hires to perspective: iso_SE_30_lowres and now I'll delete Dynmap's tiles for world "world" and re-render and see what happens.

Edit: I just did /dynmap purgemap world uwater, and I'll report back in a bit. :)

Edit again: That worked, so I did dynmap fullrender world:uwater...

And this is the result:

Screenshot 2019-12-20 at 16 46 04

A big improvement!

So I guess the bug in this case is that deftemplatesuffix: in the configuration.txt file doesn't change the settings for the uwater map in worlds.txt?

Cassolotl avatar Dec 20 '19 16:12 Cassolotl

So what deftemplatesuffix does is pick a template from here. Your uwater map is actually a custom one and isn't defined in any of the default templates. I suspect someone whom administrates your server had actually created that custom map.

I suggest following the links that Mitch had posted earlier I think they'll help you get a grasp of what's going on with the configuration.

sodaplayer avatar Dec 21 '19 01:12 sodaplayer

@sodaplayer I am the server administrator and I didn't create a custom map. The uwater map comes from an install of the standard Dynmap .jar. So if that is the case then I don't know how it happened.

This is what the basic worlds.txt file should look like when you install Dynmap, right? Everything is hashed out, and the maps for world "world" don't include uwater. I find it very hard to believe that I have at some point installed a custom map and then forgotten, especially since I remember updating Dynmap a while back and being pleasantly surprised that there was a new map type!

So, do other people's Dynmaps just not have this uwater map by default?

Cassolotl avatar Dec 21 '19 09:12 Cassolotl

I recently created a brand new dynmap and can guarantee that there is not an underwater map. Not sure how that got there for you. Did another plugin make it for you? Do users on your server have access to the in-game commands which they could use to create a new map? Maybe other things I'm not thinking of too.

MitchTalmadge avatar Dec 21 '19 09:12 MitchTalmadge

https://github.com/webbukkit/dynmap/issues/2271#issuecomment-418997546

xD It looks like you did create a custom one in the past.

sodaplayer avatar Dec 21 '19 09:12 sodaplayer

That would do it. :P

MitchTalmadge avatar Dec 21 '19 09:12 MitchTalmadge

@MitchTalmadge @sodaplayer Well, I have no idea how that happened. 😂 I will just delete the worlds.txt file and let it regenerate, to avoid this issue in future! Thank you both.

Edit: I thought this https://github.com/webbukkit/dynmap/issues/2271#issuecomment-418922347 would be alterable by the config, because it was included in a build by mikeprimm, but I guess it is never that simple!

Cassolotl avatar Dec 21 '19 09:12 Cassolotl