Overview
Snapshot files hold the data for the custom/saved levels that can be loaded in the underground area below the Treehouse. By modifying these files with a text editor, you can make playable levels that aren’t normally possible.
Extracting and editing your snapshot files
The files can be found in these directories:
Windows:
Mac:
NOTE: If you want to modify a shared level you downloaded with a code, you need to save a local copy (press Esc while playing the level)
The snapshot files that the game generates are actually just XML files compressed with LZMA. What this means is you can change the file extension from ‘.snapshot’ to ‘.lzma’ and unpack the file with your favorite decompression tool. (if you don’t have a favorite, there’s 7-zip for Windows[www.7-zip.org] or The Unarchiver for Mac[unarchiver.c3.cx]) If you open the new decompressed file in a text editor, it should look something like this.[pastebin.com]
XML is mostly human-readable, so its pretty easy to read and modify the snapshot data. I recommend using a tool like this[xmlbeautifier.com] to make the XML more readable. After you finish modifying the XML, make sure to save the file in the snapshots directory and use the “.snapshot” file extension. You don’t need to re-compress the modified file, the game handles plaintext XML snapshot files without any problem.
Snapshot file syntax
There are two types of XML nodes, scene and block. Every snapshot has a bunch of block nodes beneath a single scene node. As far as I can tell, the only attributes of scene nodes are levelSceneName and saveFormatVersion. levelSceneName indicates which level the snapshot uses, such as “Rooftops.” saveFormatVersion is always “1” and will probably be used to keep track of snapshot file formats if the developers decide to change something in the future.
The block tags define each platform/trap/coin placed in the level. It’s attributes specify the block’s type, position, rotation, and connections to other blocks. Here is my understanding of the attributes I’ve found:
sceneID: Unique identifier of the block
blockID: Number corresponding to the type of block (for example, Crossbows have a blockID of 18)
pX: X-coordinate of the block’s position
pY: Y-coordinate of the block’s position
pZ: Always “0”
rX: Always “0”
rY: Always “0”
rZ: Number of degrees the block is rotated
sX: Always “1”
sY: Always “1”
sZ: Always “1” (changing to “0” makes the block invisible)
clockwise: “1” if the block is rotating clockwise
parentID: sceneID of the block that this block is glued to
parentAttachmentPoint: Location of glue on the parent block
teleporterDestinationID: sceneID of the teleporter connected to this teleporter
placeableID: A different unique identifier (but I have no idea what its for)
When placed, glue blocks seem to spawn a bunch of other block nodes with additional attributes that I haven’t seen anywhere else:
mainID: sceneID of original glue block
subElementName: Always “GluePiece”
Experiment
Modifying these attributes lets you do some things that are not possible with just the in-game level editor, like placing multiple blocks in the same position, rotating blocks at 45 degree angles or making blocks invisible. This guide is definitely not comprehensive, so experiment with modifying snapshot files yourself and let me know what you find!