Aldriana / ShadowCraft-Engine

Calculations backend for ShadowCraft, a WoW theorycraft project.
GNU Lesser General Public License v3.0
37 stars 22 forks source link

Pretty print #67

Closed dazer closed 13 years ago

dazer commented 13 years ago

I defined a print function in every test file that can be used easily (it takes a list of dictionaries) in future aditions (like procs/weapon_speed ep values). Not that it helps by much, but it can be a nice feature for in-house testing before the test UI is in place.

Aldriana commented 13 years ago

Would it make sense to split out the lists by tree? Like, looking at Assassination, for instance, the most useful comparison is Opportunity vs Precision, which is hard to do given the current arrangement.

dazer commented 13 years ago

I don't think I'm understanding you. Return 3 dictionaries, 1 per tree?. Opportunity/Precision are in different trees so, I don't see how that could help. It's doable nonetheless, but I need to get it straight.

Furthermore, the decisions to take (for rogues at least) boil down to very little choices: precision/opportunity for assassination, ruthlesness/relentless for combat and a handfull of interweaved survavility/dps talents when building a subtletly spec.

def get_talents_ranking(self, list=None): lets you input a list of talents that I believe should suffice for the feature you are requesting:

Compute talent comparison

talents_comparison, mandatory_talents = calculator.get_talents_ranking(['opportunity', 'precision'])
pretty_print([talents_comparison])

The whole list can be posted somewhere in the rogue faq as a fun fact or as a tool for back of the envelope math when the devs make some changes.

Funnily enough, get_talents_ranking has no notion of what talent you are trading when taking a new one and for this particular case (opportunity/precision) the answer is so close that it could end up the other way around when actually swapping talents (it doesn't happen with your BiS gear but I can see it happening at lower gear levels or not hit capped ones).

In fact I dreamt of returning this thing as a matrix akin to how the talents are displayed in game (taking talent tiers and trees on the making). I refrained from doing so when I realized the actual functionality of this thing would as simple as opportunity/precision decisions.

Aldriana commented 13 years ago

Well, I was thinking of just breaking down by tree so its easier to find the two talents you want to compare, as they'll be in lists of like 3 talents each instead of buried in a 20 item list. That said, it might be better still to just split out by "main tree" and "off trees" to make it even clearer.

dazer commented 13 years ago

This should do. How would you like the assassination/combat/subtlety test files to work? now pretty_print takes every output available; would we like it to only take the off_trees?

Aldriana commented 13 years ago

Assassination and Combat only care about off trees, as you can get all the main tree points; Sub sort of needs the main tree as well as there are more DPS talents than you can actually take.

dazer commented 13 years ago

Returning not implemented talents separatedly in a list looked a bit weird to me; they can be sorted/filtered by the caller if needed (since the 'not implemented' string is internationalized it'd have to check for u'not implemented': ugettext is in place of the underscore method for gettext). subtlety.py now displays every talent, but given the spec is still "on test stage" there's some value to that; feel free to change that output at will.

If no other request is to be made I think this is ready to be reviewed/pulled.