Giter Site home page Giter Site logo

dynmap-assemble's Introduction

dynmap-assemble

Assembles one great map from many tiles, produces by DynMap, MC Bukkit map plugin/MC Forge mod

Dependencies

  • pillow (PIL)
  • tqdm (optional)

Usage

  1. Put script into %SERVER_FOLDER%\plugins\dynmap\web\tiles\ folder
  2. Launch it (with arguments or in interactive mode)
  3. Enjoy!
usage: dynmap-assemble.py [-h] [-i] [-w WORLD] [-m MAP] [-b BGCOLOR] [-r RESIZE]

DynMap map assembler

optional arguments:
  -h, --help            show this help message and exit
  -i, --interactive     Use interactive mode. Helps determine arguments
  -w WORLD, --world WORLD
                        Server world to create map for. This is directory in <server>/dynmap/web/tiles. Default is
                        'world'
  -m MAP, --map MAP     Map defined in dynmap config. This is directory in <server>/dynmap/web/tiles/<world>. Default
                        is 't'
  -b BGCOLOR, --bgcolor BGCOLOR
                        Background color. Choose one of the following ['transparent', 'overworld', 'nether',
                        'the_end', 'black', 'white'] or use hex form (#6495ed)
  -r RESIZE, --resize RESIZE
                        Size in px to which each tile will be resized

BG Colors cheatsheet

  • overworld
  • nether
  • the_end (this one isn't black, just very dark violet)

palette

Example

world_t

shrinked 10x (original one is way too big) minified example image here

dynmap-assemble's People

Contributors

xtotdam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dynmap-assemble's Issues

Is there a way to restrict the tiles being processed to an area of chunks?

I'm trying to generate a map of the isometric view from our 5000x5000 server map, however the script fails with a MemoryError even if I do 1 pixel per tile (which is still ~25,000 pixels wide, astoundingly).

At the least I'd really just like to get the main spawn area, so is there any way I can restrict it to just a certain square of tiles?

Not working. Cant run script

**Firstly i tried launch script double-clicking on it. It launches some kind of console window which closed immediately.

Then i opened Python 3.9 (exe) and tried drag-and-drop script on it. There is result:**

Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> "C:\Users\LYN\Desktop\[MC]Сервер\Trim World 1.17.1\plugins\dynmap\web\tiles\dynmap-assemble.py"
  File "<stdin>", line 1
    "C:\Users\LYN\Desktop\[MC]Сервер\Trim World 1.17.1\plugins\dynmap\web\tiles\dynmap-assemble.py"
                                                                                                   ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
>>>


AttributeError: 'NoneType' object has no attribute 'startswith'

Looks like a great script, but cant get it working on either python2.7 or python3.7
I have installed both pillow-8.1.0 and tqdm-4.58.0 on 2.7 and 3.9

$ python dynmap-assemble.py
Traceback (most recent call last):
  File "dynmap-assemble.py", line 54, in <module>
    elif bg_key.startswith('#') and len(bg_key) == 7:
AttributeError: 'NoneType' object has no attribute 'startswith'

MySQL Compatibility

There should be MySQL Database Compatibilty because not everyone is using the dynmap tiles folder to store tiles. This would be extremely helpful if you added this function to the script. And would be even better if you added the ability to download tiles from MySQL databases across the web!

When trying to create a flat map: ValueError: invalid literal for int() with base 10: ''

Whenever I try to create an image for the flat map, I get this:

Choose world (enter number)
   1:  world
   2:  world_nether
   3:  world_the_end
> 1
Choose map (enter number)
   1:  ct
   2:  flat
   3:  t
> 2
Choose background color (enter number)
   1:  transparent ()
   2:  overworld (light blue)
   3:  nether (dark red)
   4:  the_end (dark violet)
   5:  black ()
   6:  white ()
> 6
Assembling map 'flat' of world 'world' located at '/Users/macmini/mc/bcr-mc/plugins/dynmap/web/tiles/world/flat' using 'white ()' as background color
Collecting tile locations...
Traceback (most recent call last):
  File "/Users/macmini/mc/bcr-mc/plugins/dynmap/web/tiles/dynmap-assemble.py", line 99, in <module>
    h, v = map(int, hv.split('_'))
ValueError: invalid literal for int() with base 10: ''

If I choose t it seems to work out fine, but whenever I try flat it just gives me that error. I installed pillow and tqdm, not really sure how to resolve this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.