← All notes

GregTech Ore Processing Buys Byproducts, Not More Ore

GregTech's ore processing is a ladder of machines: crush the raw ore, wash it, spin it in a thermal centrifuge, crush it again, sift it, separate it with a magnet. Every step promises more. This toy runs one raw ore down any route you build and counts what actually comes out.

How to use it

Pick an ore along the top and a grade (TerraFirmaGreg's raw ores come poor, normal and rich). Choose how to crush it. Then add machines one at a time from the Then buttons, or press one of the named lines. Every machine opens below with its inputs, outputs and chances, how long it takes and how much power it draws. Mine a stack of 64 rolls every chance the way the game does, so a stack comes out a little different each time.

The first crusher decides it

A normal raw ore in TerraFirmaGreg's macerator gives one crushed ore, plus a 50 percent chance of another, a 25 percent chance of a third and a 12.5 percent chance of a fourth: 1.875 crushed ores on average. A rich one gives 2.875, a poor one 0.875. The forge hammer gives exactly one, with no bonus rolls.

After that, every machine in the chain turns one item into one item. A crushed ore washes into one purified ore; a purified ore crushes into one pile of dust; the pile spins into one dust. So every route to dust ends with the same amount of the ore itself: 1.875 dusts per normal raw ore if you macerated it, whatever you did next. The engine's tests walk every route of every ore in the toy and check it, rather than trusting the arithmetic (two ores break the rule, below).

What the extra machines buy is byproduct. On chalcopyrite:

  • Straight to dust (crush twice, rinse): 215 EU, 0.26 dusts of byproduct.
  • The full line (wash, thermal centrifuge, crush): 24,268 EU, 1.51 dusts of byproduct: pyrite, cobalt and a little cadmium.
  • Chemical bath (mercury instead of water, then the thermal centrifuge): 34,393 EU, 2.2 dusts, mostly gold.

The full line costs 113 times the power of the quick one. Whether that is worth it depends entirely on whether you want pyrite, cobalt, cadmium and gold. None of it gets you more chalcopyrite.

Two exceptions

Bismuth. TerraFirmaGreg gives bismuth an ore property with no byproduct list, and when GregTech looks for a byproduct that is not there it hands back the ore itself. So every byproduct slot on bismuth is more bismuth: 3.39 dusts per raw ore down the full line against 2.14 the quick way.

The sifter, on a gem ore. Malachite is a gem, and the sifter shakes a purified ore into gems of five sizes plus a pile of dust. Counted in material (GregTech's own measure, where a flawed gem is half a dust and an exquisite one four), one purified malachite ore sifts to 1.38 dusts' worth. It is the one machine in the chain that makes more of the ore.

Where the numbers come from

GregTech does not write its ore recipes one at a time. One file, OreRecipeHandler, holds a template for each step and stamps it out for every ore, reading that ore's byproduct list, wash fluid and multipliers. TerraFirmaGreg then rewrites some steps in its own scripts. The engine behind the toy holds the same templates and the same ore table, read from GregTech CEu Modern 7.5.3 and TerraFirmaGreg's own files at fixed versions, and a script reads every number back out of those files to check it. Nothing here was run in the game.

Reading the pack's scripts turned up a detail that decides which recipes you get. TerraFirmaGreg replaces a GregTech recipe only when the two share an id. Its washer and macerator recipes reuse GregTech's ids, so they replace them. Its raw-ore forge hammer uses a slightly different id from GregTech's, so both hammers are in the game: TerraFirmaGreg's takes 100 ticks and GregTech's takes 10, for the same crushed ore. The toy offers both.

The check that caught me

The first version of the engine gave a poor raw ore the same 50 percent bonus roll as a normal one. Every number it printed looked fine, and every test I had written passed, because the tests checked the engine against my reading of the script. The script that reads each number back out of TerraFirmaGreg's own file is what caught it: the poor ore gets the 25 and 12.5 percent rolls and not the 50. That is the same shape as most of what goes wrong on this blog, an answer that is well formed and wrong, and it is why the circuit bench in GregTech's First Circuits is checked the same way.

What is and is not modelled

Fifteen ores: the metal ores in TerraFirmaGreg's surface veins, cassiterite from its tin sands, and chalcopyrite, pyrite and galena from its normal veins. GregTech's machines only: the pack's hand routes (the quern, the barrel, Create's presses and fans) are left out. Durations are base durations, before a faster machine overclocks them. Byproducts are counted in material, so a nugget is a ninth of a dust. The chain ends at dust; what a furnace makes of it is not booked. The pixel art is drawn in code for this site and tinted with the colour numbers each material carries in GregTech's source; nothing is taken from either mod's textures.