Blood moon and Help:Resolving mod conflicts: Difference between pages

From ZeldaMods (Breath of the Wild)
(Difference between pages)
Jump to navigation Jump to search
imported>Leoetlino
 
imported>NiceneNerd
mNo edit summary
 
Line 1: Line 1:
The '''Blood Moon''' is a game mechanic that ensures the world stays populated with enemies and weapons. Every time a blood moon occurs, enemies that have been defeated and overworld weapons that have been picked up by the player respawn.
Because of the way '''Breath of the Wild''' game content is structured, multiple mods often have to make incompatible changes to the same files or groups of files. Not all of this can be helped—some mods will always conflict—but many of the most common mod conflicts can be resolved. There are seven major areas of concern in resolving mod conflicts: the [[Resource_system#Resource_size_table|RSTB]], [[SARC|SARC packs]], [[Message archives|game texts]], [[gamedata.ssarc|game data]], [[SaveMgr|save data]], [[ActorInfo.product.sbyml|actor info]], and the contents generally of [[BYML]] and [[AAMP]] files.


Blood moons are also used to reset internal state when some subsystems are running out of memory or become unresponsive. Such blood moons do not follow the regular schedule and are commonly referred to as "panic blood moons".
== RSTB Conflicts ==
RSTB conflicts occur when two or more mods modify [[ResourceSizeTable.product.rsizetable]]. Unless the changes are merged, you may experience the general symptoms of RSTB problems when trying to use such mods together, which may include crashes, invisible models, missing actors, or hanging on the loading screen. Note especially that crashes which come immediately on loading the game often involve the RSTB entry for [[Bootup.pack]] or one of the message archives [[Help:Resolving_mod_conflicts#Game_text_conflicts|described below]].


A common misconception is that blood moons help replenish system memory by resetting enemy kill flags. This is however total nonsense, because enemy kill flags are just GameData flags, and all GameData flags are loaded at bootup and stay in memory forever<ref>Even without any code reverse engineering, anyone who has an idea of what they are talking about knows that the game never loads [[Bootup.pack]] (which holds the GameData configuration) again after init so it cannot possibly be unloading flags. Not to mention that it'd be ridiculously inefficient to unload and reload flags all the time.</ref>.
To resolve RSTB conflicts, you must identify the RSTB changes made by each mod, which can be compared using [[Help:Tools/rstb|rstbtool]] or [[Help:Tools/Wild_Bits|Wild Bits]]. For help with this, see [[Help:Updating the RSTB]].


== Scheduled Blood Moons ==
== SARC Conflicts ==
{{link to article|link=WorldMgr#Midnight checks}}
SARC conflicts occur when two or more mods modify the same [[SARC]] file, most frequently [[TitleBG.pack]], [[Bootup.pack]], or an [[Sbactorpack|actor pack]]. For example, if one mod changes Link's appearance and one mod changes the texture of the paraglider, each mod will contain an entire TitleBG.pack file, and they will not cooperate.


Scheduled Blood Moons are based on a timer that starts running as soon as the "step out of Shrine of Resurrection" (Demo103_0) has finished. When the timer reaches 7 in-game days, the WM_BloodyDay flag is set. The next time it is midnight, assuming blood moons are not inhibited, the Blood Moon cutscene will trigger. For more details, read [[WorldMgr]].
To resolve SARC conflicts, you must identify the changed files in each SARC and manually copy the changed files in each to a single SARC. You can extract and modify SARC archives using [[Help:Tools/sarc|sarc]] or [[Help:Tools/Wild_Bits|Wild Bits]].


== Panic Blood Moons ==
== Game Text Conflicts ==
Panic Blood Moons occur when the game is running out of memory<ref>Debug play reports refer to the event as a "BloodyMoon ForMemory" at 0x71007A95B4 (Switch 1.5.0)</ref> or when some tasks are taking too much time.


Contrary to a widespread theory, they are not used as a generic error handler or a fallback for "unhandled events". Panic blood moons can only occur in specific cases.
== Game Data and Save Data Conflicts ==


Panic conditions are checked every frame by [[GameScene]], which also keeps track of the panic reason in an unsigned 32-bit integer so that memory issues can be reported to Nintendo via the [[telemetry]] system.
== Actor Info Conflicts ==


{|class="wikitable"
== BYML and AAMP Conflicts ==
|+ Panic Blood Moon reasons
! Bit !! Description
|-
| 0 || '''[[Resource system]]'''<ref>0x7101213144</ref>: at least one of the following is true:
* Bit 12 is set in the ResourceMgrTask's flags (indicating a problem with a resource load{{check}})<ref>0x710120C5E4</ref>
* ''An'' overlay arena's heap free size percentage is ''less than'' its configured minimum percentage.<ref>0x71011FCDE4</ref>
**The limit is 0% for the OverlayArena system itself, "Tera SZS work" (Tera decompressing buffer), Audio and [[StarterPackMgr]]. The default is 0% too.
**The limit is 5% for the "ForResourceS" (small) and "ForResourceL" (large) heaps, which is where most resources are allocated from.
|-
| 1 || '''[[PhysicsMemSys]]''': Havok main heap is running out of memory (''less than'' 5% free)<ref>0x7101216C08</ref>
|-
| 2 || '''[[PlacementMgr]]''': Actor spawning heap is running out of memory (''less than'' 5% free)<ref>0x7100D5DC40</ref>
|-
| 3 || '''ResourceSystem/OverlayArena''': ForResourceS heap is running out of memory<ref>0x71011FCFF8</ref>
|-
| 4 || '''ResourceSystem/OverlayArena''': ForResourceL heap is running out of memory<ref>0x71011FD000</ref>
|-
| 5 || '''ResourceSystem/OverlayArena''': Audio heap is running out of memory<ref>0x71011FD008</ref>
|-
| 6 || '''ResourceSystem/TextureHandleMgr''': Last TextureHandleMgr::calc execution took more than 60 seconds{{check}}<ref>0x710120C670</ref>
|}


A panic moon causes enemies and other respawnable objects to respawn since it calls [https://eventviewer.zeldamods.org/viewer.html?data=/d/Demo011_0.json&params=1&entry=Demo011_0&node=Event3 Demo011_0] just like the regular blood moon code. The demo contains a call to [[AIDef:Action/EventOffWaitRevivalAction]] (OffWaitRevival), which appears to be what actually resets the revival flags.
[[Category:Guides]]
 
=== Panic blood moon inhibitors ===
Panic blood Moons can only occur if '''all''' of the following conditions are '''false'''<ref>Switch 1.5.0 0x71007ADFB0</ref>:
* the player is in a dungeon, AocField, GameTestField, GameTestField2, or any debug or dev map
* the Fade screen (loading screen) is opened
* some [[EventMgr]] check returns false{{check}}
* there is an active event
* the player actor does not exist
* the player is more than 0.25 distance units away from his save position (game data flag: PlayerSavePos)
 
== Notes ==
<references/>
 
[[Category:Game mechanics]]
[[Category:Internals]]

Revision as of 18:54, 26 July 2019

Because of the way Breath of the Wild game content is structured, multiple mods often have to make incompatible changes to the same files or groups of files. Not all of this can be helped—some mods will always conflict—but many of the most common mod conflicts can be resolved. There are seven major areas of concern in resolving mod conflicts: the RSTB, SARC packs, game texts, game data, save data, actor info, and the contents generally of BYML and AAMP files.

RSTB Conflicts

RSTB conflicts occur when two or more mods modify ResourceSizeTable.product.rsizetable. Unless the changes are merged, you may experience the general symptoms of RSTB problems when trying to use such mods together, which may include crashes, invisible models, missing actors, or hanging on the loading screen. Note especially that crashes which come immediately on loading the game often involve the RSTB entry for Bootup.pack or one of the message archives described below.

To resolve RSTB conflicts, you must identify the RSTB changes made by each mod, which can be compared using rstbtool or Wild Bits. For help with this, see Help:Updating the RSTB.

SARC Conflicts

SARC conflicts occur when two or more mods modify the same SARC file, most frequently TitleBG.pack, Bootup.pack, or an actor pack. For example, if one mod changes Link's appearance and one mod changes the texture of the paraglider, each mod will contain an entire TitleBG.pack file, and they will not cooperate.

To resolve SARC conflicts, you must identify the changed files in each SARC and manually copy the changed files in each to a single SARC. You can extract and modify SARC archives using sarc or Wild Bits.

Game Text Conflicts

Game Data and Save Data Conflicts

Actor Info Conflicts

BYML and AAMP Conflicts