Now and then I'm working on a little RPG project ( http://sourceforge.net/projects/jewelhunt/ ) and I recently hit a problem about item drops. At the moment each item in the item catalog has the same chance to be generated. This was alright so far, since I mostly was testing the inventory code, but in future I'll need a better system to pick items for drops.
Roguelikes often use a level + rarity based system. This means, items are chosen on how well they fit the dungeon level (number), and from those which can be dropped on this level, a weighted list ist created, based on the items rarity.
Diablo II uses an treasure classes, that is, items are assigned to a treasure class, and when the game is about to create an item, it first calculates possible trasure classes for the drop, and thgen chooses an item from one of the found treasure classes.
The first system is difficult to balance, because the introduction of new items messes with the weighted list. Also it assume a linear difficulty level, and items can't be grouped other than by level.
The second system might be even more difficult to balance, and it also requries to maintain the treasure class database, in addition to the items themselves, but it allows more flexibility in allocating items for drops, and also more control.
At the moment neither system really convinced me. Is there some simple, yet flexible and powerful system, or do I need to work with something like the treasure classes from D2 (because my world is non-linear, and level + rarity won't suffice to control item generation)?