Graphing stat changes +/-100 of a stat from current gear

Topics: Rawr.Base
Developer
Oct 23, 2009 at 1:15 AM

I've implemented a graph option in the options panel of Enhance model. The code is fairly generic and could be adapted for other models very easily. Basically it allows you to pass an array of stats objects eg: new Stats() { Strength = 1 } or new Stats() { AttackPower = 2 } and it draws the effect of adding or subtracting multiples of that stat. So if you pass 3 stats objects you get three graph lines. It handles up to 9 lines at present and auto scales the graph as appropriate. It also auto generates a Legend for reference.

If this idea was to be adopted for more models it would be wise to extract the code and turn it into an interface so that the model only need supply the relevant Stats array. This would then allow for the base code to be shared across lots of models.

 

On using this for Enhance its immediately apparent that haste & hit rating are very spiky graphs as has been observed in game, that adding some haste can mean lower dps.

Coordinator
Oct 23, 2009 at 1:34 AM

I've actually got something half-way done in the same realm... Have you looked at how close/shared they are, perhaps we can merge them? How detailed of a graph does it generate?

Developer
Oct 23, 2009 at 2:18 AM
Edited Oct 23, 2009 at 2:19 AM

Yours seems a bit more manual than mine and less generic.

My graph takes a Stats array and draws 1 line per stat from that +/- 100 multiples of the stat from the base. Load up the current source code, load Levva, Khadgar, EU from armoury and choose options tab and see the Stat Graph options and button.

It's currently on the Enhance Options panel as it unique to my model. It is based on work of DPSDK though although I made it more generic. Obviously this would be better appearing on the main tools menu. I noted your one Astrylian has the menu activated with a CTRL-Oemtilde or something like that??? This then gave a graph window where you manually typed in a stat name and some variance numbers. All very manual. Mine is let users tick a few boxes and click a button to display result, easier to use and does the job well. I've not looked at performance issues though but it seems fairly responsive for the amount its doing. Of course being an entirely separate graph its not dynamic, ie: change anything on the model and it doesn't refresh. However that is possibly a good thing as it allows two side by side graphs for comparison purposes.

The aim of course is for users to be able to see what stat performs best and perhaps finally put the last nail in the coffin of EP values.

Oct 23, 2009 at 2:19 AM

DPSDK (and I think ret) have had something like this, albeit a bit simpler. It's a definitely useful way to visualize relative stat values, and if you end up extracting this into an interface I'd like to migrate DPSDK to it.

Developer
Oct 23, 2009 at 2:23 AM

Mine was based on DPSDK. Ok ok ruthlessly plagiarised :)

The difference is I ditched the hard coded base graph and replaced it with a dynamic key legend. I then modified it to have negative values as well as positive ones, so we saw the effect of REMOVING a stat as much as adding one. I also modified it to dynamically scale to fill the graph rather than the DPSDK one which had a hardcoded range.

Coordinator
Oct 23, 2009 at 3:30 AM
Levva wrote:. I noted your one Astrylian has the menu activated with a CTRL-Oemtilde or something like that??? This then gave a graph window where you manually typed in a stat name and some variance numbers. All very manual. 

Yeah. It's not done. That was just a test UI to feed it values without actually building a UI. :)

Developer
Oct 23, 2009 at 2:24 PM
Edited Oct 23, 2009 at 2:31 PM

I've re-factored Graph implementation so that it now is completely generic I've taken the liberty of moving the class into Rawr.Base, so that any models can now use it.

Usage:

            Stats[] statsList = { new Stats() { Strength = 1 }, new Stats() { Agility = 1 }, new Stats() { AttackPower = 2 }, .... etc } // NB. AP is set as 2 as this is the item budget for AP. Use similar non 1 item budget values for Stamina, Spellpower etc.
            Graph graph = new Graph();
            string explanatoryText = "Blah Blah"; // this text goes top left to explain to user what they are seeing
            graph.SetupGraph(Character, statsList, explanatoryText, "DPS"); // final string value is the text on the Y axis
            graph.Show();

NB. currently max supported is 9 stats - the graph would need more colour options to support more but this is trivial to adjust.

Currently the graph uses OverallPoints from CharacterCalculationsBase. I imagine this could be altered if other models needed to specify specifics eg: Threat, Mitigation etc. Say perhaps as an extra parameter to SetupGraph.

Also it currently has no common means of displaying the graph. An extra menu on the Tools menu is a possible solution. At present I simply have the above code activated on the Rawr.Enhance options panel. This works well as it allows me to offer the user options of which graph lines they want to see displayed. This might also be useful for tank models if they wanted to change OverallPoints to a specific result type eg: Threat. The model could then provide a dropdown choice for the user before clicking display graph.

Developer
Oct 23, 2009 at 3:31 PM
Edited Oct 23, 2009 at 5:39 PM

Given the big ugly mess of code that is the Relative Stat Chart (I've never touched it and am wary to!) I wouldn't mind looking into using this.

As you mention, though, I'm likely to want to use the different 3 sub point values rather than just overall--since it's an important distinction.

What would be kinda cool if the selection of different points was integrated in somehow, so having a drop-down with Overall/Threat/Mitigation/Survival above the chart that would automagically toggle between the different points. But that might be outside the scope of the general stuff.

Could probably just iterate through SubPoints + Overall?

Oct 23, 2009 at 4:07 PM

Agreed, it would be more robust if we could graph ANY of the calculatedStats.  How much does my Mitigation go up, or my Survivability, or my Threat.  What about my WW DPS or my HS usage?  How often will my Slam proc trigger as I increase haste?

I haven't looked at the code so I'm not sure how easy it would be to implement elegantly.

Developer
Oct 23, 2009 at 8:03 PM

I've added this so now you CAN graph ANY of the calculatedStats. To use create a combo box on your options and populate it with...

comboBoxCalculationToGraph.Items.AddRange(Graph.GetCalculationNames());

The code above now becomes

            Stats[] statsList = { new Stats() { Strength = 1 }, new Stats() { Agility = 1 }, new Stats() { AttackPower = 2 }, .... etc } // NB. AP is set as 2 as this is the item budget for AP. Use similar non 1 item budget values for Stamina, Spellpower etc.
            Graph graph = new Graph();
            string explanatoryText = "Blah Blah"; // this text goes top left to explain to user what they are seeing
            graph.SetupGraph(Character, statsList, explanatoryText, _calcOpts.CalculationToGraph); // final string value is now the drop down rating selected
            graph.Show();

I am storing the value from the combo box as _calcOpts.CalculationToGraph = (string)comboBoxCalculationToGraph.SelectedItem;

So there you have it a generic graph of user selected items with user selected calculation to graph. This means tanks can choose Overall/Threat/Mitigation/Survival and see the effects.

At present I've kept the drop down effects etc on the models' character option panel. If this was widely adopted it may be better to have a Tools menu option that opened a graph and allowed selection of those items. On change of the drop down or a tickbox it would then dynamically change the graph displayed. For now being on an individual model basis means that you can save the options selected as part of your model config and it doesn't interfere with models that aren't using the graph.

For now individual model developers can add this feature to their model with minimal effort.

Coordinator
Oct 23, 2009 at 10:05 PM

Can you clarify why it needs to have any model interaction at all? How granular are the calculations?

Oct 23, 2009 at 10:34 PM

Why such large stat increments?  I would think that formulation could populate hundreds of points in no time at all.  I would think this would be invaluable to model developers in that such granularity would highlight any discontinuities in the model in a very apparent manner.

 

 

 

 

Developer
Oct 23, 2009 at 10:43 PM

Clarifying via MSN.

Developer
Oct 23, 2009 at 11:03 PM
natehieter wrote:

Why such large stat increments?  I would think that formulation could populate hundreds of points in no time at all.  I would think this would be invaluable to model developers in that such granularity would highlight any discontinuities in the model in a very apparent manner.

In what way is a stat increment of 1 large??

Coordinator
Oct 23, 2009 at 11:27 PM

That's actually what I meant when I said the "We may have to change that." (about the granularity). 1 is actually quite large a good portion of the time.

Oct 23, 2009 at 11:37 PM
Levva wrote:
natehieter wrote:

Why such large stat increments?  I would think that formulation could populate hundreds of points in no time at all.  I would think this would be invaluable to model developers in that such granularity would highlight any discontinuities in the model in a very apparent manner.

In what way is a stat increment of 1 large??

I apparently misunderstood your comment "multiples of 100".  I did not understand you were talking about the range and not the steps.

 

Developer
Oct 24, 2009 at 2:37 AM

Yes steps of 1 stat from -100 to +100 with zero being your current gear setup. This is of course stat dependent Attack Power for instance is steps of 2 to reflect its item budget. Note so far only the Enhance model implements this graph.

 

Developer
Oct 24, 2009 at 2:41 AM
Edited Oct 24, 2009 at 3:06 AM
Astrylian wrote:

That's actually what I meant when I said the "We may have to change that." (about the granularity). 1 is actually quite large a good portion of the time.

Increasing the granularity can be done by the model developer. Perhaps the default needs a scale too. So you pass a stats object array and the scale eg: with existing model scale would be 100. With a granularity of say 0.1 scale would be 1000 which would still give +/- 100 of each stat.

[Edit] Added a scale factor to the graph so developers can now set whatever granularity they choose. eg: 1 granularity = scale 100 so 0.1f granularity means scale of 1000, etc.

 

Coordinator
Oct 24, 2009 at 6:39 AM

As Levva and I discussed via MSN, I'll be migrating these feature to Rawr3. Please don't spend time implementing it in other models in the mean time. The design we're going with needs no model implementation at all, and will be a first class feature of Rawr3.

Developer
Oct 28, 2009 at 12:49 AM

WTB ability to Zoom and Pan the graph window and the legend could stand to be smaller

Developer
Oct 28, 2009 at 12:14 PM

Given the move to Rawr3 I see these as features best implemented in Rawr3. The sooner we have a Rawr3 model ready for release the quicker we can get graphical niceties like zoom and pan implemented. I noted that the Silverlight stuff has some interesting 3d options, although that's probably overkill :)

 

Developer
Oct 28, 2009 at 4:55 PM

Just think, Rawr will eventually be displayed in Holograms and fully simming the WoW client and then doing the same thing we do every night pinky... TRY TO TAKE OVER THE WORLD!!

:P

Developer
Oct 28, 2009 at 6:40 PM
Edited Oct 28, 2009 at 6:43 PM

Is that you volunteering to do the 3d "dressing room" model of your character in Rawr3 as per Rawr paper doll? That would be a neat feature. Or were you suggesting that the optimised character having worked out optimal combat rotations then fed them into the wow client to save all the hassle of having to have a player at the keyboard? Hmm not sure that's a good idea :) Would bring all sorts of new issues... "We wiped on 1% cos there's a bug in DPSWarr."

 

Developer
Oct 28, 2009 at 6:41 PM

I beg to DIFFER SIR! The Bug would *not* be in DPSWarr   :P

Developer
Oct 28, 2009 at 6:45 PM

Yeah you're right it would probs be in Bear or Mage. :P :P Either that or the Enhance one just died entering combat.

 

Developer
Oct 28, 2009 at 6:50 PM

See now we step back into the bigger realm of Rawr4... A version that makes it so you can load your entire raid into the program and see if your raid can muster up to Patchwerk (or whatever Cataclysm equivalent at the time).

Developer
Oct 28, 2009 at 7:16 PM

And then you have Rawr5 that will play the game for you, take your dog for a walk and also make coffee.

Developer
Oct 28, 2009 at 7:53 PM

http://www.pomegranatephone.com/