Page 1 of 1

LootGeneratorTemplate Upgrade

PostPosted: Sun Aug 19, 2012 1:02 pm
by Maze
I've prepared a small update that improves the LootGeneratorTemplate. I feel like the code could use a full rewrite, but I was able to solve some of the problems I was having with it. Beforehand, on a mob with a lot of loot, it would cycle through the loot repeatedly and generate a huge list of items, many of them duplicate. This wouldn't be evident when the mob had a MobXLoot template set to 1.

I made a simple change to the code for when there isn't a MobXLoot Template, so that it cycles through the loot list once and checks each item once. I also made a further change to where there is a MobXLoot template, setting it so that when an item drops with 100% chance, it doesn't add the MobXLoot drop count instead of the item's dropcount.

Re: LootGeneratorTemplate Upgrade

PostPosted: Sun Aug 19, 2012 3:07 pm
by Graveen
Thank you Maze.

The lootgenerator is something difficult to tweak. I invite you to read this little thread where we hitted the rock: http://www.dolserver.net/viewtopic.php? ... 40&p=90635

Can you tell me how you performs related to the ideas in the above thread ? Especially how it handles 100%.

Thank you for your contribution.

/summon Tola for discussion ! :mrgreen:

Re: LootGeneratorTemplate Upgrade

PostPosted: Sun Aug 19, 2012 8:10 pm
by Maze
Can you tell me how you performs related to the ideas in the above thread ? Especially how it handles 100%.
I wasn't able to fix the MobXLoot portion of the code to work as that thread had suggested. The fix primarily applies to where there is no MobXLoot template present (I don't use those on my server). In those cases, the drop system is perfect. Every item is tried once and 100% drops drop every time.

I'm not sure the live servers have a drop limit function. Typically drop rates are low enough that the game doesn't need them, and in cases like boss mobs, usually there are so many players that even 10+ items dropping at once wouldn't be overwhelming. The MobxLoot template becomes necessary when drop rates are excessively high (like on the public DB).

To fix that portion, it would probably take a rewrite of the code. At any rate, even without a complete fix of the MobxLoot template code, the code works without any issues when there's no MobXLoot. Virtually no changes were made to that portion.
Thank you for your contribution.
No problem, there's more coming. ;D