WorldMgr/zh: Difference between revisions

Updating to match new version of source page
No edit summary
(Updating to match new version of source page)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<!--T:1-->
<!--T:1-->
{{Subsystem infobox|name=WorldMgr|init_addr_switch150=00000071010F2920|is_name_official=1|description=控制世界的狀態(時間、血月、氣候、天氣、等等。)}}
{{Subsystem infobox|name=WorldMgr|init_addr_switch150=00000071010F2920|is_name_official=1|description=Manages world state (time, blood moons, climates, weather, etc.)}}


World Manager (WorldMgr) 是遊戲裡的一個子系統。 它控制時間、血月、氣候、天氣、霧、風、閃電、雲、山林霸主的出現等等。
World Manager (WorldMgr) 是遊戲裡的一個子系統。 它控制時間、血月、氣候、天氣、霧、風、閃電、雲、山林霸主的出現等等。
Line 51: Line 51:
* "Bloody Moon end reserve timer" is set to 0.(這個計時器不是用來倒數血月何時出現的那個,下面會詳述。)
* "Bloody Moon end reserve timer" is set to 0.(這個計時器不是用來倒數血月何時出現的那個,下面會詳述。)


<div class="mw-translate-fuzzy">
=== TimeMgr::reset ===
=== TimeMgr::reset ===
This is called whenever a stage is unloaded (essentially every time the loading screen is shown). 意思是凡是讀檔就會呼叫這個函數。
This is called whenever a stage is unloaded (essentially every time the loading screen is shown). 意思是凡是讀檔就會呼叫這個函數。
* 血月相關檢查會被延後。
* 血月相關檢查會被延後。
* 山林霸主的 flag 會被設為 false,意思是不要出現。
* 山林霸主的 flag 會被設為 false,意思是不要出現。
</div>


=== TimeMgr::calc ===
=== TimeMgr::calc ===
Line 129: Line 131:
'''附註''': 這個模式跟模式 0 不一樣的地方在於血月計時器既不更新也不檢查。  
'''附註''': 這個模式跟模式 0 不一樣的地方在於血月計時器既不更新也不檢查。  
|}
|}
* Update the [[#Day/night time flag]], the [[#Time division, IsMorning, IsNoon, etc.]]
* 更新 [[#日夜標籤]],更新 [[#晨午暮夜標籤]]
* If the "Bloody Moon end reserve timer" is non zero, decrement it. If the new value is zero, the WM_BloodyDay flag is cleared.
* If the "Bloody Moon end reserve timer" is non zero, decrement it. If the new value is zero, the WM_BloodyDay flag is cleared.(這個計時器不是用來倒數血月何時出現的那個,下面詳述。)
* Update [[#Lord of the Mountain]] flags.
* 更新 [[#山林霸主]] flags.


=== 子夜檢查 ===  
=== 子夜檢查 ===  
下面這些是子夜檢查的內容(就是每次時間從 360.0 變成 0.0 的時候做的事情)。
下面這些是子夜檢查的內容(就是每次時間從 360.0 變成 0.0 的時候做的事情)。


增加 WM_NumberOfDays。
增加 WM_NumberOfDays(總共過了幾個遊戲天)。


'''If a Blood Moon is scheduled''' (WM_BloodyDay is true):
'''如果「血月該出現了」'''
*If Blood Moons are prohibited (see conditions below), set the Blood Moon timer to 2880.0.
(如果 WM_BloodyDay 是 true)(可以看到東方有紅色滿月就是這個狀態,雙子驛站的西納巴岡會告訴你內心有股騷動。)
*If they are allowed to happen, call [https://eventviewer.zeldamods.org/viewer.html?data=/d/Demo011_0.json&params=1 Demo011_0] and set the Blood Moon timer to 0.0.


'''Scheduling new Blood Moons''':
* 如果沒辦法出現血月(下面有列原因),血月計時器會被設在 2880.0。
*If the FirstTouchdown flag is set (i.e. if the player has left the Great Plateau), and if the Blood Moon timer is > 2520.0 (7 in-game days):
* 如果血月可以出現,播放 [https://eventviewer.zeldamods.org/viewer.html?data=/d/Demo011_0.json&params=1 Demo011_0](又到了紅月出現的時刻,林克你要小心), 然後血月計時器歸零。
**WM_BloodyDay is set to true, which means that a Blood Moon is scheduled for the next night.
 
**The Blood Moon timer is reset to 0.0.
'''「好久沒有血月了」'''
 
* 如果 FirstTouchdown flag is set(出台地了)而且血月計時器 > 2520.0 (遊戲內過了整整七天,營火快轉不算):
** WM_BloodyDay 設為 true,代表下個子夜檢查時就會執行上面的「血月該出現了」。
** 血月計時器歸零。
* Otherwise, the "Bloody end reserve timer" is set to 150. This ensures that the WM_BloodyDay flag is cleared 5 in-game minutes (= 5 seconds in real life) after a Blood Moon occurs.
* Otherwise, the "Bloody end reserve timer" is set to 150. This ensures that the WM_BloodyDay flag is cleared 5 in-game minutes (= 5 seconds in real life) after a Blood Moon occurs.


Line 160: Line 165:
* SkyMgr's field_2B4 is set to 15 and field_2B8 >= 1.0
* SkyMgr's field_2B4 is set to 15 and field_2B8 >= 1.0


請注意:即使血月被阻止,血月計時器也不會歸零,還是會繼續增加。這些理由也不能阻止 WM_BloodyDay from being set。
請注意:即使血月被阻止,血月計時器也不會歸零,還是會繼續增加。這些理由也不能阻止 WM_BloodyDay 被設成 true。
 
注意二:瓦‧魯達尼亞看似沒有在這個表裡,但是瓦‧魯達尼亞會去設 BloodyMoonProhibition,所以血月還是不會出現。
 
=== 日夜標籤 ===


Note: Vah Rudania is missing from the list. This is normal and blood moons still cannot happen during the Vah Rudania battle sequence because the BloodyMoonProhibition flag is set during it.
這些標籤讓程式的其他部分可以用有語義的方式檢查現在是早上還是晚上等等。


=== Day/night time flag ===
From 00:00 to 06:00 (closed interval) and from 18:00 to 00:00 (closed interval), WM_DaytimeFlag is set to false and WM_NighttimeFlag is true.
From 00:00 to 06:00 (closed interval) and from 18:00 to 00:00 (closed interval), WM_DaytimeFlag is set to false and WM_NighttimeFlag is true.
In any other case, WM_DaytimeFlag is set to true and WM_NighttimeFlag to false.


In any other case, WM_DaytimeFlag is set to true and WM_NighttimeFlag to false.
In any other case, WM_DaytimeFlag is set to true and WM_NighttimeFlag to false.
Line 171: Line 181:
=== Time division, IsMorning, IsNoon, etc. === <!--T:26-->
=== Time division, IsMorning, IsNoon, etc. === <!--T:26-->
{|class="wikitable"
{|class="wikitable"
! Start !! End !! Division !! Time type (1) !! Time type (2)
! !! !! Division !! Time type (1) !! Time type (2)
|-
|-
| 04:00 || 05:00 || 0 || MorningA || Morning_A1
| 04:00 || 05:00 || 0 || MorningA || Morning_A1
Line 192: Line 202:
|}
|}


Note: all intervals include the start time and exclude the end time.
筆記:上述的時間區間左閉右開。


=== 月相 ===
=== 月相 ===
Line 204: Line 214:
山林霸主會在 AnimalMaster_Appearance flag 是 true 的時候出現。 山林霸主出不出現是由一個有限狀態自動機控制的。
山林霸主會在 AnimalMaster_Appearance flag 是 true 的時候出現。 山林霸主出不出現是由一個有限狀態自動機控制的。


Note that whenever a stage is unloaded, the AnimalMaster_Appearance flag is reset to false.
再次強調:只要讀檔,山林霸主就會消失。


====State 0 沈默狀態====
====State 0 沈默狀態====
Line 223: Line 233:


====State 3 準備消失狀態====
====State 3 準備消失狀態====
「兩天之後」 or 「『過了一天』且『現在的小時 >= 出現的小時』」,山林霸主消失。 (意思是山林霸主只會維持整整 24 遊戲內小時/現時分鐘。)
「兩天之後」 or 「『過了一天』且『現在的小時 出現的小時』」,山林霸主消失。 (意思是山林霸主只會維持整整 24 遊戲內小時/現時分鐘。)


====State 4 熄滅狀態====
====State 4 熄滅狀態====
等月相是 5 的時候再進到 State 0.
等月相是 5(眉月)的時候再進到 State 0.


== WeatherMgr ==
== WeatherMgr ==
Line 232: Line 242:
=== Weather types ===
=== Weather types ===
{|class="wikitable"
{|class="wikitable"
! 值 !! Name
! 值 !!
|-
|-
| 0 || Bluesky
| 0 || Bluesky
Line 254: Line 264:


<!--T:40-->
<!--T:40-->
[[Category:Internals]]
[[Category:Internals{{#translation:}}]]
[[Category:Subsystems (BotW)]]
[[Category:Subsystems (BotW){{#translation:}}]]
826

edits