You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a recent playthrough (playing locally, not on a server), I decided to be more generous with the overworld oil, setting it to minimum 100 and maximum 6250 for each type (as opposed to 0-625 default), and the first oil drilling rig I set up got me 10885 L of light oil per cycle. That's running at MV, so presumably the base rate was actually 21770 L/cycle, way above the maximum I set in the config.
return (int) (Math.pow(amount, 5) / 100);//reverses the computation above
}
and found that configuring for 100-6250 actually produces output of around 91-35241. The default 0-625 config produces output of 0-624, which is close enough. However, just changing the minimum to 1 shifts the output to 0-1831.
The text was updated successfully, but these errors were encountered:
I don't really understand why the current method is using the min and max to calculate a parameter for the nextInt function, but the failure when MinAmount is non-zero is probably related to the Binomial Theorem. I tried a few alternatives, and I think something like this will have the desired distribution and handle the min and max correctly:
public int getRandomAmount(Random aRandom){
int range = (int) Math.floor((MaxAmount - MinAmount) * DIVIDER);
int min = (int) Math.floor(MinAmount * DIVIDER);
int mult = (int)1e6;
double result = min + Math.pow(aRandom.nextInt(mult), 5) * range / Math.pow(mult, 5);
return (int)result;
}
In a recent playthrough (playing locally, not on a server), I decided to be more generous with the overworld oil, setting it to minimum 100 and maximum 6250 for each type (as opposed to 0-625 default), and the first oil drilling rig I set up got me 10885 L of light oil per cycle. That's running at MV, so presumably the base rate was actually 21770 L/cycle, way above the maximum I set in the config.
I tried separately testing the algorithm from
GT5-Unofficial/src/main/java/gregtech/api/objects/GT_UO_Fluid.java
Lines 55 to 60 in 77a3c95
The text was updated successfully, but these errors were encountered: