Loot Abundance broke our books.

I cite your previous statement, do you still stand by it?


I mean...I'm not employed by TFP so it's not like the One Known Truth or anything, but that is my understanding of how LA works, yes.

If yes, replace step 3 (which is also step 3 in your detailed example if I understand that correctly) with

for each item {
result=0;
while (abundance>100%) {
result=result+1; abundance=abundance-100% }

if ( rnd(abundance)==1 ) { result=result+1 } // rnd(k) returns 1 with a probability of k, otherwise 0.
}



Ah, okay, I'm sorry I didn't grok your suggestion before. I see what you are doing here and I'm going to go test it with a couple of different loot containers.

 
Well I tested 10,000 iterations and the actual loot quantity from your algorithm (slightly modified) matches very well with expected results. Eggs especially are a lot better at LA < 100%.

image.png

image.png

image.png

image.png

I used Excel just for ease of what-iffing a bunch of scenarios and parsing out different bits of the calculation. The expression I ended up with, which works with both low-quantity items (eggs) and high-quantity items (feathers) is:

Code:
(INT(LootAbundance) * ItemCount) + IF(RAND() <= MOD(LootAbundance,1), ItemCount, 0)

//ItemCount is the total # of items 'dropped' by the loot tables after RNG checks
//RAND() returns a decimal between 0 and 1


I expect that I've only re-invented your wheel here, but my head is completely wrapped around the idea now, so thanks. If they (TFP) do actually have a "Step 3" like I showed above, just replacing it with your algorithm or the above calc would fix it it seems.

 
Last edited by a moderator:
Back
Top