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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • Dalam World — This is a new gaming project that brings together all the mechanics of your favorite games! I want to say right away that the game will run on all devices: Windows, Linux, macOS (Intel/Apple)! The Dalam World client features advanced graphics that will look great! The client also provides stable FPS even with a huge number of players! Dalam World is not a Salve or Chronicle client ported upward — it’s a completely remade game on its own proprietary game engine! Dalam World servers allow more than 100,000 people to exist in a single world without virtual instances, thanks to server technologies built with Elixir and Rust! Dalam World is the childhood game we love so much! From each of our favorite MMOs we took only the best elements! Low system requirements will let the game run on an old laptop! We redesigned the game so there are no bots or real-money traders! Game website: https://Dalam.World Game forum: https://Dalam.World/forums/ For arbitragers: https://careers.dalam.world/ Discord: https://discord.gg/vbQ347nuxd Telegram: https://t.me/+u1DNZPzscaRmNjYx Opening July 16, 2026 at 16:00 UTC!  
    • I'll give you my wallet if you want, haha
    • To make up for some of the waiting time we’re hosting a 3v3 Tournament on open Beta, and this time we’re raising the stakes with a $1,300 prize pool 💰   🏆 PRIZE POOL BREAKDOWN (Over 2000$ Worth of prices total)   🥇 1st Place — $700 🥈 2nd Place —$300 🥉 3rd Place — $200 🏅 4th Place — $100  5th -6th Place - $100 in Gold Coins each    All Participating Teams: $50 in Gold!   All Prices will be Paid out instantly after the tour, no waiting time and conditions. This is not simply a marketing move, we want to give back to the community.   📅 Date: Wednesday 06.05.2026 ⏰ Time: 20:00 Central European Timezone (Berlin) 📍Format: 3v3   ⚔️Why join? Cash Prices for top 4 and rewards for all participants Payments to winners sent out straight after the tournament - No waiting time or rules that you have to play live server to obtain the reward. Clean format, smooth matches, and solid prize pool and a chance to experience our brand new files   📝How to join: Form your 3-player team Group Leader Sign up here: ⁠📍・3v3-tour-registration (Include Name of Group, Name of Group Leader)   Be ready on match day!     A separate post with rules for the tournament and class setups will follow shortly.   Tag your teammates, lock in your roster, and get ready to compete. We'll be happy to see you on the OBT!   💬 Questions? Ask in ⁠🎫・ticket or send us a message   See you on L2Dark! 😏   Discord: https://discord.gg/FAJwnFpb8M
    • You should check if that condition is supported by your current sources. You can find this in  DocumentBase#parsePlayerCondition If it isnt there and you want to follow the same pattern of the other item conditions, create a custom condition to parse the classId (or multiple class ids) (there are examples to copy the code). Alternatively, you can create your own condition handler. Your condition should look like this: <cond msgId="1518"> <or> <player classId="ADVENTURER" /> <player classId="PALADIN" /> </or> </cond> or <cond msgId="1518"> <or> <player classId="93" /> <player classId="5" /> </or> </cond>  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..