SUMMERHOUSE

SUMMERHOUSE

Not enough ratings
Advanced Building Tools (Merging Save Files, Shifting entire Builds, Changing the Map, Replacing Specific Blocks)
By Dampfsalzig
Some simple Python scripts to let you be more creative :)

With this guide, you can build (or rather shift) your buildings out of bounds. You can import buildings from other save files by merging them. And you can change the map to your liking.
   
Award
Favorite
Favorited
Unfavorite
Changelog
  • 2024-05-19: Added remove.py and replace.py
  • 2024-04-25: Added Block IDs
  • 2024-04-18: Added zoom.py
Preamble
Before using any of the scripts you should back up your save files somewhere so that you don't accidentally delete all of your hard work.

For the merging script, I suggest that you always use the save slot 99 as the destination, because it is the Autosave slot, and that way you can always preview your merge safely.
Save file folder location
Windows: C:\Users\[YOUR USERNAME]\AppData\LocalLow\Friedemann\SUMMERHOUSE\Save
Mac: Dunno
Python and Scripts
These are Python scripts so you need to have Python installed.
If not already installed, download and install the latest Python version from here https://www.python.org/downloads/ .

The scripts can be executed over commandline. I will show examples further below (don't be afraid!).

Download the scripts and put them in the save file folder:
1) Go to https://github.com/Tjerbor/SUMMERHOUSE-Save-File-Editor .
2) Click on the green button <> Code.
3) Select "Download Zip" at the bottom of the drop-down menu and save it somewhere on your computer.
4) Open/Extract Zip file.
5) Copy "add_offset.py", "change_map.py", "merge.py", "remove.py", "replace.py" and "zoom.py" into the save file folder.

Here's how you can easily start cmd on Windows 10 directly in the save folder:
Just type "cmd" in the path bar there.


Some simple CMD tips:
  • Type for example "me" and then TAB to autocomplete to "merge.py".
  • Use the up and down arrow keys to access previously used commands.
How Coordinates Work in SUMMERHOUSE
A positive change in the X coordinate results in a shift to the right.
A negative change in the X coordinate results in a shift to the left.

A positive change in the Y coordinate results in an upward shift.
A negative change in the Y coordinate results in a downward shift.

A positive change in the Z coordinate pushes the objects further away.
A negative change in the Z coordinate pulls the objects closer.
(Depth)

You can actually measure distances yourself with this block:
It's almost exactly the size of one unit, so if you chain them like this you can measure distances:
In this example, the offset would be (if looking from the left top):
  • x = (4 + 3) = 7
  • y = (-3 - 4) = -7
Unfortunately, I have no solution to measuring depth (y) values.
Block IDs
Command Summary
[required argument]
(optional argument)

  • python change_map.py [save file number] [map]
  • python add_offset.py [number of save file] [x offset] [y offset] [z offset]
  • python merge.py [save file 1] [save file 2] [destination save file] (alignment) ([SF2 X offset] [SF2 Y offset] [SF2 Z offset])
  • python zoom.py [save file number] [zoom level]
  • python remove.py [save file number] [block id] (block id 2) (block id 3) (...)
  • python replace.py [save file number] [replacement pair] (pair 2) (pair 3) (...)
Change the Map of a Save
This one is so simple that it isn't really necessary but still faster than doing it by hand.
It allows you to change the map of a chosen save file. At the end of the save file, there's an attribute called "mapName". There are four maps to choose from:
  1. Lake
  2. Grass
  3. City
  4. Desert

How to use change_map.py:
python change_map.py [save file number] [map]
The map name is case-sensitive

Example:
This changes the map of saveFile3.json to "City"
python change_map.py 3 City

Add Offset to an entire Save file (Geometric Translation)
Take a look at how coordinates work in SUMMERHOUSE first.

How to use add_offset.py:
The offsets can be positive and negative integers or floating points.
python add_offset.py [number of save file] [x offset] [y offset] [z offset]

Example:
This command shifts all blocks from saveFile3.json 7 units to the right, 3.6 down, and stays on the same depth level (z=0).
python add_offset.py 3 7 -3.6 0
This command shifts all blocks from saveFile1.json 12 units up.
python add_offset.py 1 0 12 0
This command pushes all blocks from the Autosave slot (99) 30.72 units further away.
python add_offset.py 99 0 0 30.72
Merging two Save Files into one
You can pass multiple arguments to merge.py. I will provide examples for all of them.
The script copies all blocks from the second save file to the first and stores the result in the destination save file. The world and weather from save file 1 are always chosen.

How to use merge.py:
[required argument]
(optional argument)
python merge.py [save file 1] [save file 2] [destination save file] (alignment) ([SF2 X offset] [SF2 Y offset] [SF2 Z offset])

After every merge operation, the offset that's applied to the blocks of save file 2 is also printed on the console/terminal which can be useful for a variety of reasons.

1 - Basic Merge
python merge.py [save file 1] [save file 2] [destination save file]
This will simply copy the blocks from save file 2 into save file 1 and store the result in the destination save file.
Examples:
  • Add the blocks from save slot 5 to save 2 and stores it in the Autosave slot (99).
    python merge.py 2 5 99
  • Add the blocks from save slot 1 to save 7 and stores it back in 7.
    python merge.py 7 1 7
2 - Simple Merge
This time we add an offset to the blocks of save file 2. All three offsets must be specified, even if zero.
python merge.py [save file 1] [save file 2] [destination save file] [SF2 X offset] [SF2 Y offset] [SF2 Z offset]
Examples:
  • Add the blocks from save slot 5 to save 2, shift all blocks from save 2 7 units to the right and 3.6 down, and stores it in the Autosave slot (99).
    python merge.py 2 5 99 7 -3.6 0
  • Add the blocks from save slot 1 to save 7, shift all blocks from save 1 12 units up, and stores it back in 7.
    python merge.py 7 1 7 0 12 0
3 - Alignment Merge
The alignment merge automatically translates the blocks from save file 2 to a special point in save file 1 set by you.
python merge.py [save file 1] [save file 2] [destination save file] [alignment]
You mark the special point by putting exactly 3 of the white blossoms on the same spot.

The alignment point blocks get removed automatically after the merge.

(If you have put down 3 of these on the same spot somewhere in your build already, then this merge might confuse the points. If you have that problem please ask me in the guide's comments for help, or you can solve it yourself by:
  1. Choose a new block and get the ID from the block ID section of this guide.
  2. Open the merge.py script in a text editor.
  3. Goto line 67 (or search for the term "219").
  4. And replace 219 with your blockid.
  5. Save the script changes.
)
Now that you have set your alignment point, there are 6 alignment modes to choose from which can also be combined. The alignment modes for the same axis are obviously mutually exclusive (i.e. you can't align your build "left" and "right" at the same time.)
The modes are:

  • X:
    1. Left (l)
    2. Right (r)
  • Y:
    1. Bottom (b)
    2. Top (t)
  • Z:
    1. Close (c)
    2. Far (f)

The order of alignment characters used in commands matters. They must be specified in the XYZ order.
These are valid alignment string examples:
  • l
  • rc
  • lbf
  • t
  • bc

If we now for example execute this command:
python merge.py 1 2 3 r
Then:
  • Save 1 and 2 get merged into save 3.
  • The right-most block of save 2 is found and this block will have the same X-coordinate as the alignment point.
  • All other blocks from save 2 get shifted accordingly.
  • The Y and Z Coordinates of the save 2 blocks stay the same.
  • And lastly, the alignment point blocks get removed automatically.

Now with two modes at once:
python merge.py 1 2 3 rb
Then:
  • Save 1 and 2 get merged into save 3.
  • The right-most block of save 2 is found and this block will have the same X coordinate as the alignment point.
  • The lowest block of save 2 is found and will have the same Y coordinate as the alignment point.
  • All other blocks from save 2 get shifted accordingly.
  • The Z Coordinate of the save 2 blocks stays the same.
  • And lastly, the alignment point blocks get removed automatically.

And now with 3 at once:

python merge.py 1 2 3 rbf
Then:
  • Save 1 and 2 get merged into save 3.
  • The right-most block of save 2 is found and this block will have the same X coordinate as the alignment point.
  • The lowest block of save 2 is found and will have the same Y coordinate as the alignment point.
  • The block of save 2 that is the farthest away will have the same depth (Z Coordinate) as the alignment point.
  • All other blocks from save 2 get shifted accordingly.
  • No Coordinate stays the same.
  • And lastly, the alignment point blocks get removed automatically.
4 - Advanced Alignment Merge
This is just the alignment merge but it allows you to add an extra offset to the blocks of save file 2 after they have been aligned. All 3 coordinate offsets must be specified even if zero.
The entire offset equals to the sum of the alignment offset plus the extra offset.
python merge.py [save file 1] [save file 2] [destination save file] [alignment] [SF2 X offset] [SF2 Y offset] [SF2 Z offset]

Example:
python merge.py 6 5 99 r 5 0 1
  • Save 6 and 5 get merged into save 99 (Autosave slot).
  • The right-most block of save 5 is found and this block will have the same X coordinate as the alignment point.
  • All other blocks from save 5 get shifted accordingly.
  • The alignment point blocks get removed automatically.
  • After the alignment the blocks from save 5 are shifted 5 units to the right.
  • After the alignment the blocks from save 5 stay on the same height (Y = 0).
  • After the alignment the blocks from save 5 are pushed 1 unit further away.
Entire offset:
Setting Zoom Level
How to use zoom.py:
python zoom.py [save file number] [zoom level]
The default zoom values are between -5.0 (fully zoomed in) and -20.0 (fully zoomed out).
The problem is as soon as you touch the zoom level in-game again, it snaps back to the default interval.

Example:
python zoom.py 4 -60
Zooms out 40 more units in save file 4.
Remove Specific Block
How to use remove.py:
python remove.py [save file number] [block id] (block id 2) (block id 3) (...)

You can find the block ids for each block in the block id section of this guide.
When using the script at least one block id must be specified but you can add an unlimited amount of ids to be removed from the selected save file. I suggest that you back up your save file beforehand because this is irreversible in contrast to the previous tools.

Examples:
This command will remove all satellite dishes (id=64) from save file 4.
python remove.py 4 64

This command will remove all potted plants from save file 1.
python remove.py 1 29 30 31 152 153
Multi-Replace Specific Blocks
How to use replace.py:
python replace.py [save file number] [replacement pair] (pair 2) (pair 3) (...)

A replacement pair looks like this:
[original block id],[replacement block id]

You can find the block ids for each block in the block id section of this guide.
When using the script at least one replacement pair must be specified but you can add an unlimited amount of pairs to be replaced from the selected save file. I suggest that you back up your save file beforehand because this is irreversible.

Examples:
This command will replace all small wooden doors (129) with small glass doors (20) in save file 7.
python replace.py 7 129,20

This command will replace all grafitti with vines in save file 2.
python remove.py 2 36,123 37,124 38,223 39,223 40,124
2 Comments
Dampfsalzig  [author] Apr 16 @ 5:56pm 
Thanks. If you have any ideas for more editing tools, let me know :)
Makheon Apr 16 @ 2:37pm 
Honestly, the idea of being able to merge two files and push all the buildings from one into scenery is absolutely insane. I LOVE the idea and it would be so dope to be able to do this natively. Dope guide!!