This article goes over how this mod translated Baldur's Gate 3 damages into Elden Ring.
How Attack Ratings Are Calculated
If you already know how attack power is calculated, you can move to the next section. For those who don't know, the total attack rating (aka the damage number) is calculated in Elden Ring using the following formula:
The word "stat" in this case refers to attributes such as Strength, Dexterity etc. These multipliers can be found in the following regulation.bin fields:
- Base Damage: "Damage:" fields inside EquipParamWeapon. These fields all start with "attackBase..."
- Weapon Upgrade Damage Multiplier: "Damage %:" fields inside ReinforceParamWeapon. These fields all end with "...AtkRate."
- Weapon Stat Correction: "Correction" fields inside EquipParamWeapon. These fields all start with "correct..."
- Stat Correction %: "Correction %" fields inside ReinforceParamWeapon. These fields all have a name format of "correct<Attribute>Rate." Scaling letter grades are based on the product of Weapon Stat Correction and Stat Correction %.
- Percentage of Scaling: This multiplier is the reason why soft caps exist. This value is taken from graphs defined inside CalCorrectGraph parameter and is determined by how many points you put in a stat. This spreadsheet can help you more easily determine this value.
On the status screen, the weapon damage before the plus (+) sign is the product of the Weapon Upgrade Damage Multiplier and the Base Damage. The bonus damage in right column is the rest of the formula.
Let's calculate how much damage a player with 20 strength and 30 dexterity would do while one-handing a Standard-infused +25 Dagger. In the EquipParamEntry for Dagger (1000000), we see that the physical damage (attackBasePhysics) is 74, the Strength correction value (correctStrength) is 35 and the Dexterity correction value (correctAgility) is 65. Inside the ReinforceParamWeapon entry for "Standard +25," we see that Damage %: Physical (physicsAtkRate) is 2.45, Correction %: STR (correctStrengthRate) is 1.50 and the Correction %: DEX (correctAgilityRate) is 1.50. On a side note, this is why Dexterity and Strength have B-tier and D-tier ratings respectively, as the modified Strength correction is 35 * 1.5 = 52 (D-tier goes from 25 to 60) and the modified Dexterity correction is 65 * 1.5 = 97 (B-tier goes from 90 to 140).
Moving to CalcCorrectGraph, we see in the Default row that Threshold Point [1] (stageMaxVal1) is 18 while Threshold Point [2] (stageMaxVal2) is 60; these are the ability point values. These points correspond to Threshold Coefficient [1] (stageMaxGrowVal1) and Threshold Coefficient [2] (stageMaxValGrow2), who have values of 25 and 75 respectively. Putting this together, we can conclude that for standard infused weapons, the percentage of scaling linearly increases from 25 at 18 ability points to 75 percentage of scaling at 60 ability points. For 20 Strength and 30 Dexterity, this corresponds to 27.84 and 41.61 percentage of scaling respectively.
The AR formula is calculated for each attribute that an item scales with. Putting this all together, we get the following AR formulas:
- AR from Strength: 74 * 2.45 * ((35 * 1.5)/100) * (27.84/100) = 26.50
- AR from Dexterity: 74 * 2.45 * ((65 * 1.5)/100) * (41.61/100) = 73.55
- Base Damage * Weapon Upgrade Damage Multiplier: 74 * 2.45 = 181.30
Adding these three damages together, the total damage is 26.50 + 73.55+ 181.30 = 281, which, in the status screen, will be displayed as 181 + 100
Translating BG3 Damage rolls into Elden Ring
Unlike Elden Ring, Baldur's Gate 3 damage values are not static. Instead, they depend on the results of a damage roll. Furthermore, before a damage roll, there is also an attack roll to determine whether or not the the attack hits in the first place.
For this mod, I wanted modded weapon damages to be proportional to their BG3 counterparts. When this mod was first released, I set a ratio of 1 BG3 damage = 20 Elden Ring at +0 upgrade. At +25/+10 upgrade for a standard infused weapon, this ratio becomes 1 BG3 damage = 49 Elden Ring damage. Since version 1.6, I modified ReinforceParamWeapon so that all weapon scaling is the same as a fully upgraded standard weapon, regardless of weapon. In other words, the 1 BG3 Damage to 49 Elden Ring damage ratio is in effect whether the weapon is +0 or +25. Despite this, values inputted into the "attackBase..." fields will still need to use the 1:20 ratio. Baldur's Gate 3 (and Dungeons & Dragons in general) also adds an ability score modifier to its damage rolls. For this mod, I decided that having 60 points in a stat would be equivalent to having a +5 ability modifier. This translates to 5 * 49 = 245 extra damage at 60 ability points.
With all this in mind, let's take a look at how I modified Elden Ring's Dagger. BG3's Dagger has a damage roll of 1d4, which averages out to 2.5 damage. This leads to a attackBasePhysics value of 2.5 * 20 = 50 and a base damage value of 50 * 2.45 = 122 at +25 upgrade. BG3 daggers, because of their Finesse attribute, can scale with both Strength and Dexterity, whichever stat is higher. Unfortunately, such a feature is not possible in Elden Ring. In turn, I made it so all Finesse weapons in my mod scale only with Dexterity.
Now it's time to find the Weapon Stat Correction value (correctAgility). We know that at 60 dexterity and +25 upgrade, we have
- 5 * 49 = 245 bonus damage
- 2.5 * 49 = 122 base damage
- 75 percentage of scaling
- 1.5 Stat Correction % for Dexterity (correctAgilityRate)
From here, we find that the Dex correction value = 245/122/(75/100)/1.5 * 100 = 178. Because the Dagger is only scaling with Dexterity, we obviously have to set correctStrength to 0.
For versatile weapons, and by extension two-handed weapons, I based their damages off the two-handed damage rolls and ignored their one-handed damages. With this in mind, let's take a look at how I found the Trident's Strength correction value (correctStrength). The damage roll for a two-handed Trident is 1d8, which averages out to 4.5 damage and translates to 220 ER damage at +25 upgrade. In Elden Ring, two-handing a weapon at 60 Strength increases your Strength to 90. At 90 Strength, the percentage of scaling is 92.85. With 245 bonus damage and 1.5 Stat Correction for Strength (correctStrengthRate), we find that the Strength correction value = 100 * 245/220/(92.85/100)/1.5 = 80.
AtkParam and Flat Damages
In this mod, I wanted the Ray of Frost skill (a modified Ice Spear) on the Mourning Frost to do 13.5 * 49 = 661 magic damage at +10 upgrade regardless of player stats. In vanilla Elden Ring, Ice Spear damage scales with dexterity and intelligence. To make this happen, I went to the AtkParam_PC (aka motion value or hitbox) entry for the Ice Spear (300200075) and changed Attack Element Correct ID (overwriteAttackElementCorrectId) from 51100 (all damages scale with dexterity and intelligence) to 50000 (no scaling at all).
The next step was to determine the value for the Damage: Magic field (atkMag). All "Damage:.." values are multiplied by the "Damage %: BaseAtk" (baseAtkRate) field inside ReinforceParamWeapon. The Mourning Frost replaces Lusat's Glintstone Staff, which means at +10 upgrade, the baseAtkRate value is 3. Therefore, to get 661 damage, the atkMag field should be about 220. In practice, you won't actually do 661 damage with Ray of Frost given that, thanks to attack ratios, enemies will always block at least 10% of damages.
While we're on the topic of AtkParams, what if we changed the Attack Element Correct ID field to 10041000, where makes magic damage scale with strength? In this mod, the Mourning Frost scales exclusively with strength, and the weapon's correctStrength value is 54.4. With the scaling enabled, the Ray of Frost magic damage formula is now:
This leads to a magic damage value of 220 * 3 + 220 * 3 * ((54.4 * 1.8)/100) * (75/100) = 1144 at 60 strength.
For the Ice Spear, all values in the "Attack Correction:" damage fields are 0. These "Attack Correction:" percentage values are multipliers that multiplies a weapon's base damage. The Mourning Frost has a physical base damage of 289, a magic base damage damage of 122 and a bonus physical damage of 262 while two-handing at 60 strength and +10 reinforcement; magic damage does not scale with stats. Consider the following scenarios at 60 strength:
- If we set "Attack Correction: Magic" (atkMagCorrection) to 100 and Attack Element Correct ID is 50000, then the Ray of Frost damage is 220 * 3 + 122 = 782.
- If we set "Attack Correction: Magic" to 0, "Attack Correction: Physical" (atkPhysCorrection) to 100 and Attack Element Correct ID to 50000, then the overall Ray of Frost damage is 220 * 3 + 289 = 949; note that only the base damage and not the bonus damage is being applied.
- If we set "Attack Correction: Magic" to 100 and Attack Element Correct ID is 10041000, then the Ray of Frost damage is 220 * 3 + 220 * 3 * ((54.4 * 1.8)/100) * (75/100) + 122 + (122 * ((54.4 * 1.8)/100 * (75/100)) = 1356
- If we set "Attack Correction: Physical" to 100, "Attack Correction: Magic" to 0 and Attack Element Correct ID to 10041000, then the Ray of Frost damage is 220 * 3 + 220 * 3 * ((54.4 * 1.8)/100) * (75/100) + 289 = 1433. Because the Attack Element Correct ID only scales magic damage, the physical damage is only the weapon's base damage (i.e. 289) with no bonus damage added.
Translating BG3 Damage types into Elden Ring
Some Baldur's Gate 3 damages, such as fire and lightning, have obvious counterparts in Elden Ring. Other damages, such as Necrotic, do not. Furthermore, certain concepts such as Poison don't translate neatly between the two, as Poison is a damage type in BG3, while Poison is merely a status effect in Elden Ring. This being Elden Ring, I decided to make BG3 damages such as Cold and Poison behave more like status effects. In other words, if a BG3 spell dealt Poison damage, I made it's Elden Ring counterpart build up poison instead. Overall, the BG3 damage to Elden Ring conversion was as follows:
- Bludgeoning: Strike
- Piercing: Thrust
- Slashing: Slash
- Cold: Magic
- Fire: Fire
- Lightning: Lightning
- Thunder: Standard
- Acid: Deadly poison buildup
- Poison: Poison buildup
- Radiant: Holy
- Necrotic: Scarlet Rot buildup
- Force: Magic
- Psychic: Magic
The idea to link necrotic damage to Scarlet Rot buildup was taken from Geoho6's Elden Ring Incantation to 5e conversion project. How a status effect built up depended how their BG3 equivalent worked. If their BG3 counterpart dealt damage at the start of a turn, then players and enemies would receive a buildup equivalent to being instantly hit with a status pot. If their BG3 counterpart dealt damage at the end of a turn, then players and enemies would receive a buildup amount equivalent to a status pot, but spread out over 6 seconds. For example, if a BG3 spell dealt Necrotic damage at the start of a turn, then affected entities would instantly receive 300 Scarlet Rot build up (the same amount as a Rot Pot) as soon as they touch the spell. If said BG3 spell dealt Necrotic damage at the end of a turn, then affected entities would instead receive 50 Scarlet Rot build up every second. Remember status build up stops once said status triggers e.g. you can't build up Scarlet Rot when Scarlet Rot is triggered, but you can still build up other status effects.
Translating BG3 Buffs and Debuffs into Elden Ring
In Baldur's Gate 3, buffs usually involve modifying attack bonuses and/or AC by a specific number. This modification in turn modifies the chance an attack will hit. This change in hit chance serves as the basis for determining the buff multiplier when they are translated into Elden Ring.
To determine the multipliers, I first defined the neutral scenario as an encounter where a level 12 player with +5 ability points and a +4 proficiency bonus is facing down a monster with 17 AC. In this scenario, the player has a 65% chance of hitting a monster. If the monster is Hastened, their armor class increases to 19, which decreases the hit chance to 55%. In other words, you can say that this is the equivalent of increasing damage negation by 1 - 55/65 = 15.38%. If a player instead attacks with advantage, the player's hit chance increase to 87.75%, which in turn you can say is equivalent to a 35% damage increase in Elden Ring.
Weapon enchantment in BG3 buffs both a weapon's damage and attack roll. Therefore, to make damages of enchanted weapons proportional to their non-enchanted counterparts, both the base damage and bonus damage should be multiplied by the buff.
For example, let's find the Dex correction value for the Dagger +1. In BG3, the Dagger +1 has a damage roll of 1d4 + 1, which averages out to 3.5 damage per turn. In addition, the Dagger +1 adds a +1 bonus to the attack roll. Going by the 65% rule, the +1 bonus to the attack roll increases hit chance to 70%, which correlates to a buff of about 7.69%. Putting it all together, the base damage for Dagger +1 = 20 * 3.5 * (70/65) = 75.4 damage, or 185 damage with a +25 weapon. As mentioned earlier, bonus damage also needs to be multiplied by the buff. This in turn leads to a target bonus damage of 245 * 1.0769 = 264 at 60 Dexterity. Using the percentage of scaling and correctAgilityRate values that were used earlier, we find that the Dexterity correction value = 264/185/.75/1.5 * 100 = 127.
0 comments