Object respawning/zh: Difference between revisions

no edit summary
(Created page with "== 商品 ==")
No edit summary
 
(38 intermediate revisions by the same user not shown)
Line 2: Line 2:




''曠野之息''裡的材料、武器、跟敵人會在一段時間後重生。這個機制是為了防止遊戲世界變得「太空曠」。確切的重生規則取決於每種東西的特性。
''曠野之息''裡的材料、武器、跟敵人會在一段時間後重生。這個機制是為了防止遊戲世界變得「太空曠」。確切的重生規則取決於每種東西的特性。


GameData 裡用來追蹤每個東西應該如何重生的 flag 叫做 "revival flags"(重生標籤)。這些 revival flags 無時無刻都存在遊戲的記憶體裡,即使是相應的物件可能並不存在。
GameData 裡用來追蹤每個東西應該如何重生的 flag 叫做 "revival flags"(復活標籤)。這些 revival flags 無時無刻都存在遊戲的記憶體裡,即使是相應的物件可能並不存在。


== 商品 ==
== 商品 ==


Shop items are revived every day at midnight, assuming the following conditions are satisfied:
商店裡賣的東西會在子夜時更新(商店會補貨),但是必須滿足下面這些條件:
* the player is in none of the areas that are associated with the shop item; alternatively the player is not on MainField (on the main map)
* 每件商品都會對應到一塊區域,玩家在補貨的當下不能處在個範圍內。
* and, for items with the Arrow tag, the player has fewer than 50<ref>This is configured by [[ActorInfo]] (itemSaleRevivalCount property).</ref> arrows of the relevant type in their inventory
* 箭類的物品只有在玩家持有少於 50 <ref>This is configured by [[ActorInfo]] (itemSaleRevivalCount property) .</ref> 個時才會補貨。


[1.3.1+] The inventory check function uses the player's real inventory data, not temporary quest inventory data. This means that warping into the Trial of the Sword or starting any other quest that temporarily clears the inventory in an attempt to trick [[GameDataMgr]] into restocking arrows no longer works.
[1.3.1+] 檢查玩家持有多少箭的函數會檢查玩家「真正的」口袋。所謂「假的」口袋則是指玩家在劍之考驗之類的特殊任務裡,物品欄會被暫時清空。換句話說,故意進入這些特殊任務不再會讓 [[GameDataMgr]] 誤以為玩家箭很少,進而補貨。


Revival flags for shop items have their [[ResetType]] set to 3.
商品的 Revival flags 裡,[[ResetType]] 這一項被設成 3。(意思是凡是設成 3 的物品都會遵守上面講的商店補貨的邏輯。)


=== The revival map grid ===
=== 重生用地圖網格 ===


The revival map grid is used for shop items and for randomly-respawned items. It is slightly different from the regular map unit grid and features 10 columns (0..9) and 8 rows (0..7).
上面提到的商品和另一類隨機重生的物件(下面會詳述)使用的地圖網格和正常的地圖網格有一點點不同。這裡用到的地圖網格有 10 columns (從 0 到 9)和 8 rows(從 0 到 7)。


Given an item located in column <code>itemCol</code> and row <code>itemRow</code>, the player is considered to not be in its map area ''if and only if'':
假設一件商品(或一個隨機重生的物件)位在第 <code>itemCol</code> 個 column 跟第  <code>itemRow</code> 個 row 裡,那麼玩家「不在指定區域內」的意思是
* itemCol < playerCol1
* itemCol < playerCol1
* or itemCol > playerCol2
* itemCol > playerCol2
* or itemRow < playerRow1
* itemRow < playerRow1
* or itemRow > playerRow2
* itemRow > playerRow2


where the player column and row values are calculated as follows:
玩家的位置(playerCol1、playerCol2、playerRow1、playerRow2)是這樣計算的:


<source lang="c++">
<source lang="c++">
Line 49: Line 49:
This grid is shown on the object map. It is also possible to show the no-revival area for an object by right clicking on it.
This grid is shown on the object map. It is also possible to show the no-revival area for an object by right clicking on it.


== Revival during blood moons (RevivalBloodyMoon) ==
== 血月後重生的物件 (RevivalBloodyMoon) ==


This policy is used for most weapons and enemies. Every time a [[blood moon]] occurs, all associated revival flags are reset to their initial value.
血月 [[blood moon]] 是大部分武器跟敵人重生的關鍵。每次血月出現後,所有跟血月有關的 revival flags 都會被重設為預設值。


Revival flags for objects under this policy have their [[ResetType]] set to 1.
對於這一類的物品,[[ResetType]] 這一項的值是 1。(換句話說,所有 ResetType 是 1 的物品都會在血月後復活。)


{{actor list|label='''Actors under the RevivalBloodyMoon policy'''|content=
{{actor list|label='''Actors under the RevivalBloodyMoon policy'''|content=
Line 383: Line 383:
}}
}}


== No automatic revival (RevivalNone) ==
== 不自動重生的物件 (RevivalNone) ==


Objects under the RevivalNone policy will not be automatically revived.
遵守 RevivalNone policy 的物件不會自動重生。這些物件的列表如下。


{{actor list|label='''Actors under the RevivalNone policy'''|content=
{{actor list|label='''Actors under the RevivalNone policy'''|content=
Line 488: Line 488:
}}
}}


