• Advertisement
Sign in to follow this  

[Question] In which ways are loot systems implemented?

This topic is 3034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, my name is Samuel. This is my first post at GDNET - apologies if I make any of the usual mistakes. I'm pretty new to programming but not computing in general. I know MMO questions are often met with some trepidation around here (usually for good reason) so please understand the question is purely out of interest and not because I want to make the 'latest greatest'. Question: In what ways are loot systems in MMOs often implemented? I'm not looking for a complete outline of how to design and write one, I'm just curious as to how they are normally implemented (database tables, arrays - I've really no idea). Thanks for taking the time to read this and for any feedback, Samuel_XMA.

Share this post


Link to post
Share on other sites
Advertisement
I've just realised that what I wrote may have been lacking a little.

I should have added that I'd like to know how the 'systems' are structured (tables, arrays in memory), how they are replenished and how what is dropped is worked out (straight-forward probability: some items having greater probability of being selected?).

Apologies for any 'newbie terminology' and understanding.


Samuel_XMA.

Share this post


Link to post
Share on other sites
i find the question very vague. i din't really understand to what do you reffer by `loot systems`. Do you want to know how the server stores data about items, upgrades, charater info(level,items?)? or how this data is transformed and transfered to your computer so that items are all in place? or what are the inner workings of actual storage space of such data, what are the common data structures used used to represent everything?.

i can only explain a simple design for what items a creature droppes.
You can rate items by level/money/etc and any creature droppes items of a certain value. You can simply do a random select from the database choosing some items of that value.

Share this post


Link to post
Share on other sites
Well...
List<Item *> Entity::generateLoot();


Quote:
I'm just curious as to how they are normally implemented (database tables, arrays - I've really no idea).


It doesn't really matter, it would come down to management requirements. Who produces the tables, how often does it change, is it static, dynamic, does it depend on some context or is it idempotent...

But the basic idea is, any entity may generate a number of items (perhaps on death). The interface above covers that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Makaan
i find the question very vague. i din't really understand to what do you reffer by `loot systems`.



I guess what I was after knowing was how the server manages which NPCs drop what and how the available 'loot' is, for lack of a better word, stored.

Whether it be held in a single database table and the drop be based on a factor such as the NPCs privilege level (lower level NPCs only have access to items below a certain threshold) or perhaps a loot list per 'type' of NPC.

I can see that what I asked was a very open-ended question. And as Antheus said it depends upon the management needs.

Simply thinking it through like I just have done highlights his point well.

Thanks guys and please forgive any spelling mistakes (I'm not feeling too good).

Samuel.

Share this post


Link to post
Share on other sites
havind a loot list for every NPC is out of the question because there is too much data and this would be too heavy on the database.

A simple solution: the server will hold a database table with all the items available. Each entry on the table represents a item. Each iteam can have a price or a level or a rating, or type, power etc. This is just to make sure a cheap NPC will not drop the ultimate hammer of Thor that will destory the world.

When you kill a NPC the server knows what level the NPC was. So it will simply select from tha table a number of items of that certain level. In general it would be faster to store as litle data as possible for every NPC. The server will do any computation base on the type of the NPC in order to figure out what items will it drop , or how much money will it give you. Keep in mind that the server can take you as a factor in this selection of items. It would be useles to give you a powerfull warrior item when you are a mage.


Share this post


Link to post
Share on other sites
Quote:
Original post by Makaan
havind a loot list for every NPC is out of the question because there is too much data and this would be too heavy on the database.

A simple solution: the server will hold a database table with all the items available. Each entry on the table represents a item. Each iteam can have a price or a level or a rating, or type, power etc. This is just to make sure a cheap NPC will not drop the ultimate hammer of Thor that will destory the world.

When you kill a NPC the server knows what level the NPC was. So it will simply select from tha table a number of items of that certain level. In general it would be faster to store as litle data as possible for every NPC. The server will do any computation base on the type of the NPC in order to figure out what items will it drop , or how much money will it give you. Keep in mind that the server can take you as a factor in this selection of items. It would be useles to give you a powerfull warrior item when you are a mage.


Hi Makaan

Thanks for the additional explanation. What you said makes perfect sense.

I guess the best way to create a 'loot system' is to think through what you need it to be able to do.

Thanks,
Sam.

Share this post


Link to post
Share on other sites
Just thinking out loud here:
Just store the loot on the client:
- It is YOUR loot
- It is acceptable to lose the option to loot the current loot after logging out
- After a timeout the loot is deleted.
- optionally: move the loot after the timeout to a general loot on the server so others can loot it.

I do not like the final option because I think that loot should fit te player's level. Otherwise you will see a lot of n00bs waiting near battlefields for high level loot.

It all depends on what you want and what is 'realistic' in your MMO world.

[Edited by - ernow on December 29, 2009 7:27:50 AM]

Share this post


Link to post
Share on other sites
In Lineage 2 (lineage2.com) all of the loot is separated by mob's so that each mob is unique. For example, a "dire wolf" will drop 2 or 3 specific materials and a "black wolf" will drop 1 or 2 specific materials and a rare chance for a "black knife." If you take a look at L2J which is a emulation server for L2 (l2jserver.com) you will see that all of the drops are stored in a database. For the official servers that NCSoft runs, the drops are stored in a giant text file that is parsed when the NPC server is launched. Different MMO's have different ways of handling loot though so some of the above posts will work as well.

Share this post


Link to post
Share on other sites
In an online game project I worked on, the loot list of each mob was customized entirely by hand, as a list of unique identifiers representing each item. This was a few years ago.

These days, I would blend this approach with a more global loot system that others have brought up so far. In a lot of games today, some items will only drop from a specific mob, and some will drop from a wide variety of mobs. So one possibility right off the top of my head would be a per-mob list (for things like quest items or boss drops) and some number of generic lists that can be attached to each mob but quickly modified as a whole. For example, creatures like wolves or bears would usually drop some kind of meat.

It really depends on exactly what your needs are, though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement