This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Loot tables not working  (Read 1501 times)

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Loot tables not working
« on: October 03, 2017, 02:15:27 am »
I have an item that when opened contains two loot entries. The first entry has a 90% chance to drop a certain item and the other entry has a 10% chance to drop a different item from a list in reference_loot_template. However, for some reason it's not working.

My referenced loot entries have chances on their own so it would be 10% on top of maybe a 30% chance within that reference. But, for some reason, sometimes when my item is opened, it contains either nothing, one of the 90% items, or both a 90% and 10% item.

None of them have groupids in either item_loot_template or reference_loot_template.

Here's a picture of my item_loot_template entries:


Here's a picture of the reference_loot_template entries:

Supora

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 143
    • View Profile
Re: Loot tables not working
« Reply #1 on: October 03, 2017, 07:31:27 am »
Did you set up a GroupId in loot_template?

Makpptfox

  • Contributors
  • Loreweaver
  • *****
  • Posts: 103
    • View Profile
Re: Loot tables not working
« Reply #2 on: October 03, 2017, 01:45:44 pm »
I never use 0 as a GroupID, set 1 for both of your references, it should fix the problem of looting both of the row instead of one.

I don't really get why you would have nothing in it tho, since the reference is a total of 100%.. Try again with 1 as GroupID too, because I don't see anything wrong in your tables beside of that.
For support, send your Discord's ID by PM.

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: Loot tables not working
« Reply #3 on: October 04, 2017, 12:50:47 am »
I never use 0 as a GroupID, set 1 for both of your references, it should fix the problem of looting both of the row instead of one.

I don't really get why you would have nothing in it tho, since the reference is a total of 100%.. Try again with 1 as GroupID too, because I don't see anything wrong in your tables beside of that.

Okay I changed the item_loot_template to this:


and now there's no more duplicates BUT whenever the drop lands on the 10%, nothing is inside. It's completely empty.

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: Loot tables not working
« Reply #4 on: October 04, 2017, 07:19:50 am »
First of all, 0 GroupID for loots is fine in many cases. It only means "no group" - which means that more than 1 out of items in group can drop at once (or none can drop as well). And thats what you don't want in this particular case, yes. What happens at the moment is that in 10% of cases references are used, which have up to 26% to drop. 26/10 = 2.6%.

So there is only up to 2.6% of anything from references dropping, the rest what remains to 10% is quite high chance that NOTHING will drop. Because of groupID=0 which says "none, one, or multiple can drop at once". Set groupID to 1 in references, too.
« Last Edit: October 04, 2017, 08:44:45 am by Amaroth »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: Loot tables not working
« Reply #5 on: October 04, 2017, 07:56:52 pm »
First of all, 0 GroupID for loots is fine in many cases. It only means "no group" - which means that more than 1 out of items in group can drop at once (or none can drop as well). And thats what you don't want in this particular case, yes. What happens at the moment is that in 10% of cases references are used, which have up to 26% to drop. 26/10 = 2.6%.

So there is only up to 2.6% of anything from references dropping, the rest what remains to 10% is quite high chance that NOTHING will drop. Because of groupID=0 which says "none, one, or multiple can drop at once". Set groupID to 1 in references, too.

My reference chances total 100 not 26.

Here is what happens when my groupid is set to 1 for both the reference and the item_loot_template:

This is also what happens when the item_loot_template groupids are set to 0 and the reference groupids are set to 1. Which doesn't many any sense at all.

I also tried updating item.dbc and that did nothing. I also tried changing the name of each of the items to be different but that also did nothing.
« Last Edit: October 04, 2017, 11:26:51 pm by Kobiesan »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: Loot tables not working
« Reply #6 on: October 05, 2017, 07:22:07 am »
My reference chances total 100 not 26.
That means absolutely nothing when you use group 0, as in that case, every single item is handled as, in fact, its own group.
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: Loot tables not working
« Reply #7 on: October 06, 2017, 02:45:18 am »
My reference chances total 100 not 26.
That means absolutely nothing when you use group 0, as in that case, every single item is handled as, in fact, its own group.

okay so i put the references in group 2 and the loot_template tables in group 1. The container still drops two items sometimes.

I also tried making everything have a group id of 1. Same problem. I've tried every combination and it doesn't work.
« Last Edit: October 06, 2017, 02:48:45 am by Kobiesan »