Save Games

Save games store information about the state of your game. These save games can be found on your local disk. They can be edited with online tools.

### File Location

#### Windows

By default, Unity engine stores games on the C drive. You will be able to find the saved games at location:

```
C:\Users\<user>\AppData\LocalLow\Raw Lion Workshop\Sailwind

```

You can access your AppData folder in Windows by pressing `Windows + R,` opening the `Run` program in windows and typing in `appdata`.

#### Steam Deck (Proton)

```
/home/deck/.steam/steam/steamapps/compdata/1764530/pfx/drive_c/users/steamuser/AppData/LocalLow/Raw Lion Workshop/Sailwind

```

(Be aware that on Linux paths are case sensitive).

For fast access you should create a link somewhere where you can find it easily. For that:

1. `right click in the folder` you want to create a link
2. Select `+ Create new` then `🔗 Link to File or Directory...`
3. Name the link `Sailwind AppData`
4. Paste in the directory path from above

### Structure

Save games are stored as `slot<i>.save` where the "i" will be a number from 0 to 5. These numbers correspond to the save game boxes on the UI in the game. The box on the top left corner will be `slot0.save`, the box in the middle at the top `slot1.save` and the box at the bottom right will correspond to `slot5.save`.

By default your very first game is saved as `slot1.save`.

When you're backing up files for purpose of either editing or safe-keeping specific milestones reached you can use any name other than these. E.g. `sanbuq-100k.save`. When you want to ever return to that state you can simply rename it back to fit any of the 6 slots.

### Online editor

For editing values inside the .save files you can use an online editor like SaveEditOnline which allows you to upload any .save file of your choice, edit the different values and then download the resultant file again.

In the linked editor you can edit all values that are in green between the parenthesis. Simply click the value you would like to edit and type in a new value in the box that pops up and click OK. The value should now be updated. Once done editing, the button to download your edited file will be at the very bottom of the page.

The save game editor will return the same named file to you that you've uploaded. Because of this it is highly recommended that when you want to save an edit, back it up simply by copying it. This way if things don't quite work out the way you had envisioned, it is easy to reinstate the original save game.

#### Popular changes

##### Money

* For Al'Ankh Lions edit item `currency[0]`
* For Emerald Dragons edit item `currency[1]`
* For Aestrin Crowns edit item `currency[2]`
* For Gold edit item `currency[3]`

##### Reputation

* For Al'Ankh Archipelago Reputation edit item `playerReputation[0]` (60000 for max. missions allowed)
* For Emerald Archipelago Reputation edit item `playerReputation[1]` (60000 for max. missions allowed)
* For Aestrin Archipelago Reputation edit item `playerReputation[2]` (60000 for max. missions allowed)

##### Food

* edit item `food` (0 is no food and will start decreasing the foodDebt bar, 100 is full bar)
* edit item `foodDebt` (generally should be 100)

##### Sleep

* edit item `sleep` (0 is no sleep and will start decreasing the sleepDebt bar, 100 is full bar)
* edit item `sleepDebt` (generally should be 100)

##### Time (time of day)

* edit item `time` ; time in hours and decimal hours. e.g. `8` is 8 AM while `11.5` is 11:30 AM

##### Player Location

The player location is represented in the save game as `savedObjects > 0`. Edit the x, y and z coordinates in order to change the location of the saved player.

Any items held in inventory will be gone unless you can figure out which savedPrefabs they are and what their new locations should be after moving your player. More information is currently not yet available on this.

##### Ships

To "purchase" a ship, find its corresponding `savedObjects` number below, then change `extraSetting > 0` to `extraSetting > 1`

Ships for purposes of moving them consist of an object that is the ship itself and 4 objects that represent the mooring lines. The mooring lines have a property for their coordinates, and also have the `extraSetting` property, which can be either '0' or '1' indicating whether or not the mooring rope is tied to something (dock). Before 'moving' your ship to a distant location make sure these values are set to '0'!

Any items on the ships are left behind on the location it is moved from. Unless each and every `savedPrefab` on your ship is also moved to the new location they will be lost once the player is out of range (e.g. by moving player by editing the player coordinates as well).

###### Dhow (Neverdin)

* name: `savedObjects > 1`
* x-coordinate: -48887.85
* y-coordinate: -0.59
* z-coordinate: -45942.21
* mooring ropes are `savedObjects 2 - 5`

###### Kakam (Crab Beach)

* name: `savedObjects > 26`
* x-coordinate: 43984.67
* y-coordinate: -0.8
* z-coordinate: -38773.09
* mooring ropes are `savedObjects 28 - 30`

###### Cog (Siren Song)

* name: `savedObjects > 11`
* x-coordinate: 5215.72
* y-coordinate: -0.5
* z-coordinate: 42778.67
* mooring ropes are `savedObjects 12 - 15`

###### Sanbuq (Gold Rock City)

* name: `savedObjects > 6`
* x-coordinate: -43702.22
* y-coordinate: -0.2
* z-coordinate: -44105.18
* mooring ropes are `savedObjects 7 - 10`

###### Junk (Dragon Cliffs)

* name: `savedObjects > 21`
* x-coordinate: 42994.3
* y-coordinate: -0.88
* z-coordinate: -41923.99
* mooring ropes are `savedObjects 22 - 25`

###### Brig (Fort Aestrin)

* name: `savedObjects > 16`
* x-coordinate: 5621.64
* y-coordinate: -0.03
* z-coordinate: 38988.47
* mooring ropes are `savedObjects 17 - 20`

##### Other locations

###### Happy Bay (dock)

* x-coordinate: 32255
* y-coordinate: 2.11
* z-coordinate: -5765

###### Oasis (dock)

* x-coordinate: -45683
* y-coordinate: 1.71
* z-coordinate: -29275

#### Editing Items

In SaveEditOnline, items are shown as SavedPrefabs > *##* > *Setting* *name* **data.**

In the image, a red box is drawn around SavedPrefab #54. That number could be anything, each time the game creates a new item, in a shop, from fishing, from accepting a mission, it will add a new SavedPrefab number.

Each SavedPrefab will have:

* prefabIndex ## This is how the game knows *what* the item is. 79 is a fishing hook, for example
* position > Three position entries, X, Y, and Z, tell the game *where* the item is
* rotation > Three entries for rotation, X, Y, and Z, tell the game *how* the item is pointed
* inventorySlot This tells the game if the item is stored in the player's inventory
	+ -1 means no
	+ 0, 1, 2, 3, or 4 means it is in the first, second, etc slot
* isSold This might mean if the item can be sold to a shop keeper
* itemHealth Is the item *cooked*, and how cooked is it
* itemAmount How *much* of the item is there, for things like boxes of bananas It's possible health and amount got recorded backwards during testing.
* itemMissionIndex This tell the game *which* mission the item is for
	+ -1 means it is not part of a mission and can't be turned into the harbor
	+ a number from 0 to however many missions you've taken means this item must be turned into the harbor mission giver for that mission to be completed

##### PrefabIndex IDs

These are *some* of the prefab index numbers found. Some index numbers cause the game to freeze on trying to load the save. More testing needs to be done to find the rest of the numbers, however SaveEditOnline has a limit on the number of times you can upload/edit/download files in an hour. It is unknown exactly how many IDs are used, but it is at least up to 185.

