Asheron's Call Plugins


Asheron's call is a great online MMORPG that I unfortunately no longer have the time to play. One of the great parts about the game is the amazing developer community that exists around it. They have developed a complete plugin system for the game called Decal. This system loads up in game and provides a harness for implementing a GUI and accessing the game state, as well as causing actions to happen. Having gotten so much use out of other plugins I wanted to contribute back to the community so I developed two plugins, the Winamp 3 controller plugin and a death item predictor (as when you die in AC you drop items).

Winamp 3 Plugin

This plugin essentially duplicates the winamp 3 interface in game to allow you control over what winamp is doing without having to leave the game. There is also a winamp 3 side plugin that is the bridge between the AC plugin and winamp. It uses tcp sockets for transmission of the data. If I reimplemented it I'd probably use another form of RPC however, as sockets were a bit of a pain to synchronize nicely. Here is an example of the GUI in action:

The main control screen

The playlist screen

As for whether the plugin still works or not, I have no idea, being unable to test it in game. As winamp 5 is now out, I anticipate this will not be too useful for much longer.


You can grab the plugin installer here.

Death Item Predictor

This started off as an observation that much research had been done on what happened when you died to allow for protection of important items that you really didn't want to lose when you died. However, all the calculations were by hand (or at least outside of the game) before. Solving this problem actually turns out to be very interesting.

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;


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.

Back to Projects page

Back to projects.