Last active
May 2, 2017 17:26
-
-
Save EvilSupahFly/675ff15da96ef5d55fb4c493d406c676 to your computer and use it in GitHub Desktop.
Overviewer Render Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################### | |
######## https://gist.github.com/aperson/2644002 ######## | |
######################################################### | |
worlds["Resquer"] = "/home/seann/minecraft_server/Chateau de Resquer_venture Server" | |
processes = 8 | |
def cauldronFilter(poi): | |
if poi['id'] == "Cauldron": | |
return "Brew Stand with %s" % len(poi['Items']) | |
def portalFilter(poi): | |
if poi['id'] == 'Portals': | |
return poi['name'] | |
def signFilter(poi): | |
if poi['id'] == 'Sign': | |
return "\n".join([poi['Text1'], poi['Text2'], poi['Text3'], poi['Text4']]) | |
def customSignFilter(poi): | |
import re | |
if poi['id'] == 'Sign': | |
text_list = [poi['Text1'], poi['Text2'], poi['Text3'], poi['Text4']] | |
tag = None | |
for i in range(0,len(text_list)): | |
if text_list[i].find("#") > -1: | |
text_trunc = text_list[i][text_list[i].find("#"):len(text_list[i])] | |
if text_trunc.find(" ") > -1: | |
tag = str(text_trunc[1:text_trunc.find(" ")]).lower() | |
else: | |
tag = str(text_trunc[1:len(text_trunc)]).lower() | |
tag = re.sub(r'[^\w\\/@+\-:,|#]+', '', tag) | |
if tag != None and tag != "" and tag != " ": | |
poi['icon'] = "icons/"+tag+".png" | |
return "\n".join(text_list) | |
def screenshotFilter(poi): | |
# '''This looks for signs that have their first line in the 'Image:<id>' format, where <id> is an id from an Imgur.com image.''' | |
if poi['id'] == 'Sign': | |
if poi['Text1'].startswith('Image:'): | |
poi['icon'] = "painting_icon.png" | |
image_html = "<style>.infoWindow img[src='{icon}'] {{display: none}}</style><a href='http://imgur.com/{id}'><img src='http://imgur.com/{id}s.jpg' /></a>".format(icon=poi['icon'], id=poi['Text1'][6:]) | |
return "\n".join([image_html, poi['Text2'], poi['Text3'], poi['Text4']]) | |
def playerIcons(poi): | |
# '''This finds the players and formats the popup bubble a bit. TODO: Work in health, armor, and hunger''' | |
def meterHelper(meter, icon, reversed=False, spacer=False): | |
# '''Helper function for playerFilter() that builds a pretty bar for hunger/armor/health/etc. | |
# We're going to make the assumption that for every icon, there is the equivalent half_icon, | |
# and empty_icon.''' | |
if spacer: | |
empty = 'blank.gif' | |
else: | |
empty = 'empty_{}'.format(icon) | |
full_icons = ''.join(["<img src='{}' />".format(icon) for i in range(int(meter // 2))]) | |
half_icons = ''.join(["<img src='half_{}' />".format(icon) for i in range(int(meter % 2))]) | |
blank_icons = ''.join(["<img src='{}' />".format(empty) for i in range(int(10 - ((meter // 2) + (meter % 2))))]) | |
if reversed: | |
return blank_icons + half_icons + full_icons | |
else: | |
return full_icons + half_icons + blank_icons | |
# Dict of defese points Each row goes leather/cm/iron/diamond/gold and each column is helm/chest/pants/shoes | |
# Everything is doubled so we can feed it easier into metaHelper() | |
armor = {298 : 1, 299 : 3, 300 : 2, 301 : 1, | |
302 : 2, 303 : 5, 304 : 4, 305 : 1, | |
306 : 2, 307 : 6, 308 : 5, 309 : 2, | |
310 : 3, 311 : 8, 312 : 6, 313 : 3, | |
314 : 2, 315 : 5, 316 : 3, 317 : 1} | |
if poi['id'] == 'Player': | |
poi['icon'] = "http://cravatar.tomheinan.com/{}/16".format(poi['EntityId']) | |
image_html = "<style>.infoWindow img[src='{}'] {{display: none}}</style><img src='http://overviewer.org/avatar/{}' />".format(poi['icon'], poi['EntityId']) | |
#calculate the defense points | |
defense_points = 0 | |
for i in poi['Inventory']: | |
if i['Slot'] in (100, 101, 102, 103): | |
defense_points += armor[i['id']] | |
return "\n".join([image_html, meterHelper(defense_points, 'armor.png') + meterHelper(poi['Air'] // 15, 'bubble.png', reversed=True, spacer=True), | |
meterHelper(poi['Health'], 'heart.png') + meterHelper(poi['foodLevel'], 'hunger.png', reversed=True), | |
"Current location for {}".format(poi['EntityId']), "X:{} Y:{} Z:{}".format(poi['x'], poi['y'], poi['z'])]) | |
def bedFilter(poi): | |
# '''This finds the beds and formats the popup bubble a bit.''' | |
if poi['id'] == 'PlayerSpawn': | |
poi['icon'] = 'bed_icon.png' | |
image_html = "<style>.infoWindow img[src='{}'] {{display: none}}</style><img src='http://cravatar.tomheinan.com/{}/16' />".format(poi['icon'], poi['EntityId']) | |
return "\n".join([image_html, "Current spawn point for {}".format(poi['EntityId']), "X:{} Y:{} Z:{}".format(poi['x'], poi['y'], poi['z'])]) | |
def playerSpawns(poi): | |
if poi['id']=='PlayerSpawn': | |
poi['icon']="bed.png" | |
return "Spawn for %s" % poi['EntityId'] | |
def beaconFilter(poi): | |
if poi['id'] == 'Beacon': | |
return "%s" % poi['Levels'] | |
def screenshotFilter(poi): | |
#This looks for signs that have their first line in the 'Image:<id>' format, where <id> is an id from an Imgur.com image. | |
if poi['id'] == 'Sign': | |
if poi['Text1'].startswith('Image:'): | |
poi['icon'] = "icons/painting_icon.png" | |
image_html = "<style>.infoWindow img[src='{icon}'] {{display: none}}</style><a href='http://imgur.com/{id}'><img src='http://i.imgur.com/{id}s.jpg' /></a>".format(icon=poi['icon'], id=poi['Text1'][6:]) | |
return "\n".join([image_html, poi['Text2'], poi['Text3'], poi['Text4']]) | |
def chestFilter(poi): | |
if poi['id'] == "Chest": | |
return ("Chest", "Chest with %d items" % len(poi['Items'])) | |
renders["Resquerday"] = { | |
"world": "Resquer", | |
"title": "Chateau de Resquer Daytime", | |
"rendermode": smooth_lighting, | |
"dimension": "overworld", | |
'markers': [dict(name="Players", filterFunction=playerIcons, checked=True), | |
dict(name='Spawns',filterFunction=playerSpawns, checked=True), | |
dict(name="Portals", filterFunction=portalFilter), | |
dict(name="Signs", filterFunction=signFilter), | |
dict(name="Chests", filterFunction=chestFilter, createInfoWindow=True), | |
dict(name="Brew Stands", filterFunction=cauldronFilter), | |
dict(name="Beacons", filterFunction=beaconFilter), | |
#dict(name="Nether", filterFunction=netherFilter), | |
], | |
} | |
renders["Resquernight"] = { | |
"world": "Resquer", | |
"title": "Chateau de Resquer Nighttime", | |
"rendermode": smooth_night, | |
"dimension": "overworld", | |
'markers': [dict(name="Players", filterFunction=playerIcons, checked=True), | |
dict(name='Spawns',filterFunction=playerSpawns, checked=True), | |
dict(name="Portals", filterFunction=portalFilter), | |
dict(name="Signs", filterFunction=signFilter), | |
dict(name="Chests", filterFunction=chestFilter, createInfoWindow=True), | |
dict(name="Brew Stands", filterFunction=cauldronFilter), | |
dict(name="Beacons", filterFunction=beaconFilter), | |
#dict(name="Nether", filterFunction=netherFilter), | |
], | |
} | |
renders["ResquerCaveB"] = { | |
"world": "Resquer", | |
"title": "Chateau de Resquer Underground", | |
"rendermode": cave, | |
"dimension": "overworld", | |
'markers': [dict(name="Players", filterFunction=playerIcons, checked=True), | |
dict(name='Spawns',filterFunction=playerSpawns, checked=True), | |
dict(name="Portals", filterFunction=portalFilter, icon="icons/tempist_portal.png"), | |
dict(name="Signs", filterFunction=signFilter), | |
dict(name="Chests", filterFunction=chestFilter, icon="icons/marker_star_red.png", createInfoWindow=True), | |
dict(name="Brew Stands", filterFunction=cauldronFilter, icon="Brewing_Stand.png"), | |
dict(name="Beacons", filterFunction=beaconFilter, icon="icons/Beacon.png"), | |
dict(name='ScreenCaps',filterFunction=screenshotFilter, icon="icons/painting_icon.png"), | |
#dict(name="Nether", filterFunction=netherFilter), | |
], | |
} | |
renders["Resquernether"] = { | |
"world": "Resquer", | |
"title": "Nether", | |
"rendermode": nether_smooth_lighting, | |
"dimension": "nether", | |
'markers': [dict(name="Players", filterFunction=playerIcons, checked=True), | |
dict(name='Spawns',filterFunction=playerSpawns, checked=True), | |
dict(name="Portals", filterFunction=portalFilter), | |
dict(name="Signs", filterFunction=signFilter), | |
dict(name="Chests", filterFunction=chestFilter, createInfoWindow=True), | |
dict(name="Brew Stands", filterFunction=cauldronFilter), | |
dict(name="Beacons", filterFunction=beaconFilter), | |
#dict(name="Nether", filterFunction=netherFilter), | |
], | |
} | |
#texturepath = "/home/seann/minecraft/resourcepacks/Flows_HD_1.11_128x.zip" | |
outputdir = "/media/seann/1_TB_Torrents/Maps/Resquer_Screwy_Nether_Normal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2017-05-02 12:32:30 E An error has occurred. This may be a bug. Please let us know! | |
See http://docs.overviewer.org/en/latest/index.html#help | |
This is the error that occurred: | |
Traceback (most recent call last): | |
File "/usr/bin/overviewer.py", line 624, in <module> | |
ret = main() | |
File "/usr/bin/overviewer.py", line 131, in main | |
g.genPOI.main() | |
File "/usr/lib/python2.7/dist-packages/overviewer_core/aux_files/genPOI.py", line 528, in main | |
handlePlayers(worldpath, list(worldpath_filters), markers) | |
File "/usr/lib/python2.7/dist-packages/overviewer_core/aux_files/genPOI.py", line 344, in handlePlayers | |
result = filter_function(data) | |
File "/home/seann/Documents/overviewer-config.py", line 307, in playerIcons | |
defense_points += armor[i['id']] | |
KeyError: u'minecraft:diamond_boots' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment