Your new MF run counter?

ffs

Well-known member
Mar 13, 2020
438
995
93
Cool stuff. Champ/boss kills are the main thing of course and one can just multiply it with hork%, but missing a hork here or there does happen and a solution to track those would really mean full accuracy. Would be super convenient as it would eliminate having to review of recordings. But agreed would still be great without it.
 
  • Like
Reactions: Luhkoh

Albatross

Well-known member
Mar 17, 2020
613
392
63
Europe/Croatia
@Luhkoh unfortunately no, being a web developer I'd have to spend a lot of time just figuring stuff out when it comes to desktop apps. However, I'm really interested to see where this goes :)

@ffs the bigger problem is traditional vs individual champ counting which this counter does. We'd have to update the old scores or adjust new scores by an approximated value. I have one 100 run sample for AT, which shows a ~3.3% difference between the two. It might be a good idea to get more data if it comes to this, both for AT and other areas.
 

0skros

New member
Sep 30, 2020
12
22
3
Hi guys,

Nice with the increased attention. Let me just try and answer a few things
  • .dll injection:
    As some of you correctly assessed, I am not using dll injection as the counter only reads from memory.

  • How the kill counter works:
    The way I count kills is that the game has a "pUnitList" stored in memory that contains all monsters currently in draw range of the player (about 2-3 screens of distance)
    Each of the monsters in a game instance gets assigned a unique ID. Furthermore it is possible to check the monster status (alive/dead/etc), and the monster type (and a few other things as well)

    So what I do is that every time a new monster is encountered, add it to an observed monster list if it is alive.
    Then if the same monster ID changes status to dead, I add it to a list of dead monster IDs and increment the total kill counter. Then I also have a check for the monster type, to find out if I should increment unique/champion kill count. You can see the monster type mapping I made here:
    https://github.com/oskros/MF_run_counter/blob/master/memory_reader/reader_utils.py#L108-L123

    The reason I have the observed monster list is to not count kills of already dead monsters (e.g. at Pindleskin)

    This is the function that performs the kill count if you're curious:
    https://github.com/oskros/MF_run_counter/blob/master/memory_reader/reader.py#L184-L219

    As one guy correctly pointed out, there is currently an issue where monster spawned hydras increment the total kill count when they despawn. I have not tested this with player spawned hydras, but hopefully its not an issue here. This does NOT impact the unique/champion kill count, as the monster type is different - I might find a fix for this in the future.

  • Viewing total kill counts:
    As of now the "Advanced Stats Tracker" only displays Unique/Champion kills. It is however also possible to view total kills, by going to the "Profiles" tab, and clicking the "Open" button for the relevant session (or Profile history). Then you open the "Run table" tab, and in there you can see additional stats for each run, including a total kill count.

  • Counting casts of "Find Item":
    I wouldn't rule this out as impossible yet, but I don't know how to do this as of right now, and don't have the time at the moment to look further into this
 
Last edited:

Luhkoh

Well-known member
Guide Author
Mar 13, 2020
736
1,301
93
30
USA
Awesome thanks so much for the answers @0skros. And of course for the hard work on the runcounter. I'm sure I will want to pester you with some more questions or requests on it, but what youve made here (unique, champ, and total monster count) will be an amazing change for the efficiency discussion/runs we like to do here. So thanks so much.

With this feedback from 0skros, as well as some light code reading from a friend who works with python (but not quite a thorough check), I think it's pretty clear this wont affect the game code, and would like to try it out today in prep for the upcoming rf/mf tourney. Let me know if anyone thinks there's a problem and I should hold off (especially @maxicek) but I'm looking forward to it. Need a pitmap on my barb desperately, and this should change map evaluation from just terrible to fairly fun.
 

Nano

Active member
Mar 16, 2020
46
163
33
Great work and thanks for the explanation of the kill counter.
 

ffs

Well-known member
Mar 13, 2020
438
995
93
@maxicek I've briefly tried the run counter as well to track a couple of test runs. It really does a fantastic job and could be relied on heavily in Hall of Records and MF/RF efficiency discussions. From my understanding it doesn't alter the game in any way. Can you confirm this is FAM under SPF rules?
 
Mar 17, 2020
28
82
13
Assuming this is FAM, does anyone know how to change the program's path to the character files? It appears to default to C:, but I my toons are on F:.
 

Luhkoh

Well-known member
Guide Author
Mar 13, 2020
736
1,301
93
30
USA
@EatSleepDiablo and anyone else interested. HERE is the link to the creator's discord. He seems quite responsive for answering questions and such.
I'm not sure myself about your specific question though. Good luck!
 
Last edited:
  • Like
Reactions: 0skros

0skros

New member
Sep 30, 2020
12
22
3
Assuming this is FAM, does anyone know how to change the program's path to the character files? It appears to default to C:, but I my toons are on F:.
You are probably using the "simple automode", which is the one that requires you to input the path to your save folder. For that to work you can simply copy paste the full path to your save folder, doesn't matter if it is on C: or F:

However, I would recommend using advanced automode if you're playing SP, since that has a lot of additional nice features. Advanced automode does not need to know about the installation path, so don't worry about that here.
 

0skros

New member
Sep 30, 2020
12
22
3
Mmh, I guess this isn't Bnet safe?

But cool work :)
I dont know how Warden detects programs that are bannable. The counter reads memory bytes, but doesn't inject or modify the game in any way so if the latter is Wardens way of detection you should be safe. If Warden can somehow detect when a program reads the memory off of diablo 2, then there could be trouble. Either way, this only applies for "Advanced automode". I intentionally made a "Simply automode" which relies on testing when your .map file is updated for starting a new run (that happens every time you join a new game). This method does nothing that you can be banned for, and should be completely safe online.
 
  • Like
Reactions: Luhkoh
Mar 17, 2020
28
82
13
@Oskros

I keep getting various error messages with the two recent updates. One creates the following notepad text:

19:46:02,481 root ERROR (<class 'PermissionError'>, PermissionError(13, 'Access is denied'), <traceback object at 0x0000019E641C6700>)
Traceback (most recent call last):
File "tkinter\__init__.py", line 1883, in __call__
File "main_frame.py", line 168, in <lambda>
File "main_frame.py", line 432, in notebook_tab_change
File "main_frame.py", line 541, in SaveActiveState
File "utils\other_utils.py", line 60, in atomic_json_dump
PermissionError: [WinError 5] Access is denied: 'Profiles/PIT_tmp.json' -> 'Profiles/PIT.json'

Thanks for your help...
 
  • Like
Reactions: 0skros

0skros

New member
Sep 30, 2020
12
22
3
@Oskros

I keep getting various error messages with the two recent updates. One creates the following notepad text:

19:46:02,481 root ERROR (<class 'PermissionError'>, PermissionError(13, 'Access is denied'), <traceback object at 0x0000019E641C6700>)
Traceback (most recent call last):
File "tkinter\__init__.py", line 1883, in __call__
File "main_frame.py", line 168, in <lambda>
File "main_frame.py", line 432, in notebook_tab_change
File "main_frame.py", line 541, in SaveActiveState
File "utils\other_utils.py", line 60, in atomic_json_dump
PermissionError: [WinError 5] Access is denied: 'Profiles/PIT_tmp.json' -> 'Profiles/PIT.json'

Thanks for your help...
Thanks for reporting this issue. I know what change I made that causes this, but I don't fully understand why it is happening for you when its not happening for me or the majority of my users. Would you mind joining the discord channel, then its easier to debug. https://discord.gg/JhkTF2g

I had 1 more user report this issue, but it was related to him running the counter from a USB and didn't get to the bottom of it. Perhaps you could help me do a bit of testing and I can find the cause and fix it?
 

ReaperYuyuko

New member
Apr 24, 2021
12
1
3
Bit overcomplicated for me. I just kill stuff as fast as humanly possible and see what drops. xD I don't need a counter to tell me how much of a loser I am for not getting what I want. xD
 

d2lover

Well-known member
Jun 24, 2020
917
524
93
Hi, what qualifies as a drop?

only HRs and S/U?

edit: ok found out, S/U and any rune.

My suggestion (don't know if possible):

if you pick up an item from the ground to the inventory, add runes automaticly to the drops, I like to keep track of low runes, but the current system makes it tedious

I don't suggest reading the ground for drops, because then you know that under that pile of stuff some rune waits there for grabbing (basicly cheating)

you could also make that for uniques that don't share the base with another

and finally if you identify set/uniques they could be added autmaticly as well.

I think that would be great, but again, don't know if that's possible.
 
Last edited: