WorldMgr: Difference between revisions

Jump to navigation Jump to search
881 bytes added ,  4 years ago
no edit summary
mNo edit summary
No edit summary
Line 1: Line 1:
<languages/>
<languages/>
<!--T:1-->
<!--T:1-->
{{Subsystem infobox|name=WorldMgr|init_addr_switch150=00000071010F2920|is_name_official=1|description=Manages world state (time, blood moons, climates, weather, etc.)}}
{{Subsystem infobox|name=WorldMgr|init_addr_switch150=00000071010F2920|is_name_official=1|description=<translate>Manages world state (time, blood moons, climates, weather, etc.</translate>)}}


<translate>
<!--T:2-->
<!--T:2-->
The '''World Manager''' (WorldMgr) is responsible for managing time, blood moons, climates, weather, fog, wind, lighting, procedural generation of clouds, whether the Lord of the Mountain appears, etc.
The '''World Manager''' (WorldMgr) is responsible for managing time, blood moons, climates, weather, fog, wind, lighting, procedural generation of clouds, whether the Lord of the Mountain appears, etc.
Line 13: Line 14:
=== Sub-managers ===
=== Sub-managers ===
Sub-managers are created in WorldMgr::init (0x71010F43C0) and inserted into a pointer array (@WorldMgr+0x5c0). All names below are unofficial.
Sub-managers are created in WorldMgr::init (0x71010F43C0) and inserted into a pointer array (@WorldMgr+0x5c0). All names below are unofficial.
</translate>


<!--T:5-->
<!--T:5-->
{|class="wikitable"
{|class="wikitable"
|+ Sub-managers by ID
|+ <translate>Sub-managers by ID</translate>
! ID !! Description
! <translate>ID</translate> !! <translate>Description</translate>
|-
|-
| 0 || <translate>TimeMgr: Handles time, blood moons, Lord of the Mountain.</translate>
| 0 || <translate>TimeMgr: Handles time, blood moons, Lord of the Mountain.</translate>
Line 38: Line 40:
|}
|}


<translate>
=== Climate === <!--T:6-->
=== Climate === <!--T:6-->
The main WorldMgr class is responsible for keeping climate related parameters and determining which set of climate settings to use. Strangely enough, WorldMgr uses the position of the Camera actor to figure out which map area the player is in (and thus what climate to use), not the Player actor.
The main WorldMgr class is responsible for keeping climate related parameters and determining which set of climate settings to use. Strangely enough, WorldMgr uses the position of the Camera actor to figure out which map area the player is in (and thus what climate to use), not the Player actor.
Line 69: Line 72:
<!--T:13-->
<!--T:13-->
* '''Update time of day''': there are several possible update modes. In most cases, the update mode is 0.
* '''Update time of day''': there are several possible update modes. In most cases, the update mode is 0.
</translate>
{|class="wikitable"
{|class="wikitable"
! Mode !! Description
! <translate>Mode</translate> !! <translate>Description</translate>
|-
|-
| 0 || <translate>
| 0 || <translate>
Line 80: Line 84:
</translate>
</translate>
|-
|-
| 1, 13, 35 || Freeze time to 04:00
| 1, 13, 35 || <translate>Freeze time to 04:00</translate>
|-
|-
| 2, 14 || Freeze time to 05:00
| 2, 14 || <translate>Freeze time to 05:00</translate>
|-
|-
| 3, 16, 36 || Freeze time to 07:00
| 3, 16, 36 || <translate>Freeze time to 07:00</translate>
|-
|-
| 4, 19, 37 || Freeze time to 10:00
| 4, 19, 37 || <translate>Freeze time to 10:00</translate>
|-
|-
| 5, 26, 39 || Freeze time to 17:00
| 5, 26, 39 || <translate>Freeze time to 17:00</translate>
|-
|-
| 6, 28, 40 || Freeze time to 19:00
| 6, 28, 40 || <translate>Freeze time to 19:00</translate>
|-
|-
| 7, 30, 41 || Freeze time to 21:00
| 7, 30, 41 || <translate>Freeze time to 21:00</translate>
|-
|-
| 8, 11 || Freeze time to 02:00
| 8, 11 || <translate>Freeze time to 02:00</translate>
|-
|-
| 9, 42 || Freeze time to 00:00
| 9, 42 || <translate>Freeze time to 00:00</translate>
|-
|-
| 10 || Freeze time to 01:00
| 10 || <translate>Freeze time to 01:00</translate>
|-
|-
| 12 || Freeze time to 03:00
| 12 || <translate>Freeze time to 03:00</translate>
|-
|-
| 15 || Freeze time to 06:00
| 15 || <translate>Freeze time to 06:00</translate>
|-
|-
| 17 || Freeze time to 08:00
| 17 || <translate>Freeze time to 08:00</translate>
|-
|-
| 18 || Freeze time to 09:00
| 18 || <translate>Freeze time to 09:00</translate>
|-
|-
| 20 || Freeze time to 11:00
| 20 || <translate>Freeze time to 11:00</translate>
|-
|-
| 21 || Freeze time to 12:00
| 21 || <translate>Freeze time to 12:00</translate>
|-
|-
| 22, 38 || Freeze time to 13:00
| 22, 38 || <translate>Freeze time to 13:00</translate>
|-
|-
| 23 || Freeze time to 14:00
| 23 || <translate>Freeze time to 14:00</translate>
|-
|-
| 24 || Freeze time to 15:00
| 24 || <translate>Freeze time to 15:00</translate>
|-
|-
| 25 || Freeze time to 16:00
| 25 || <translate>Freeze time to 16:00</translate>
|-
|-
| 27 || Freeze time to 18:00
| 27 || <translate>Freeze time to 18:00</translate>
|-
|-
| 29 || Freeze time to 20:00
| 29 || <translate>Freeze time to 20:00</translate>
|-
|-
| 31 || Freeze time to 22:00
| 31 || <translate>Freeze time to 22:00</translate>
|-
|-
| 32 || Freeze time to 23:00
| 32 || <translate>Freeze time to 23:00</translate>
|-
|-
| 34 ||<translate>
| 34 ||<translate>
Line 136: Line 140:
</translate>
</translate>
|}
|}
 
<translate>
<!--T:15-->
<!--T:15-->
* Update the [[#Day/night time flag]], the [[#Time division, IsMorning, IsNoon, etc.]]
* Update the [[#Day/night time flag]], the [[#Time division, IsMorning, IsNoon, etc.]]
Line 184: Line 188:
<!--T:25-->
<!--T:25-->
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.
</translate>


=== 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)
! <translate>Start</translate> !! <translate>End</translate> !! Division !! Time type (1) !! Time type (2)
|-
|-
| 04:00 || 05:00 || 0 || MorningA || Morning_A1
| 04:00 || 05:00 || 0 || MorningA || Morning_A1
Line 208: Line 213:
|}
|}


<translate>
Note: all intervals include the start time and exclude the end time.
Note: all intervals include the start time and exclude the end time.


Line 252: Line 258:
{{expand section}}
{{expand section}}
=== Weather types ===
=== Weather types ===
</translate>
{|class="wikitable"
{|class="wikitable"
! Value !! Name
! <translate>Value</translate> !! <translate>Name</translate>
|-
|-
| 0 || Bluesky
| 0 || Bluesky

Navigation menu