1. Box of Salmon
2. Box of Dates
3. Box of Coconuts
4. Box of Lamb
5. Box of Tea
6. Box of Tuna
7. Box of Cheese
8. Box of Goat Cheese
9. Box of Sunspot fish
10. Barrel of \*\*
11. Barrel of \*\*
12. Barrel of \*\*
13. Barrel of \*\*
14. Box of North fish
15. Box of Sausages
16. Box of Pork
17. Box of Bananas
18. Box of Trout
19. Box of Eel
20. Box of Gems
21. Box of Iron
22. Box of Gold
23. Box of Copper
24. Box of Spices
25. Box of Grain
26. Box of Medicine
27. Box of Seafood
28. Box of Silk
29. Box of Goods
30. Box of Books
31. Temple fish
32. Sunspot fish
33. Salmon
34. Eel
35. Blue Shimertail
36. Trout
37. North Fish
38. Blackfin Hunter fish
39. Pork
40. Sausage
41. Bottle (size 10)
42. Kabob
43. Bread (long)
44. Banana
45. Fish (cut)
46. Tuna
47. *Doesn't load*
48. *Doesn't load*
49. *Doesn't load*
50. Bread (round)
51. (Cube of food, name wasn't recorded during testing)
52. Cheese wedge
53. Cheese wheel
54. Pork
55. Empty bottle\*
56. Empty bottle\*
57. Empty bottle\*
58. Empty bottle\*
59. Empty bottle\*
60. Low bed
61. Simple bed
62. Fancy bed
63. Four-post bed
64. Table\*
65. Table\*
66. Table\*
67. Table\*
68. Table\*
69. Table (large square)
70. *Doesn't load*
71. Firewood (single)
72. Table (long\*)
73. Table (big\*)
74. Table\*
75. Chair\*
76. Chair\*
77. Table (small\*)
78. Table (small\*)
79. Fish Hook
80. Al'Ankh Compass
81. Jade\* Compass
82. Aestrin\* compass
83. Al'Ankh Chronocompass\*
84. Jade\* Chronocompass\*
85. Aestrin\* Chronocompass\*
86. Aestrin\* Suncompass\*
87. *Doesn't load*
88. *Doesn't load*
89. *Doesn't load*
90. Sextant
91. Instructions scroll (open)
92. Chip log\*
93. Al'Ankh Chip log
94. Mop
95. Fishing Pole
96. Elixr
97. Snake oil
98. *Doesn't load*
99. Fish Hook (Seems unlikely that there would be two types of fish hook, needs rechecking)
100. Empty mug

( \* - Possibly incorrect style of item, possibly swapped chronocompass and sun compass, or specific type of item not recorded during testing)

(\*\* - During testing, the boxes and barrels were spawned empty, which means some are unknown what the contents should be as they displayed as "empty barrel")

### Automatic saves

The game saves any time you sleep. Sometimes this can be far and in between. People experiencing game crashes often find a lot of time is lost when relying on this mechanism. To work around this a small Powershell script (Windows) can be used from the Sail Wind directory/folder that will save the game periodically for you.

#### Use of the script:

1. create a new file in your Sail Wind directory with a `.cmd` extension e.g. `auto-save.cmd`
2. copy code below into the file and save it
3. open the CMD window `windows + R`, navigate to your Sail Wind directory and run the file!

By default file with name `slot0.save` is backed up every 5 minutes. When you're playing another save/slot simply pass the filename as an argument. E.g.: `C:/> auto-save.cmd slot2.save`

Edit sleep value or default file value when/where necessary to your own liking.

```
@echo off
rem This script saves the game every 5 minutes and keeps up to 5 save-games. To change the interval, simply change the value in seconds in the powershell command
set DEFAULT\_GAME=slot0.save
if [%1] == [] (set SAVE\_GAME=%DEFAULT\_GAME%) else (set SAVE\_GAME=%1)
echo %CD%
:start
powershell -nop -c "& {sleep 300}"
rem create timestamp
set CUR\_YYYY=%date:~6,4%
set CUR\_MM=%date:~3,2%
set CUR\_DD=%date:~0,2%
set CUR\_HH=%time:~0,2%
if %CUR\_HH% lss 10 (set CUR\_HH=0%time:~1,1%)
set CUR\_NN=%time:~3,2%
set CUR\_SS=%time:~6,2%
set CUR\_MS=%time:~9,2%
set TIMESTAMP=%CUR\_YYYY%%CUR\_MM%%CUR\_DD%-%CUR\_HH%%CUR\_NN%%CUR\_SS%

rem save backup of savegame
COPY /B "%CD%\%SAVE\_GAME%" "%CD%\%SAVE\_GAME%-%TIMESTAMP%"

setlocal enableDelayedExpansion
set /a ID=0
for %%f in ( DIR /b /on %SAVE\_GAME%-\* ) do (
  set filename[!ID!]=%%~f
  set /a ID+=1
)
set filename

if %ID% GEQ 9 (
  DEL %filename[3]%
)

endlocal

goto start

```