StellarisDB

How to edit a Stellaris save

A Stellaris save (.sav) is a zip of two text files, gamestate and meta. Unzip it, change the lines below in a text editor, zip both back and load. On Windows the saves are in Documents\Paradox Interactive\Stellaris\save games, in a folder for each empire. For resources, traits and government the console does the same without touching the file, except in Ironman and multiplayer.

Where are Stellaris save files?

SystemFolder
WindowsDocuments\Paradox Interactive\Stellaris\save games
macOS~/Documents/Paradox Interactive/Stellaris/save games
Linux~/.local/share/Paradox Interactive/Stellaris/save games
  • Each empire gets its own folder there, and each save is one .sav file named by its in-game date.
  • If Windows keeps your Documents in OneDrive, the folder is under OneDrive\Documents instead.
  • Ironman games save to one file and keep it in sync with the cloud. The game says: "Ironman requires Steam Cloud to be enabled and for the user to be logged into Steam."

What is inside a .sav file

A .sav is an ordinary zip archive with two files and no folders: meta, the short summary the load menu shows (version, name, date, required_dlcs, player_portrait, flag and counts of fleets and planets), and gamestate, the whole game. Both are plain text. The game's own tutorial save, on its first day (2200.01.01), unpacks to a 16.5 MB gamestate; a save a few centuries in is much bigger.

  1. Copy the save somewhere safe first. Edit the copy.
  2. Open the .sav with any zip tool (7-Zip, or rename it to .zip) and take out both files.
  3. Open gamestate in a text editor that copes with large files. Search for the lines below.
  4. Save it as plain text, keeping the name gamestate with no extension.
  5. Zip gamestate and meta together, both at the top of the archive, and rename the zip to .sav in the same folder.
  6. Load it from the game's load menu.

Lines to change

Shown as the game's tutorial save writes them. Keep the quotes, the braces and one line per value.

Find your empire

Near the top, player gives your country number (country=0 in a single-player game started as the first empire). Then search for country={ and the line 0={ under it: everything until its closing brace is your empire.

Resources

Inside your country, the stockpile is a list of resource IDs and amounts:

modules={
	standard_economy_module={
		resources={
			energy=100
			minerals=100
			food=200
			influence=100
			consumer_goods=100
			alloys=100
		}
	}
}
Every resource ID (27)
ResourceID
Energy Creditsenergy
Mineralsminerals
Foodfood
Physics Researchphysics_research
Society Researchsociety_research
Engineering Researchengineering_research
Influenceinfluence
Unityunity
Tradetrade
Consumer Goodsconsumer_goods
Alloysalloys
Volatile Motesvolatile_motes
Exotic Gasesexotic_gases
Rare Crystalsrare_crystals
Living Metalsr_living_metal
Zrosr_zro
Dark Mattersr_dark_matter
Nanitesnanites
Minor Artifactsminor_artifacts
Astral Threadsastral_threads
Biomassbiomass
Menacemenace
Valorintegrity
Willpowerwillpower
Advanced Logicadvanced_logic
Feral Insightferal_insight
Crystallized Entropyentropy_crystals

Ethics

Your empire's ethics are one line each. An empire's ethics must add up to 3 points: a fanatic ethic counts twice. IDs: ethics.

ethos={
	ethic="ethic_fanatic_egalitarian"
	ethic="ethic_xenophile"
}

Civics, origin and authority

All in the government block. Empires start with 2 civic points. IDs: civics, origins, authorities.

government={
	authority="auth_democratic"
	civics={
		"civic_beacon_of_liberty"
		"civic_idealistic_foundation"
	}
	origin="origin_default"
}

Species traits

Species live in their own list near the top, species_db, each under a number. Your country names its species by that number (founder_species_ref). IDs: species traits.

traits={
	trait="trait_adaptive"
	trait="trait_nomadic"
	trait="trait_wasteful"
	trait="trait_pc_continental_preference"
}

Galaxy settings and Ironman

The settings you picked when the galaxy was made are kept together, Ironman among them:

galaxy={
	ironman=no
	difficulty=cadet
	aggressiveness=low
	crisis_type=any
	mid_game_start=100
	end_game_start=200
	victory_year=300
}

What breaks a save

Our estimate, from how the save is built. The game prints no list of its own.

  • A missing or extra brace. The game reads the file as nested blocks, so everything after the mistake lands in the wrong place.
  • Deleting a thing other blocks point at by number: a species, a planet, a fleet, a leader. The pointers stay and lead nowhere.
  • An ID that your version of the game does not know, or that needs a DLC you do not have. The summary lists the DLC a save needs.
  • Ethics that do not add up to 3 points, or opposite ethics together. The game may load it and then refuse changes on the government screen.
  • Editing a save from an older version of the game. The summary keeps the version it was made with.

The same with the console

Open the console with the key under Esc. The arguments are as the game writes them.

To getCommandTakesThe game's help line
Any resource, by its ID from the table aboveresource<Resource>Gives the player specified resource
Energy creditscash<Amount>Gives the player some money
Mineralsminerals<Amount>Gives the player some minerals
Alloysalloys<Amount>Gives the player some alloys
Influenceinfluence<Amount>Gives the player some Influence
Unityunity<Amount>Gives the player some unity
Every resource to its capmax_resourcesSets all available resources to the maximum value
A species traitadd_trait_speciesSpecies IndexAdd a trait to a species Species trait IDs
Take a species trait awayremove_trait_speciesSpecies IndexRemove a trait from a species Species trait IDs
Ethics of a group of popsadd_ethic_popPop Group IDAdd ethic to an amount in a pop group Ethic IDs
Change ethics, civics and authority at any timefree_governmentToggles allowing player to change government without time limit
A technologyresearch_technology<technology key> <research prerequisites> (0/1, optional)Research the given technology Technology IDs
Write the running game out as a text savedebug_dumpgamestate<filename suffix>Dump Gamestate data save as text file
Check that the game saves and loads cleanlycheck_saveCheck save and load persistence

Every command: console commands.

Ironman, achievements and the console

  • In Ironman mode, console commands are disabled and the game is automatically saved regularly to a single file. In games played with this setting, there is no turning back.
  • When you open the console there, the game answers: "Console not available in multiplayer or ironman mode."
  • Saving is disabled in Ironman mode. The one Ironman file is the only save.
  • The game says: "The use of any debug commands will disable achievements." It also lists the reasons achievements are off: "Ironman Mode is not enabled" and "Checksum is Modified".

Save editing: questions

Where are Stellaris save files?

On Windows in Documents\Paradox Interactive\Stellaris\save games, in a folder for each empire. On macOS in ~/Documents/Paradox Interactive/Stellaris/save games, on Linux in ~/.local/share/Paradox Interactive/Stellaris/save games.

How do I open a Stellaris .sav file?

It is a zip archive. Open it with any zip tool and you get two text files, gamestate and meta. Edit gamestate, zip both back at the top of the archive and rename the zip to .sav.

How do I give myself resources without editing the save?

Open the console and use cash, minerals, alloys, influence or unity with an amount, or resource with a resource ID for the rest. The console is off in Ironman and multiplayer, and any debug command turns achievements off.

Can I turn Ironman off in a save?

Ironman is one line of the galaxy settings in gamestate (ironman=no in a normal game). The game keeps an Ironman game in one file that it syncs with Steam Cloud.

From the game files · Stellaris Corona Borealis v4.6.0 (3d1a).

Spotted a mistake on this page, or have an idea for the site?