更改

跳到导航 跳到搜索
删除2,185字节 、 2021年8月3日 (二) 17:02
无编辑摘要
第135行: 第135行:  
==高级==
 
==高级==
 
===编辑存档===
 
===编辑存档===
[[File:Editing a save in Sublime Text.png|thumb|A save file open in Sublime Text with formatted XML.]]
+
[[File:Editing a save in Sublime Text.png|thumb| 一个用Sublime Text 打开并按Xml格式化了的存档文件。]]
You can edit your save to fix some common issues or change your choices. '''This can permanently break your save if you make a mistake; don't forget to [[#Back up or transfer between two PCs|create a backup first]].''' You should also avoid automatic save editor tools, since they often break the save.
+
在编辑存档前,别忘记备份存档!
   −
# Install [https://www.sublimetext.com/ Sublime Text] for Linux, Mac, or Windows. (If you already have another text editor which supports XML formatting, feel free to use that instead.)
+
这里推荐的是Sublime Text 这个软件。当然,其他文本编辑软件也是可以的。
# Install the [https://packagecontrol.io/installation Package Control extension for Sublime Text].
  −
# Use the Package Control extension to install the ''Indent XML'' and ''XPath'' plugins (see [https://packagecontrol.io/docs/usage how to add plugins]).
  −
# Open [[#Find your save files|your save file]] (the file that looks like <tt>Name_0123456789</tt>) in Sublime Text.
  −
# Click Selection > Format > Indent XML.
  −
# Make any changes you want and save. (See the sections below, [https://www.reddit.com/r/StardewValley/comments/8i5z1j/guide_how_to_change_hosts_of_a_multiplayer_save/ this guide for changing the host of a co-op save], and [http://community.playstarbound.com/threads/save-file-editing-guide-for-solving-some-common-issues.110762/ this guide for other changes].)
     −
