How does "NoDrop" in treasureclassex.txt work?

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

User avatar
Spectrum
Posts: 69
Joined: Mon May 12, 2003 12:40 pm
Location: Denmark
Denmark

How does "NoDrop" in treasureclassex.txt work?

Post by Spectrum » Tue Oct 19, 2021 6:47 pm

Hi!

I am making a small mod for D2R. One thing I want to do is have fewer but better drops. I am struggling to understand how the game chooses whether to drop an item at all. The file treasureclassex.txt has a colum NoDrop, but it is unclear to me how it works, and I cannot find a guide to treasureclassex.txt.

My best guess is that NoDrop is a probability alongside Prob1 etc. So that eg "Act 1 Chest A" has 100 chance of dropping nothing, 15 change of dropping gold, 15 change of dropping "Act 1 Junk" etc.

But I also seem to recall having read somewhere that the player count influences the likelihood that each monster will drop something or nothing. It is extra nebulous how this interacts with the probabilities in the file.

Is it known how this works?

Thanks in advance!

User avatar
Vortaka
Posts: 31
Joined: Thu Jan 31, 2008 2:25 am
Location: Montreal, Qc

Re: How does "NoDrop" in treasureclassex.txt work?

Post by Vortaka » Thu Oct 21, 2021 1:58 pm

I don't know about D2R but in D2, (It's in the Knowledge Base/File Guide (1.10 - 1.14) / TreasureClassEx.txt (the new one by Nefarius).

Read the guide itself for more info but from what I remember (if I do remember correctly anyway), the NoDrop is like the ProbX column, to drop nothing...

So, let's make an example (It might NOT be exactly that but you'll get the idea)

Item1 and Item2 have something in them (who cares what).
Prob1 is set at 25, Prob2 is set at 25 and NoDrop is set at 50 (very simple example)
So the chances to drop nothing is 50% (NoDroo / NoDrop+Prob1+Prob2, so 50 / (50+25+25)

Anyway, if I remember it right! :)

User avatar
Spectrum
Posts: 69
Joined: Mon May 12, 2003 12:40 pm
Location: Denmark
Denmark

Re: How does "NoDrop" in treasureclassex.txt work?

Post by Spectrum » Fri Oct 22, 2021 7:19 pm

Thanks. I suppose you mean this guide? Updated TCEX.txt File Guide. It was hard to find because it doesn't have the full file name in the title. Unfortunately, it's not very helpful because Nefarius just says:
Listing the whole “quality” calculation here is not necessary as this has been covered in many places
That's not very useful since he doesn't link to any of those "many places".

In the meantime, I also found something on Diablo Wiki:
So how does the player setting affect monster drops? First, we'll have to introduce a term called "nodrop". Every monster has a certain chance for this "nodrop", that is the chance to drop nothing at all. The greater this number, the greater the chance to drop nothing. This value is cut down with increasing player settings according to the following formula in V1.11 (for basics on item generation, nodrop an so on see the Item Generation Tutorial for Patch 1.11 on the DII Strategy Forum from Warrior of Light):

NewNoDrop=int( ProbSum/(1/((NoDrop/(NoDrop+ProbSum))^N)-1) ),

where N=int(1+AdditionalPlayers/2+ClosePartiedPlayers/2),
AdditionalPlayers — the number of all additional players in the game, where the monster is killed,
ClosePartiedPlayers — the number of players in your party near you (not far than two screens away),
ProbSum=Prob1+Prob2+Prob3+...+Prob10,
int — operation of truncating fractional part of a number.
1. (NoDrop/(NoDrop+ProbSum))

This looks like the base NoDrop probability, and it fits my guess above.

2. ((NoDrop/(NoDrop+ProbSum))^N)

This suggests to me that in a multiplayer game, when the drop calculator reaches a "no drop" decision, it will "retry" a number of times until it either finds something to drop or runs out of players.

User avatar
Vortaka
Posts: 31
Joined: Thu Jan 31, 2008 2:25 am
Location: Montreal, Qc

Re: How does "NoDrop" in treasureclassex.txt work?

Post by Vortaka » Sat Oct 23, 2021 1:14 am

Sorry, my bad! I meant this guide https://d2mods.info/forum/kb/viewarticle?a=368

Also, since I don't really play multiplayer much (I mod for my own solo play), I don't really know much/I don't really test multiplayer... Sorry!
But, with what's written, it's a little too much multiplayer math's for me!
Sorry again I can't help more!

User avatar
Spectrum
Posts: 69
Joined: Mon May 12, 2003 12:40 pm
Location: Denmark
Denmark

Re: How does "NoDrop" in treasureclassex.txt work?

Post by Spectrum » Sat Oct 23, 2021 6:56 pm

Vortaka wrote:
Sat Oct 23, 2021 1:14 am
Sorry, my bad! I meant this guide https://d2mods.info/forum/kb/viewarticle?a=368

Also, since I don't really play multiplayer much (I mod for my own solo play), I don't really know much/I don't really test multiplayer... Sorry!
But, with what's written, it's a little too much multiplayer math's for me!
Sorry again I can't help more!
Thanks.

When I say "multiplayer", that also includes singleplayer using the /players X command.

Return to “General Mod Making”