Jump to content
  • 0

Drop Calculation L2j


barao45

Question

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.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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.

 

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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>

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.



  • Posts

    • Instead of using encedc on it, try renaming it to "Icon.u" instead of "Icon.utx", and put it in your System folder. If it still crashes, the problem might be with your unrealed.
    • How's the project doing? Is there any news? It really interesting 🤔
    • thx for answer, i tried and woks encrypting, but i still having crashes 😞 i changed the icon in skillgrp.dat from "icon.skill0003" to "Myicons.misil" as i saved the file before endec and nothing. this is the report i got
    • New Season coming May 2024! First post updated      Website: L2Kain.net  Discord: https://discord.gg/l2kain  Wiki: https://info.kain.ws/   Important Dates   Server Start: TBD  Open Beta Test: 10th of May 2024!   Basic Information     Briefly about the concept of the server! We decided to move away from the standard Mid-Rate server concept and keep the mechanics of our beloved Lineage 2 that everyone loves! Massive battles for epic bosses, battles for profitable farming locations, resource spoilage and equipment crafting, daily instances, a balanced economy and much more. This server is build as a Craft-PvP concept. The goal is to gather players with a variety of preferences in the game and make a high-quality and interesting server with alternative character development options. We are well aware that "grinding" is an integral part of the game, but we diluted the boring and the same type of farming with interesting solutions and non-standard mechanics!   We have prepared a new High Five x25 on Modern Client for you. This server will be another step in the development of the platform and the project as a whole! Your appeals to those. support was not ignored, which means the new server will be even better than the previous one!      ⭐ Promotions and Bonuses for new players!     ⭐ Events and Giveaways daily!   ⭐ Rewards for Voting!   ℹ️ Server Rates Learn more about server rates! Server rates are configured in such a way that farming is best rewarded. Adena, drops, quests, various rewards and prices in the game store are well balanced among themselves!   Basic Server Rates:  ⭐ Experience & Skill Points - x25  ⭐ Adena Drop - x15 & Fixed Chance 66%  ⭐ Drop Rates - x10  ⭐ Spoil Rates - x10   Crafting keys, recipes drop & spoil with fixed amount from 2 to 3 and increased chances on all locations and quests  related to farm them.  ⭐ Quest Rates - x5  ⭐ Fortresses & Sieges - x5  ⭐ Raid Bosses & Epic Bosses - x1  ⭐ Weight Limit - x10      Connect with Us:  Discord: https://discord.gg/l2kain  Facebook: https://www.facebook.com/KainLineage2  TikTok: https://www.tiktok.com/@l2kain.net  YouTube: https://www.youtube.com/@Lineage2Kain
  • Topics

×
×
  • Create New...