ArtificialQualia / PyEveLiveDPS

PyEveLiveDPS (PELD) is a live DPS calculator and grapher for EVE Online
GNU General Public License v3.0
157 stars 27 forks source link

The mining calculator doesn't work #73

Closed makstronchik closed 2 years ago

makstronchik commented 3 years ago

The mining calculator doesn't work

Aeternitas26 commented 2 years ago

It seems this is an issue with the regular expressions for mining. It expects the number of mined units to be bold, but in my log, it is not.

From my log:

[ 2022.03.16 12:21:03 ] (mining) You mined 697 units of Viscous Pyroxeres with a lost residue of 0 units

Lines 37 to 57 in PyEveLiveDPS/logreader.py

#this holds the regex strings for all the different languages the eve game log can be in _logLanguageRegex = { 'english': { 'character': "(?<=Listener: ).*", 'sessionTime': "(?<=Session Started: ).*", 'pilotAndWeapon': '(?:.*ffffffff>(?P<default_pilot>[^\(\)<>]*)(?:\[.*\((?P<default_ship>.*)\)<|<)/b.*> \-(?: (?P<default_weapon>.*?)(?: \-|<)|.*))', 'damageOut': "\(combat\) <.*?><b>([0-9]+).*>to<", 'damageIn': "\(combat\) <.*?><b>([0-9]+).*>from<", 'armorRepairedOut': "\(combat\) <.*?><b>([0-9]+).*> remote armor repaired to <", 'hullRepairedOut': "\(combat\) <.*?><b>([0-9]+).*> remote hull repaired to <", 'shieldBoostedOut': "\(combat\) <.*?><b>([0-9]+).*> remote shield boosted to <", 'armorRepairedIn': "\(combat\) <.*?><b>([0-9]+).*> remote armor repaired by <", 'hullRepairedIn': "\(combat\) <.*?><b>([0-9]+).*> remote hull repaired by <", 'shieldBoostedIn': "\(combat\) <.*?><b>([0-9]+).*> remote shield boosted by <", 'capTransferedOut': "\(combat\) <.*?><b>([0-9]+).*> remote capacitor transmitted to <", 'capNeutralizedOut': "\(combat\) <.*?ff7fffff><b>([0-9]+).*> energy neutralized <", 'nosRecieved': "\(combat\) <.*?><b>\+([0-9]+).*> energy drained from <", 'capTransferedIn': "\(combat\) <.*?><b>([0-9]+).*> remote capacitor transmitted by <", 'capNeutralizedIn': "\(combat\) <.*?ffe57f7f><b>([0-9]+).*> energy neutralized <", 'nosTaken': "\(combat\) <.*?><b>\-([0-9]+).*> energy drained to <", 'mined': "\(mining\) .* <b><.*?><.*?>([0-9]+).*> units of .*<b>(.+)</b>"

Aeternitas26 commented 2 years ago

for English language, the following change works as regular expression in Notepad++ (I can't get the fork to be compiled):

'mined': "\(mining\) .* <b><.*?><.*?>([0-9]+).*> units of .*<b>(.+)</b>" --> 'mined': "\(mining\) .* <.*?><.*?>([0-9]+).*> units of .*<.*?>(.+)"

Aeternitas26 commented 2 years ago

Maybe the regular expression can be extrated to a configuration file like the overview settings to avoid having them hardcoded in the application?

ArtificialQualia commented 2 years ago

Thanks for the heads up @Aeternitas26. It isn't unusual for CCP to change the format of these log messages with no notice, so it can be annoying to keep up with them at times.

Could you send me a EVE Gamelog that contains some recent mining entries in it? I haven't played EVE in a few years so it is difficult for me to get new ones nowadays. Then I can put in a fix and release a new build.

Aeternitas26 commented 2 years ago

Sure, I have uploaded them here: https://github.com/Aeternitas26/PyEveLiveDPS/tree/master/testlogs. It's for the English client though.

Thank you, even if you don't play EVE any more.

ArtificialQualia commented 2 years ago

@Aeternitas26 I appreciate you sending me that log. I've put in a fix on the dev branch and have got a working version with the log file you provided.

I've attached a compiled version here: PELD-standalone-issue73fix.zip If you can try unzipping and running that one and see if it is working for you, I can push this to master and release a proper version. Sorry to make you a QA guy, but again I don't have EVE anymore!

Note that you will probably need to bypass the windows defender message saying it's from an unknown source, it takes a decent amount of time for my new releases to get 'approved' by that system.

Aeternitas26 commented 2 years ago

No worries... actually, I work kind of as a QA guy, so I am used to it :-) But thanks for still maintaining the tool.

So, the tool is showing me the mining yield, but the numbers are a bit strange:

  • I activate "Mining tracking", "Show total value" and "Show peak value".
  • "Total" matches the one I have in cargo hold
  • "Mining" and "Peak" are 10 times less. I figured that this has something to do with "Number of seconds to average", which is "10" for me. Setting it to "2" will lead to more correct values in "Mining" and "Peak"
  • as the suggestion is to have the setting greater than the weapon cycle timer (which I tried with about 60 for the mining lasers), the shown values become even smaller.

What I want to say is: maybe this averaging calculation may need some rework or at least some more explaination. Also, CCP introduced "lost residue". That might also be interesting to show in the graph. But again, I understand that you don't play EVE anymore. The mining issue (not showing anything) is solved in my oppinion.

ArtificialQualia commented 2 years ago

Yeah, I can understand how the values are confusing for mining. The tool is meant to be, as the name implies, a measurement of units per second. So if a mining laser mines 120 units every 60 second cycle, the tool should show around 2 assuming your interval covers that cycle time.

This makes far more intuitive sense for values like damage in/out than it does for mining. But, that is why things like the 'Total' accumulator were added (and the 'show in m3 instead of units' setting), so it could be used in a way that makes more sense for mining.

I agree that 'lost residue' would be neat to show as well. If there is enough demand for that, and people like yourself to test it, I could see adding that in the future.

Thanks for testing! I'll see about making a proper release with this fix included tonight.