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

[UI] Results table refactor #931

Merged
merged 45 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
df87731
Add spells chool colors
1337LutZ Aug 10, 2024
f2695d7
Damage / healing / dtps table metrics WIP
1337LutZ Aug 10, 2024
2281e39
Add metrics combined totals tooltip
1337LutZ Aug 11, 2024
825688c
Add isPeriodic bool and fix spellschools
1337LutZ Aug 11, 2024
779821c
Add SpellType filtering & concat Metrics options
1337LutZ Aug 12, 2024
affd1ef
Add isProc check to ActionMetrics and pet resolvers
1337LutZ Aug 12, 2024
a7f6962
Add damage/healing crits
1337LutZ Aug 12, 2024
6d67945
Add damage done metric & dtps miss concat
1337LutZ Aug 12, 2024
009ce42
Merge branch 'master' into feature/results-refactor
1337LutZ Aug 12, 2024
2a8fd53
Merge threat metrics
1337LutZ Aug 13, 2024
6e6c581
Remove unused metrics
1337LutZ Aug 13, 2024
04112a0
Remove console log
1337LutZ Aug 13, 2024
efa11b2
Fix typo
1337LutZ Aug 13, 2024
161074f
Fix healing prop missing
1337LutZ Aug 13, 2024
56fd1f4
de-compact H/DPS values & only ignore moving pets
1337LutZ Aug 13, 2024
ac56896
Add healing hit/crit metric & Unholy Strength crits
1337LutZ Aug 13, 2024
6d46845
Updated tests due to Unholy Strength heals being able to crit
1337LutZ Aug 13, 2024
4aa86a4
Add DPET and fallback string to formatter
1337LutZ Aug 13, 2024
22204b6
Fix aura pet movement filter
1337LutZ Aug 13, 2024
5b67e05
Remove DPASP & refactor topline results to table
1337LutZ Aug 13, 2024
bfa6624
Change field tmi to old dpasp field number
1337LutZ Aug 14, 2024
ab583eb
Add IsPassiveAction
1337LutZ Aug 14, 2024
e5e8098
PR Feedback
1337LutZ Aug 15, 2024
7c3457a
Add more PassiveSpell flags
1337LutZ Aug 15, 2024
b711226
Normalize cast / hits
1337LutZ Aug 15, 2024
2332ab0
Add glancing, blocks, crit blocked damage
1337LutZ Aug 15, 2024
4c8d8ef
Add accidental removed shoulder name
1337LutZ Aug 15, 2024
5506eb5
Add missing CritBlocks metric
1337LutZ Aug 15, 2024
46d756a
Fix descriptive comments
1337LutZ Aug 15, 2024
c30c5c0
WIP adding ticks/crit ticks
1337LutZ Aug 15, 2024
b0af6a7
Add Dot tick metrics
1337LutZ Aug 15, 2024
f98e933
Remove spelltype, add proxy spell outcomes for non-hit additions and …
1337LutZ Aug 16, 2024
e68e45c
Fix summon action ID names
1337LutZ Aug 16, 2024
3fb97e1
PR feedback: hardcode spellschools in FE
1337LutZ Aug 16, 2024
a5b3086
Fix logs layout & add NoCounter outcomes
1337LutZ Aug 16, 2024
bbb1a38
Disabled recuperate heal dot
1337LutZ Aug 16, 2024
4a3f100
Fix Casts column & update subtlety test
1337LutZ Aug 16, 2024
909c393
a few style tweaks on results refactor
kayla-glick Aug 17, 2024
2fe7782
Merge pull request #934 from wowsims/feature/results-refactor-style-t…
kayla-glick Aug 17, 2024
1b8f714
Fix InDebt findings
1337LutZ Aug 17, 2024
42bbda4
Fix mind sear metrics
1337LutZ Aug 17, 2024
2fffcfe
[Metrics] Add correct cast time metrics for channels
Aug 18, 2024
0fee7ef
Fix TotalCastTime metric for channels being 0
1337LutZ Aug 18, 2024
fadaaa8
Merge branch 'master' into feature/results-refactor
1337LutZ Aug 19, 2024
40342d8
Merge branch 'master' into feature/results-refactor
1337LutZ Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ui/*/*/index.html
dist
binary_dist
sim/web/__debug_bin
/wowsimcatacli*
/wowsimcli*
/wowsimcata*

# temporary files
Expand Down
38 changes: 36 additions & 2 deletions proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ message ActionMetrics {
// Note that some spells are untargeted, these will always have a single
// element in this array.
repeated TargetedActionMetrics targets = 3;

int32 spell_school = 4;

// True if action is applied/cast as a result of another action
bool is_passive = 5;
}

// Metrics for a specific action, when cast at a particular target.
Expand All @@ -170,6 +175,12 @@ message TargetedActionMetrics {
// # of times this action was a critical strike.
int32 crits = 3;

// # of times this action ticked on a target.
int32 ticks = 21;

// # of times this action was a critical tick on a target.
int32 crit_ticks = 22;

// # of times this action was a Miss or Resist.
int32 misses = 4;

Expand All @@ -182,18 +193,42 @@ message TargetedActionMetrics {
// # of times this action was a Block.
int32 blocks = 7;

// # of times this action was a Critical Block.
int32 crit_blocks = 20;

// # of times this action was a Glance.
int32 glances = 8;

// Total damage done to this target by this action.
double damage = 9;

// Total critical damage done to this target by this action.
double crit_damage = 15;

// Total tick damage done to this target by this action.
double tick_damage = 23;

// Total critical tick damage done to this target by this action.
double crit_tick_damage = 24;

// Total glancing damage done to this target by this action.
double glance_damage = 17;

// Total block damage done to this target by this action.
double block_damage = 18;

// Total critical block damage done to this target by this action.
double crit_block_damage = 19;

// Total threat done to this target by this action.
double threat = 10;

// Total healing done to this target by this action.
double healing = 11;

// Total critical healing done to this target by this action.
double crit_healing = 16;

// Total shielding done to this target by this action.
double shielding = 13;

Expand Down Expand Up @@ -268,10 +303,9 @@ message UnitMetrics {
int32 unit_index = 13;

DistributionMetrics dps = 1;
DistributionMetrics dpasp = 16;
DistributionMetrics threat = 8;
DistributionMetrics dtps = 11;
DistributionMetrics tmi = 17;
DistributionMetrics tmi = 16;
DistributionMetrics hps = 14;
DistributionMetrics tto = 15; // Time To OOM, in seconds.

Expand Down
2 changes: 1 addition & 1 deletion proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ message ProtoVersion {
// protos need to define an api_version field so that the UI code knows
// to up-convert these protos to the new format whenever api_version is
// missing (0) or lower than current_version_number.
option (current_version_number) = 2;
option (current_version_number) = 3;

// The actual field value is only used within unit tests.
int32 saved_version_number = 1;
Expand Down
2 changes: 1 addition & 1 deletion sim/common/shared/shared_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewProcStatBonusEffectWithDamageProc(config ProcStatBonusEffect, damage Dam
ActionID: core.ActionID{SpellID: damage.SpellID},
SpellSchool: damage.School,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell,
DamageMultiplier: 1,
CritMultiplier: character.DefaultSpellCritMultiplier(),
DamageMultiplierAdditive: 1,
Expand Down
2 changes: 1 addition & 1 deletion sim/common/tbc/caster_trinkets.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func init() {
core.AddEffectsToTest = false
// Offensive trinkets. Keep these in order by item ID.
core.NewSimpleStatOffensiveTrinketEffect(32483, stats.Stats{stats.HasteRating: 175}, time.Second*20, time.Minute*2) // Skull of Gul'dan
core.NewSimpleStatOffensiveTrinketEffect(32483, stats.Stats{stats.HasteRating: 175}, time.Second*20, time.Minute*2) // Skull of Gul'dan
core.NewSimpleStatOffensiveTrinketEffect(33829, stats.Stats{stats.SpellPower: 211}, time.Second*20, time.Minute*2) // Hex Shrunken Head
core.NewSimpleStatOffensiveTrinketEffect(34429, stats.Stats{stats.SpellPower: 320}, time.Second*15, time.Second*90) // Shifting Naaru Sliver

Expand Down
6 changes: 3 additions & 3 deletions sim/common/tbc/melee_trinkets.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ func init() {
core.NewSimpleStatOffensiveTrinketEffect(38287, stats.Stats{stats.AttackPower: 278, stats.RangedAttackPower: 278}, time.Second*20, time.Minute*2) // Empty Direbrew Mug

// Defensive trinkets. Keep these in order by item ID.
core.NewSimpleStatDefensiveTrinketEffect(29387, stats.Stats{stats.DodgeRating: 200}, time.Second*40, time.Minute*2) // Gnomeregan Auto-Blocker 600 (Cata Became Auto-Dodger)
core.NewSimpleStatDefensiveTrinketEffect(32501, stats.Stats{stats.Health: 1750}, time.Second*20, time.Minute*3) // Shadowmoon Insignia
core.NewSimpleStatDefensiveTrinketEffect(38289, stats.Stats{stats.DodgeRating: 66}, time.Second*40, time.Minute*2) // Coren's Lucky Coin
core.NewSimpleStatDefensiveTrinketEffect(29387, stats.Stats{stats.DodgeRating: 200}, time.Second*40, time.Minute*2) // Gnomeregan Auto-Blocker 600 (Cata Became Auto-Dodger)
core.NewSimpleStatDefensiveTrinketEffect(32501, stats.Stats{stats.Health: 1750}, time.Second*20, time.Minute*3) // Shadowmoon Insignia
core.NewSimpleStatDefensiveTrinketEffect(38289, stats.Stats{stats.DodgeRating: 66}, time.Second*40, time.Minute*2) // Coren's Lucky Coin

// Proc effects. Keep these in order by item ID.

Expand Down
2 changes: 1 addition & 1 deletion sim/core/TestProtoVersioning.results
Original file line number Diff line number Diff line change
@@ -1 +1 @@
saved_version_number: 2
saved_version_number: 3
148 changes: 74 additions & 74 deletions sim/core/base_stats_auto_gen.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package core

// **************************************
Expand All @@ -18,82 +17,83 @@ const SpellHitRatingPerHitPercent = 102.445740
const DodgeRatingPerDodgePercent = 176.718900
const ParryRatingPerParryPercent = 176.718900
const MasteryRatingPerMasteryPoint = 179.280040

var CritPerAgiMaxLevel = map[proto.Class]float64{
proto.Class_ClassUnknown: 0.0,
proto.Class_ClassWarrior: 0.0041,
proto.Class_ClassPaladin: 0.0049,
proto.Class_ClassHunter: 0.0031,
proto.Class_ClassRogue: 0.0031,
proto.Class_ClassPriest: 0.0049,
proto.Class_ClassDeathKnight: 0.0041,
proto.Class_ClassShaman: 0.0031,
proto.Class_ClassMage: 0.0050,
proto.Class_ClassWarlock: 0.0051,
proto.Class_ClassDruid: 0.0031,
proto.Class_ClassUnknown: 0.0,
proto.Class_ClassWarrior: 0.0041,
proto.Class_ClassPaladin: 0.0049,
proto.Class_ClassHunter: 0.0031,
proto.Class_ClassRogue: 0.0031,
proto.Class_ClassPriest: 0.0049,
proto.Class_ClassDeathKnight: 0.0041,
proto.Class_ClassShaman: 0.0031,
proto.Class_ClassMage: 0.0050,
proto.Class_ClassWarlock: 0.0051,
proto.Class_ClassDruid: 0.0031,
}
var CritPerIntMaxLevel = map[proto.Class]float64{
proto.Class_ClassUnknown: 0.0,
proto.Class_ClassWarrior: 0.0000,
proto.Class_ClassPaladin: 0.0015,
proto.Class_ClassHunter: 0.0000,
proto.Class_ClassRogue: 0.0000,
proto.Class_ClassPriest: 0.0015,
proto.Class_ClassDeathKnight: 0.0000,
proto.Class_ClassShaman: 0.0015,
proto.Class_ClassMage: 0.0015,
proto.Class_ClassWarlock: 0.0015,
proto.Class_ClassDruid: 0.0015,
proto.Class_ClassUnknown: 0.0,
proto.Class_ClassWarrior: 0.0000,
proto.Class_ClassPaladin: 0.0015,
proto.Class_ClassHunter: 0.0000,
proto.Class_ClassRogue: 0.0000,
proto.Class_ClassPriest: 0.0015,
proto.Class_ClassDeathKnight: 0.0000,
proto.Class_ClassShaman: 0.0015,
proto.Class_ClassMage: 0.0015,
proto.Class_ClassWarlock: 0.0015,
proto.Class_ClassDruid: 0.0015,
}
var ExtraClassBaseStats = map[proto.Class]stats.Stats{
proto.Class_ClassUnknown: {},
proto.Class_ClassWarrior: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: 0.0000,
},
proto.Class_ClassPaladin: {
stats.Mana: 23422.0000,
stats.SpellCritPercent: 3.3355,
stats.PhysicalCritPercent: 0.6520,
},
proto.Class_ClassHunter: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: -1.5320,
},
proto.Class_ClassRogue: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: -0.2950,
},
proto.Class_ClassPriest: {
stats.Mana: 20590.0000,
stats.SpellCritPercent: 1.2375,
stats.PhysicalCritPercent: 3.1765,
},
proto.Class_ClassDeathKnight: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: 0.0000,
},
proto.Class_ClassShaman: {
stats.Mana: 23430.0000,
stats.SpellCritPercent: 2.2010,
stats.PhysicalCritPercent: 2.9220,
},
proto.Class_ClassMage: {
stats.Mana: 17418.0000,
stats.SpellCritPercent: 0.9075,
stats.PhysicalCritPercent: 3.4540,
},
proto.Class_ClassWarlock: {
stats.Mana: 20553.0000,
stats.SpellCritPercent: 1.7000,
stats.PhysicalCritPercent: 2.6220,
},
proto.Class_ClassDruid: {
stats.Mana: 18635.0000,
stats.SpellCritPercent: 1.8515,
stats.PhysicalCritPercent: 7.4755,
},
proto.Class_ClassUnknown: {},
proto.Class_ClassWarrior: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: 0.0000,
},
proto.Class_ClassPaladin: {
stats.Mana: 23422.0000,
stats.SpellCritPercent: 3.3355,
stats.PhysicalCritPercent: 0.6520,
},
proto.Class_ClassHunter: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: -1.5320,
},
proto.Class_ClassRogue: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: -0.2950,
},
proto.Class_ClassPriest: {
stats.Mana: 20590.0000,
stats.SpellCritPercent: 1.2375,
stats.PhysicalCritPercent: 3.1765,
},
proto.Class_ClassDeathKnight: {
stats.Mana: 0.0000,
stats.SpellCritPercent: 0.0000,
stats.PhysicalCritPercent: 0.0000,
},
proto.Class_ClassShaman: {
stats.Mana: 23430.0000,
stats.SpellCritPercent: 2.2010,
stats.PhysicalCritPercent: 2.9220,
},
proto.Class_ClassMage: {
stats.Mana: 17418.0000,
stats.SpellCritPercent: 0.9075,
stats.PhysicalCritPercent: 3.4540,
},
proto.Class_ClassWarlock: {
stats.Mana: 20553.0000,
stats.SpellCritPercent: 1.7000,
stats.PhysicalCritPercent: 2.6220,
},
proto.Class_ClassDruid: {
stats.Mana: 18635.0000,
stats.SpellCritPercent: 1.8515,
stats.PhysicalCritPercent: 7.4755,
},
}
8 changes: 7 additions & 1 deletion sim/core/cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@ func (spell *Spell) makeCastFunc(config CastConfig) CastSuccessFunc {
}

if effectiveTime := spell.CurCast.EffectiveTime(); effectiveTime != 0 {
spell.SpellMetrics[target.UnitIndex].TotalCastTime += effectiveTime

// do not add channeled time here as they have variable cast length
// cast time for channels is handled in dot.OnExpire
if !spell.Flags.Matches(SpellFlagChanneled) {
spell.SpellMetrics[target.UnitIndex].TotalCastTime += effectiveTime
}

spell.Unit.SetGCDTimer(sim, max(sim.CurrentTime+effectiveTime, spell.Unit.NextGCDAt()))
}

Expand Down
2 changes: 1 addition & 1 deletion sim/core/character.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (character *Character) applyAllEffects(agent Agent, raidBuffs *proto.RaidBu
measureStats := func() *proto.UnitStats {
baseStats := character.GetStats()
character.stats = character.SortAndApplyStatDependencies(character.stats)
measuredStatsProto := &proto.UnitStats{
measuredStatsProto := &proto.UnitStats{
Stats: character.GetStats().ToProtoArray(),
PseudoStats: character.GetPseudoStatsProto(),
ApiVersion: GetCurrentProtoVersion(),
Expand Down
3 changes: 3 additions & 0 deletions sim/core/dot.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,15 @@ func newDot(config Dot) *Dot {
dot.Spell.Unit.WaitUntil(sim, sim.CurrentTime+dot.Spell.Unit.ChannelClipDelay)
}
}

dot.tickAction.Cancel(sim)
dot.tickAction = nil
if dot.isChanneled {
dot.Spell.Unit.ChanneledDot = nil
dot.Spell.Unit.Rotation.interruptChannelIf = nil
dot.Spell.Unit.Rotation.allowChannelRecastOnInterrupt = false
// track time metrics for channels
dot.Spell.SpellMetrics[aura.Unit.UnitIndex].TotalCastTime += dot.fadeTime - dot.StartedAt()
}
})

Expand Down
1 change: 1 addition & 0 deletions sim/core/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ const (
SpellFlagCombatPotion // Indicates this spell is the combat potion.
SpellFlagNoSpellMods // Indicates that no spell mods should be applied to this spell
SpellFlagCanCastWhileMoving // Allows the cast to be casted while moving
SpellFlagPassiveSpell // Indicates this spell is applied/cast as a result of another spell

// Used to let agents categorize their spells.
SpellFlagAgentReserved1
Expand Down
Loading
Loading