(merge from offical wiki) |
小 (文本替换 - 替换“Category:Modding]]”为“Category:模组制作]]”) |
||
第105行: | 第105行: | ||
{{ModdingNavbox}} | {{ModdingNavbox}} | ||
[[Category: | [[Category: 模组制作]] |
2022年3月8日 (二) 01:49的最新版本
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)[编辑 | 编辑源代码]
OS | Location |
---|---|
Windows auto saves (including ironman saves) | %USERPROFILE%\Documents\Paradox Interactive\Stellaris\save games\$EMPIRENAME+ID\
|
Windows custom saves | \Steam\userdata\%STEAMUSERID%\281990\remote\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 can be edited.
Here are the cloud saves locations:
OS | Location |
---|---|
Mac | ~/Library/Application Support/Steam/userdata/<YOUR STEAM ID>/281990/remote/save games/ |
Location (Paradox Launcher Version)[编辑 | 编辑源代码]
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!)
|
Location (GamePass Launcher Version)[编辑 | 编辑源代码]
OS | Location |
---|---|
Windows | %USERPROFILE%\Documents\Paradox Interactive\Stellaris GamePass\save games\$EMPIRENAME+ID\
|
Format[编辑 | 编辑源代码]
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.
- When zipping the files, you should select the two text files and create a new .sav archive from those files. If you try to zip the folder containing the edited files, you will get a broken save error when trying to load the game. Move the new .sav into the main save folder
Compression on Windows[编辑 | 编辑源代码]
Use 7-Zip with the following options:
- Archive format: zip
- Compression speed: Fast
- 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.
By using the edit function in the 7zip file manager (the editor needs to be chosen by going to tools then options then editor and putting a link to editor of chice) the file can be edited and then once the file is closed 7zip will automatically re-compress the file to ensure no issues
Compression on Linux or macOS[编辑 | 编辑源代码]
Use Apple's Archive Utility app to unzip the .sav game file. To do that:
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.
An easier way to compress the saves on Mac is to highlight the two files, left click and click "Compress 2 Items". A .zip file named Archive.zip will appear: left click on this and click "Get Info". Under the "Name & Extension" section, click the box containing Archive.sav and change .zip to .sav. You will be prompted for confirmation on changing the extension.
Save Attributes[编辑 | 编辑源代码]
gamestate File Details[编辑 | 编辑源代码]
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" )
帝国 | 帝国 • 思潮 • 政府 • 国民理念 • 起源 • 承诺 • 议程 • 传统 • 飞升天赋 • 法令 • 政策 • 遗珍 • 科技 • 自定义帝国 |
人口 | 岗位 • 派系 |
领袖 | 领袖 • 领袖特质 |
物种 | 物种 • 物种特质 |
行星 | 行星 • 行星特征 • 轨道矿藏 • 建筑 • 区划 • 行星决议 |
星系 | 星系 • 恒星基地 • 巨型结构 • 虫洞 • 星门 • 地图 |
舰队 | 舰队 • 舰船 • 部件 |
地面战 | 陆军 • 轰炸姿态 |
外交 | 外交 • 联邦 • 星海共同体 • 评价修正 • 宣战理由 • 战争目标 |
事件 | 事件 • 异常现象 • 特殊项目 • 考古遗址 |
游玩 | 游玩 • 定义 • 研究 • 经济 • 游戏开局 |
动态修改 | 动态 • 指令效果 • 触发条件 • 作用域 • 修正 • 变量 • AI |
媒体/本地化 | Maya 导出器 • 图形 • 肖像 • 旗帜 • 事件图片 • 界面 • 图标 • 音乐 • 本地化 |
Other | 控制台命令 • 存档编辑 • Steam 创意工坊 • 模组制作教程 |