Skip to content

Instantly share code, notes, and snippets.

@Cold06
Last active October 4, 2024 00:32
Show Gist options
  • Save Cold06/e48c94a73e914aa8a110582620464f06 to your computer and use it in GitHub Desktop.
Save Cold06/e48c94a73e914aa8a110582620464f06 to your computer and use it in GitHub Desktop.
Satisfactory Parts + Underclock Calculator, using math.js (heynote actually)
print(MachinesToBuild, OutputOverclock, ShouldOverclock) = concat("Build ", string(MachinesToBuild), " machines ", string(ShouldOverclock ? "OVERCLOCKING" : "underclocking"), " to ", string(OutputOverclock), ". It will generate ", string(OutputOverclock * MachinesToBuild)," parts")
TotalInputPartGeneration = 1 # The amount of parts the last machine group generates in total
MachinePartInput = 1 # The number of parts one machine wants
MachinePartOutput = 1 # The number of parts one machine generates
Offset = 0 # Machine count offset, decrease to overclock, increase to underclock
MachineIORatio = MachinePartInput / MachinePartOutput #
MachineGroupRatio = TotalInputPartGeneration / MachinePartInput #
MachinesRequired = floor(MachineGroupRatio) #
MachinesToBuild = MachinesRequired + Offset #
InputOverclock = TotalInputPartGeneration / MachinesToBuild #
OutputOverclock = InputOverclock / MachineIORatio #=============#
ShouldOverclock = OutputOverclock > MachinePartOutput #
TOTAL = OutputOverclock * MachinesToBuild
print(MachinesToBuild, OutputOverclock, ShouldOverclock)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment