Scheduled system upgrade on Sunday 21 April 2024 15:00-16:00 UTC - On that day, the wiki and other services might go down for 5-15 minutes.

Shield durability: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
imported>Leoetlino
mNo edit summary
imported>Leoetlino
Line 34: Line 34:
In 1.6.0:
In 1.6.0:


* RideBreakRatio is 1.0 for the majority of shields, and 0.2 for the Ancient Shield, which means that the latter takes shield surfing damage at a 20% rate compared to most other shields.  
* RideBreakRatio is 1.0 for the majority of shields, and 0.2 for the Ancient Shield, which means that the latter takes shield surfing damage at a 20% rate compared to most other shields.  Refer to this [https://docs.google.com/spreadsheets/u/0/d/1qhh_TLCF_1vMdpPY0QHbhYhN-eUIyh6R3Povo-gziMg/pubhtml spreadsheet] for more information on shield stats, including the hidden RideBreakRatio.


* ShieldRideBaseFrame is 120<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L26</ref> and ShieldRideHitBaseDamage is 1<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L27</ref>. This means that shield surfing costs <code>RideBreakRatio * 1</code> durability points every 4 seconds.
* ShieldRideBaseFrame is 120<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L26</ref> and ShieldRideHitBaseDamage is 1<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L27</ref>. This means that shield surfing costs <code>RideBreakRatio * 1</code> durability points every 4 seconds.

Revision as of 21:31, 13 March 2020

Shields lose durability points every time an attack is blocked and during shield surfing.

Attack blocking

The logic is as follows[1]:

float damageRatio = GlobalParameter::sInstance->globalParam->shieldDamageRatio.value();
int damage = damageRatio * (param->attackPower - guardPower - additionalGuardPower);
if (param->forceOnlyOneDamage)
  minDamage = 1;
else
  minDamage = param->minDmg;
weapon->takeDamage(min(damage, minDamage));
  • damageRatio is loaded from GlobalParameter ("ShieldDamageRatio" in the "Global" section).
  • attackPower is the power of the attack that is being blocked by the shield.
  • guardPower is the base Guard Power of the shield. It is loaded from the shield's bgparamlist ("GuardPower" in the "WeaponCommon" section).
  • additionalGuardPower is the Shield Guard Up bonus value (if any).

minDmg appears to be 1 in most cases.

In 1.6.0, ShieldDamageRatio is 0.2, meaning a shield takes a minimum of 1 damage point (in most cases), and 1 damage point for every 5 points of difference between the attack power and the guard power. [2]

Shield surfing

The shield surf damage logic is available here: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d

Here is a gist of the logic:

  • Whenever Link is shield surfing, a timer (which is tied to the shield) is incremented.
  • If Link is surfing on a "no shield damage floor", or if the L2 norm of his velocity is lower than 0.03, then the shield takes no damage.
  • Otherwise, every time the timer reaches ShieldRideBaseFrame (as configured in GlobalParameter), the shield takes RideBreakRatio * ShieldRideHitBaseDamage * Damage and the timer is reset.

In 1.6.0:

  • RideBreakRatio is 1.0 for the majority of shields, and 0.2 for the Ancient Shield, which means that the latter takes shield surfing damage at a 20% rate compared to most other shields. Refer to this spreadsheet for more information on shield stats, including the hidden RideBreakRatio.
  • ShieldRideBaseFrame is 120[3] and ShieldRideHitBaseDamage is 1[4]. This means that shield surfing costs RideBreakRatio * 1 durability points every 4 seconds.

References