Jump to content

Help on loot.xml probabilities: probs over 1, list order..


danielspoa

Recommended Posts

Hey guys, looking for some aid in making another mod. Few questions as the title implies:

 

- with probability going over 1 for some items, how exactly it works? normalizes towards a 1 total value? Or means a 1.5 value guarantees one drop and 50% chance of a second unit of that item?

 

- does the order in which items are listed affect the chance of each result in that loot container?

 

 

actually just these two, appreciate the help :)

Link to comment
Share on other sites

Back when I was trying to figure this out this is the conclusion I came to. I found some threads of people discussing how it works and they seemed to come to the same conclusion:

 

It's a weighted system. First it rolls for count (eg 0,2 means anywhere from 0 to 2 items will spawn), then once it determines how many items will spawn it runs through the list to determine which items will spawn. It could roll the same item twice. So say you have lootcontainer that contains only 2 items, junk prob=10 and cannedfood prob=2. It would have an equal chance of picking one out of the following:

 

junk junk junk junk junk junk junk junk junk junk cannedfood cannedfood

 

So a 10/12 chance (83.3%) of picking junk and 2/12 chance (16.6%) of picking cannedfood.

 

To get the actual percentage value you take the individual item and divide its probability value by the total of all probability values in the pool. However if you do it where each item is a decimal and all in the pool add up to 1 (or integers that add up to 100), that will effectively make it = to the percentage. eg,

 

junk prob="50"

cannedfood prob="30"

bandage prob="10"

medkit prob="10"

 

That all adds up to 100

 

junk 50/100 = 50%

cannedfood 30/100 = 30%

bandage 10/100 = 10%

medkit 10/100 = 10%

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...