Save-game editing

From Stellaris Wiki
Jump to navigation Jump to search

Version

Outliner top.png
This article may contain outdated information that is inaccurate for the current version of the game. It was last updated for 2.1.

This article is for the PC version of Stellaris only.

This article details Stellaris save game format and how to edit them. As a reminder, always make a backup copy of your save file before editing!

Location (Steam Version)[edit]

OS Location
Windows %USERPROFILE%\Documents\Paradox Interactive\Stellaris\save games\$EMPIRENAME+ID\
Mac $HOME/Documents/Paradox Interactive/Stellaris/save games/$EMPIRENAME+ID
Linux $HOME/.local/share/Paradox Interactive/Stellaris/save games/$EMPIRENAME+ID ($XDG_DATA_HOME is ignored!)
Linux (newer versions) $STEAMFOLDER/userdata/$STEAMID/281990/remote/save games/$EMPIRENAME+ID

Cloud saves cannot be edited.

Location (Paradox Launcher Version)[edit]

OS Location
Windows %USERPROFILE%\Documents\Paradox Interactive\Stellaris Plaza\save games\$EMPIRENAME+ID\
Mac ???
Linux $HOME/.local/share/Paradox Interactive/Stellaris Plaza/save games/$EMPIRENAME+ID ($XDG_DATA_HOME is ignored!)

Format[edit]

Each .sav file is a ZIP archive containing two text files: gamestate and meta. They include all the game state data and the meta-information that is shown on the load game screen.

The game seems to be unusually picky about the format when loading:

  • The files within the ZIP archive must use UNIX-style newlines. Windows Notepad will not save the newlines correctly, so another editor such as Notepad++ must be used.
  • The files within the ZIP archive must have correct timestamps. See OS-specific instructions below.

Compression on Windows[edit]

Options for 7-Zip

Use 7-Zip with the following options:

  • Archive format: zip
  • Compression method: Deflate
  • Do not include NTFS timestamps (tc=off parameters in bottom left of 7-Zip, or use a version equal to 9.12 beta or earlier)

Do not use WinRAR as it messes compressed lines.

Compression on Linux or macOS[edit]

Use Apple's Archive Utility app to unzip the .sav game file. To do that:

Navigate and select Archive Utility app
1. Right-click the .sav file and click Open With > Other...
2. Navigate to: <computer_name>/System/Library/ CoreServices/Applications
3. In the Choose Application dialog change Enable option to All Applications
4. Select the Archive Utility, then click Open

A folder appears with the same name as the .sav file containing the gamestate and meta files. Edit using any text editor able to save in Unix LF format.

Put the save back together using:

   zip -X output.sav gamestate meta

The -X flag is needed to "eXclude eXtra file attributes".

Alternatively, run this Python script from the directory containing the gamestate and meta files.

Save Attributes[edit]

gamestate File Details[edit]

Nearly any information about a given playthrough can be modified via editing the gamestate file. This includes current energy, mineral, food and unity stores, as well as planet tiles and pop traits. The following is an example of a populated tile on a Fallen Empire's planet, containing a dark matter power plant.

0={ active=yes pop=127 resources={ minerals={1.000 1.000 0.000} } building={ type="building_dark_matter_power_plant" modifier=yes } deposit="d_mineral_deposit" )

Stellaris Savegame Editor[edit]

There is also an Alpha Version of a Windows-Forms-Based Savegame Editor.

Users have to select the Empire / Species in the left list view. Traits from Synthetic Dawn for machine empire's are not included yet.

The Alpha Version has probably lots of Bugs and Problems, but the following stuff should be possible:

1. Setting the Game Root Folder in Settings Section. This is necessary to parse the gamefiles for valid options for Techs and Traits

2. Opening Savegame Files

3. Parsing the savegame files in a dependency tree-like structure

4. Showing the extracted properties (like empires, planets) in there corresponding tabs

5. Selecting an empire in Technology-Tab: Indication of researched technologies. Checking / Unchecking of Technologies

6. Selecting an empire in Traits-Tab: Indication of selected Traits Checking / Unchecking of Traits

7. Seeing all planets in Planet Tabs - All Planets List

8. Filtering all Planets List by a string to find your planet faster

9. Seeing the selected Planets tiles (View is ugly. Red Color indicates a tile-blocker, checked checkboxes indicate population. Both not modifiable yet)

10. Seeing the selected tiles resource modifiers and there values. Values can be changed (from 1.000 to 100.000 for example). New Modifiers can be added.

11. It's not possible yet to add new resource modifiers to tiles without a resource modifier yet.

12. Saving the modified savegame: Stores the new savegame like: original savegame name + mod.sav

Download Link