Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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