On large servers, running multiple mods, for many reasons the tick rate can slow down below 20 ticks/second. This makes all industrialcraft machines run proportionally slower, and this can be quite annoying.
Well, another post suggested making machines compensate for the tick rate by doing more in the same ticks. I put some thought into how to implement this, and it's pretty simple.
First of all, once every 20 ticks the code needs to check the system time and then calculate the tick rate scaling multiplier. This number goes from 0 to 40, and is the time elapsed (in seconds) for 20 ticks. So if it takes 20 seconds for there to be 20 ticks, the multiplier = 20.
The following items and blocks need to be edited :
Charging functionality of MFSU/batbox/MFE
Electric Machines. The time til completion of the current operation is decremented by 1 tick * the scaling multiplier. Just a few lines of code to the electric machines base class file. For example, the code has stuff like
tickstilcompletion--; which just has to be changed to tickstilcompletion -= tickscalingmultiplier;
Just find the line where the energy to be outputted is calculated, and multiply it by the tickscaling multiplier.
EnergyNet : the limit for wire in EU/packet before the wire melts is also multiplied by this tickscaling multiplier.
And that's it.
Terraformers can be left alone, because they create lag in of themselves, and making them run faster worsens the problem.
This would in some cases reduce the precision of the simulation : for example, if the tick rate were very slow, a machine might finish an operation on every tick, and be unable to run any faster.
However, I think that's an acceptable tradeoff for allowing machines to run at a decent rate on a slow server.