Minecraft Overviewer

Started by Thorin, March 28, 2012, 05:47:15 PM

Previous topic - Next topic

Tom

Ya, network changes. so annoying not having my dhcp clients properly registering their hostnames in the dns.

I'll look at it.
<Zapata Prime> I smell Stanley... And he smells good!!!

Lazybones

You have control of the DHCP scope options on the router. Nothing stopping you from running DNS on another server.

Tom

Quote from: Lazybones on December 28, 2015, 11:21:14 AM
You have control of the DHCP scope options on the router. Nothing stopping you from running DNS on another server.
That is probably what I'll do. I saw that there are actual dns key options so you can set the access key to the dns server to auto register names. I just didn't set that up yet. May not. We'll see if I go back to the soekeris or not.
<Zapata Prime> I smell Stanley... And he smells good!!!

Lazybones

If you are running Merlin firmware on your Asus you can set nearly all of the standard DNS / DHCP options in detail.

Edit: it does require creating some scripts for startup however.

Thorin

Hmm, I just set certain devices with a static IP in my router. When I change routers, I know I need to set those three or four devices and everything else just works. Drobo, Plex machine. Actually, I guess it's only two. If I had a server that answers outside requests, I'd set a third static IP.
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Tom

I have a lot of separate physical machines and virtual machines. Many of which are temporary. so I prefer to have it setup to take the hostname from DHCP, and automatically register that to the lan's DNS server, so all physical and virtual machines on the lan get a hostname automatically.
<Zapata Prime> I smell Stanley... And he smells good!!!

Thorin

Hey Tom, I'm running Overviewer at home for my personal server.  Can you show me how you set up the player markers to show custom icons?  I have this:


def playerIconFilter(poi):
if poi['id'] == 'Player':
return "Last known location for %s" % poi['EntityId']


I know I need to make it this:


def playerIconFilter(poi):
if poi['id'] == 'Player':
poi['icon'] = '<some path to an icon for %s>' % poi['EntityId']
return "Last known location for %s" % poi['EntityId']


I don't know what the path for the icon is.  You've got it working nicely on your overviewer, so I'm hoping you'll share the knowledge.  And the overviewer documentation isn't up-to-snuff, some of the samples they have there flat-out don't work in 1.11.
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Tom

As I was about to post the below message, I re-read yours... All you really need is: poi['icon'] = "http://overviewer.org/avatar/%s" % poi['EntityId']

...

Here's my entire config:

from sets import Set                                                                                                                                                                                                                                                           
import re                                                                                                                                                                                                                                                                     
import ConfigParser, os                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                               
defaults = { 'processes': 2, 'path': '/overviewer/path/is/not/set', 'outputdir': '/overviewer/outputdir/is/not/set' }                                                                                                                                                         
config = ConfigParser.ConfigParser(defaults)                                                                                                                                                                                                                                   
dirname = os.path.dirname(os.path.realpath(__file__+"/.."))                                                                                                                                                                                                                   
settings_file = os.path.join(dirname, "settings.cfg")                                                                                                                                                                                                                         
print "Settings File: "+settings_file                                                                                                                                                                                                                                         
config.read(settings_file)                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                               
mc_path = config.get('overviewer', 'path')                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                               
worlds["righteouswrath"] = os.path.join(mc_path, "righteouswrath")                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                               
processes = config.getint('overviewer', 'processes')                                                                                                                                                                                                                           
mycave = [Base(), EdgeLines(), Cave(only_lit=True), DepthTinting(), SmoothLighting()]                                                                                                                                                                                         
mynethercave = [Base(), EdgeLines(), Nether(), Cave(only_lit=True), DepthTinting(), SmoothLighting()]                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
majorPOIre = re.compile(r"\[[^\]]+\]")                                                                                                                                                                                                                                         
personalPOIre = re.compile(r"\{[\}]+\}")                                                                                                                                                                                                                                       
tradingPOIre = re.compile(r"\*[^\*]+\*")                                                                                                                                                                                                                                       
hiddenSignre = re.compile(r"\*~~[^~]*~~\*")                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                               
def checkStrings(text, what):                                                                                                                                                                                                                                                 
         for word in what:                                                                                                                                                                                                                                                     
                  if word in text:                                                                                                                                                                                                                                             
                                return 1                                                                                                                                                                                                                                       
         return 0

def matchFilter(poi, prog):
         return prog.match(poi['Text1']) or prog.match(poi['Text2']) or prog.match(poi['Text3']) or prog.match(poi['Text4'])

def directionFilter(poi):
         "Directions"
         global checkStrings
         directionStrings = ['<---', '--->', '^', '\/']
         if poi['id'] == 'Sign' and (\
                  checkStrings(poi['Text1'], directionStrings) or
                  checkStrings(poi['Text2'], directionStrings) or
                  checkStrings(poi['Text3'], directionStrings) or
                  checkStrings(poi['Text4'], directionStrings)):
                                return "\n".join([poi['Text1'],poi['Text2'],poi['Text3'],poi['Text4']])

def hiddenSignFilter(poi):
        "Hidden Signs"
        global matchFilter
        global hiddenSignre
        if poi['id'] == 'Sign' and matchFilter(poi, hiddenSignre):
                return 1

def majorPOIFilter(poi):
         "Major POIs"
         global majorPOIre
         prog = majorPOIre
         if poi['id'] == 'Sign' and ((poi.has_key('Text1') and prog.match(poi['Text1'])) or (poi.has_key('Text2') and prog.match(poi['Text2'])) or (poi.has_key('Text3') and prog.match(poi['Text3'])) or (poi.has_key('Text4') and prog.match(poi['Text4']))):
                return "\n".join([poi['Text1'],poi['Text2'],poi['Text3'],poi['Text4']])

def personalPOIFilter(poi):
         "Personal POIs"
         import re
         prog = re.compile(r"\{[^\}]+\}")
         if poi['id'] == 'Sign' and ((poi.has_key('Text1') and prog.match(poi['Text1'])) or (poi.has_key('Text2') and prog.match(poi['Text2'])) or (poi.has_key('Text3') and prog.match(poi['Text3'])) or (poi.has_key('Text4') and prog.match(poi['Text4']))):
                return "\n".join([poi['Text1'],poi['Text2'],poi['Text3'],poi['Text4']])

def tradingPOIFilter(poi):
         "Trading Posts"
         import re
         prog = re.compile(r"\*[^\*]+\*")
         if poi['id'] == 'Sign' and ((poi.has_key('Text1') and prog.match(poi['Text1'])) or (poi.has_key('Text2') and prog.match(poi['Text2'])) or (poi.has_key('Text3') and prog.match(poi['Text3'])) or (poi.has_key('Text4') and prog.match(poi['Text4']))):
                return "\n".join([poi['Text1'],poi['Text2'],poi['Text3'],poi['Text4']])

def otherFilter(poi):
         "Magic"
         if poi["id"] in ["EnchantTable", "Cauldron"]:
                  return "[%s] " % poi["id"]

def signFilter(poi):
         "All POIs"
         global directionFilter
         global majorPOIFilter
         global personalPOIFilter
         global tradingPOIFilter
         global otherFilter
         global hiddenSignFilter

         if poi['id'] == 'Sign':
                  if(not hiddenSignFilter(poi)):
           
                          ret = directionFilter(poi)
                          if not ret:
                                        ret = majorPOIFilter(poi)
        #                 if not ret:
        #                               ret = personalPOIFilter(poi)
        #                 if not ret:
        #                               ret = tradingPOIFilter(poi)
                 
                          return ret

def playerFilter(poi):
        "Player Locations"
        if poi['id'] == 'Player':
                poi['icon'] = "http://overviewer.org/avatar/%s" % poi['EntityId']
                return "Last known location for %s" % poi['EntityId']

def spawnFilter(poi):
        "Player Spawns"
        if poi['id'] == 'PlayerSpawn':
                poi['icon'] = "http://overviewer.org/avatar/%s" % poi['EntityId']
                return "%s's Spawn" % poi['EntityId']

renders["overworld"] = {
         "world": "righteouswrath",
         "title": "Survival Daytime",
         "rendermode": smooth_lighting,
         "dimension": "overworld",
         "markers": [   dict(name="Directions", filterFunction=directionFilter),
                                                dict(name="Major POIs", filterFunction=majorPOIFilter),
                                                #dict(name="Personal POIs", filterFunction=personalPOIFilter),
                                                #dict(name="Trading Posts", filterFunction=tradingPOIFilter),
                                                dict(name="Magic", filterFunction=otherFilter),
                  dict(name="Players", filterFunction=playerFilter),
                  dict(name="Player Spawns", filterFunction=spawnFilter),
                                           dict(name="Signs", filterFunction=signFilter) ]
}

renders["overworld_reversed"] = {
         "world": "righteouswrath",
         "title": "Survival Daytime Reversed",
         "rendermode": smooth_lighting,
         "dimension": "overworld",
         "northdirection": "lower-right",
         "markers": [   dict(name="Directions", filterFunction=directionFilter),
                                                dict(name="Major POIs", filterFunction=majorPOIFilter),
                                                #dict(name="Personal POIs", filterFunction=personalPOIFilter),
                                                #dict(name="Trading Posts", filterFunction=tradingPOIFilter),
                                                dict(name="Magic", filterFunction=otherFilter),
                  dict(name="Players", filterFunction=playerFilter),
                  dict(name="Player Spawns", filterFunction=spawnFilter),
                                           dict(name="Signs", filterFunction=signFilter) ]
}

