PathOfBuilding icon indicating copy to clipboard operation
PathOfBuilding copied to clipboard

Manaforged Trigger Rate is not correct.

Open 8Times opened this issue 1 year ago • 0 comments

Check version

  • [X] I'm running the latest version of Path of Building and I've verified this by checking the changelog

Check for duplicates

  • [X] I've checked for duplicate open and closed issues by using the search function of the issue tracker

Check for support

  • [X] I've checked that the calculation is supposed to be supported. If it isn't please open a feature request instead (Red text is a feature request).

What is the value from the calculation in-game?

As this is more indepth let me explain it with an example: Lightning Arrow (11 Mana) - GMP (150%) - Elemental Damage with Attacks (130%) - Trinity (140%) - Faster Attacks (110%) - Concentrated Effect (140%) Storm Rain (11 Mana) - Elemental Damage with Attacks (130%) - Concentrated Effect (140%) - Manaforged Arrows (200%) - Lightning Penetration (130%) - Mirage Archer (130%)

Ingame with this setup (excluding other sources of reduced and increased mana cost) I trigger Storm Rain every 5 shots.

To reach that point I need to use the formula Math.ceil(Blast Rain Manaforged Threshold / Lightning Arrow Cost) with the exact mana cost of both skills to avoid rounding issues.

Lightning Arrow Cost = 111,51,31,41,11,4 = 46,2462 Blast Rain Manaforged Threshold = (111,31,421,31,3)*3 = 203,0028

Math.ceil(203,0028/46,2462) = Math.ceil(4,38961038961) = 5 shots

That means my trigger rate will be my attack rate / shots required. e.g. at 3,87 APS I have a trigger rate of 0,774.

What is the value from the calculation in Path of Building?

PoB ignores the required amount of shots to trigger manaforged arrows and instead uses the constant mana cost per second. Additionally it is not accurate because it uses the already rounded down mana cost which will lead to issues on edge cases where the required amounts of shots are almost over a threshold. This leads to a trigger rate of 0,88 which would only work with a much higher attack rate.

  1. Those two imports need to be fixed, it has to be the exact mana cost: https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/ad60a7a1a3d50ea88c0ba20394a0c618a3fc58af/src/Modules/CalcTriggers.lua#L535 https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/ad60a7a1a3d50ea88c0ba20394a0c618a3fc58af/src/Modules/CalcTriggers.lua#L538
  2. trigRate = trigRate / m_ceil(manaSpentThreshold / sourceManaCost): https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/ad60a7a1a3d50ea88c0ba20394a0c618a3fc58af/src/Modules/CalcTriggers.lua#L551
  3. Replacement with accurate description https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/ad60a7a1a3d50ea88c0ba20394a0c618a3fc58af/src/Modules/CalcTriggers.lua#L541-L549

How to reproduce the issue

No response

Character build code

https://pobb.in/g-a58sUT0t-p

Screenshots

No response

8Times avatar May 20 '24 02:05 8Times