Difficulty scaling/fr: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>


'''Difficulty scaling''' is a mechanic in ''Breath of the Wild'' that results in enemies and weapons being progressively replaced by more powerful variants during a playthrough.
'''Difficulty scaling''' (nivellement de la difficulté) est un mécanisme dans ''Breath of the Wild'' qui fait que les ennemis et les armes sont progressivement remplacés par des variantes plus puissantes au cours d'une partie de jeu.


== Points ==  
== Points ==  


The scaling system is based on a point system. Killing enemies is the ''only way'' to receive points.
Le système de nivellement se base sur un système de points. Tuer des ennemis est la ''seule manière'' d'en recevoir.


Whenever an enemy dies, the game increments a flag 'Defeated_{SameGroupActorName}_Num' if all of the following conditions are satisfied:
Quand un ennemi meurt, le jeu incrémente un flag 'Defeated_{SameGroupActorName}_Num' si toutes les conditions suivantes sont remplies :
* The current kill count is &#x3C; 10.
* Le nombre de kills est strictement inférieur à 10.
* The actor does not have the NotCountDefeatedNum flag.
* L'acteur n'a pas le flag NotCountDefeatedNum.
* '''For Monk Maz Koshia''': 'Defeated_Priest_Boss_Normal_Num' is 0.
* '''Pour Maz Koshia''' : 'Defeated_Priest_Boss_Normal_Num' est 0.
* '''For Dark Beast Ganon''': It is the first time the boss is beaten. (Ganon's Defeated flag has 1 as the maximum value.)  
* '''Pour Dark Beast Ganon''' : C'est la première fois que le boss final est battu. (Son flag Defeated a pour valeur maximale 1.)  
* '''For Blights''': It is the first time the blight is beaten in the Divine Beast, or in the Illusory Realm. Blights fought in Hyrule Castle do not count.
* '''Pour les Ombres de Ganon''' : C'est la première fois que l'Ombre est battue au sein de la créature divine, ou dans l'univers onirique (DLC2). Les Ombres que vous battez au château d'Hyrule ne comptent pas.
This happens every time ''any'' enemy dies, even if they don't necessarily play a role in the point system (see below) and even if the player is not responsible for their death.
Cela se produit à chaque fois qu'un ennemi ''quelconque'' meurt, même s'il ne joue pas forcément de rôle dans le système de points (voir ci-dessous) et même si le joueur n'est pas responsable pour leur mort.


Because enemies have to be killed throughout the main quest and bosses are considered as enemies too, difficulty scaling is unavoidable.
Vu que des ennemis doivent être tués tout au long de la quête principale et que les boss sont considérés comme des ennemis, le nivellement de la difficulté est inévitable.


Only the defeated counter flags are stored in the save file. The <code>Ecosystem::LevelSensor</code> subsystem is responsible for [[Difficulty scaling#Ecosystem::LevelSensor::calculatePoints|converting these kill counts to points]] using a [[Difficulty scaling#Ecosystem::LevelSensor::loadByml|configuration file]].
Only the defeated counter flags are stored in the save file. The <code>Ecosystem::LevelSensor</code> subsystem is responsible for [[Difficulty scaling#Ecosystem::LevelSensor::calculatePoints|converting these kill counts to points]] using a [[Difficulty scaling#Ecosystem::LevelSensor::loadByml|configuration file]].
Line 21: Line 21:
The subsystem provides two functions ([[Difficulty scaling#Ecosystem::LevelSensor::scaleWeapon|<code>scaleWeapon</code>]] and [[Difficulty scaling#Ecosystem::LevelSensor::scaleActor|<code>scaleActor</code>]]) that may be called when a weapon or enemy actor is created.
The subsystem provides two functions ([[Difficulty scaling#Ecosystem::LevelSensor::scaleWeapon|<code>scaleWeapon</code>]] and [[Difficulty scaling#Ecosystem::LevelSensor::scaleActor|<code>scaleActor</code>]]) that may be called when a weapon or enemy actor is created.


== Scaling inhibitors ==  
== Inhibiteurs du nivellement ==  


Both scaling functions will immediately return without doing anything if:
<div class="mw-translate-fuzzy">
Les deux fonctions de nivellement ne feront absolument rien si :
* [[WorldMgr]]::sInstance-&#x3E;stageType == 1 (Open World [[stage]])
* [[WorldMgr]]::sInstance-&#x3E;stageType == 1 (Open World [[stage]])
* and WorldMgr::sInstance-&#x3E;isAocField (current map is Trial of the Sword)
* and WorldMgr::sInstance-&#x3E;isAocField (la map actuelle est les épreuves de l'épée)
* and WorldMgr::sInstance-&#x3E;disableScaling (set to true when entering Trial of the Sword)
* and WorldMgr::sInstance-&#x3E;disableScaling (réglée à true à l'entrée des épreuves de l'épée)
</div>


This means that scaling is always disabled in the Trial of the Sword.
This means that scaling is always disabled in the Trial of the Sword.
Line 32: Line 34:
Scaling will also be skipped if the current [[map area]] is 28. This corresponds to &#x22;HateruSea&#x22;, which is the Eventide Island area.
Scaling will also be skipped if the current [[map area]] is 28. This corresponds to &#x22;HateruSea&#x22;, which is the Eventide Island area.


== Weapons ==  
== Armes ==  


'scaleWeapon' is called (i.e. weapons may be scaled) for a weapon if:
'scaleWeapon' is called (i.e. weapons may be scaled) for a weapon if:
Line 40: Line 42:
* '''For other enemy drops''': The flag <code>{MapName}_WeaponDrop_{ID}</code> is false, '''and''' [the actor property 'LevelSensorMode' is higher than 1 ''or'' the enemy is a Guardian Scout ('Enemy_Guardian_Mini')].
* '''For other enemy drops''': The flag <code>{MapName}_WeaponDrop_{ID}</code> is false, '''and''' [the actor property 'LevelSensorMode' is higher than 1 ''or'' the enemy is a Guardian Scout ('Enemy_Guardian_Mini')].


Note: Weapons that are bought from a shop cannot receive modifiers because they do not fit into any of the above cases.
Remarque : les armes achetées dans une boutique ne peuvent pas recevoir de bonus car elles ne rentrent dans aucun des cas mentionnés ci-dessus.


== Weapon bonuses ==  
== Bonus des armes ==  


Weapon scaling results in weapons being replaced by a different weapon (e.g. a Soldier's Bow which becomes a Royal Bow), or weapons gaining a random, bonus stat boost (e.g. Attack Up, Durability Up, etc.). The range of those boosts is also affected by weapon scaling.
Weapon scaling results in weapons being replaced by a different weapon (e.g. a Soldier's Bow which becomes a Royal Bow), or weapons gaining a random, bonus stat boost (e.g. Attack Up, Durability Up, etc.). The range of those boosts is also affected by weapon scaling.


=== Bonus types ===
There are two bonus tiers in the game: one for low-level types (which appear in blue/white in the game UI) and another for high-level types (yellow). Those that belong to the Yellow tier are usually superior to the other ones. For instance, ''Attack Up +'' is the superior variant of ''Attack Up'' and it typically grants a higher attack power boost compared to ''Attack Up''.


Weapon bonuses (e.g. Durability Up, Attack Up) are entirely random. Each bonus has equal probability.
=== Types de bonus ===
 
Pour les armes, les bonus (par exemple Durabilité ↑ ou Attaque ↑) sont entièrement aléatoires. Chaque type de bonus est équiprobable.


{|class="wikitable"
{|class="wikitable"
! Bonus !! Available in modifier tiers
! Bonus !! <span class="mw-translate-fuzzy">Disponible pour les paliers</span>
|-
|-
|-
|-
| Attack up || Blue/White and Yellow
| Attaque ↑ || Bleu/blanc et jaune
|-
|-
| Durability up || Blue/White and Yellow
| Durabilité ↑ || Bleu/blanc et jaune
|-
|-
| Long throw || Yellow
| Distance lancers ↑ || Jaune
|-
|-
| Multi-shot burst (bows) || Yellow
| Tirs x N (arcs) || Jaune
|-
|-
| Quick shot (bows) || Yellow
| Visée rapide (arcs) || Jaune
|-
|-
| AddSurfMaster || Yellow
| Glisse ↑ || Jaune
|-
|-
| Shield guard up || Blue/White and Yellow
| Garde ↑ || Bleu/blanc et jaune
|-
|-
| Critical Hit || Blue/White
| Coup de grâce || Bleu/blanc
|-
|-
| ZoomRapid || Yellow
| ZoomRapid || Jaune
|}
|}


Line 77: Line 81:
* AddSurfMaster is a bonus that only applies to shields and gives them a lower friction for shield surfing. That bonus type is unused in the game.
* AddSurfMaster is a bonus that only applies to shields and gives them a lower friction for shield surfing. That bonus type is unused in the game.


=== Bonus values ===  
=== Valeurs de bonus ===  


Bonus values (e.g. the durability or attack power increase) are determined from [[ActorParam/GeneralParamList]] (with a copy of the information in [[ActorInfoData]]). Valid ranges and bonuses for each weapon are configured in the WeaponCommon section.
Bonus values (e.g. the durability or attack power increase) are determined from [[ActorParam/GeneralParamList]] (with a copy of the information in [[ActorInfoData]]). Valid ranges and bonuses for each weapon are configured in the WeaponCommon section.
Line 83: Line 87:
==== amiibo ====  
==== amiibo ====  
{|class="wikitable"
{|class="wikitable"
! Bonus !! Value that is used for the bonus effect
! Bonus !! Valeur qui est utilisée pour l'effet bonus
|-
|-
| None || -
| Aucun || -
|-
|-
| Attack up || addAtkMax
| Attaque ↑ || addAtkMax
|-
|-
| Durability up || addLifeMax
| Durabilité ↑ || addLifeMax
|-
|-
| Long throw || addThrowMax
| Distance lancers ↑ || addThrowMax
|-
|-
| Multi-shot burst (bows) || 5-shot burst
| Tirs x N (arcs) || Tirs x 5
|-
|-
| Quick shot (bows) || addRapidFireMin
| Visée rapide (arcs) || addRapidFireMin
|-
|-
| AddSurfMaster || [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio
| Glisse ↑ || [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio
|-
|-
| Shield guard up || addGuardMax
| Garde ↑ || addGuardMax
|}
|}


In summary, for amiibo weapons, an attack up always brings it to the greatest possible attack power.
En résumé, pour les armes amiibo, Attaque ↑ donne toujours le pouvoir d'attaque maximum. Il n'y a pas d'aléatoire.
No randomness is involved.


==== Non-amiibo ====  
==== Non amiibo ====  


{|class="wikitable"
{|class="wikitable"
! Bonus !! Value that is used for the bonus effect
! Bonus !! Valeur qui est utilisée pour l'effet bonus
|-
|-
| None || -
| Aucun || -
|-
|-
| Attack up || Random integer between addAtkMin and addAtkMax
| Attaque ↑ || Entier aléatoire entre addAtkMin et addAtkMax
|-
|-
| Durability up || Random integer between addLifeMin and addLifeMax
| Durabilité ↑ || Entier aléatoire entre addLifeMin et addLifeMax
|-
|-
| Long throw || Random float between addThrowMin and addThrowMax
| Distance lancers ↑ || Flottant aléatoire entre addThrowMin et addThrowMax
|-
|-
| Multi-shot burst (bows) || 5-shot burst
| Tirs x N (arcs) || Tirs x 5
|-
|-
| Quick shot (bows) || Random float between addRapidFireMin and addRapidFireMax
| Visée rapide (arcs) || Flottant aléatoire entre addRapidFireMin et addRapidFireMax
|-
|-
| AddSurfMaster || [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio
| Glisse ↑ || [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio
|-
|-
| Shield guard up || Random integer between addGuardMin and addGuardMax
| Garde ↑ || Entier aléatoire entre addGuardMin et addGuardMax
|}
|}


In summary, for non-amiibo weapons, an attack up results in a randomized attack power.
En résumé, pour les armes non issues d'amiibo, Attaque ↑ donne un pouvoir d'attaque aléatoire.


== Enemies ==  
== Ennemis ==  


When loading enemies, the game will always try to scale enemies.
When loading enemies, the game will always try to scale enemies.
Line 141: Line 144:
[1.3.0] In Master Mode, '''all''' enemies are automatically ranked up one tier by default '''post scaling''', independently of 'LevelSensorMode'. [[Actor]]s can receive two additional parameters:
[1.3.0] In Master Mode, '''all''' enemies are automatically ranked up one tier by default '''post scaling''', independently of 'LevelSensorMode'. [[Actor]]s can receive two additional parameters:
{| class="wikitable"
{| class="wikitable"
! Parameter
! Paramètre
! Default
! Valeur par défaut
! Description
! Description
|-
|-
| IsHardModeActor
| IsHardModeActor
| false
| false
| Controls whether an enemy only shows up in Master Mode.
| Contrôle l'apparition ou non d'un ennemi dans le Mode Expert.
|-
|-
| DisableRankUpForHardMode
| DisableRankUpForHardMode
Line 153: Line 156:
| Controls whether the automatic rankup applies to an enemy.
| Controls whether the automatic rankup applies to an enemy.
|}
|}
In Master Mode, IsHardModeActor, DisableRankUpForHardMode and LevelSensorMode are combined on some actors to keep low-level enemies in the overworld (e.g. Red Bokoblin south of the Great Plateau).
Dans le Mode Expert, IsHardModeActor, DisableRankUpForHardMode and LevelSensorMode sont combinés sur quelques acteurs pour garder des ennemis de bas niveau dans le monde (par exemple pour garder un Bokoblin rouge au sud du Plateau du Prélude.)


== Properties ==  
== Propriétés ==  


=== <code>LevelSensorMode</code> ===
=== <code>LevelSensorMode</code> ===
Line 168: Line 171:


{| class="wikitable"
{| class="wikitable"
! Value
! Valeur
! Description
! Description
|-
|-
Line 193: Line 196:
For example, 0 ('None') doesn't mean a weapon will never receive a modifier. It just means that the developers haven't forced the weapon to spawn with a blue/yellow modifier. If scaling requirements are satisfied, the weapon will receive blue or yellow modifiers.
For example, 0 ('None') doesn't mean a weapon will never receive a modifier. It just means that the developers haven't forced the weapon to spawn with a blue/yellow modifier. If scaling requirements are satisfied, the weapon will receive blue or yellow modifiers.


== Scaling algorithm ==  
== Algorithme de nivellement ==  


=== <code>Ecosystem::LevelSensor::loadByml</code> ===  
=== <code>Ecosystem::LevelSensor::loadByml</code> ===  


This function is called by <code>Ecosystem::init</code> from <code>ksys::InitializeApp</code>
Cette fonction est appelée par <code>Ecosystem::init</code> depuis <code>ksys::InitializeApp</code>


Sets up byml structures for reading Ecosystem/[[LevelSensor.byml]].
Met en place les structures byml pour la lecture de Ecosystem/[[LevelSensor.byml]].


=== <code>Ecosystem::LevelSensor::calculatePoints</code> ===  
=== <code>Ecosystem::LevelSensor::calculatePoints</code> ===  


Called by [[PlacementMgr]] when spawning actors.
Appelée par [[PlacementMgr]] au moment du spawn des acteurs.


Calculates weapon and enemy scaling points using a list of flags and configuration values.
Calculates weapon and enemy scaling points using a list of flags and configuration values.
Line 222: Line 225:
</source>
</source>


In practice, settings have never been modified. 1.5.0 (which will likely be the last game update) still has the same Level2WeaponPower and Level2EnemyPower.
En pratique, ces paramètres n'ont jamais été modifiés. 1.5.0 (qui sera sans doute la dernière mise à jour du jeu) a toujours les mêmes Level2WeaponPower et Level2EnemyPower.


=== <code>Ecosystem::LevelSensor::scaleWeapon</code> ===  
=== <code>Ecosystem::LevelSensor::scaleWeapon</code> ===  
Line 232: Line 235:
If the algorithm fails to find an appropriate weapon that satisfies all conditions (point requirements, weapon series, modifier), the originally specified weapon and modifier will be used directly.
If the algorithm fails to find an appropriate weapon that satisfies all conditions (point requirements, weapon series, modifier), the originally specified weapon and modifier will be used directly.


Pseudocode (1.0.0):
Pseudocode (1.0.0) :


<source lang="c++">
<source lang="c++">
Line 290: Line 293:
=== <code>Ecosystem::LevelSensor::scaleActor</code> ===  
=== <code>Ecosystem::LevelSensor::scaleActor</code> ===  


Analogous to <code>LevelSensor::scaleWeapon</code>.
Analogue à <code>LevelSensor::scaleWeapon</code>.


Pseudocode (1.0.0):
Pseudocode (1.0.0) :


<source lang="c++">
<source lang="c++">
Line 340: Line 343:
</source>
</source>


== The Data ==  
== Les données ==  


To make things easier to understand, here are links to:
Pour rendre tout cela plus facile à comprendre, voici des liens vers :
* [https://docs.google.com/spreadsheets/d/e/2PACX-1vRSlyOD7FLAn1TUBn64Pu8Pld-WOfgcVByuywHMWvBTEV0j8potD1wkBs-MJJXf-gvEkpfItUCMqMk6/pubhtml kill point, enemy scaling and weapon scaling tables]
* [https://docs.google.com/spreadsheets/d/e/2PACX-1vRSlyOD7FLAn1TUBn64Pu8Pld-WOfgcVByuywHMWvBTEV0j8potD1wkBs-MJJXf-gvEkpfItUCMqMk6/pubhtml des tableaux de points, de nivellement des ennemis et des armes]
* an [https://objmap.zeldamods.org object map with scaling information].
* une [https://objmap.zeldamods.org carte objets (object map) avec les infos de nivellement].
This makes it possible to see both the required points for enemy/weapon upgrades, as well as all of the special cases extremely easily.
Cela permet de voir très aisément à la fois les points nécessaires pour mettre à niveau les ennemis ou les armes, ainsi que tous les cas spéciaux.


== Ganon Blights ==  
== Ombres de Ganon ==  


Ganon blights also have varying difficulty but follow a different system. Their health is determined by the base HP (set in [[ActorParam/GeneralParamList|GeneralParamList]]) and blight defeat flags.
Les Ombres de Ganon varient elles aussi en difficulté mais suivent un système différent. Leur HP est déterminé par le HP de base (réglé dans [[ActorParam/GeneralParamList|GeneralParamList]]) et les flags de défaite des ombres.


<source lang="c++">__int64 SiteBoss::getInitialHP(SiteBoss *this) // 0x71002D01F4
<source lang="c++">__int64 SiteBoss::getInitialHP(SiteBoss *this) // 0x71002D01F4
Line 370: Line 373:
}</source>
}</source>


Effectively, this means that the first blight Link fights will have 800+0×400 = 800 HP, the second will have 800+1×400 = 1200 HP, the third 800+2×400 = 1600 HP and the last one 800+3×400 = 2000 HP.
En pratique, cela signifie que la première ombre que Link bat disposera de 800+0×400 = 800 HP, la seconde aura 800+1×400 = 1200 HP, la troisième 800+2×400 = 1600 HP et la dernière 800+3×400 = 2000 HP.


=== Special case 1: Castle Blights ===  
=== Cas spécial 1 : Les ombres du château ===  


Castle blights have <code>IsRemainBoss</code> set to false in their root AI parameters (see [[AIDef:AI/SiteBossSpearRoot]] for example), which sets flag 4.
Les ombres du château d'Hyrule ont <code>IsRemainBoss</code> réglé sur false dans les paramètres de leur AI root (voir [[AIDef:AI/SiteBossSpearRoot]] par exemple), ce qui active le flag 4.


Thus, blights that are fought in the Castle always have 800+3×400 = 2000 HP regardless of story progression.
Ainsi, les ombres combattues au château disposent toujours de 800+3×400 = 2000 HP quelle que soit la progression de l'histoire.


If flag 4 is set, the [[AIDef:Action/SiteBossDie]] code will NOT increment the &#x22;defeated&#x22; counter. This means castle blights do not give any scaling points.
Si le flag 4 est activé, le code [[AIDef:Action/SiteBossDie]] n'incrémenta PAS le compteur Defeated. Cela signifie que les ombres du château ne donnent aucun point de nivellement.


=== Special case 2: DLC2 Blights ===  
=== Cas spécial 2 : Les ombres du DLC2 ===  


Illusory Realm blights possess the <code>EnemySiteBoss_R</code> actor tag. This causes flag 8 to be set. So they will always have 500+4×250 = 1500 HP.
Les ombres dans l'univers onirique possèdent le tag acteur <code>EnemySiteBoss_R</code>. Cela conduit à l'activation du flag 8. Donc celles-ci auront toujours 500+4×250 = 1500 HP.


Interestingly, the Windblight AI function relies doesn't check the actor tag but the actor name instead. For flag 8 to be set, the actor name must be <code>Enemy_SiteBoss_Bow_R</code>.
Fait intéressant, la fonction AI de l'ombre de vent de Ganon (Windblight) ne vérifie pas le tag acteur mais plutôt le nom d'acteur. Pour que le flag 8 soit activé, le nom doit absolument être <code>Enemy_SiteBoss_Bow_R</code>.





Revision as of 14:55, 11 May 2020

Other languages:

Difficulty scaling (nivellement de la difficulté) est un mécanisme dans Breath of the Wild qui fait que les ennemis et les armes sont progressivement remplacés par des variantes plus puissantes au cours d'une partie de jeu.

Points

Le système de nivellement se base sur un système de points. Tuer des ennemis est la seule manière d'en recevoir.

Quand un ennemi meurt, le jeu incrémente un flag 'Defeated_{SameGroupActorName}_Num' si toutes les conditions suivantes sont remplies :

  • Le nombre de kills est strictement inférieur à 10.
  • L'acteur n'a pas le flag NotCountDefeatedNum.
  • Pour Maz Koshia : 'Defeated_Priest_Boss_Normal_Num' est 0.
  • Pour Dark Beast Ganon : C'est la première fois que le boss final est battu. (Son flag Defeated a pour valeur maximale 1.)
  • Pour les Ombres de Ganon : C'est la première fois que l'Ombre est battue au sein de la créature divine, ou dans l'univers onirique (DLC2). Les Ombres que vous battez au château d'Hyrule ne comptent pas.

Cela se produit à chaque fois qu'un ennemi quelconque meurt, même s'il ne joue pas forcément de rôle dans le système de points (voir ci-dessous) et même si le joueur n'est pas responsable pour leur mort.

Vu que des ennemis doivent être tués tout au long de la quête principale et que les boss sont considérés comme des ennemis, le nivellement de la difficulté est inévitable.

Only the defeated counter flags are stored in the save file. The Ecosystem::LevelSensor subsystem is responsible for converting these kill counts to points using a configuration file.

The subsystem provides two functions (scaleWeapon and scaleActor) that may be called when a weapon or enemy actor is created.

Inhibiteurs du nivellement

Les deux fonctions de nivellement ne feront absolument rien si :

  • WorldMgr::sInstance->stageType == 1 (Open World stage)
  • and WorldMgr::sInstance->isAocField (la map actuelle est les épreuves de l'épée)
  • and WorldMgr::sInstance->disableScaling (réglée à true à l'entrée des épreuves de l'épée)

This means that scaling is always disabled in the Trial of the Sword.

Scaling will also be skipped if the current map area is 28. This corresponds to "HateruSea", which is the Eventide Island area.

Armes

'scaleWeapon' is called (i.e. weapons may be scaled) for a weapon if:

  • For standalone weapons: The actor property 'LevelSensorMode' is higher than 1 and it wasn't already picked up.
  • For treasure chest drops: If SharpWeaponJudgeType is not 4, when AIDef:AI/TreasureBox initialises the drop actor.
  • For Hinox weapons: The flag {MapName}_Necklace_{i}_{HinoxName}_{ID} is false.
  • For other enemy drops: The flag {MapName}_WeaponDrop_{ID} is false, and [the actor property 'LevelSensorMode' is higher than 1 or the enemy is a Guardian Scout ('Enemy_Guardian_Mini')].

Remarque : les armes achetées dans une boutique ne peuvent pas recevoir de bonus car elles ne rentrent dans aucun des cas mentionnés ci-dessus.

Bonus des armes

Weapon scaling results in weapons being replaced by a different weapon (e.g. a Soldier's Bow which becomes a Royal Bow), or weapons gaining a random, bonus stat boost (e.g. Attack Up, Durability Up, etc.). The range of those boosts is also affected by weapon scaling.

There are two bonus tiers in the game: one for low-level types (which appear in blue/white in the game UI) and another for high-level types (yellow). Those that belong to the Yellow tier are usually superior to the other ones. For instance, Attack Up + is the superior variant of Attack Up and it typically grants a higher attack power boost compared to Attack Up.

Types de bonus

Pour les armes, les bonus (par exemple Durabilité ↑ ou Attaque ↑) sont entièrement aléatoires. Chaque type de bonus est équiprobable.

Bonus Disponible pour les paliers
Attaque ↑ Bleu/blanc et jaune
Durabilité ↑ Bleu/blanc et jaune
Distance lancers ↑ Jaune
Tirs x N (arcs) Jaune
Visée rapide (arcs) Jaune
Glisse ↑ Jaune
Garde ↑ Bleu/blanc et jaune
Coup de grâce Bleu/blanc
ZoomRapid Jaune

Notes:

  • "Critical Hit" can only be selected if weaponCommonSharpWeaponAddCrit is true and if the weapon modifier tier is Blue/White. This means that it becomes impossible to get a weapon with a Critical Hit bonus after enough enemies have been killed.
  • AddSurfMaster is a bonus that only applies to shields and gives them a lower friction for shield surfing. That bonus type is unused in the game.

Valeurs de bonus

Bonus values (e.g. the durability or attack power increase) are determined from bgparamlist (with a copy of the information in ActorInfoData). Valid ranges and bonuses for each weapon are configured in the WeaponCommon section.

amiibo

Bonus Valeur qui est utilisée pour l'effet bonus
Aucun -
Attaque ↑ addAtkMax
Durabilité ↑ addLifeMax
Distance lancers ↑ addThrowMax
Tirs x N (arcs) Tirs x 5
Visée rapide (arcs) addRapidFireMin
Glisse ↑ GlobalParameter::shieldSurfMasterFrictionRatio
Garde ↑ addGuardMax

En résumé, pour les armes amiibo, Attaque ↑ donne toujours le pouvoir d'attaque maximum. Il n'y a pas d'aléatoire.

Non amiibo

Bonus Valeur qui est utilisée pour l'effet bonus
Aucun -
Attaque ↑ Entier aléatoire entre addAtkMin et addAtkMax
Durabilité ↑ Entier aléatoire entre addLifeMin et addLifeMax
Distance lancers ↑ Flottant aléatoire entre addThrowMin et addThrowMax
Tirs x N (arcs) Tirs x 5
Visée rapide (arcs) Flottant aléatoire entre addRapidFireMin et addRapidFireMax
Glisse ↑ GlobalParameter::shieldSurfMasterFrictionRatio
Garde ↑ Entier aléatoire entre addGuardMin et addGuardMax

En résumé, pour les armes non issues d'amiibo, Attaque ↑ donne un pouvoir d'attaque aléatoire.

Ennemis

When loading enemies, the game will always try to scale enemies.

However, the scaling function won't do anything if 'LevelSensorMode' is < 1 and will leave the enemy and any weapons they may hold unscaled.

Note: Enemies that are not in any upgrade list (such as elemental Lizalfos) will not be scaled, but their weapon can still receive upgrades if:

  • 'LevelSensorMode' is non zero.
  • Weapon point requirements are satisfied
  • or the modifier tier is overridden using 'SharpWeaponJudgeType'.

[1.3.0] In Master Mode, all enemies are automatically ranked up one tier by default post scaling, independently of 'LevelSensorMode'. Actors can receive two additional parameters:

Paramètre Valeur par défaut Description
IsHardModeActor false Contrôle l'apparition ou non d'un ennemi dans le Mode Expert.
DisableRankUpForHardMode false Controls whether the automatic rankup applies to an enemy.

Dans le Mode Expert, IsHardModeActor, DisableRankUpForHardMode and LevelSensorMode sont combinés sur quelques acteurs pour garder des ennemis de bas niveau dans le monde (par exemple pour garder un Bokoblin rouge au sud du Plateau du Prélude.)

Propriétés

LevelSensorMode

This actor property controls whether scaling is enabled for an enemy or weapon. Also applies to any weapons held by an enemy since 'scaleWeapon' is called when an enemy drops their weapon.

Note that this doesn't apply to weapons that are attached to a Hinox's necklace, because Hinoxes use a different underlying enemy actor which overrides the 'on weapon dropped' function and ignores 'LevelSensorMode'.

SharpWeaponJudgeType

This actor property controls the minimum modifier tier that a weapon can receive.

Internally and in assets such as map units, the following values are used for modifiers:

Valeur Description
0 None: No modifiers.
1 RandomBlue: Weapon will randomly get at least a blue modifier (with weaponCommonSharpWeaponPer being the probability).
2 Blue: Weapon will get at least a blue modifier.
3 Yellow: Weapon will get at least a yellow modifier.
4 NoneForced (chests only): Weapon will never spawn with any modifiers. This overrides regular scaling.

If scaling is enabled, the weapon may receive modifiers from an even higher tier if point requirements are met.

Otherwise, the weapon will get modifiers from exactly the specified tier.

For example, 0 ('None') doesn't mean a weapon will never receive a modifier. It just means that the developers haven't forced the weapon to spawn with a blue/yellow modifier. If scaling requirements are satisfied, the weapon will receive blue or yellow modifiers.

Algorithme de nivellement

Ecosystem::LevelSensor::loadByml

Cette fonction est appelée par Ecosystem::init depuis ksys::InitializeApp

Met en place les structures byml pour la lecture de Ecosystem/LevelSensor.byml.

Ecosystem::LevelSensor::calculatePoints

Appelée par PlacementMgr au moment du spawn des acteurs.

Calculates weapon and enemy scaling points using a list of flags and configuration values.

All flags that are referenced in the configuration file are of the form Defeated_%s_Num, but technically the configuration format allows for other flags to be specified.

Interestingly, the game calculates a single point value based on the kill counter flags but calculates two separate values for weapons and enemies with two different multipliers. This format makes it possible to easily change the scaling.

float points = 0.0;
for (kill_flag : this->byml["flag"])
    int kill_count = GameData::getIntegerFlag(kill_flag["name"]);
    points += kill_count * kill_flag["point"];

this->points = points;
this->weapon_points = points * this->byml["setting"].Level2WeaponPower;
this->enemy_points = points * this->byml["setting"].Level2EnemyPower;

En pratique, ces paramètres n'ont jamais été modifiés. 1.5.0 (qui sera sans doute la dernière mise à jour du jeu) a toujours les mêmes Level2WeaponPower et Level2EnemyPower.

Ecosystem::LevelSensor::scaleWeapon

Called from treasure chest code, enemy actors[check], Ecosystem::LevelSensor::scaleActor

Given a weapon name, its modifier and current point status, this function returns the weapon to actually spawn and the modifier to use (if possible).

If the algorithm fails to find an appropriate weapon that satisfies all conditions (point requirements, weapon series, modifier), the originally specified weapon and modifier will be used directly.

Pseudocode (1.0.0) :

bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString& weapon_to_look_up,
                                         WeaponModifier required_modifier,
                                         const char** weapon_to_use_name,
                                         WeaponModifier* modifier_to_use,
                                         void* unknown)
{
  // some checks using 'unknown' here which seems to be a pointer to the actor
  //
  for (weapon_table : this->byml["weapon"]) {
    // find the first weapon entry for which the player has enough points
    // with the specified name and modifier
    i = -1;
    for (j = 0; j < weapon_table["actors"].size; ++j) {
      entry = weapon_table["actors"][j];
      float points_for_next_transition = entry["value"];
      //
      if (this->weapon_points > points_for_next_transition &&
          weapon_to_look_up == entry["name"] &&
          convert_to_modifier(entry["plus"]) == required_modifier) {
        i = j;
        break;
      }
    }
    //
    if (i == -1)
      continue;
    //
    do {
      entry = weapon_table["actors"][i];
      //
      // not_rank_up means there is no link between weapons;
      // this table is just used to look up modifiers.
      // so go down the list until there are no more entries for the requested weapon
      // or until we reach a modifier that requires more points.
      if (weapon_table["not_rank_up"] && entry["name"] != weapon_to_look_up)
        break;
      //
      // otherwise, just go down the list until we reach the end or a weapon which
      // requires more points. this will possibly upgrade the weapon (e.g. Knight -> Royal).
      if (this->weapon_points <= entry["value"])
        break;
      //
      ++i;
    } while (i < weapon_table["actors"].size);
    //
    *weapon_to_use_name = entry["name"];
    *modifier_to_use = convert_to_modifier(entry["plus"]);
    return true;
  }
  return false;  // cannot scale up
}

Ecosystem::LevelSensor::scaleActor

Analogue à LevelSensor::scaleWeapon.

Pseudocode (1.0.0) :

if (actor->params["LevelSensorMode"] < 1)
  return false;
//
if (actor_name.contains("Enemy")) {
  for (enemy_table : this->byml["enemy"]) {
    i = -1;
    for (j = 0; j < enemy_table["actors"].size; ++j) {
      entry = enemy_table["actors"][j];
      if (entry["name"] == actor_name && this->enemy_points > entry["value"]) {
        i = j;
        break;
      }
    }
    //
    if (i == -1)
      continue;
    //
    do {
      entry = enemy_table["actors"][i];
      if (this->enemy_points <= entry["value"])
        break;
      ++i;
    } while (i < enemy_table["actors"].size);
    //
    *actor_to_use = entry["name"];
    return true;
  }
  return false;  // cannot scale up
}
//
if (actor_name.contains("Weapon")) {
  weapon_name = actor->getWeaponName();
  modifier = actor->params["SharpWeaponJudgeType"];
  if (modifier == WeaponModifier::RandomBlue)
    modifier = get_random_blue_modifier(actor->getWeaponName());
  //
  if (scaleWeapon(weapon_name, &weapon_to_use, &modifier_to_use)) {
    actor->setProperty("SharpWeaponJudgeType", modifier_to_use);
    *actor_to_use = weapon_to_use;
    return true;
  }
  return false;  // cannot scale up
}

Les données

Pour rendre tout cela plus facile à comprendre, voici des liens vers :

Cela permet de voir très aisément à la fois les points nécessaires pour mettre à niveau les ennemis ou les armes, ainsi que tous les cas spéciaux.

Ombres de Ganon

Les Ombres de Ganon varient elles aussi en difficulté mais suivent un système différent. Leur HP est déterminé par le HP de base (réglé dans bgparamlist) et les flags de défaite des ombres.

__int64 SiteBoss::getInitialHP(SiteBoss *this) // 0x71002D01F4
{
  const int baseHp = Enemy::getInitialHP(this);
  const int halfBaseHp = baseHp >> 1;
  const bool dieGanonWind = hasFlag_Die_PGanonWind(0);
  const bool dieGanonWater = hasFlag_Die_PGanonWater(0);
  const bool dieGanonFire = hasFlag_Die_PGanonFire(0);
  const bool dieGanonElectric = hasFlag_Die_PGanonElectric(0);
  const int flags = this->siteBossFlags & 0xFFFFFFFC;
  int multiplier;
  if ( flags == 4 )
    multiplier = 3;
  else if ( flags == 8 )
    multiplier = 4;
  else
    multiplier = dieGanonFire + dieGanonWind + dieGanonWater + dieGanonElectric;
  return baseHp + multiplier * halfBaseHp;
}

En pratique, cela signifie que la première ombre que Link bat disposera de 800+0×400 = 800 HP, la seconde aura 800+1×400 = 1200 HP, la troisième 800+2×400 = 1600 HP et la dernière 800+3×400 = 2000 HP.

Cas spécial 1 : Les ombres du château

Les ombres du château d'Hyrule ont IsRemainBoss réglé sur false dans les paramètres de leur AI root (voir AIDef:AI/SiteBossSpearRoot par exemple), ce qui active le flag 4.

Ainsi, les ombres combattues au château disposent toujours de 800+3×400 = 2000 HP quelle que soit la progression de l'histoire.

Si le flag 4 est activé, le code AIDef:Action/SiteBossDie n'incrémenta PAS le compteur Defeated. Cela signifie que les ombres du château ne donnent aucun point de nivellement.

Cas spécial 2 : Les ombres du DLC2

Les ombres dans l'univers onirique possèdent le tag acteur EnemySiteBoss_R. Cela conduit à l'activation du flag 8. Donc celles-ci auront toujours 500+4×250 = 1500 HP.

Fait intéressant, la fonction AI de l'ombre de vent de Ganon (Windblight) ne vérifie pas le tag acteur mais plutôt le nom d'acteur. Pour que le flag 8 soit activé, le nom doit absolument être Enemy_SiteBoss_Bow_R.