'''Tips:'''
+
步骤:
<ul>
+
# 安装[https://www.sublimetext.com/ Sublime Text](Linux、Mac、Windows三大系统均兼容)。
<li>Click an element, and press <tt>CTRL</tt> + <tt>SHIFT</tt> + <tt>[</tt> to collapse the whole section which contains it. This is useful when you want to ignore a large field. For example, given this text in the save file:
+
# 安装[https://packagecontrol.io/installation Sublime Text的插件管理器(Package Control)]。
<syntaxhighlight lang="xml">
+
# 通过插件管理器安装''Indent XML''和''XPath''插件(详见[https://packagecontrol.io/docs/usage 如何添加插件])。
<ArrayOfInt>
+
# 打开存档(比方说<tt>Name_0123456789</tt> ) 。
   <int>1981</int>
+
# 将文本以Xml格式显示。依次:菜单栏 - 选择 - Format - Indent XML。英文对照:Selection > Format > Indent XML。
   <int>0</int>
+
# 开始编辑存档吧。目前暂时只有一些英文教程:[https://www.reddit.com/r/StardewValley/comments/8i5z1j/guide_how_to_change_hosts_of_a_multiplayer_save/ 通过编辑联机模式存档来改变主机]、[http://community.playstarbound.com/threads/save-file-editing-guide-for-solving-some-common-issues.110762/ 改变一些常规数据]。
   <int>0</int>
  −
   <int>0</int>
  −
   <int>0</int>
  −
   <int>0</int>
  −
</ArrayOfInt>
  −
</syntaxhighlight>
  −
Click on one of the <tt><int></tt> fields and press those keys, and it will collapse into this:
  −
<syntaxhighlight lang="xml">
  −
<ArrayOfInt> [ …]
  −
</ArrayOfInt>
  −
</syntaxhighlight>
  −
</li>
  −
<li>Click any element, and look in the status bar to see the path to where you are in the save format (like <tt>/SaveGame/player/friendships/item[32]</tt>).</li>
  −
</ul>
      
===复制存档===
 
===复制存档===
 
 你可以复制一个存档来测试一些有特定目的的活动,而不必担心这些实验性活动更改了你的存档,并避免了为了测试一些选项而重开一个新存档的麻烦事。
 
 你可以复制一个存档来测试一些有特定目的的活动,而不必担心这些实验性活动更改了你的存档,并避免了为了测试一些选项而重开一个新存档的麻烦事。
   −
# [[#Find your save files|Find your save files]].
+
# [[# 游戏存档位置| 找到存档位置]]
# Create the new save folder:
+
# 存档复制第二份,放在与原存档相同的目录下。
## Duplicate the target save folder.
+
# 此时系统必会让你重命名,因为同一个文件夹下不能有两个同名的文件。以以下规则重命名:
## Rename the new folder:
+
#* 新名字你得分辨得出来,不要过几天你就忘记这个存档是做什么的了。
##* change the name so you can recognise it in-game;
+
#* 结尾的那一串数字,这里称作存档的尾号。每个存档尾号都是不同的。
##* change the number at the end to any number that's not used by another save.
+
# 以下所有操作都在此复制过来的文件夹里进行。
## Open the new folder for the next steps.
+
# 一些文件:
# Prepare the new files:
+
## 删除以 <tt>_old</tt> <tt>.back.*</tt> 结尾的文件。
## Delete any file whose name ends with <tt>_old</tt> or <tt>.back.*</tt>.
+
## 重命名存档文件:找到像 <tt>Name_0123456789</tt> 的文件,重命名,新名字与刚刚文件夹的重命名相同。
## Rename the file that looks like <tt>Name_0123456789</tt> to match your new folder name.
+
# 存档元数据:
# Edit the save metadata:
+
## 记事本打开 <tt>SaveGameInfo</tt> 文件。
## Open the <tt>SaveGameInfo</tt> file in a text editor like Notepad.
+
## 找到第一行<code>&lt;name&gt;</code> 节点,后面就是玩家的名字。改成新名字。
## Look for <code>&lt;name&gt;</code> on the first line. Your farmer's name should be right after that. Change it to your new name.
+
# 主存档:
## Search for the 2nd mention of your name (ctrl+f to 'find') and change it to your new name.
+
## 记事本打开类似于 <tt>Name_0123456789</tt> 文件。
# Edit the save file:
+
## 同样找到第一行<code>&lt;name&gt;</code> 节点,后面就是玩家的名字。改成新名字。
## Open the file that looks like <tt>Name_0123456789</tt> in a text editor like Notepad.
+
## ctrl+f 查找<code>uniqueIDForThisGame<code>,后面那串数字就是你之前存档的尾号,将其改成重命名后的尾号。
## Look for <code>&lt;name&gt;</code> on the first line. Your farmer's name should be right after that. Change it to your new name.
  −
## Search for the 2nd mention of your name (ctrl+f to 'find') and change it to your new name.
  −
## Search for the old save ID (the number from the filename). Change it to your new number.
     −
That's it! Launch the game and check the load menu; you'll see both saves now.
+
完事了,现在游戏里应该同时能看到原存档和你刚刚复制的存档了。
    
===更改农场类型===
 
===更改农场类型===
 
 你可以通过更改游戏存档文件来变更你的[[农场地图|农场类型]]:
 
 你可以通过更改游戏存档文件来变更你的[[农场地图|农场类型]]:
 
<ol>
 
<ol>
<li>[[#Edit a save|Open your save file for editing]].</li>
+
<li>[[# 编辑存档| 打开存档]] </li>
<li>Search for <tt>&lt;whichFarm&gt;</tt>. The number after that open tag is the farm type.</li>
+
<li> 搜索 <tt>&lt;whichFarm&gt;</tt> ,后面跟着的那个数字就是农场类型。
<li>Change the number to the one you want:
   
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! code
+
! 数字
! farm type
+
! 农场类型
 
|-
 
|-
 
| 0
 
| 0
| standard farm
+
| 标准农场
 
|-
 
|-
 
| 1
 
| 1
| riverland farm
+
| 河流农场
 
|-
 
|-
 
| 2
 
| 2
| forest farm
+
| 森林农场
 
|-
 
|-
 
| 3
 
| 3
| hilltop farm
+
| 山顶农场
 
|-
 
|-
 
| 4
 
| 4
| wilderness farm
+
| 荒野农场
 
|-
 
|-
 
| 5
 
| 5
| four corners farm
+
| 四角农场
 
|}
 
|}
 
</li>
 
</li>
 
</ol>
 
</ol>
   −
That will change the farm map, but everything placed on the farm will stay where it is. You may have things in an invalid position, like trees in a lake. Here are some ways to fix that:
+
这仅仅更改了地图,但是所有在农场上的东西(像树、草、灌木丛、箱子等等)该在哪还是在哪。因此,可能会有一些东西超出边界或者跑到水里。解决方法如下:
    
<ul>
 
<ul>
<li>Take note of what's out of bounds, then switch back to the old farm type and move them.</li>
+
<li> 两种用mod的方法:</li>
<li>If you [[Modding:Player Guide/Getting Started|use SMAPI]], install the {{nexus mod|3900|Noclip Mode}} mod to reach things that are out of bounds, so you can remove or move them.</li>
+
<li>{{nexus mod|3900| 穿墙mod(Noclip Mode }} ,通过穿墙(水也能穿)来打掉错位的物品。</li>
<li>If you [[Modding:Player Guide/Getting Started|use SMAPI]], enter one of these commands in the SMAPI console:
+
<li>SMAPI 自带一个控制台命令mod(Console Commands),以下一些命令可能适合:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! command
+
! 命令
! effect
+
! 作用
 
|-
 
|-
 
| <code>world_clear farm debris</code>
 
| <code>world_clear farm debris</code>
| remove stones, branches, weeds, and dead crops.
+
| 移除农场的石头、树状、杂草、枯萎的作物。
 
|-
 
|-
 
| <code>world_clear farm trees</code>
 
| <code>world_clear farm trees</code>
| remove non-fruit trees.
+
| 移除农场所有的树(除了果树)。
 
|-
 
|-
 
| <code>world_clear farm fruit-trees</code>
 
| <code>world_clear farm fruit-trees</code>
| remove fruit trees.
+
| 移除农场所有的果树。
 
|-
 
|-
 
| <code>world_clear farm grass</code>
 
| <code>world_clear farm grass</code>
| remove tall grass.
+
| 移除农场所有的草。
 
|-
 
|-
 
| <code>world_clear farm everything</code>
 
| <code>world_clear farm everything</code>
| remove ''everything'', including placed objects.
+
| 移除所有放置在农场的东西,包括以上所有,还包括所有的“物品”(比如箱子、熔炉、宝石复制机等等)。
 
|}</li>
 
|}</li>
 
</ul>
 
</ul>
   −
===移除一个NPC===
  −
You can remove an NPC from your save file (e.g. to fix an NPC permanently stuck in an invalid place). If it still exists in the game data, the NPC will respawn when you reload the save file. This should be a last resort, and is unnecessary when using SMAPI versions 3.0 and up, as SMAPI will attempt to remove this data for you.
  −
  −
# [[#Edit a save|Open your save file for editing]]. Make sure you format the file for readability per those instructions.
  −
# Remove the NPC:
  −
## Search for the NPC's default name between 'name' tags (e.g. to remove Penny: <tt>&lt;name&gt;Penny&lt;/name&gt;</tt>).
  −
## Remove the entire 'NPC' section containing the line you found, starting from the previous <tt>&lt;NPC&gt;</tt> line up to and including the next <tt>&lt;/NPC&gt;</tt> line.
  −
# ''(optional)'' Remove the NPC friendship data:
  −
## Search for the NPC's default name between 'string' tags (e.g. to remove Penny: <tt>&lt;string&gt;Penny&lt;/string&gt;</tt>).
  −
## Remove the entire 'item' section containing the line you found, starting from the previous <tt>&lt;item&gt;</tt> line up to the next <tt>&lt;/item&gt;</tt> line.
      
[[Category:游戏玩法]]
 
[[Category:游戏玩法]]
50

个编辑

导航菜单