A little bit about treasure drops
Posted: Tue Oct 04, 2005 7:40 pm
Okay a lot of people have asked about treasure drops so I thought I'd explain how the system works.
here is the system works
Hope this helps.
here is the system works
so most critters on the islands are under level 5 so if you do the math you have a 10% chance per kill of getting treasure.As is, this system will only work by default on containers. If creatures are to drop treasure too, some code will have to be added to their OnDeath script. A sample of the code could be:
if (iRace != RACIAL_TYPE_ANIMAL && iRace != RACIAL_TYPE_BEAST && iRace != RACIAL_TYPE_ABERRATION && Random(99) <= iLevel*2) GenerateLowTreasure(GetLastKiller(), OBJECT_SELF);
This would make it so animals, beasts, and aberrations do not drop any treasure, but all the other kinds of monsters do. It also makes it so not every single creature killed will drop treasure, otherwise you might find yourself with deep inflation problems in your world. In this case, we added a Radom(99) <= iLevel*2 condition. This checks the level of the monster, and gives it a 2% chance per level to drop treasure. So a 1st level goblin would only drop 2% of the time, wherease a 30th level dragon would drop 60% of the time. For worlds where creatures spawn over and over again, only to be killed over and over again, this kind of statement can be used to keep the amount of treasure and gold in your world from flying out of control. However, this kind of condition is only a suggestion. You can base your own conditions on whatever will suit your module.
Hope this helps.