Author Topic: How does "item weight" work?  (Read 779 times)

0 Members and 1 Guest are viewing this topic.

Not Yet Rated!

Offline Adehmar

  • Visitor
  • *
  • Topic Author
  • Posts: 2
  • Country: ar
  • Karma: +0/-0
  • Gender: Female
    • View Profile
    • Awards
  • Time Zone: ?
How does "item weight" work?
« on: 25 February 2021, 23:38:53 »
So I finally got modding running. Now, editing files, how do weights work?

Suppose there's only 1 drop is allowed, and 2 different items can drop.

If I put 90 in one and 10 in the other under "item weight", does it mean I have 90 % chance to drop the first, and 10 % chance to drop the other? Or I am mistaken?

What about in other cases where I see various item weights and some have 2000, another 500, another 400, another 1500, another 100, another 80. How does it work in that case?

Not Yet Rated!

Offline Ninakoru

  • Member
  • *
  • Posts: 32
  • Country: es
  • Karma: +1/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: +1
Re: How does "item weight" work?
« Reply #1 on: 26 February 2021, 10:35:35 »
Example: if an item has 1000 weight for Affix A, 200 weight for Affix B, and 20 weight for affix C.

Each time you get that item, there's a dice roll between 1-1220 (the sum of all weights). From 1 to 1000 you get Affix A, from 1001 to 1200 you get Affix B, from 1201 to 1220 you get Affix C.

So to view it as a percent chance, divide each individual weight by the total weight of all items involved, multiply per 100. In the example:

Affix A: 81.97%
Affix B: 16.39%
Affix C: 1.64%



Tags:
 


SimplePortal 2.3.7 © 2008-2021, SimplePortal