[0.18.17] entity minable.results amount_min/amount_max not working correctly
Posted: Sat Mar 28, 2020 8:53 pm
I tried to create a mod that variates the result when you mine trees, similar to how it works with most rocks. I quickly noticed however, that I didn't get the expected result. For example I modded the "dead-tree-desert" that yields 2 wood in vanilla:
As I understand it you should expect to get 1, 2 or 3 wood equally likely if you mine that tree. I didn't. I tried a 100 different things and I couldn't get it to work as I expected.
Since I didn't knew if I was just doing something wrong I checked in vanilla. Same problem: For example when mining a "sand-rock-big" it is impossible to get 25 stone even though in the code it says otherwise:
For a big sandy rock the tooltip tells you that you should expect 22 stone. For my testing (with 300 big sandy rocks) it was about 21.76 . That's not far of (and not the 21.5 I was expecting by then) but since I got quite a big sample size I am confident that it is more accurate than 22. I don't know what is going on and I am still not sure if it is just me or my bad luck that is causing this issue, but it would be nice if you could look into it.
The loot table seems to be unaffected of this (yes, I might have shot about 100 "sand-rock-big"s in the process .
Code: Select all
data.raw.tree["dead-tree-desert"].minable.results = {{name = "wood", amount_min = 1, amount_max = 3}}
Since I didn't knew if I was just doing something wrong I checked in vanilla. Same problem: For example when mining a "sand-rock-big" it is impossible to get 25 stone even though in the code it says otherwise:
Code: Select all
results = {{name = "stone", amount_min = 19, amount_max = 25}}
The loot table seems to be unaffected of this (yes, I might have shot about 100 "sand-rock-big"s in the process .