Difficulty scaling: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 13: Line 13:
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.
* The actor does not have the NotCountDefeatedNum flag.
* The actor does not have the NotCountDefeatedNum [[actor tag]].
* '''For Monk Maz Koshia''': 'Defeated_Priest_Boss_Normal_Num' is 0.
* '''For Monk Maz Koshia''': 'Defeated_Priest_Boss_Normal_Num' is 0.
* '''For Dark Beast Ganon''': It is the first time the boss is beaten. (Ganon's Defeated flag has 1 as the maximum value.)  
* '''For Dark Beast Ganon''': It is the first time the boss is beaten. (Ganon's Defeated flag has 1 as the maximum value.)  
Line 36: Line 36:
* and WorldMgr::sInstance->disableScaling (set to true when entering Trial of the Sword)
* and WorldMgr::sInstance->disableScaling (set to true when entering Trial of the Sword)


<!--T:394-->
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.


<!--T:395-->
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.


Line 52: Line 54:
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 == <!--T:275-->  
== Weapon modifiers == <!--T:275-->  


<!--T:276-->
<!--T:276-->
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 === <!--T:277-->  
<!--T:396-->
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''.
 
=== Modifier types === <!--T:277-->


<!--T:278-->
<!--T:278-->
Weapon bonuses (e.g. Durability Up, Attack Up) are entirely random. Each bonus has equal probability.
Which modifier a weapon receives is random each time Link obtains it. Which modifiers a weapon can possibly have is specific for each in [[ActorParam/GeneralParamList]], and is based on the weapon's type and the modifier tier. Note that certain modifiers can only appear at certain tiers— in particular, this means once a weapon is scaled to yellow modifiers, it can no longer receive the Critical Hit buff.
 
The odds for each type of modifier is determined by an algorithm in actWeapon which depends on the possible modifiers for a given weapon at a given tier. As such, this algorithm yields the following odds for different types of weapons:
</translate>
</translate>
 
{|class="wikitable" style="text-align: center;"
{|class="wikitable"
! rowspan=2|Weapon !! rowspan=2|Modifier Tier !! AddAtk !! AddLife !! AddCrit !! AddGuard !! AddThrow !! AddSpreadFire !! AddZoomRapid !! AddRapidFire !! AddSurfMaster
! <translate><!--T:279--> Bonus</translate> !! <translate><!--T:280--> Available in modifier tiers</translate>
|-
| <translate><!--T:281--> Attack Up</translate> || <translate><!--T:283--> Durability Up</translate> || <translate><!--T:295--> Critical Hit</translate> || <translate><!--T:293--> Shield Guard Up</translate> || <translate><!--T:285--> Long Throw</translate> || <translate><!--T:287--> 5-Shot Burst</translate> || <translate><!--T:297--> ''Unused''<sup>[[#Notes|[a] ]]</sup></translate> || <translate><!--T:289--> Quick Shot</translate> || ''Unused''<sup>[[#Notes|[b] ]]</sup>
|-
|-
| Most melee weapons || White/Blue || 25% || 33.3̅3̅% || 41.6̅6̅% || - || -  || - || - || - || -
|-
|-
| <translate><!--T:281--> Attack up</translate> || <translate><!--T:282--> Blue/White and Yellow</translate>
| Most melee weapons || Yellow || 25% || 33.3̅3̅% || - || - || 41.6̅6̅% || - || - || - || -
|-
|-
| <translate><!--T:283--> Durability up</translate> || <translate><!--T:284--> Blue/White and Yellow</translate>
| Traveler's Sword/<br>Rusty Broadsword || White/Blue || 50% || 50% || Impossible || - || - || - || - || - || -
|-
|-
| <translate><!--T:285--> Long throw</translate> || <translate><!--T:286--> Yellow</translate>
| Boomerangs, elemental rods and wind items || Yellow || 50% || 50% || - || - || Impossible || - || - || - || -
|-
|-
| <translate><!--T:287--> Multi-shot burst (bows)</translate> || <translate><!--T:288--> Yellow</translate>
| Shields || White/Blue || - || 50% || - || 50%<sup>[[#Notes|[c] ]]</sup> || - || - || - || - || -
|-
|-
| <translate><!--T:289--> Quick shot (bows)</translate> || <translate><!--T:290--> Yellow</translate>
| Shields || Yellow || - || 50% || - || 50%<sup>[[#Notes|[c] ]]</sup> || - || - || - || - || -
|-
|-
| <translate><!--T:291--> AddSurfMaster</translate> || <translate><!--T:292--> Yellow</translate>
| Bows || White/Blue || 50% || 50% || - || - || - || - || - || - || -
|-
|-
| <translate><!--T:293--> Shield guard up</translate> || <translate><!--T:294--> Blue/White and Yellow</translate>
| Normal Bows || Yellow || 25% || 33.3̅3̅% || - || - || - || - || - || 41.6̅6̅% || -
|-
|-
| <translate><!--T:295--> Critical Hit</translate> || <translate><!--T:296--> Blue/White</translate>
| Multi-Shot Bows<sup>[[#Notes|[d] ]]</sup> || Yellow || 12.5% || 22.2̅2̅% || - || - || - || 29.16̅% || - || 36.1̅1̅% || -
|-
|-
| <translate><!--T:297--> ZoomRapid</translate> || <translate><!--T:298--> Yellow</translate>
|}
|}


<translate>
<translate>
<!--T:299-->
==== Notes ==== <!--T:299-->
Notes:
* <small>[a]</small> AddSurfMaster, or "Shield Surf Up" 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, though if implemented through mods or glitches it uses a yellow shield icon and reads "Shield Surf Up"
* "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.
* <small>[b]</small> AddZoomRapid is another unused bonus that gives bows a zoom when aimed, similar to the property inherent to the Golden and Phrenic Bows.
* 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.
* <small>[c]</small> Due to a bug, if "Shield Guard Up" is rolled for an amiibo weapon, "Durability Up" will be applied using that value instead.<ref name="amiiboShield">The bugged code is in function {{addr|a=0x71002df7d8|ver=nx-1.5.0}}.</ref>
* <small>[d]</small> These are for bows which can have the Five-Shot Burst modifier, which are the Forest Dweller's Bow, Lynel Bow, Mighty Lynel Bow, and the Savage Lynel Bow. (Despite shooting multiple arrows, the Duplex Bow and Great Eagle Bow cannot have this modifier.)
 
====Impossible modifiers====
Some items of a weapon type are furthermore restricted from certain modifiers, or the only ones that can receive it:
*Cannot receive Critical Hit (<code>SharpWeaponAddCrit</code> is false):
** Odd cases: Traveler's Sword, Rusty Broadsword
** Special weapons: Master Sword, One-Hit Obliterator
*Cannot receive Long Throw (<code>PoweredSharpAddThrowMin || PoweredSharpAddThrowMax == 1.0</code>):
** Boomerangs: Boomerang, Giant Boomerang, Lizal Boomerang, Lizal Forked Boomerang, Lizal Tri-Boomerang, Lizalfos Arm, Sea-Breeze Boomerang
** Elemental rods: Fire Rod, Ice Rod, Lightning Rod, Meteor Rod, Blizzard Rod, Thunderstorm Rod
** Wind-blowing weapons: Korok Leaf, Windcleaver
** Special weapons: Master Sword, One-Hit Obliterator
*Can receive Five-Shot Burst (<code>PoweredSharpAddSpreadFire</code> is true):
** Forest Dweller's Bow, Lynel Bow, Mighty Lynel Bow, Savage Lynel Bow
*The Hero's Shield will never recieve Shield Guard up due to only being obtainable from amiibo.
 
There are also some items that have values for modifiers in their parameters, but in all actual in-game cases have scaling restricted. This is mostly weapons only obtainable through crafting or shops.
*Never seen with any modifiers:
**Only from purchasing: Ancient Short Sword, Ancient Bladesaw, Ancient Shield, Ancient Bow, Spring-Loaded Hammer
**Champions' weapons restricted: Scimitar of the Seven, Daybreaker, Boulder Breaker, Great Eagle Bow, Ceremonial Trident, Lightscale Trident
**Skeleton arms: Bokoblin Arm, Lizalfos Arm, Moblin Arm
**Random items: Farmer's Pitchfork
**Special weapon: Bow of Light
*Never seen with yellow modifiers (only white):
**Random items: Tree Branch, Soup Ladle, Boat Oar, Woodcutter's Axe, Wooden Mop, Pot Lid, Wooden Bow
 
Finally, there are some items which either have limited instances where scaling is allowed and/or limited modifier availability before they upgrade. A list can be found [https://docs.google.com/spreadsheets/d/1RdV6RsHucg4h22sIZOEBsGSE7Mxk4zUipsADoGIjkOk/pubhtml# here].


=== Bonus values === <!--T:300-->  
=== Modifier values === <!--T:300-->  


<!--T:301-->
<!--T:301-->
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 actual 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. The possible values for a bonus are generally higher for a yellow tier.


==== amiibo ==== <!--T:302-->  
==== Non-amiibo weapons ==== <!--T:315-->  
</translate>
</translate>
{|class="wikitable"
{|class="wikitable" style="text-align: center;"
! <translate><!--T:303--> Bonus</translate> !! <translate><!--T:304--> Value that is used for the bonus effect</translate>
! <translate><!--T:316--> Modifier chosen</translate> !! Effect if applied !! Bonus Value (White/Blue) !! Bonus Value (Yellow)
|-
| <translate><!--T:318--> None</translate> || - || - || -
|-
| <translate><!--T:319--> Attack Up</translate> || Attack value boosted by: || Random integer between [SharpWeaponAddAtkMin, SharpWeaponAddAtkMax] || Random integer between [PoweredSharpAddAtkMin, PoweredSharpAddAtkMax]
|-
|-
| <translate><!--T:305--> None</translate> || -
| <translate><!--T:321--> Durability Up</translate> || Durability value boosted by: || Random integer between [SharpWeaponAddLifeMin, SharpWeaponAddLifeMax] || Random integer between [PoweredSharpAddLifeMin, PoweredSharpAddLifeMax]
|-
|-
| <translate><!--T:306--> Attack up</translate> || addAtkMax
| Critical Hit || Last hit of a chain does double damage/staggers enemies || - || N/A
|-
|-
| <translate><!--T:307--> Durability up</translate> || addLifeMax
| <translate><!--T:331--> Shield Guard Up</translate> || Shield guard value boosted by: || Random integer between [SharpWeaponAddGuardMin, SharpWeaponAddGuardMax] || Random integer between [PoweredSharpWeaponAddGuardMin, PoweredSharpWeaponAddGuardMax]
|-
|-
| <translate><!--T:308--> Long throw</translate> || addThrowMax
| <translate><!--T:323--> Long Throw</translate> || Throw distance multiplied by: || - || Random float between [PoweredSharpAddThrowMin, PoweredSharpAddThrowMax]
|-
|-
| <translate><!--T:309--> Multi-shot burst (bows)</translate> || <translate><!--T:310--> 5-shot burst</translate>
| <translate><!--T:325--> Multi-Shot Burst</translate> || Bow shoots multiple arrows: || - || 5
|-
|-
| <translate><!--T:311--> Quick shot (bows)</translate> || addRapidFireMin
| ''AddZoomRapid'' || Reticle zooms when aiming || - || Unknown {{check}}
|-
|-
| <translate><!--T:312--> AddSurfMaster</translate> || [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio
| <translate><!--T:327--> Quick Shot</translate> || Firing rate multiplied by: || - || Random float between [PoweredSharpAddRapidFireMin, PoweredSharpAddRapidFireMax]
|-
|-
| <translate><!--T:313--> Shield guard up</translate> || addGuardMax
| <translate><!--T:329--> ''AddSurfMaster''</translate> || Shield surfing friction multiplied by: || - || 0.2 (from [[GlobalParameter]]::ShieldSurfMasterFrictionRatio)
|}
|}


<translate>
<translate>
<!--T:314-->
<!--T:333-->
In summary, for amiibo weapons, an attack up always brings it to the greatest possible attack power.
In summary, for non-amiibo weapons, a modifier bonus results in a randomized additional value in a certain range for each item.
No randomness is involved.
 
==== amiibo weapons ==== <!--T:302-->


==== Non-amiibo ==== <!--T:315-->  
<!--T:398-->
Because of a bug in the game code<ref name="amiiboShield"></ref>, any time the game randomly chooses the "Shield Guard Up" bonus, the actual bonus that gets assigned to the weapon and shows up in the user interface is "Durability Up". For this reason, the extra durability value that is used for shields with the "Durability Up" bonus is either addLifeMax or addGuardMax, depending on which bonus was chosen.
</translate>
</translate>


{|class="wikitable"
{|class="wikitable" style="text-align: center;"
! <translate><!--T:316--> Bonus</translate> !! <translate><!--T:317--> Value that is used for the bonus effect</translate>
! <translate><!--T:303--> Modifier chosen</translate> !! Effect if applied !! Bonus Value (White/Blue) !! Bonus Value (Yellow)
|-
| <translate><!--T:305--> None</translate> || - || - || -
|-
| <translate><!--T:306--> Attack Up</translate> || Attack value boosted by: || SharpWeaponAddAtkMax || PoweredSharpAddAtkMax
|-
|-
| <translate><!--T:318--> None</translate> || -
| <translate><!--T:307--> Durability Up</translate> || Durability value boosted by: || SharpWeaponAddLifeMax || PoweredSharpAddLifeMax
|-
|-
| <translate><!--T:319--> Attack up</translate> || <translate><!--T:320--> Random integer between addAtkMin and addAtkMax</translate>
| Critical Hit || Last hit of a chain does double damage/staggers enemies || - || N/A
|-
|-
| <translate><!--T:321--> Durability up</translate> || <translate><!--T:322--> Random integer between addLifeMin and addLifeMax</translate>
| <translate><!--T:313--> Shield Guard Up</translate> || '''Durability''' value boosted by: || SharpWeaponAddGuardMax || PoweredSharpWeaponAddGuardMax
|-
|-
| <translate><!--T:323--> Long throw</translate> || <translate><!--T:324--> Random float between addThrowMin and addThrowMax</translate>
| <translate><!--T:308--> Long Throw</translate> || Throw distance multiplied by: || - ||  PoweredSharpAddThrowMax
|-
|-
| <translate><!--T:325--> Multi-shot burst (bows)</translate> || <translate><!--T:326--> 5-shot burst</translate>
| <translate><!--T:309--> Multi-Shot Burst</translate> || Bow shoots multiple arrows: || - || 5
|-
|-
| <translate><!--T:327--> Quick shot (bows)</translate> || <translate><!--T:328--> Random float between addRapidFireMin and addRapidFireMax</translate>
| ''AddZoomRapid'' || Reticle zooms when aiming || - || Unknown {{check}}
|-
|-
| <translate><!--T:329--> AddSurfMaster</translate> || <translate><!--T:330--> [[bgparamlist#Global|GlobalParameter]]::shieldSurfMasterFrictionRatio</translate>
| <translate><!--T:311--> Quick Shot</translate> || Firing rate multiplied by: || - || PoweredSharpAddRapidFireMin
|-
|-
| <translate><!--T:331--> Shield guard up</translate> || <translate><!--T:332--> Random integer between addGuardMin and addGuardMax</translate>
| <translate><!--T:312--> ''AddSurfMaster''</translate> || Shield surfing friction multiplied by: || - || 0.2 (from [[GlobalParameter]]::ShieldSurfMasterFrictionRatio)
|}
|}


<translate>
<translate>
<!--T:333-->
<!--T:314-->
In summary, for non-amiibo weapons, an attack up results in a randomized attack power.
In summary, for amiibo weapons, a modifier always yields the highest possible value for that weapon as a bonus, except Quick Shot, which will use the ''lowest'' value.
No randomness is involved, aside from whether the Durability Up bonus comes from the AddLifeMax or AddGuardMax value.


== Enemies == <!--T:334-->  
== Enemies == <!--T:334-->  
Line 191: Line 237:
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> === <!--T:347-->
=== <code>SharpWeaponJudgeType</code> === <!--T:347-->
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.


Line 445: Line 491:


<!--T:393-->
<!--T:393-->
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 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>.


</translate>
</translate>


<references />
<references />
[[Category:Internals]]
[[Category:Internals{{#translation:}}]]
[[Category:Game mechanics]]
[[Category:Game mechanics{{#translation:}}]]
6

edits