• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Calculating loot chance

cire2003

New Member
Joined
May 31, 2008
Messages
29
Reaction score
0
Let's say we got that into a monster file.

Code:
Monster A
    <item id="AAAA" chance="100000"/>
    <item id="BBBB" chance="50000"/>
    <item id="CCCC" chance="25000">
    <item id="DDDD" chance="17500">
    <item id="EEEE" chance="8750">

My question is, how can you calculate the chance that an item out of that list get out. I looked up in the C code and find out, correct me if im wrong, that it do a sum of all chance in monster loot to make a choice. After that, thats where i dont understand.

If we got that instead.

Code:
Monster B
    <item id="AAAA" chance="50000"/>
    <item id="BBBB" chance="25000"/>
    <item id="CCCC" chance="17500">
    <item id="DDDD" chance="8750">
    <item id="EEEE" chance="4875">

Does the item EEEE would be more hard to loot then into the monster A?

Dunno if it's 100% understandable but ill try to modify my explaination if some1 doesnt understand :p

Tks
 
Its simple:

100000 = 100.000% (One hundred point zero zero zero percent)

1000 = 1.000% (One point zero zero zero percent)

1 = 0.001% (Zero point zero zero one percent)

8750 = 8.75%

17500 = 17.5%

And so on.

This defines the chance of the item dropping when the monster is killed.
 
Its simple:

100000 = 100.000% (One hundred point zero zero zero percent)

1000 = 1.000% (One point zero zero zero percent)

1 = 0.001% (Zero point zero zero one percent)

8750 = 8.75%

17500 = 17.5%

And so on.

This defines the chance of the item dropping when the monster is killed.

Sorry for bumping up but I have a question regarding your post.

How does the "Loot Rate" from config.lua affect those percentages?

Is it like if I put 2x on config.lua, then if I set an item to "10000" (10%) then it would turn to 20% dropping chance?

Or how?
 
Back
Top