Diablo II: Resurrected

File information

Last updated

Original upload

Created by

alex-c-i

Uploaded by

icalexci

Virus scan

Safe to use

Tags for this mod

About this mod

This D2RMM mod allows to replace specific base item drops with no drop.
The Goal of the mod is to reduce item clutter beyond what is currently possible with other D2RMM mods while maintaining original drop chances.

Requirements
Permissions and credits
Changelogs
Donations
This D2RMM mod allows to replace specific base item drops with no drop.
The Goal of the mod is to reduce item clutter beyond what is currently possible with other D2RMM mods:

The mod allows the selection of no drop chance for the follwing:
  • misc items
  • gem qualities
  • runes (up to Fal Rune)
  • all individual armors and weapons in the game: starting from treasure class 3 and up to treasure class 87 (the highest in the game)

By replacing the original base item's drop chance with no drop there is no intended change in any item drop probability.
If you suspect the original drop chances are affected by this mod do not hesitate to contact me.

Notes: mod.json was autogenerated from the game files and then edited a bit to be easier to read, please contact me if you believe there is something wrong with one of the config parameters.

Notes about the implementation:
- the main idea was to replace the references of the original auto generated TCs (weap3, armo3, mele3, bow3, ..., weap87, armo87, mele87, bow87) with newly created copies

- items in the orignal auto generated TCs get their rarity from linking weapons.txt and armor.txt with itemtypes.txt. In short all items have rarity 3 except for claws (rarity 2), class specific items (rarity 1) and wands, staves and scepers (rarity 1).

- a TC defined in treasureclassex.txt has a limit of at most 10 items that it can group, each with its own probability. the TC also has a no drop column. the chance to get any specific item is its probability / (sum of all probabilities + no drop). Make sure to read [https://www.purediablo.com/diablo-2/item-generation](https://www.purediablo.com/diablo-2/item-generation) if you want to understand the whole D2R item generation algoritm

- each item referenced in a TC can also be an already defined TC (aka a lower TC), as such the treasureclassex.txt is recursive and can be represented as graph data structure.

- to overcome the 10 items / lower TCs per TC I split the items for each auto generated TC in groups by rarity of each item, this also helps with maintaining the original drop chances; lets look at an example:

------
weap30
------
Item Name # Probability
Cudgel # 3     
Edge Bow # 3     
Gladius # 3     
Halberd # 3     
Throwing Spear # 3     
War Javelin # 3     
Oil Potion # 3     
Quhab # 2     
Jo Staff # 1 

The sum of all the item's probabilities is 24 therefore the final drop chances for weap30 are:

Cudgel Chance = 3 / 24 (all other items with rarity = 3 have the same drop chance of course)
Quhab Chance = 2 / 24
Jo Staff Chance = 1 / 24

The mod defines the following TCs:

-----------
weap30newR1
-----------
Item Name # Probability
Jo Staff # 1

The sum of all the item's probabilities is 1 because we only have one item that had rarity 1 in the original TC.
Jo Staff chance = 1 / 1 in this TC.

-----------
weap30newR2
-----------
Item Name # Probability
Quhab # 2  

The sum of all the item's probabilities is 2 because we only have one item that had rarity 2 in the original TC.
Quhab chance = 2 / 2 in this TC.

-----------
weap30newR3
-----------
Item Name # Probability
Cudgel # 3     
Edge Bow # 3     
Gladius # 3     
Halberd # 3     
Throwing Spear # 3     
War Javelin # 3     
Oil Potion # 3     

The sum of all the item's probabilities is 21 because we have 7 items that had rarity 3 in the original TC.
Cudgel chance = 3 / 21 in this TC.

And finally the TC replacing weap30 is:

---------
weap30new
---------
Name # Probability
weap30newR1 # 1      
weap30newR2 # 2      
weap30newR3 # 21  

The sum of all the item's probabilities is 24 because we have assgined each sub TC the probability to be equal to the original items rarity it contains * the number if items. Notice 24 is also the original sum for weap30.

Hence the chances for each sub TC are:
weap30newR3 chance = 21 / 24
weap30newR2 chance =  2 / 24
weap30newR1 chance =  1 / 24

And finally calculating the chance for the original items in weap30 but now for weap30new we get:
Cudgel Chance = weap30newR3 chance * Cudgel chance = (21 / 24) * (3 / 21) = 3 / 24
Quhab Chance = weap30newR2 chance * Quhab chance = ( 2 / 24) * (2 /  2) = 2 / 24
Jo Staff Chance = weap30newR1 chance * Jo Staff chance = ( 1 / 24) * (1 /  1) = 1 / 24

Notice the final chances are the same as the original chances in weap30.

Sadly weap33 and  weap36 both have over 10 weapons with rarity 3 therefore an extra nested layer of TCs needed to be generated for them. I wont go into details but the same principle was applied, you can check the implementation iteself if you want to verify correctness or if you are just curious.

See the source code on GitHub.