Cooking: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
imported>Leoetlino
(→‎CookData.byml: Clarify Ma and Mi, add NMMR)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{stub}}
{{stub}}
== Concepts ==
== Concepts ==
=== Recipes ===
=== Recipes ===
=== SingleRecipes ===
=== SingleRecipes ===
=== Boost ===
=== Boost ===
Cooked items sometimes receive bonuses (improved effect duration, potency, health recovery, etc.). This random process is internally called a "boost". When this happens, the player is said to have gotten a "critical success".
The probability of getting a boost is calculated based on what ingredients the player is using.
However, boosts are ''guaranteed'' during a [[blood moon]]. More exactly:
* The current day must be a "Bloody Day" (see [[WorldMgr]] for more information).
* The "blood moon time range progress" must be strictly greater than 0.1%.
** This value starts increasing linearly from 0% at 23:30 and reaches 100% at 00:00, then starts decreasing and reaches 0% at 00:15.
** Effectively, this means the time range is ''roughly'' 23:30-00:15.
=== Fail ===
=== Fail ===
=== Tag ===
=== Tag ===
== Implementation ==
Tags (in the context of the cooking subsystem) are exactly the same thing as regular actor tags (see [[bxml]]). However, they are stored as CRC32 hashes in the configuration file.
The cooking mechanic is implemented by the [[CookingMgr]]. Its configuration is stored in [[CookData.byml]].
 
== CookData.byml ==
{{resloc|path=Cooking/CookData.byml|locations=[[Bootup.pack]]}}
'''CookData.byml''' is the configuration file for the CookingMgr (which implements cooking functionality).
 
=== System ===
The System header, located at the bottom of CookData.byml, contains parameters that define how the cooking system functions.
 
==== CEI ====
CEI contains the parameters for each effect type available when cooking.
 
{| class="wikitable"
!Key
!Name (unofficial)
!Description
|-
|BT
|Base Time
|Minimum amount of time a recipe effect will be active for, before additions/multipliers from ingredients.
|-
|MR
|Material Rate
|Multiplier on the EffectLevel of ingredients used to obtain the final effect amount.
|-
|Ma
|Maximum
|Maximum effect level. For stamina, in 1/5s of a wheel. For hearts, in 1/4s of a heart. The executable enforces a hard cap of 3 for all effect types that are not stamina or hearts.
|-
|Mi
|Minimum
|Minimum effect level. For stamina, in 1/5s of a wheel. For hearts, in 1/4s of a heart. (The executable ignores this parameter for all effect types.)
|-
|SSA
|unknown
|-
|-
|T
|Type
|Effect Type, as un/signed hash of string. Valid types are hashes of the following: LifeRecover, LifeMaxUp, ResistHot, ResistCold, ResistElectric, AllSpeed, AttackUp, DefenseUp, Quietness, Fireproof. (GutsRecover and GutsMaxUp are the two unlisted types, but their unhashed string values are currently unknown)
|}
 
==== NMMR ====
Unofficial name: Next Milestone Material Rate
 
An independent parameter in System, NMMR is used to determine what the final effect level is for any given recipe. The ingredients' EffectLevels are added together, then multiplied by the effect type's MR. The result is compared to the NMMR array. If the result is:
* greater than the first number, the recipe is given effect level 1
* greater than the second number and Ma >= 2, it is given effect level 2
* greater than the third number and Ma >= 3, it is given effect level 3
 
A recipe can only have one effect. If two effects in a single recipe both exceed the first number in the NMMR array, the game discards all of them.
 
Though there are five numbers in the NMMR array, only the first three are used, as the game hard-caps the Maximum for all effect types that use NMMR to 3.


[[Category:Game mechanics]]
[[Category:Game mechanics]]

Latest revision as of 05:17, 9 December 2020


Concepts

Recipes

SingleRecipes

Boost

Cooked items sometimes receive bonuses (improved effect duration, potency, health recovery, etc.). This random process is internally called a "boost". When this happens, the player is said to have gotten a "critical success".

The probability of getting a boost is calculated based on what ingredients the player is using.

However, boosts are guaranteed during a blood moon. More exactly:

  • The current day must be a "Bloody Day" (see WorldMgr for more information).
  • The "blood moon time range progress" must be strictly greater than 0.1%.
    • This value starts increasing linearly from 0% at 23:30 and reaches 100% at 00:00, then starts decreasing and reaches 0% at 00:15.
    • Effectively, this means the time range is roughly 23:30-00:15.

Fail

Tag

Tags (in the context of the cooking subsystem) are exactly the same thing as regular actor tags (see bxml). However, they are stored as CRC32 hashes in the configuration file.

CookData.byml

This resource is found in Bootup.pack.

Its canonical resource path is "Cooking/CookData.byml".

CookData.byml is the configuration file for the CookingMgr (which implements cooking functionality).

System

The System header, located at the bottom of CookData.byml, contains parameters that define how the cooking system functions.

CEI

CEI contains the parameters for each effect type available when cooking.

Key Name (unofficial) Description
BT Base Time Minimum amount of time a recipe effect will be active for, before additions/multipliers from ingredients.
MR Material Rate Multiplier on the EffectLevel of ingredients used to obtain the final effect amount.
Ma Maximum Maximum effect level. For stamina, in 1/5s of a wheel. For hearts, in 1/4s of a heart. The executable enforces a hard cap of 3 for all effect types that are not stamina or hearts.
Mi Minimum Minimum effect level. For stamina, in 1/5s of a wheel. For hearts, in 1/4s of a heart. (The executable ignores this parameter for all effect types.)
SSA unknown
T Type Effect Type, as un/signed hash of string. Valid types are hashes of the following: LifeRecover, LifeMaxUp, ResistHot, ResistCold, ResistElectric, AllSpeed, AttackUp, DefenseUp, Quietness, Fireproof. (GutsRecover and GutsMaxUp are the two unlisted types, but their unhashed string values are currently unknown)

NMMR

Unofficial name: Next Milestone Material Rate

An independent parameter in System, NMMR is used to determine what the final effect level is for any given recipe. The ingredients' EffectLevels are added together, then multiplied by the effect type's MR. The result is compared to the NMMR array. If the result is:

  • greater than the first number, the recipe is given effect level 1
  • greater than the second number and Ma >= 2, it is given effect level 2
  • greater than the third number and Ma >= 3, it is given effect level 3

A recipe can only have one effect. If two effects in a single recipe both exceed the first number in the NMMR array, the game discards all of them.

Though there are five numbers in the NMMR array, only the first three are used, as the game hard-caps the Maximum for all effect types that use NMMR to 3.