Overviwer

From Jens\\\\\\\' Wiki
Jump to navigation Jump to search

FIX ME AT SOME POINT

Render high-resolution maps of a Minecraft world with a Google Maps powered interface((https://github.com/overviewer/Minecraft-Overviewer))

The Minecraft Overviewer is a command-line tool for rendering high-resolution maps of Minecraft worlds. It generates a set of static html and image files and uses the Google Maps API to display a nice interactive map.

The Overviewer has been in active development for several years and has many features, including day and night lighting, cave rendering, mineral overlays, and many plugins for even more features! It is written mostly in Python with critical sections in C as an extension module.

Map examples

Examples of a config file for Overviewer.

All examples are created using the map of Zagis's Single LP((https://github.com/jensz12/zagi-single-lp-map/tree/master)

No POI

  1. -*- coding: utf-8 -*-

end_smooth_lighting = [Base(), EdgeLines(), SmoothLighting(strength=0.5)]

  1. Define the path to your world here. 'Zagi Single Player' in this case will show up as
  2. the world name on the map interface. If you change it, be sure to also change
  3. the referenced world names in the render definitions below.

worlds['Zagi Single Player'] = "C:/Users/Jens/Downloads/world"

  1. Define where to put the output.

outputdir = "C:/zagi/world"

  1. Dag med Smooth Lightning

renders["singleoverworld"] = {

   "world": "Zagi Single Player",
   "title": "Dag",
   "rendermode": smooth_lighting,
   "dimension": "overworld", 

}

  1. Overworld caves

renders["singlecave"] = {

   "world": "Zagi Single Player",
   "title": "Cave",
   "rendermode": cave,
   "dimension": "overworld",
                       } 
  1. Overworld nat

renders["singlenight"] = {

   "world": "Zagi Single Player",
   "title": "Nat",
   "rendermode": smooth_night,
   "dimension": "overworld", 

}

  1. Nether med Smooth Lightning

renders["singlenether"] = {

   "world": "Zagi Single Player",
   "title": "Nether",
   "rendermode": nether_smooth_lighting,
   "dimension": "nether", 

}

  1. End

renders["singleend"] = {

   "world": "Zagi Single Player",
   "title": "End",
   "rendermode": end_smooth_lighting,
   "dimension": "end",

}

With POI

  1. -*- coding: utf-8 -*-

def farmSheepFilter(poi):

   if poi['id'] == 'FarmSheep':
       try:
           return (poi['name'], poi['description'])
       except KeyError:
           return poi['name'] + '\n' 

end_smooth_lighting = [Base(), EdgeLines(), SmoothLighting(strength=0.5)]

  1. Define the path to your world here. 'Zagi Single Player' in this case will show up as
  2. the world name on the map interface. If you change it, be sure to also change
  3. the referenced world names in the render definitions below.

worlds['Zagi Single Player'] = "C:/Users/Jens/Downloads/world"

  1. Define where to put the output.

outputdir = "C:/zagi/world"

  1. Dag med Smooth Lightning

renders["singleoverworld"] = {

   "world": "Zagi Single Player",
   "title": "Dag",
   "rendermode": smooth_lighting,
   "dimension": "overworld",
   'manualpois':[
                  {'id':'FarmSheep',
                   'x':335,
                   'y':64,
                   'z':-1169,
                   'name':'Fårefarmen',
                   'description':'Fårefarmen, bygget i episode 88 & 107'},],
   'markers':[  

dict(name="FarmSheep", filterFunction=farmSheepFilter, icon="icons/marker_farm_sheep.png"),], }

  1. Overworld caves

renders["singlecave"] = {

   "world": "Zagi Single Player",
   "title": "Cave",
   "rendermode": cave,
   "dimension": "overworld",
                       } 
  1. Overworld nat

renders["singlenight"] = {

   "world": "Zagi Single Player",
   "title": "Nat",
   "rendermode": smooth_night,
   "dimension": "overworld",
   'manualpois':[
                  {'id':'FarmSheep',
                   'x':335,
                   'y':64,
                   'z':-1169,
                   'name':'Fårefarmen',
                   'description':'Fårefarmen, bygget i episode 88 & 107'},],
   'markers':[  

dict(name="FarmSheep", filterFunction=farmSheepFilter, icon="icons/marker_farm_sheep.png"),], }

  1. Nether med Smooth Lightning

renders["singlenether"] = {

   "world": "Zagi Single Player",
   "title": "Nether",
   "rendermode": nether_smooth_lighting,
   "dimension": "nether", 

}

  1. End

renders["singleend"] = {

   "world": "Zagi Single Player",
   "title": "End",
   "rendermode": end_smooth_lighting,
   "dimension": "end",

}

POI

POI or Point Of Interest, is a way to add markers to the map.

Start by defining the filter, put the following at the top of the config.py. Just under the UTF-8 encoding def farmSheepFilter(poi):

   if poi['id'] == 'FarmSheep':
       try:
           return (poi['name'], poi['description'])
       except KeyError:
           return poi['name'] + '\n'
           

Then add 'manualpois' to the world renders

'manualpois':[]

A manualpoi should look like this

'manualpois':[

                   {'id':'FarmSheep',
                   'x':335,
                   'y':64,
                   'z':-1169,
                   'name':'Fårefarmen',
                   'description':'Fårefarmen, bygget i episode 88 & 107'},]

Now we need to define the markers, and the icons used to display the poi on the map. Add this code, after the 'manualpoi' section

'markers':[]

A marker should look like this

'markers':[ dict(name="FarmSheep", filterFunction=farmSheepFilter, icon="icons/marker_farm_sheep.png"),]

A world render with POI should look like this

def farmSheepFilter(poi):

    if poi['id'] == 'FarmSheep':
       try:
           return (poi['name'], poi['description'])
       except KeyError:
           return poi['name'] + '\n' 
  1. Dag med Smooth Lightning

renders["singleoverworld"] = {

   "world": "Zagi Single Player",
   "title": "Dag",
   "rendermode": smooth_lighting,
   "dimension": "overworld",
   'manualpois':[
                  {'id':'FarmSheep',
                   'x':335,
                   'y':64,
                   'z':-1169,
                   'name':'Fårefarmen',
                   'description':'Fårefarmen, bygget i episode 88 & 107'},],
   'markers':[ 

dict(name="FarmSheep", filterFunction=farmSheepFilter, icon="icons/marker_farm_sheep.png"),], }

Finally run the genpoi code, to make the markeres show up on the map.

Extra settings

Always show markers

In **markers.js** set "checked": false to "checked": true

Other

Map of End

The map of The End, will not be created unless you define it.

Heres is the best render code to do it. Add it to the top of config.py

end_smooth_lighting = [Base(), EdgeLines(), SmoothLighting(strength=0.5)]

Then define the map below the other renders in config.py

  1. End

renders["singleend"] = {

   "world": "Zagi Single Player",
   "title": "End",
   "rendermode": end_smooth_lighting,
   "dimension": "end",

}

UTF 8

Overviewer is not set to use UTF-8 unless you tell it to.

Add the following code top the top of config.py, to get UTF 8 support

# -*- coding: utf-8 -*-

POI generation

Run the following code in a .bat file, or in the CMD to generate the marker files overviewer.exe --genpoi --skip-scan --config=C:/PATH/TO/config.py

Skip-scan

--skip-scan tells genpoi.py to not look for entitys, and there fore speed up the process quite a lot on larger maps. DO NOT use this, if you want to display the text of signs, or whats inside a chest, since this will only generate the manualpois, defined in the world renders.

Map generation

Run the following code in a .bat file, or in the CMD to generate the map overviewer.exe --config=C:/PATH/TO/config.py

Fodnoter