Skip to content

Instantly share code, notes, and snippets.

@dlew
Created November 1, 2017 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlew/d21d700634a4fb9cfa05ebfc089be111 to your computer and use it in GitHub Desktop.
Save dlew/d21d700634a4fb9cfa05ebfc089be111 to your computer and use it in GitHub Desktop.
Simple Python script that tells you all the current artifact spots on a Stardew Valley save
import xml.etree.ElementTree as ET
tree = ET.parse('/path/to/save/file')
root = tree.getroot()
locations = root.find('locations')
for location in locations:
name = location.find('name').text
objects = location.find('objects')
for thing in objects:
data = thing.find('value').find('Object')
thingName = data.find('name').text
if thingName == 'Artifact Spot':
tileLocation = data.find('tileLocation')
x = tileLocation.find('X').text
y = tileLocation.find('Y').text
print name + ": " + "x=" + x + " y=" + y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment