oskros / MF_run_counter

MF run counter developed for Diablo 2. Allows users to collect stats about their run times and found items, and can track your holy grail progress
MIT License
80 stars 18 forks source link

Add sundering charms #17

Open bviktor opened 11 months ago

bviktor commented 11 months ago

Blizzard added sundering charms in patch 2.5 of D2R:

https://news.blizzard.com/en-us/diablo2/23827590/diablo-ii-resurrected-ladder-season-two-now-live

I was unable to find certain specifics, like treasure class or quality level:

https://www.purediablo.com/diablo-2/diablo-2-treasure-class https://www.aoeah.com/news/1795--d2r-26-sunder-charm-drop-rates-single-player--best-areas-to-farm-offline https://diablo2.io/uniques/black-cleft-t1135125.html

So I just copied the values from Gheed. (Btw it seems that Gheed's TC is bogus, it's listed as 1, while on the first link it is listed as 3.)

I tested the changes, and to me it seems to work, there's one caveat tho, and that's due to the very nature of the situation: they've added new unique items to the game, and that's something that's never happened since the existence of this util, and to me it seems that such automated migrations are not implemented in the code as of now. So what happens is that this addition will not work on existing profiles, since grail.json is only created once, then not kept up-to-date.

Manually editing the existing grail.json does work, i.e. adding these:

  {
    "Item": "The Black Cleft",
    "Base Item": "Grand Charm",
    "Item Group 0": "Unique Other",
    "Item Group 1": "Charms",
    "Item Group 2": "All",
    "Item Class": "Charm",
    "Quality": "",
    "Rarity": "Unique",
    "Class restriction": "",
    "TC": "1",
    "QLVL": "70",
    "Roll rarity": "",
    "Roll chance": "",
    "Drop Andariel": "TRUE",
    "Drop Duriel": "TRUE",
    "Drop Mephisto": "TRUE",
    "Drop Diablo": "TRUE",
    "Drop Pindleskin": "TRUE",
    "Found": false
  },
  {
    "Item": "The Bone Break",
    "Base Item": "Grand Charm",
    "Item Group 0": "Unique Other",
    "Item Group 1": "Charms",
    "Item Group 2": "All",
    "Item Class": "Charm",
    "Quality": "",
    "Rarity": "Unique",
    "Class restriction": "",
    "TC": "1",
    "QLVL": "70",
    "Roll rarity": "",
    "Roll chance": "",
    "Drop Andariel": "TRUE",
    "Drop Duriel": "TRUE",
    "Drop Mephisto": "TRUE",
    "Drop Diablo": "TRUE",
    "Drop Pindleskin": "TRUE",
    "Found": false
  },
  {
    "Item": "The Cold Rupture",
    "Base Item": "Grand Charm",
    "Item Group 0": "Unique Other",
    "Item Group 1": "Charms",
    "Item Group 2": "All",
    "Item Class": "Charm",
    "Quality": "",
    "Rarity": "Unique",
    "Class restriction": "",
    "TC": "1",
    "QLVL": "70",
    "Roll rarity": "",
    "Roll chance": "",
    "Drop Andariel": "TRUE",
    "Drop Duriel": "TRUE",
    "Drop Mephisto": "TRUE",
    "Drop Diablo": "TRUE",
    "Drop Pindleskin": "TRUE",
    "Found": false
  },
  {
    "Item": "The Crack of The Heavens",
    "Base Item": "Grand Charm",
    "Item Group 0": "Unique Other",
    "Item Group 1": "Charms",
    "Item Group 2": "All",
    "Item Class": "Charm",
    "Quality": "",
    "Rarity": "Unique",
    "Class restriction": "",
    "TC": "1",
    "QLVL": "70",
    "Roll rarity": "",
    "Roll chance": "",
    "Drop Andariel": "TRUE",
    "Drop Duriel": "TRUE",
    "Drop Mephisto": "TRUE",
    "Drop Diablo": "TRUE",
    "Drop Pindleskin": "TRUE",
    "Found": false
  },
  {
    "Item": "The Flame Rift",
    "Base Item": "Grand Charm",
    "Item Group 0": "Unique Other",
    "Item Group 1": "Charms",
    "Item Group 2": "All",
    "Item Class": "Charm",
    "Quality": "",
    "Rarity": "Unique",
    "Class restriction": "",
    "TC": "1",
    "QLVL": "70",
    "Roll rarity": "",
    "Roll chance": "",
    "Drop Andariel": "TRUE",
    "Drop Duriel": "TRUE",
    "Drop Mephisto": "TRUE",
    "Drop Diablo": "TRUE",
    "Drop Pindleskin": "TRUE",
    "Found": false
  },
  {
    "Item": "The Rotting Fissure",
    "Base Item": "Grand Charm",
    "Item Group 0": "Unique Other",
    "Item Group 1": "Charms",
    "Item Group 2": "All",
    "Item Class": "Charm",
    "Quality": "",
    "Rarity": "Unique",
    "Class restriction": "",
    "TC": "1",
    "QLVL": "70",
    "Roll rarity": "",
    "Roll chance": "",
    "Drop Andariel": "TRUE",
    "Drop Duriel": "TRUE",
    "Drop Mephisto": "TRUE",
    "Drop Diablo": "TRUE",
    "Drop Pindleskin": "TRUE",
    "Found": false
  },

But that seems like a PITA to ask all users to edit JSON files, so I guess there should be some checks in the code, like if these items are missing in the profile grail JSON, add them, probably with Found: false.

Unfortunately my Python skills are non-existent, so I'll need your help with that part.

oskros commented 11 months ago

Charms drop from the "Jewelry_A", "Jewelry_B" and "Jewelry_C" treasure classes, which are not associated with any treasure class numbering. So if I wanted to be exact I should've put "Jewelry" in the TC column for Gheeds. It's the same issue for all the rings and amulets. I only set it to 1 to make the column numeric so it was easier to sort by without implementing a mixed type sorter in the code. https://www.theamazonbasin.com/wiki/index.php/Jewelry_A

So it's incorrect at PureDiablo to say that Gheed has treasure class "3" - In fact only weapons and armor treasure classes are suffixed by a number (which go from 3 to 87 in increments of 3). Examples of weapon and armor treasure classes would be https://theamazonbasin.com/wiki/index.php/Armo3 https://theamazonbasin.com/wiki/index.php/Armo6 https://theamazonbasin.com/wiki/index.php/Armo87 https://theamazonbasin.com/wiki/index.php/Weap87

So as an example, when I write TC = 9 for Twitchthroe, the correct treasure class would be "Armo9". But for the sake of simplicity I chose to write "9" instead

oskros commented 11 months ago

In terms of updating for everyone, it would be possible to make a one-off call of "update_grail_from_list" with the new items, doing a simple check in the init to see if the grail.json file already included the new items, or not.

https://github.com/oskros/MF_run_counter/blob/717687cd0e611ee086037d75ac940b3bc366f600/modules/grail.py#L203C27

I can have a look at this in one of the next couple of days hopefully

bviktor commented 11 months ago

That sounds great, thanks a lot :)

bviktor commented 11 months ago

One more thing: while the announcement mentions all the charms the "the", and they're listed even on sites like Traderie with this prefix (while on diablo2.io they don't have "the"), the in-game captions are without it in all 6 cases. So I think I should remove those from the patch as well. Whatcha think?

image image image image image image