Ipsis / Woot

The alternative mob spawner/grinder system
GNU Lesser General Public License v3.0
46 stars 26 forks source link

[1.12.2][LycanitesMobs][FTBRevelation] Looting I, II don't work #375

Closed Zithorio closed 6 years ago

Zithorio commented 6 years ago

So I'm on an FTB Revelation server with a few mods removed and a few mods added in, Lycanites being one of the ones added and I made my very first factory. The problem is that I upgraded it to tier 2 and threw looting 1 and 2 in and they do nothing. If anything, they drop loot rates down per upgrade (at least by the displayed odds). At the moment I can walk up to a desert temple and sylphs just immediately spawn in droves. With my looting 3 sword, I kill 1 and get 10 glowstone, kill another and I get 8. The factory? Kills 4, gets none, kills 4 again, gets none, kills 4 again, gets 3.

So in 4 kills in the overworld I can get 40 glowstone manually with reasonable consistency, in the factory, I'll spend millions of rf and 10 minutes of time and get.... 40 all the same, if even that. Rate works fine, I think mass does too. Like I said, I'm "spawning 4 at once" but at the same time, the drop rate of glowstone is displayed as 12% meaning that in 4 mobs spawned at once, I might not see any glowstone dropped. That's only 48%. In 3 rounds I might see one set of glowstone, statistically. The problem seems to just be the looting upgrades. I'm fairly certain Sylphs drop glowstone and gold nuggets almost every kill. So 80% should be the base, we'll say. Gold nuggets are displayed at 17% and yet I have been making blocks of gold by the stack... Cleansing crystals drop at 2% according to the factory (makes sense with my sword too) and yet I've been getting those by the stack. Sulphur from Thermal Expansion drops at 19% according to the factory. I have stacks of that too. Glowstone? Never drops. Not with the level it should. All of those numbers are wrong until multiplied by 5. I can't even tell what's really wrong. Is looting affecting some drops but not others? How come an 80% drop where you get 0-3 isn't becoming a 100% drop where you get 4 to 6+?

I don't have a tier 3 factory yet, but I have enough reason to belive that won't change things. More than likely they'll worsen further yet.

wamc2017 commented 6 years ago

Hmm, maybe the same issue as #371

Ipsis commented 6 years ago

So #371 has been bugging me for a while as if I had missed something. This new bug has made me rethink again and I believe I have found a reason.

@Hachuurui - I think you did see a genuine problem that wasn't covered by my explanation and I completely missed what was actually going on - my apologies.

I still need to investigate this but I think that the underlying problem is that 100% guaranteed drops can be missed by the loot generation.

What is happening is that I learn the loot and get back for eg. Looting I Glowstone - 12% of stack size 1, 8% of stack size 2, 4% of stack size 4

I then calculate a random value between 0-100 and work out what stack size to drop. However that roll can end up meaning that no glowstone drops, even though the drop chance is 100%.

I need to split this into % chance to drop the item % chance for each stack size

The tooltip would therefore need to display 100% drop rate. However just now it displays the % chance of the maximum stack size, which is less than 100%.

I think I have all the information, I'm just need using it correctly in the case where there are multiple stack sizes for a drop. And of course looting changes the stack size, rather than the drop rate.

So I'll stop waffling and go and prove that I've got a bug.

Ipsis commented 6 years ago

After playing with some code which sort of agreed with my above summary: Creeper: No Looting - 66% Looting I - 84% Looting II - 91% Looting III - 96%

Now I basically do the following: How many mobs of this type did I kill? How many times did I get a stack of a specific item, regardless of size? This becomes the drop chance.

If the drop succeeds then I use the individual stack sizes counts to determine how many to drop.

Hachuurui commented 6 years ago

Nice! I'm glad I was able to help. Thanks for looking into this :)

On Mon, Aug 6, 2018 at 3:44 PM, Ipsis notifications@github.com wrote:

After playing with some code which sort of agreed with my above summary: Creeper: No Looting - 66% Looting I - 84% Looting II - 91% Looting III - 96%

Now I basically do the following: How many mobs of this type did I kill? How many times did I get a stack of a specific item, regardless of size? This becomes the drop chance.

If the drop succeeds then I use the individual stack sizes counts to determine how many to drop.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ipsis/Woot/issues/375#issuecomment-410829990, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWbSDZ4wbKDibd3QeDdCIRJDpb78KW5ks5uOJyYgaJpZM4VvhQR .

Ipsis commented 6 years ago

d5415552088cb10384d1d5345fba82512eabd957

Ipsis commented 6 years ago

Fixed in 1.12.2-1.4.2 which is awaiting approval from CurseForge. Hopefully I've not broken anything else.

You should now see in the GUI the real chance of getting the drop based on all the possible stack sizes. If the drop is successful then a different check will be used to determine which stack size you get.