-
Notifications
You must be signed in to change notification settings - Fork 411
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
Default database profiles #639
Default database profiles #639
Conversation
Removed the kludgey method of using _init_ to check to see if the Uniform 25/25/25/25 damage pattern exists, and if missing create it. Moved creation of it to prefetch.py.
Loads defaults for target resists and damage profiles....for now. Can be extended to add anything we want on DB creation. Can be extended to add a "load default value to database" button somewhere down the line, to support people who have existing databases and don't want to recreate them.
Two things (as we discussed on Slack):
Also, |
Only ints are handled currently, if you throw a float at it, you'll get a stacktrace. This is just a little safety to convert it to an int, so if we somehow get a float (like via database injection/modification), we quietly convert it to the expected format
Redid all the values, especially updated target resist profiles. Re-implemented the _init_ on service\damagePattern.py to check for default values.
Allows for existing databases to be updated with the current default profiles. Can also be used to inject other defaults (maybe 0 and V chars?)
Changes you requested made. Tested against:
I think this is pretty good to go, unless anything jumps out at you..... |
Screenshot of the import defaults option. Maybe should be moved to the Help menu, since it's more of an override/migration/repair/etc? |
Preliminary testing looks pretty good. I like that I can delete these and then reload them if needed, and that it doesn't mess with current databases unless requested by the user. I also like moving the Uniform DP addition to this new class - keeps all defaults contained, and I believe it's a great compromise with what we've discussed before. Few notes, most of which are just pythonic changes:
Can be reduced to something like this:
This unpacks the list (which, semantically, should probably be a
Thanks for your hard work! =D |
Merged changes to see if we can clear up the merge conflict warning
@blitzmann updated as per your feedback. I think I got all the changes mentioned, let me know if I missed something or if you have other suggestions. I reran some quick tests (new DB, existing DB, reimporting multiple times, etc), haven't seen any issues. I did merge in a bunch of stuff from Master, so a bunch of the "modified" files aren't really modified. Also, that cleared up the conflict (it conflicted with the change to move the turning overrides on). |
class ImportError(Exception): | ||
pass | ||
|
||
class defaultDatabaseValues(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change case to DefaultDatabaseValues
A few more comments. Also, not sure why the merge is causing the files to be changed - anything merged from master should be ignored in the merge compare. v0v =) |
@blitzmann check now please. :) The funny thing is that I even manually copied and pasted the entire file on a couple, and for some reason github still thinks it's different. Maybe a case of Linux/Unix whitespace vs Windows? Anyway, let me know if you catch anything else.... |
This pull is to specifically add database profiles, but it's setup so that we can add other things as we see fit.
Removed the hacky way of importing the default uniform resist profile (currently checks every time Pyfa is launched).
One change to consider would be merging the deadspace and asteroid NPCs, as they are fairly similar. As they are not exactly the same (and some differ quite a bit), I've kept them separate.
Data is scraped from Chukker's database, which is from 2015.
Target resist profile number is calculated off HP*resist, and doesn't account for shield VS armor tank, just total raw buffer. This gives NPCs slightly better numbers than if we accounted for just their "real" tank, but is probably more accurate to actual game play. Since NPC repping is spotty at best, this is probably as good as it gets.
Damage profiles are calculated off the damage done by that group, and does not account for weapon cycle times. Cycle times are not exposed on the main page (only on the detailed drill down), and scraping would be painful. Checking the numbers against a handful of NPCs, it seems to work out okay as CCP generally does high damage = high cycle time, low damage = low cycle time, so a NPC with multiple damage sources will end up with a fairly close representation of what the actual numbers are. Room for improvement, if we can figure out a better way to scrape Chukkers database.