PDA

View Full Version : Loot Tables


Disorder
01-25-2013, 06:54 PM
Greetings! George, if you read this, thanks for making these tools!

I'm making custom NPC's in the zone crushbone. I selected every NPC and used "Kill NPC" in the DB list for zone > Crushbone.

I created a new npc (oddly enough, I had to make a copy of one. I could not just create a new entry).

Now, my question comes in. Does an NPC have to have a Lootdrop_ID assigned to them and must the lootdrop_id contain and item_id.

I'd like to just have the NPC empty at the moment. However, it will not save my changes if I completely eliminate the lootdrop_id and Item_id.

Can any one explain what exactly a lootdrop_id is versus a loot_table.

If you don't mind, I'll use a picture to ask questions easier..

http://i.imgur.com/UBbgcdp.png
(sorry image isn't cropped!)

1. How do I create a unique one? Does it matter?

2. What does this mean?

3. What does this mean?

4. What does this mean?

5. Disregard - error :)

6. What is max regen values allowed? I tried 75k on a DPS parse mob I created and it would not load (may have been something else I did. I'm new!) Any way to make NPC invulnerable?

7. Loottable - Perplexes me how this all works together.

Any help would be appreciated. I've tried searching forums, but these answers still elude me. Thanks in advance!

Drajor
01-25-2013, 11:53 PM
An 'npc type' has 0 or 1 loot table(s). (set in npc_types and specified in loottable).
A 'loot table' has 0..n 'loot drop' (specified in loottable_entries).
A 'loot drop' has 0..n 'items' (specified in lootdrop_entries).

Oh geez I don't think I made that any easier to understand.

Disorder
01-26-2013, 12:56 AM
Drajor, let me give an example to see if I understand. And thank you very much for your time to respond to this. It has perplexed me.

Boss_mob_1 - I want him to to always drop 3 spells (of 10 possible), 2 augs (of 5 possible) and 1 armor piece (of 6 possible).

So he would have npc_type -> loottable 1
loottable -> 3 loot_drops (for spells, augs, armor)
and loot drop would have its own set of each items..

actually, I'm going to practice this on a mob.. I'll show a picture if i don't get the desired result.

Thanks again, Drajor.

Disorder
01-26-2013, 01:48 AM
OK. This is what I did.

First, created new loot table (seen at bottom)

http://i.imgur.com/k05N5Dp.png

-- Then I added new loot drop ID - 120752, with MULT = 3 (so it does it 3 times?), and 100% chance to do it every time. Added 10 spells to pick from in the lootdrop_id each with a 10% chance of dropping


http://i.imgur.com/jbkm4Un.png

Did similar process with next lootdrop_id, except MULT = 2 (for 2 item drops?), and only have 5 items with equal chance of dropping

http://i.imgur.com/UFc1EBc.png

Same process except MULT = 1 (for one item?)

Disorder
01-26-2013, 01:48 AM
I saved it, reboot server, killed NPC..

http://i.imgur.com/uVOwnnC.png

2 Spells, 3 augs, no armor. Not the desired result, but a start.

However, as soon as I looted, i got this error..

http://i.imgur.com/fvQjk5t.png


Any suggestions? Thanks.

Sorry for two posts, limited to 4 images per post.

Disorder
01-26-2013, 01:54 AM
I found this under zone, external dependencies, xstring, line 1440 as error indicates.

reference operator[](size_type _Off)
{ // subscript mutable sequence
#if _ITERATOR_DEBUG_LEVEL == 2

if (this->_Mysize <= _Off)

_DEBUG_ERROR("string subscript out of range");

#elif _ITERATOR_DEBUG_LEVEL == 1
_SCL_SECURE_VALIDATE_RANGE(_Off < this->_Mysize);
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */

return (_Myptr()[_Off]);
}

Not sure what it means. Hah! Sorry for spamming message board with posts.

Disorder
01-26-2013, 02:15 AM
OK, through some testing - The error only comes when dealing with some of the augments (adventure stone augs) 67670, 67672,67671, 67669.

I can spawn them, but as soon as I interact with them, such as inspect them, I get that error.

This is not a problem, as I just chose augments from random. The other aug, 47344 works just fine.

So aside from some apparently bugged items, what is incorrect with my set up to prevent my desired result of 3 spells, 2 augs, 1 armor item. I get a wide variance in amounts of drops from each category each time the npc spawns.

Its not that this matters that I get this npc working, but I would love to better understand the process.

Disorder
01-26-2013, 03:04 AM
OK, once again, I think I may have found my answer. I'm not sure I understand it but this long thread probably has my answer.

http://www.eqemulator.org/forums/showthread.php?t=35770

However, if %chance has been removed, why does it still show up?

Disorder
01-26-2013, 03:34 AM
Well. I figured it out via thread.

Maybe since I figured it out I'll make a tutorial for new devs -- please, tell me one doesn't exist already (actually, tell me it does! I want to read it!).

Sorry for the bandwidth usage! Hah! :)

Drajor
01-26-2013, 04:14 AM
Glad you worked it out!