## Overview

## Winamp 3 Plugin

The main control screen |
The playlist screen |

### Download

You can grab the plugin installer here.## Death Item Predictor

DI Predictor in action

### Death Item Explanation

When you die in Asheron's call the game calculates how many items you are going to drop using a level based formula, roughly looking something like this:minDrop = level / 10; if (level >= 11 && level <= 20) maxDrop = 1; else if (level >= 21 && level <= 35) maxDrop = minDrop + 2; else if (level > 35) { maxDrop = minDrop + 2; dropWeilded = true; }Essentially this says you lose at least (level / 10) rounded down items, with a random chance of losing up to 2 extra items if you are above level 20. Also, if you are less than level 35 you can't drop your wielded items. Now, this is only valid for non-PK's. PK's are a bit different in that they always can drop wielded items and always have the random chance of losing up to 2 extra items.

Now comes the interesting part, the game takes a tally of all of the items that can be dropped (there are some items that can not be dropped) and applies a +-10% variation on their value. Also, any items that are the same (after the first) have half value w.r.t. the DI calculations.Then it sorts this list by highest value to lowest. Finally, using n, the chosen number of items to drop, it chooses the top n values of the list and those are the ones you lose. Predicting what happens after this 10% variation is unfortunately very hard. It reduces to an elegant problem statement:

Given a list of values that have a specified range (+-10% in our case) and the number of the top valued items that will be dropped find the probabilities that each of the items will drop.

The pseudocode for the algorithm I use is below, essentially it determines the ranges that any given item can lie in (ie. 800-1200 pyreals) and finds the discrete boundries of the ranges. Then for each inner boundry it calculates the chance that any given item will lie within it.

double slot[maxDrops] = {0}; sRange range[i]; sRange ranges[i] = discrete ranges... for (i=0..numItems) { range[i].top = 0; range[i].bott = 0; for (j=0..numItems) but not us { if (high value of j range within us) range[i].bott++; else if (low value of j range within us or above us) { range[i].top++; range[i].bott++; } } for (j=range[i].top; j<=range[i].bott; j++) { slot[j] += (ranges[i].size / item[i].size) / ranges[i].numOnRange; } }

### Download

You can grab the plugin installer here.The source is available here. Be warned you will need decal to be installed to get the program to compile.