Jump to content
  • 0

Drop Calculation L2j


Question

Posted

Hello how are you?. I'm checking some issues of chances and % drops in L2jSunrise. I have configured only that the drop CHANCE is 5, so... for example the npc Ascetic Solina.
some drop is
<group chance="0.06449999660253525">
<item id="13460" min="1" max="1" chance="0.2343" /> <!-- Vesper Shaper -->
<item id="15637" min="1" max="1" chance="99.7657" /> <!-- Vesper Shaper Piece -->
</group>

When I change the drop rate, that percentage should be updated, right? and should it be seen in the NPC Drop View multiplied by the chance? I feel like the drops are too low.

4 answers to this question

Recommended Posts

  • 0
Posted

l2j,acis,sunrise and many other projects who copy-pasted the same formula have the same issue.

You are right drop rate and drop chance dont work the way they suppose to and currently they work only for untouched rates (x1). Part of the mess is here:

while (random < dropChance)
            {
                // Get the item quantity dropped
                if (min < max)
                    itemCount += Rnd.get(min, max);
                else if (min == max)
                    itemCount += min;
                else
                    itemCount++;

                // Prepare for next iteration if dropChance > DropData.MAX_CHANCE
                dropChance -= DropData.MAX_CHANCE;
            }

Currently one variable is responsible for 2 things (drop rate , drop chance). Sadly you have to rework the whole formula and make 2 config variables one for drop rate and one for drop chance  and this problem is arround l2j since for ever im surprised nobody mentioned it.

 

  • 0
Posted

Thanks Panic. I think I won't be able to make that code modification, I don't know where to start. In sunrise they have the dropchange and the dropAmount only. I'm thinking of starting to modify the mobs one by one through their xml.

  • 0
Posted

Panic, I don't know if it's like you say. From what I see in l2jsunrise you have in the configs the two options type chance/amount of drops and spoil. What I see is that it is not very precise, for example in the Chimeras it says a 24% chance. When I kill them they do not fall with that %, the celtus say 100% and it does not fall completely at 100%.
these are the configurations of the NPC

<group chance="45.53020095825195">
<item id="1867" min="308" max="924" chance="6.9179" /> <!-- Animal Skin -->
<item id="1872" min="60" max="180" chance="35.5118" /> <!-- Animal Bone -->
<item id="1882" min="27" max="81" chance="13.1525" /> <!-- Leather -->
<item id="1894" min="5" max="15" chance="11.2143" /> <!-- Crafted Leather -->
<item id="4042" min="6" max="18" chance="4.439" /> <!-- Enria -->
<item id="6901" min="1" max="1" chance="3.1961" /> <!-- Recipe: Shining Arrow (100%) -->
<item id="9551" min="1" max="1" chance="25.5684" /> <!-- Holy Stone -->
</group>

  • 0
Posted

Does anybody found the way to solve problems with precice calculation on drop? i found the same formula of drop in l2jsunrise en l2jserver.

https://bitbucket.org/l2jserver/l2j-server-game/src/develop/src/main/java/com/l2jserver/gameserver/model/drops/strategy/IGroupedItemDropCalculationStrategy.java

yesterday i check that the problem is with drop group, because for example Celtus npc drops holys on 100% configurated like datapack is comming. but if i creat a drop of holys or an item outside of a group drop. it is droped well.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...