Closed Aldriana closed 13 years ago
This seems to have two parts - the actual UI that will allow you to make selections and display results, and compiling a substantial list of gear to plug into that. I'm game for either one over the long weekend, but probably not both.
I'd characterize making the gear list as the easy part. I suspect you also need to define the framework for storing it before that can be done. So I guess my recommendation would be to tackle the UI piece first and worry about the gear list later.
We've avoided needing to get extra libraries that don't come with the base python install in the past. For the gui, I'd prefer not to use Tkinter ... I'd have to write/find my own drop down list implementation etc. What's your take on this? Since this tool would not need to compile/run on the target server, no special configuration would be needed there - just for developers/testers.
I'm fine with installing a limited number of additional modules for this. Just try to pick stuff with relatively good platform support (Windows + Mac at minimum, Linux would be nice) and clearly document what people will need and where to get it.
I have a first pass at this up on my fork - I would very much welcome any feedback. It's not quite ready for a pull request; as noted it's missing enchants and gems currently. The items currently entered are pure junk. It's currently experiencing an odd behavior where the mutilate glyph does not change the dps output - however logging statements in Aldriana's calculator indicate that at the only point where the glyph is referenced, the correct value is read. I could not reproduce this with assassination.py. One issue I did observe is that not taking restless blades for a combat spec/cycle causes division by zero at line 1010/1011 in Aldriana's calculator; probably should have a guard like MP, CttC, revealing strike.
Getting the 1 additional module needed is explained in comments in testing_ui.py.
Note, on OS X you need to run python in 32 bit mode to use wx. If you use python form macports you might have to rebuild with the +universal
variant.
I can run it with arch -i386 python2.7 testing_ui.py
.
Just some thoughts after I had a quick look over the code:
Regarding items, when building http://shadowcraft-test.appspot.com/ I started with sockets stored the same way you did, but found it useful to have them ordered in a list: {'name': 'Helm of Numberless Shadows', 'agi': 242, 'hit': 182, 'crit': 162, 'id': 56344, 'sockets': {'colors': ['blue', 'meta'], 'bonus_stat': 'agi', 'bonus_value': 30}}, This would probably also help setting correct gems if the UI ever gets some load/save functionality.
There's some random gear here https://github.com/julienp/ShadowCraft-Engine/blob/appengine/appengine/gear.py that might be useful, but I haven't bothered to add more than 1 item per slot, so it's not much more useful than random values.
You'll also want to think how to handle reforging. I completely forgot about it and it's a pretty bad hack in my gear selection. Maybe it would be useful to have a very simple Item class instead of dictionaries, so you can transparently return reforged stats. The reforging combobox could then just set what stats you reforge from and into.
Thanks for the suggestions Julien - yes, I forgot to mention reforging though I have though about it a couple times. I'm not sure about an Item class - I have an idea on how to track reforging that should work with the current setup more-or-less. I will make the change you suggest for sockets. And I figured out what was wrong with mutilate, fixed in next commit.
Load/save is going to be really needed ... first priority after everything works for me.
New commit up, added most gem support, fixed some errors, renamed item file to ui_data so it would be a more logical place to store things like talent/glyph defaults. Should get reforging tomorrow and be ready for a pull.
If you just checked - try again, file fail, apologies.
If anyone has items data in excel/openoffice-calc (or anything table-like) I wouldn't mind parsing that to python to populate this thing, as I do that kind of stuff about every other day. The rep rewards thread has one that I could use, but the items are focused in entry level gear (and it's missing socket bonuses).
Pull request is up, with some TODOs. Adding more items would also help quite a bit in terms of usefulness.
As this is now basically working, I'm going to close this issue. If you'd like to add some new issues for feature development on the test UI, that's completely fine, but I don't think we need an issue to track writing what has now been written.
Eventually we plan to hook this up with Antiarc's Shadowcraft-UI project for UI/frontend stuff. However, it seems like there may be some merit to writing some manner of primitive frontend for development and testing purposes. Basically: while its all well and good to operate through the UI for most purposes, I can see it being hard to distinguish front-end bugs from back-end bugs when operating through that UI.
Hence: it seems to me that having some manner of basic frontend - ideally pure python (so you don't have to install anything else to run it) to allow basic access to gear, gems, and reforging in a way that doesn't require manually adding up stats in a separate spreadsheet.
In short: I'm thinking about something about as functional as the front page of my previous spreadsheets - something that'll add up stats and give you a DPS estimate + EP values and tell you how you're doing relative to the various caps... and not a whole lot more. Does such a tool make sense to people, and does anyone feel like writing it?