aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGDCloud <93287602+GDCloudstrike@users.noreply.github.com>2023-05-14 22:06:59 +0200
committerGitHub <noreply@github.com>2023-05-14 22:06:59 +0200
commit25b336d48671e8d017b49f37ab7faf2012ef4f5b (patch)
treef79bfec68fae08b40ff6a035c6ae115680622338
parent9c4e13c89f94e2a2d46340cb29f0784402881ede (diff)
downloadGT5-Unofficial-25b336d48671e8d017b49f37ab7faf2012ef4f5b.tar.gz
GT5-Unofficial-25b336d48671e8d017b49f37ab7faf2012ef4f5b.tar.bz2
GT5-Unofficial-25b336d48671e8d017b49f37ab7faf2012ef4f5b.zip
Rework EOH overclock formula (#208)
* rework OC formula * better wording * new formula * wording (it's not always increasing) * address review + shorten drain time
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
index 68cdde1801..a6d7074b3f 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
@@ -98,6 +98,7 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
private static final double TIME_ACCEL_DECREASE_CHANCE_PER_TIER = 0.1;
// % Increase in recipe chance and % decrease in yield per tier.
private static final double STABILITY_INCREASE_PROBABILITY_DECREASE_YIELD_PER_TIER = 0.05;
+ private static final double LOG_BASE_CONSTANT = Math.log(4.4);
private static final int TOTAL_CASING_TIERS_WITH_POWER_PENALTY = 8;
@@ -746,7 +747,7 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
private double hydrogenOverflowProbabilityAdjustment;
private double heliumOverflowProbabilityAdjustment;
- private static final long TICKS_BETWEEN_HATCH_DRAIN = EOH_DEBUG_MODE ? 10 : 50;
+ private static final long TICKS_BETWEEN_HATCH_DRAIN = EOH_DEBUG_MODE ? 10 : 20;
private List<ItemStackLong> outputItems = new ArrayList<>();
@@ -955,9 +956,14 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
"is avaliable the items/fluids will be " + UNDERLINE + DARK_RED + "voided" + RESET + GRAY + ".")
.addInfo(TOOLTIP_BAR)
.addInfo("This multiblock can be overclocked by placing a programmed circuit into the input bus.")
+ .addInfo("Each OC halves recipe time and multiplies startup cost by a factor of:")
+ .addInfo(GREEN + "(log4.4(overclockAmount + 1) + 1) * 0.77^overclockAmount")
.addInfo(
- "E.g. A circuit of 2 will provide 2 OCs, 16x EU consumed and 0.25x the time. All outputs are equal.")
- .addInfo(TOOLTIP_BAR)
+ "Furthermore, each OC decreases the power output by a factor of " + RED
+ + "0.77^overclockAmount"
+ + GRAY
+ + ".")
+ .addInfo("All item and fluid output chances & amounts per recipe are unaffected.").addInfo(TOOLTIP_BAR)
.addInfo(
"If a recipe fails the EOH will output " + GREEN
+ "successChance * "
@@ -1131,7 +1137,10 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
startEU = recipeObject.getEUStartCost();
// Remove EU from the users network.
- if (!addEUToGlobalEnergyMap(userUUID, (long) (-startEU * pow(4, currentCircuitMultiplier)))) {
+ if (!addEUToGlobalEnergyMap(
+ userUUID,
+ (long) (-startEU * (Math.log(currentCircuitMultiplier + 1) / LOG_BASE_CONSTANT + 1)
+ * pow(0.77, currentCircuitMultiplier)))) {
return false;
}
@@ -1151,7 +1160,7 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
successChance = recipeChanceCalculator();
// Determine EU recipe output.
- euOutput = recipeObject.getEUOutput();
+ euOutput = (long) (recipeObject.getEUOutput() * pow(0.77, currentCircuitMultiplier));
// Reduce internal storage by hydrogen and helium quantity required for recipe.
validFluidMap.put(Materials.Hydrogen.getGas(1), 0L);
@@ -1355,10 +1364,11 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
+ RESET
+ " L");
}
- long euPerTick = (long) -(startEU * pow(4, currentCircuitMultiplier)
+ long euPerTick = (long) (startEU * (Math.log(currentCircuitMultiplier + 1) / LOG_BASE_CONSTANT + 1)
+ * pow(0.77, currentCircuitMultiplier)
- euOutput * (1 - ((TOTAL_CASING_TIERS_WITH_POWER_PENALTY - stabilisationFieldMetadata)
* STABILITY_INCREASE_PROBABILITY_DECREASE_YIELD_PER_TIER)))
- / maxProgresstime();
+ / -maxProgresstime();
if (abs(euPerTick) < LongMath.pow(10, 12)) {
str.add("Estimated EU/t: " + RED + formatNumbers(euPerTick) + RESET + " EU/t");
} else {