== No drop revival (RevivalNoneForDrop) ==
== 不重複掉落的物件  (RevivalNoneForDrop) ==


Drops for objects under the RevivalNoneForDrop policy will not be revived. This is used for broken Guardians.
遵守 RevivalNoneForDrop policy 的物件也不會再次出現。這個類別主要包含了壞掉的守護者(眼睛不會亮的)底下的材料。


{{actor list|label='''Actors under the RevivalNoneForDrop policy'''|content=
{{actor list|label='''Actors under the RevivalNoneForDrop policy'''|content=
Line 498: Line 498:
}}
}}


== No revival for use flag (RevivalNoneForUsed) ==
== 不重複使用的物件 (RevivalNoneForUsed) ==


The use status for objects under the RevivalNoneForUsed policy will not be reset. This is notably used for terminals.
這一類的物件主要包含勇導石(林克拿希卡石去碰的東西),這些物件只能使用一次。


{{actor list|label='''Actors under the RevivalNoneForUsed policy'''|content=
{{actor list|label='''Actors under the RevivalNoneForUsed policy'''|content=
Line 567: Line 567:
}}
}}


== Random revival (RevivalRandom) ==
== 隨機重生的物件 (RevivalRandom) ==


Objects under the RevivalRandom policy will be revived at random times ''independently of'' blood moons. This is used for most materials (fruits, rocks, etc.)
RevivalRandom policy 底下包含的物件會在隨機時間點重生。此時間長短與紅月無關。這一類的物件主要是素材(植物、水果、石頭等)。


Revival flags for objects under this policy have their [[ResetType]] set to 0 and the position of the object on the main map is stored in the upper 7 bits of the initial flag value.
這些物件的 [[ResetType]] 是 0,and the position of the object on the main map is stored in the upper 7 bits of the initial flag value。


{{actor list|label='''Actors under the RevivalRandom policy'''|content=
{{actor list|label='''Actors under the RevivalRandom policy'''|content=
Line 830: Line 830:
}}
}}


=== RevivalRandom and RevivalRandomForDrop logic ===
=== 隨機重生跟隨機掉落的邏輯 ===


Every 60 seconds<ref>Time spent in menus and cutscenes does not count</ref>, [[RadarMgr]] determines where the player is on the revival grid.
每隔六十秒<ref>Time spent in menus and cutscenes does not count</ref>[[RadarMgr]] 會計算玩家在重生用網格上的位置。


If the player is on AocField (Trial of the Sword):
如果玩家在 AocField(劍之考驗)裡:
* Special flags (with the reset data set to 127) are ''skipped''.
* 某些特殊的 flags (with the reset data set to 127) 會被忽略而不重生.
* Any other revival flag has a ''1% chance'' of being reset.
* 其他物件有 ''1% 機率''重生。


Otherwise:
如果玩家不在劍之考驗裡,那麼檢查:
* If the player is on MainField, special flags have a ''1% chance'' of being reset.
* 如果玩家在主世界裡,上面講到的特殊的 flags ''1% 機率''重生。
* If the player is not on MainField, non-special flags also have a ''1% chance'' of being reset.
* 如果玩家不在主世界裡不特殊的 flags 也有 ''1% 機率''重生。
* In any other case, flags have a ''1% chance'' of being reset, but only if the player is not in the same map area as the object that is to be revived.
* 若以上皆非,那麼每個 flag 還是有 ''1% 機率''重生,前提是玩家跟該物件不處在同一個網格裡。


== Random drop revival (RevivalRandomForDrop) ==
== 隨機掉落的物件  (RevivalRandomForDrop) ==


Drops of objects under the RevivalRandom policy will be revived at random times ''independently of'' blood moons. This is used for wooden boxes and other things that contain materials (fruits, etc.)
RevivalRandomForDrop policy 底下包含的物件會在隨機時間點重生。此時間長短與紅月無關。這一類主要是打壞木箱後掉出來的東西(水果等)。


Revival flags for objects under this policy have their [[ResetType]] set to 0 and the position of the object on the main map is stored in the upper 7 bits of the initial flag value.
這些物件的 [[ResetType]] 是 0,and the position of the object on the main map is stored in the upper 7 bits of the initial flag value。


{{actor list|label='''Actors under the RevivalRandomForDrop policy'''|content=
{{actor list|label='''Actors under the RevivalRandomForDrop policy'''|content=
Line 890: Line 890:
}}
}}


== Revival whenever the Lord of the Mountain appears (RevivalUnderGodTime) ==
== 和山林霸主一起出現的物件 (RevivalUnderGodTim) ==


Objects under the RevivalUnderGodTime policy will be revived whenever the Lord of the Mountain appears (more precisely, when the AnimalMaster_Appearance flag is set by [[WorldMgr]]).
RevivalUnderGodTime policy 底下的物件會和山林霸主一起出現,也就是當 AnimalMaster_Appearance flag [[WorldMgr]] 設成 true 的時候。


Revival flags for objects under this policy have their [[ResetType]] set to 4.
對這類物件而言,[[ResetType]] 的值是 4。


{{actor list|label='''Actors under the RevivalUnderGodTime policy'''|content=
{{actor list|label='''Actors under the RevivalUnderGodTime policy'''|content=
translator
745

edits