renders["caves"] = {
         "world": "righteouswrath",
         "title": "Overworld Caves",
         "rendermode": mycave,
         "dimension": "overworld",
         "markers": [   dict(name="Directions", filterFunction=directionFilter),
                                                dict(name="Major POIs", filterFunction=majorPOIFilter),
                                                #dict(name="Personal POIs", filterFunction=personalPOIFilter),
                                                #dict(name="Trading Posts", filterFunction=tradingPOIFilter),
                                                dict(name="Magic", filterFunction=otherFilter),
                  dict(name="Players", filterFunction=playerFilter),
                  dict(name="Player Spawns", filterFunction=spawnFilter),
                                           dict(name="Signs", filterFunction=signFilter) ]
}

renders["nether"] = {
         "world": "righteouswrath",
         "title": "Survival Nether",
         "rendermode": nether_smooth_lighting,
         "dimension": "nether",
         "markers": [   dict(name="Directions", filterFunction=directionFilter),
                                                dict(name="Major POIs", filterFunction=majorPOIFilter),
                                                #dict(name="Personal POIs", filterFunction=personalPOIFilter),
                                                #dict(name="Trading Posts", filterFunction=tradingPOIFilter),
                                                dict(name="Magic", filterFunction=otherFilter),
                  dict(name="Players", filterFunction=playerFilter),
                  dict(name="Player Spawns", filterFunction=spawnFilter),
                                           dict(name="Signs", filterFunction=signFilter) ]
}

renders["nethercaves"] = {
         "world": "righteouswrath",
         "title": "Nether Caves",
         "rendermode": mynethercave,
         "dimension": "nether",
         "markers": [   dict(name="Directions", filterFunction=directionFilter),
                                                dict(name="Major POIs", filterFunction=majorPOIFilter),
                                                #dict(name="Personal POIs", filterFunction=personalPOIFilter),
                                                #dict(name="Trading Posts", filterFunction=tradingPOIFilter),
                                                dict(name="Magic", filterFunction=otherFilter),
                  dict(name="Players", filterFunction=playerFilter),
                  dict(name="Player Spawns", filterFunction=spawnFilter),
                                           dict(name="Signs", filterFunction=signFilter) ]
}

renders["theend"] = {
         "world": "righteouswrath",
         "title": "The End",
         "rendermode": smooth_lighting,
         "dimension": "end",
         "markers": [   dict(name="Directions", filterFunction=directionFilter),
                                                dict(name="Major POIs", filterFunction=majorPOIFilter),
                                                #dict(name="Personal POIs", filterFunction=personalPOIFilter),
                                                #dict(name="Trading Posts", filterFunction=tradingPOIFilter),
                                                dict(name="Magic", filterFunction=otherFilter),
                  dict(name="Players", filterFunction=playerFilter),
                                           dict(name="Signs", filterFunction=signFilter) ]
}



outputdir = config.get('overviewer', 'outputdir')

# kate: space-indent off; indent-width 4; mixedindent off; indent-mode python;


If you use it verbatim with just a few changes, you'll also want the settings.cfg file i use:

[overviewer]
path: /home/moose/overviewer/minecraft-vanila-planetbob
outputdir: /home/moose/overviewer/minecraft-vanila-planetbob-overviewer
processes: 3


That file is generated by my scripts to handle more than one server. So you can probably just strip out all of the references to the extra config file..

The important bits are really just this:

def playerFilter(poi):
        "Player Locations"
        if poi['id'] == 'Player':
                poi['icon'] = "http://overviewer.org/avatar/%s" % poi['EntityId']
                return "Last known location for %s" % poi['EntityId']

def spawnFilter(poi):
        "Player Spawns"
        if poi['id'] == 'PlayerSpawn':
                poi['icon'] = "http://overviewer.org/avatar/%s" % poi['EntityId']
                return "%s's Spawn" % poi['EntityId']


And the following dict() entries in your "markers" field:

dict(name="Players", filterFunction=playerFilter),
                  dict(name="Player Spawns", filterFunction=spawnFilter),


To be honest I haven't touched this config at all in a long time. It's probably just luck that it still works.
<Zapata Prime> I smell Stanley... And he smells good!!!

Thorin

Thanks.  I figured that out shortly after posting, by going into developer tools and getting down to the actual icon displayed.  It works, huzzah!
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

LennyLen

I received this warning today when trying to view the map: This server could not prove that it is ov.mc.tomasu.net; its security certificate expired 8 days ago.

Tom

fixed, thanks for the report. Shouldn't happen again.
<Zapata Prime> I smell Stanley... And he smells good!!!

Thorin

Hey, some guy updated Overviewer for Minecraft 1.13!  See this github comment.  We should see if we can get it working.  Do you think you have some time for that, Tom?
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Tom

Quote from: Thorin on August 30, 2018, 07:39:05 PM
Hey, some guy updated Overviewer for Minecraft 1.13!  See this github comment.  We should see if we can get it working.  Do you think you have some time for that, Tom?
I /might/. depends on what I get put on after this current project I'm on.
<Zapata Prime> I smell Stanley... And he smells good!!!

Lazybones


Thorin

HOORAY

Now to get it set up for our community server (if that's still running).

I'm surprised how motivated I am to build stuff if I can get it to show up on an Overviewer again.  And this time I'm taking screenshots, not just putting links with coordinates.
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful