Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calc mode issues for triggers and mirages #7458

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

Paliak
Copy link
Contributor

@Paliak Paliak commented Mar 25, 2024

Fixes issue mentioned on discord. Related #7390 #7317 #6898

Description of the problem being solved:

Calc modes were a mess with a bunch of vestigial code. This caused many calc issues and potential slow downs as well as odd cache re-use issues.

Steps taken to verify a working solution:

The mana cost warning diffs in the following output are an example of cache re-use causing incorrect readings. The different in Relfection from The Saviour is caused by a different structure of modDBs and how modDB structures affect rounding of more modifiers.

Savefile Diff for httpspastebincomnd8XxzjM.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -690,11 +690,9 @@
                <PlayerStat stat="FireTakenDotMult" value="0.09"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="79.48502055"></PlayerStat>
                <PlayerStat stat="ManaCostWarning1" value="Summon Stone Golem"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning2" value="Signal Prey"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning3" value="Raise Spectre"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning4" value="Summon Chaos Golem"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning5" value="Pride"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning6" value="Animate Guardian"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning2" value="Raise Spectre"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning3" value="Summon Chaos Golem"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning4" value="Animate Guardian"></PlayerStat>
                <MinionStat stat="SpellSuppressionChanceOverCap" value="0"></MinionStat>
                <MinionStat stat="LifeLeechInstances" value="7.7677311471353"></MinionStat>
                <MinionStat stat="WithIgniteDPS" value="2838184.7060276"></MinionStat>

Output Diff for httpspastebincomnd8XxzjM.build

ManaCostWarning6 Mismatch in player outputs: 
        head Output: Animate Guardian
        dev Output: nil
ManaCostWarning3 Mismatch in player outputs: 
        head Output: Raise Spectre
        dev Output: Summon Chaos Golem
ManaCostWarning4 Mismatch in player outputs: 
        head Output: Summon Chaos Golem
        dev Output: Animate Guardian
ManaCostWarning2 Mismatch in player outputs: 
        head Output: Signal Prey
        dev Output: Raise Spectre
ManaCostWarning5 Mismatch in player outputs: 
        head Output: Pride
        dev Output: nil

Savefile Diff for httpspobbin1B8U9yDyWot.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -683,16 +683,8 @@
                <PlayerStat stat="EnergyShieldDegen" value="0"></PlayerStat>
                <PlayerStat stat="FireTakenDotMult" value="0.25"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="659.63835"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning1" value="Assassin's Mark"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning2" value="Vulnerability"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning3" value="Pride"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning4" value="Desecrate"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning5" value="Raise Spectre"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning6" value="Animate Guardian"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning7" value="Raise Spectre"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning8" value="Summon Chaos Golem"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning9" value="Haste"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning10" value="Summon Stone Golem"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning1" value="Summon Chaos Golem"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning2" value="Summon Stone Golem"></PlayerStat>
                <MinionStat stat="SpellSuppressionChanceOverCap" value="0"></MinionStat>
                <MinionStat stat="ManaOnBlock" value="0"></MinionStat>
                <MinionStat stat="WithIgniteDPS" value="4068327.2786744"></MinionStat>

Output Diff for httpspobbin1B8U9yDyWot.build

ManaCostWarning6 Mismatch in player outputs: 
        head Output: Animate Guardian
        dev Output: nil
ManaCostWarning7 Mismatch in player outputs: 
        head Output: Raise Spectre
        dev Output: nil
ManaCostWarning8 Mismatch in player outputs: 
        head Output: Summon Chaos Golem
        dev Output: nil
ManaCostWarning9 Mismatch in player outputs: 
        head Output: Haste
        dev Output: nil
ManaCostWarning2 Mismatch in player outputs: 
        head Output: Vulnerability
        dev Output: Summon Stone Golem
ManaCostWarning3 Mismatch in player outputs: 
        head Output: Pride
        dev Output: nil
ManaCostWarning1 Mismatch in player outputs: 
        head Output: Assassin&apos;s Mark
        dev Output: Summon Chaos Golem
ManaCostWarning4 Mismatch in player outputs: 
        head Output: Desecrate
        dev Output: nil
ManaCostWarning10 Mismatch in player outputs: 
        head Output: Summon Stone Golem
        dev Output: nil
ManaCostWarning5 Mismatch in player outputs: 
        head Output: Raise Spectre
        dev Output: nil

Savefile Diff for httpspobbin1R7av1GlriU.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -681,6 +681,7 @@
                <PlayerStat stat="FireTakenDotMult" value="0.11"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="309.5296092"></PlayerStat>
                <PlayerStat stat="ManaCostWarning1" value="Summon Chaos Golem"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning2" value="Raise Zombie"></PlayerStat>
                <MinionStat stat="SpellSuppressionChanceOverCap" value="0"></MinionStat>
                <MinionStat stat="ManaOnBlock" value="0"></MinionStat>
                <MinionStat stat="WithIgniteDPS" value="925230.32273454"></MinionStat>

Output Diff for httpspobbin1R7av1GlriU.build

ManaCostWarning2 Mismatch in player outputs: 
        head Output: nil
        dev Output: Raise Zombie

Savefile Diff for httpspobbin2JP91esEXeY.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -637,6 +637,7 @@
                <PlayerStat stat="FireTakenDotMult" value="0.176"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="0"></PlayerStat>
                <PlayerStat stat="ManaCostWarning1" value="Flicker Strike"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning2" value="Assassin's Mark"></PlayerStat>
                <PlayerStat stat="MainHandBrittleChanceOnCrit" value="0"></PlayerStat>
                <PlayerStat stat="MainHandChillChanceOnHit" value="100"></PlayerStat>
                <PlayerStat stat="MainHandEnemyStunThresholdMod" value="1"></PlayerStat>

Output Diff for httpspobbin2JP91esEXeY.build

ManaCostWarning2 Mismatch in player outputs: 
        head Output: nil
        dev Output: Assassin&apos;s Mark

Savefile Diff for httpspobbin6Md0lMDThvlI.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -95,11 +95,11 @@
                <PlayerStat stat="ChaosResist" value="82"></PlayerStat>
                <PlayerStat stat="ChaosResistOverCap" value="44"></PlayerStat>
                <PlayerStat stat="EffectiveMovementSpeedMod" value="2.847"></PlayerStat>
-               <PlayerStat stat="FullDPS" value="40962680.460112"></PlayerStat>
+               <PlayerStat stat="FullDPS" value="40847593.595967"></PlayerStat>
                <PlayerStat stat="FullDotDPS" value="55389.377100568"></PlayerStat>
-               <FullDPSSkill skillPart="" source="" stat="Full Impale DPS" value="21708565.827733"></FullDPSSkill>
-               <FullDPSSkill skillPart="" source="Saviour" stat="Reflection" value="9626316.2120679"></FullDPSSkill>
+               <FullDPSSkill skillPart="" source="" stat="Full Impale DPS" value="21647491.987417"></FullDPSSkill>
                <FullDPSSkill skillPart="" source="" stat="Cleave of Rage" value="9572409.0432105"></FullDPSSkill>
+               <FullDPSSkill skillPart="" source="Saviour" stat="Reflection" value="9572303.1882389"></FullDPSSkill>
                <FullDPSSkill skillPart="" source="Cleave of Rage" stat="Best Bleed DPS" value="55389.377100568"></FullDPSSkill>
                <PlayerStat stat="SpellSuppressionChanceOverCap" value="0"></PlayerStat>
                <PlayerStat stat="FireEnemyDamage" value="2274.615"></PlayerStat>

Output Diff for httpspobbin6Md0lMDThvlI.build

FullDPS Mismatch in player outputs: 
        head Output: 40962680.460112
        dev Output: 40847593.595967

Savefile Diff for httpspobbin6l9rHWCkFQ3Q.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -712,6 +712,7 @@
                <PlayerStat stat="EnergyShieldDegen" value="0"></PlayerStat>
                <PlayerStat stat="FireTakenDotMult" value="0.185"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="0"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning1" value="Zealotry"></PlayerStat>
                <TimelessData devotionVariant1="1" devotionVariant2="1" searchList="" searchListFallback="" socketFilterDistance="0"></TimelessData>
        </Build>
        <Import exportParty="false"></Import>

Output Diff for httpspobbin6l9rHWCkFQ3Q.build

ManaCostWarning1 Mismatch in player outputs: 
        head Output: nil
        dev Output: Zealotry

Savefile Diff for httpspobbinJMVIpB8NfS3W.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -95,12 +95,12 @@
-               <PlayerStat stat="FullDPS" value="95885121.837328"></PlayerStat>
+               <PlayerStat stat="FullDPS" value="95763892.373965"></PlayerStat>
-               <FullDPSSkill skillPart="" source="" stat="Full Impale DPS" value="45578821.105154"></FullDPSSkill>
+               <FullDPSSkill skillPart="" source="" stat="Full Impale DPS" value="45520329.457421"></FullDPSSkill>
-               <FullDPSSkill skillPart="" source="Saviour" stat="Reflection" value="19569115.864247"></FullDPSSkill>
+               <FullDPSSkill skillPart="" source="Saviour" stat="Reflection" value="19518500.994953"></FullDPSSkill>
-               <FullDPSSkill skillPart="" source="" stat="Full Culling DPS" value="9588512.1837328"></FullDPSSkill>
+               <FullDPSSkill skillPart="" source="" stat="Full Culling DPS" value="9576389.2373965"></FullDPSSkill>

Output Diff for httpspobbinJMVIpB8NfS3W.build

FullDPS Mismatch in player outputs: 
        head Output: 95885121.837328
        dev Output: 95763892.373965

Savefile Diff for httpspobbinJo3D0J952BE.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -700,6 +700,7 @@
                <PlayerStat stat="PhysicalTakenHitMult" value="0.66"></PlayerStat>
                <PlayerStat stat="FireTakenDotMult" value="1.19"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="358.092"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning1" value="Blade Vortex"></PlayerStat>
                <TimelessData devotionVariant1="1" devotionVariant2="1" searchList="" searchListFallback="" socketFilterDistance="0"></TimelessData>
        </Build>
        <Import exportParty="false" lastAccountHash="b76dc05a209432a9fcd78ef4dc60200cb738134e" lastCharacterHash="5e90f98ce088357e3b7062ef91b087e361c05993" lastRealm="PC"></Import>

Output Diff for httpspobbinJo3D0J952BE.build

ManaCostWarning1 Mismatch in player outputs: 
        head Output: nil
        dev Output: Blade Vortex

Savefile Diff for httpspobbinQYMalBGKpank.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -674,8 +674,7 @@
                <PlayerStat stat="EnergyShieldRegen" value="19"></PlayerStat>
                <PlayerStat stat="FireTakenDotMult" value="0.25"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="324.13617260467"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning1" value="Signal Prey"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning2" value="Summon Chaos Golem of the Maelstrom"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning1" value="Summon Chaos Golem of the Maelstrom"></PlayerStat>
                <MinionStat stat="SpellSuppressionChanceOverCap" value="0"></MinionStat>
                <MinionStat stat="ManaOnBlock" value="0"></MinionStat>
                <MinionStat stat="WithIgniteDPS" value="0"></MinionStat>

Output Diff for httpspobbinQYMalBGKpank.build

ManaCostWarning1 Mismatch in player outputs: 
        head Output: Signal Prey
        dev Output: Summon Chaos Golem of the Maelstrom
ManaCostWarning2 Mismatch in player outputs: 
        head Output: Summon Chaos Golem of the Maelstrom
        dev Output: nil

Savefile Diff for httpspobbinS9aqRfwcRkig.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -728,8 +728,7 @@
                <PlayerStat stat="PhysicalEnemyPen" value="0"></PlayerStat>
                <PlayerStat stat="FireTakenDotMult" value="0.16"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="628.12379448"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning1" value="Penance Brand of Dissipation"></PlayerStat>
-               <PlayerStat stat="ManaCostWarning2" value="Raise Spectre"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning1" value="Raise Spectre"></PlayerStat>
                <TimelessData devotionVariant1="1" devotionVariant2="1" searchList="" searchListFallback="" socketFilterDistance="0"></TimelessData>
        </Build>
        <Import exportParty="false" lastAccountHash="aa2562d55314f1656357ae80f6f3c2631891ec50" lastCharacterHash="9b7f2aaf5030cac383387d723a14cf7272fe5997" lastRealm="PC"></Import>

Output Diff for httpspobbinS9aqRfwcRkig.build

ManaCostWarning1 Mismatch in player outputs: 
        head Output: Penance Brand of Dissipation
        dev Output: Raise Spectre
ManaCostWarning2 Mismatch in player outputs: 
        head Output: Raise Spectre
        dev Output: nil

Savefile Diff for httpspobbinTQN51If6AivG.build

--- /dev/fd/64
+++ /dev/fd/65
@@ -681,6 +681,7 @@
                <PlayerStat stat="FireTakenDotMult" value="0.11"></PlayerStat>
                <PlayerStat stat="LightningTakenHit" value="309.5296092"></PlayerStat>
                <PlayerStat stat="ManaCostWarning1" value="Summon Chaos Golem"></PlayerStat>
+               <PlayerStat stat="ManaCostWarning2" value="Raise Zombie"></PlayerStat>
                <MinionStat stat="SpellSuppressionChanceOverCap" value="0"></MinionStat>
                <MinionStat stat="ManaOnBlock" value="0"></MinionStat>
                <MinionStat stat="WithIgniteDPS" value="1018871.6611259"></MinionStat>

Output Diff for httpspobbinTQN51If6AivG.build

ManaCostWarning2 Mismatch in player outputs: 
        head Output: nil
        dev Output: Raise Zombie

@Paliak Paliak added the crash Causes PoB to crash and is High Priority label Mar 25, 2024
@Wires77 Wires77 merged commit 8f20e3d into PathOfBuildingCommunity:dev Mar 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Causes PoB to crash and is High Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants