1,158
edits
No edit summary |
(Marked this version for translation) |
||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<translate> | <translate> | ||
<!--T:153--> | |||
'''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''' is a mechanic in ''Breath of the Wild'' that results in enemies and weapons being progressively replaced by more powerful variants during a playthrough. | ||
== Points == | == Points == <!--T:154--> | ||
The scaling system is based on a point system. Killing enemies is the ''only way'' to receive points. | The scaling system is based on a point system. Killing enemies is the ''only way'' to receive points. | ||
<!--T:155--> | |||
Whenever an enemy dies, the game increments a flag 'Defeated_{SameGroupActorName}_Num' if all of the following conditions are satisfied: | Whenever an enemy dies, the game increments a flag 'Defeated_{SameGroupActorName}_Num' if all of the following conditions are satisfied: | ||
* The current kill count is < 10. | * The current kill count is < 10. | ||
Line 14: | Line 16: | ||
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. | 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. | ||
<!--T:156--> | |||
Because enemies have to be killed throughout the main quest and bosses are considered as enemies too, difficulty scaling is unavoidable. | Because enemies have to be killed throughout the main quest and bosses are considered as enemies too, difficulty scaling is unavoidable. | ||
<!--T:157--> | |||
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]]. | ||
<!--T:158--> | |||
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 == | == Scaling inhibitors == <!--T:159--> | ||
<!--T:160--> | |||
Both scaling functions will immediately return without doing anything if: | Both scaling functions will immediately return without doing anything if: | ||
* [[WorldMgr]]::sInstance->stageType == 1 (Open World [[stage]]) | * [[WorldMgr]]::sInstance->stageType == 1 (Open World [[stage]]) | ||
Line 28: | Line 34: | ||
Scaling will also be skipped if the current [[map area]] is 28. This corresponds to "HateruSea", which is the Eventide Island area. | Scaling will also be skipped if the current [[map area]] is 28. This corresponds to "HateruSea", which is the Eventide Island area. | ||
== Weapons == | == Weapons == <!--T:161--> | ||
<!--T:162--> | |||
'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: | ||
* '''For standalone weapons''': The actor property 'LevelSensorMode' is higher than 1 '''and''' it wasn't already picked up. | * '''For standalone weapons''': The actor property 'LevelSensorMode' is higher than 1 '''and''' it wasn't already picked up. | ||
Line 36: | Line 43: | ||
* '''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')]. | ||
<!--T:163--> | |||
Note: Weapons that are bought from a shop cannot receive modifiers because they do not fit into any of the above cases. | Note: Weapons that are bought from a shop cannot receive modifiers because they do not fit into any of the above cases. | ||
== Weapon bonuses == | == Weapon bonuses == <!--T:164--> | ||
<!--T:165--> | |||
Scaling of weapons are divided into three steps: Does the weapon get replaced by a different (better weapon)? | Scaling of weapons are divided into three steps: Does the weapon get replaced by a different (better weapon)? | ||
Which of the stats (among attack, guard, durability etc) is increased? | Which of the stats (among attack, guard, durability etc) is increased? | ||
And how much it is increased. | And how much it is increased. | ||
=== Bonus types === | === Bonus types === <!--T:166--> | ||
<!--T:167--> | |||
Weapon bonuses (e.g. Durability Up, Attack Up) are entirely random. Each bonus has equal probability. | Weapon bonuses (e.g. Durability Up, Attack Up) are entirely random. Each bonus has equal probability. | ||
</translate> | </translate> | ||
{|class="wikitable" | {|class="wikitable" | ||
! <translate> Available in modifier tiers</translate> | ! <translate> <!--T:168--> Available in modifier tiers</translate> | ||
|- | |- | ||
|- | |- | ||
| <translate> Blue/White and Yellow</translate> | | <translate> <!--T:169--> Blue/White and Yellow</translate> | ||
|- | |- | ||
| <translate> Blue/White and Yellow</translate> | | <translate> <!--T:170--> Blue/White and Yellow</translate> | ||
|- | |- | ||
| <translate> Yellow</translate> | | <translate> <!--T:171--> Yellow</translate> | ||
|- | |- | ||
| <translate> Yellow</translate> | | <translate> <!--T:172--> Yellow</translate> | ||
|- | |- | ||
| <translate> Yellow</translate> | | <translate> <!--T:173--> Yellow</translate> | ||
|- | |- | ||
| <translate> Yellow</translate> | | <translate> <!--T:174--> Yellow</translate> | ||
|- | |- | ||
| <translate> Blue/White and Yellow</translate> | | <translate> <!--T:175--> Blue/White and Yellow</translate> | ||
|- | |- | ||
| <translate> Blue/White</translate> | | <translate> <!--T:176--> Blue/White</translate> | ||
|- | |- | ||
| <translate> Yellow</translate> | | <translate> <!--T:177--> Yellow</translate> | ||
|} | |} | ||
<translate> | <translate> | ||
<!--T:178--> | |||
Notes: | 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. | * "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. | * 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 === | === Bonus values === <!--T:179--> | ||
<!--T:180--> | |||
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. | ||
==== amiibo ==== | ==== amiibo ==== <!--T:181--> | ||
</translate> | </translate> | ||
{|class="wikitable" | {|class="wikitable" | ||
! <translate> Value that is used for the bonus effect</translate> | ! <translate> <!--T:182--> Value that is used for the bonus effect</translate> | ||
|- | |- | ||
| <translate> None</translate> || - | | <translate> <!--T:183--> None</translate> || - | ||
|- | |- | ||
| <translate> Attack up</translate> || addAtkMax | | <translate> <!--T:184--> Attack up</translate> || addAtkMax | ||
|- | |- | ||
| <translate> Durability up</translate> || addLifeMax | | <translate> <!--T:185--> Durability up</translate> || addLifeMax | ||
|- | |- | ||
| <translate> Long throw</translate> || addThrowMax | | <translate> <!--T:186--> Long throw</translate> || addThrowMax | ||
|- | |- | ||
| <translate> 5-shot burst</translate> | | <translate> <!--T:187--> 5-shot burst</translate> | ||
|- | |- | ||
| <translate> Quick shot (bows)</translate> || addRapidFireMin | | <translate> <!--T:188--> Quick shot (bows)</translate> || addRapidFireMin | ||
|- | |- | ||
| <translate> AddSurfMaster</translate> || [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio | | <translate> <!--T:189--> AddSurfMaster</translate> || [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio | ||
|- | |- | ||
| <translate> Shield guard up</translate> || addGuardMax | | <translate> <!--T:190--> Shield guard up</translate> || addGuardMax | ||
|} | |} | ||
<translate> | <translate> | ||
<!--T:191--> | |||
In summary, for amiibo weapons, an attack up always brings it to the greatest possible attack power. | In summary, for amiibo weapons, an attack up always brings it to the greatest possible attack power. | ||
No randomness is involved. | No randomness is involved. | ||
==== Non-amiibo ==== | ==== Non-amiibo ==== <!--T:192--> | ||
</translate> | </translate> | ||
{|class="wikitable" | {|class="wikitable" | ||
! <translate> Value that is used for the bonus effect</translate> | ! <translate> <!--T:193--> Value that is used for the bonus effect</translate> | ||
|- | |- | ||
| <translate> None</translate> || - | | <translate> <!--T:194--> None</translate> || - | ||
|- | |- | ||
| <translate> Random integer between addAtkMin and addAtkMax</translate> | | <translate> <!--T:195--> Random integer between addAtkMin and addAtkMax</translate> | ||
|- | |- | ||
| <translate> Random integer between addLifeMin and addLifeMax</translate> | | <translate> <!--T:196--> Random integer between addLifeMin and addLifeMax</translate> | ||
|- | |- | ||
| <translate> Random float between addThrowMin and addThrowMax</translate> | | <translate> <!--T:197--> Random float between addThrowMin and addThrowMax</translate> | ||
|- | |- | ||
| <translate> 5-shot burst</translate> | | <translate> <!--T:198--> 5-shot burst</translate> | ||
|- | |- | ||
| <translate> Random float between addRapidFireMin and addRapidFireMax</translate> | | <translate> <!--T:199--> Random float between addRapidFireMin and addRapidFireMax</translate> | ||
|- | |- | ||
| [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio | | [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio | ||
|- | |- | ||
| <translate> Random integer between addGuardMin and addGuardMax</translate> | | <translate> <!--T:200--> Random integer between addGuardMin and addGuardMax</translate> | ||
|} | |} | ||
<translate> | <translate> | ||
<!--T:201--> | |||
In summary, for non-amiibo weapons, an attack up results in a randomized attack power. | In summary, for non-amiibo weapons, an attack up results in a randomized attack power. | ||
== Enemies == | == Enemies == <!--T:202--> | ||
<!--T:203--> | |||
When loading enemies, the game will always try to scale enemies. | When loading enemies, the game will always try to scale enemies. | ||
<!--T:204--> | |||
However, the scaling function won't do anything if 'LevelSensorMode' is < 1 and will leave the enemy and any weapons they may hold unscaled. | However, the scaling function won't do anything if 'LevelSensorMode' is < 1 and will leave the enemy and any weapons they may hold unscaled. | ||
<!--T:205--> | |||
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: | 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. | * 'LevelSensorMode' is non zero. | ||
Line 146: | Line 163: | ||
</translate> | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
! <translate> Parameter</translate> | ! <translate> <!--T:206--> Parameter</translate> | ||
! <translate> Default</translate> | ! <translate> <!--T:207--> Default</translate> | ||
! <translate> Description</translate> | ! <translate> <!--T:208--> Description</translate> | ||
|- | |- | ||
| IsHardModeActor | | IsHardModeActor | ||
| false | | false | ||
| <translate> Controls whether an enemy only shows up in Master Mode.</translate> | | <translate> <!--T:209--> Controls whether an enemy only shows up in Master Mode.</translate> | ||
|- | |- | ||
| DisableRankUpForHardMode | | DisableRankUpForHardMode | ||
| false | | false | ||
| <translate> Controls whether the automatic rankup applies to an enemy.</translate> | | <translate> <!--T:210--> Controls whether the automatic rankup applies to an enemy.</translate> | ||
|} | |} | ||
<translate> | <translate> | ||
<!--T:211--> | |||
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). | 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). | ||
== Properties == | == Properties == <!--T:212--> | ||
<!--T:213--> | |||
=== <code>LevelSensorMode</code> === 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. | === <code>LevelSensorMode</code> === 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. | ||
<!--T:214--> | |||
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'. | 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'. | ||
=== <code>SharpWeaponJudgeType</code> === | === <code>SharpWeaponJudgeType</code> === <!--T:215--> | ||
<!--T:216--> | |||
This actor property controls the ''minimum'' modifier tier that a weapon can receive. | This actor property controls the ''minimum'' modifier tier that a weapon can receive. | ||
<!--T:217--> | |||
Internally and in assets such as [[Map unit|map units]], the following values are used for modifiers: | Internally and in assets such as [[Map unit|map units]], the following values are used for modifiers: | ||
</translate> | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
! <translate> Value</translate> | ! <translate> <!--T:218--> Value</translate> | ||
! <translate> Description</translate> | ! <translate> <!--T:219--> Description</translate> | ||
|- | |- | ||
| 0 | | 0 | ||
| <translate> '''None''': No modifiers.</translate> | | <translate> <!--T:220--> '''None''': No modifiers.</translate> | ||
|- | |- | ||
| 1 | | 1 | ||
| <translate> '''RandomBlue''': Weapon will randomly get at least a blue modifier (with <code>weaponCommonSharpWeaponPer</code> being the probability).</translate> | | <translate> <!--T:221--> '''RandomBlue''': Weapon will randomly get at least a blue modifier (with <code>weaponCommonSharpWeaponPer</code> being the probability).</translate> | ||
|- | |- | ||
| 2 | | 2 | ||
| <translate> '''Blue''': Weapon will get at least a blue modifier.</translate> | | <translate> <!--T:222--> '''Blue''': Weapon will get at least a blue modifier.</translate> | ||
|- | |- | ||
| 3 | | 3 | ||
| <translate> '''Yellow''': Weapon will get at least a yellow modifier.</translate> | | <translate> <!--T:223--> '''Yellow''': Weapon will get at least a yellow modifier.</translate> | ||
|- | |- | ||
| 4 | | 4 | ||
| <translate> '''NoneForced''' (chests only): Weapon will ''never'' spawn with any modifiers. ''This overrides regular scaling.''</translate> | | <translate> <!--T:224--> '''NoneForced''' (chests only): Weapon will ''never'' spawn with any modifiers. ''This overrides regular scaling.''</translate> | ||
|} | |} | ||
<translate> | <translate> | ||
<!--T:225--> | |||
If [[Difficulty scaling#LevelSensorMode|scaling]] is enabled, the weapon may receive modifiers from an even higher tier if point requirements are met. | If [[Difficulty scaling#LevelSensorMode|scaling]] is enabled, the weapon may receive modifiers from an even higher tier if point requirements are met. | ||
<!--T:226--> | |||
Otherwise, the weapon will get modifiers from exactly the specified tier. | Otherwise, the weapon will get modifiers from exactly the specified tier. | ||
<!--T:227--> | |||
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 == | == Scaling algorithm == <!--T:228--> | ||
=== <code>Ecosystem::LevelSensor::loadByml</code> === | === <code>Ecosystem::LevelSensor::loadByml</code> === <!--T:229--> | ||
<!--T:230--> | |||
This function is called by <code>Ecosystem::init</code> from <code>ksys::InitializeApp</code> | This function is called by <code>Ecosystem::init</code> from <code>ksys::InitializeApp</code> | ||
<!--T:231--> | |||
Sets up byml structures for reading Ecosystem/[[LevelSensor.byml]]. | Sets up byml structures for reading Ecosystem/[[LevelSensor.byml]]. | ||
=== <code>Ecosystem::LevelSensor::calculatePoints</code> === | === <code>Ecosystem::LevelSensor::calculatePoints</code> === <!--T:232--> | ||
<!--T:233--> | |||
Called by [[PlacementMgr]] when spawning actors. | Called by [[PlacementMgr]] when spawning actors. | ||
<!--T:234--> | |||
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. | ||
<!--T:235--> | |||
All flags that are referenced in the configuration file are of the form <code>Defeated_%s_Num</code>, but technically the configuration format allows for other flags to be specified. | All flags that are referenced in the configuration file are of the form <code>Defeated_%s_Num</code>, but technically the configuration format allows for other flags to be specified. | ||
<!--T:236--> | |||
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. | 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. | ||
<!--T:237--> | |||
<source lang="c++"> | <source lang="c++"> | ||
float points = 0.0; | float points = 0.0; | ||
Line 225: | Line 257: | ||
points += kill_count * kill_flag["point"]; | points += kill_count * kill_flag["point"]; | ||
<!--T:238--> | |||
this->points = points; | this->points = points; | ||
this->weapon_points = points * this->byml["setting"].Level2WeaponPower; | this->weapon_points = points * this->byml["setting"].Level2WeaponPower; | ||
Line 230: | Line 263: | ||
</source> | </source> | ||
<!--T:239--> | |||
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. | 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. | ||
=== <code>Ecosystem::LevelSensor::scaleWeapon</code> === | === <code>Ecosystem::LevelSensor::scaleWeapon</code> === <!--T:240--> | ||
<!--T:241--> | |||
Called from treasure chest code, enemy actors{{Check}}, <code>Ecosystem::LevelSensor::scaleActor</code> | Called from treasure chest code, enemy actors{{Check}}, <code>Ecosystem::LevelSensor::scaleActor</code> | ||
<!--T:242--> | |||
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). | 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). | ||
<!--T:243--> | |||
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. | ||
<!--T:244--> | |||
Pseudocode (1.0.0): | Pseudocode (1.0.0): | ||
<!--T:245--> | |||
<source lang="c++"> | <source lang="c++"> | ||
bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString& weapon_to_look_up, | bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString& weapon_to_look_up, | ||
Line 296: | Line 335: | ||
</source> | </source> | ||
=== <code>Ecosystem::LevelSensor::scaleActor</code> === | === <code>Ecosystem::LevelSensor::scaleActor</code> === <!--T:246--> | ||
<!--T:247--> | |||
Analogous to <code>LevelSensor::scaleWeapon</code>. | Analogous to <code>LevelSensor::scaleWeapon</code>. | ||
<!--T:248--> | |||
Pseudocode (1.0.0): | Pseudocode (1.0.0): | ||
<!--T:249--> | |||
<source lang="c++"> | <source lang="c++"> | ||
if (actor->params["LevelSensorMode"] < 1) | if (actor->params["LevelSensorMode"] < 1) | ||
Line 348: | Line 390: | ||
</source> | </source> | ||
== The Data == | == The Data == <!--T:250--> | ||
<!--T:251--> | |||
To make things easier to understand, here are links to: | To make things easier to understand, here are links to: | ||
* [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 kill point, enemy scaling and weapon scaling tables] | ||
Line 355: | Line 398: | ||
This makes it possible to see both the required points for enemy/weapon upgrades, as well as all of the special cases extremely easily. | This makes it possible to see both the required points for enemy/weapon upgrades, as well as all of the special cases extremely easily. | ||
== Ganon Blights == | == Ganon Blights == <!--T:252--> | ||
<!--T:253--> | |||
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. | 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. | ||
<!--T:254--> | |||
<source lang="c++">__int64 SiteBoss::getInitialHP(SiteBoss *this) // 0x71002D01F4 | <source lang="c++">__int64 SiteBoss::getInitialHP(SiteBoss *this) // 0x71002D01F4 | ||
{ | { | ||
Line 378: | Line 423: | ||
}</source> | }</source> | ||
<!--T:255--> | |||
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. | 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. | ||
=== Special case 1: Castle Blights === | === Special case 1: Castle Blights === <!--T:256--> | ||
<!--T:257--> | |||
Castle blights have <code>IsRemainBoss</code> set to false in their root AI parameters (see [[AIDef:AI/SiteBossSpearRoot]] for example), which sets flag 4. | Castle blights have <code>IsRemainBoss</code> set to false in their root AI parameters (see [[AIDef:AI/SiteBossSpearRoot]] for example), which sets flag 4. | ||
<!--T:258--> | |||
Thus, blights that are fought in the Castle always have 800+3×400 = 2000 HP regardless of story progression. | Thus, blights that are fought in the Castle always have 800+3×400 = 2000 HP regardless of story progression. | ||
<!--T:259--> | |||
If flag 4 is set, the [[AIDef:Action/SiteBossDie]] code will NOT increment the "defeated" counter. This means castle blights do not give any scaling points. | If flag 4 is set, the [[AIDef:Action/SiteBossDie]] code will NOT increment the "defeated" counter. This means castle blights do not give any scaling points. | ||
=== Special case 2: DLC2 Blights === | === Special case 2: DLC2 Blights === <!--T:260--> | ||
<!--T:261--> | |||
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. | 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. | ||
<!--T:262--> | |||
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>. | 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>. | ||