How to reproduce.
Expected behavior:
- Place a new lab.
- Add 100 Automation science packs.
- Research Gun turret (costs 10).
- You are left with 90 Automation science packs.
Actual behavior:
- Place a new lab.
- Add 100 Automation science packs.
- Have Lab research speed 3 (or later) unlocked.
- Research Gun turret (costs 10).
- You are left with 89 Automation science packs.
[2.1.7] Lab research speed 3+ results in innacurate science pack usage
Re: [2.1.7] Lab research speed 3+ results in innacurate science pack usage
I have read your explanation, but can you explain why this only happens after a specific threshold of research speed?
For example research speed 2 (x1.5) does not trigger this issue (reliably so, and appears not to rely on floating points at all), which might be a hint for a potential fix.
Re: [2.1.7] Lab research speed 3+ results in innacurate science pack usage
These are illustrative numbers only but let's say that you had a science that took 1 research point and labs researched at 0.1 research per tick. At base speed of 1x, it will take 10 ticks to research that 1 point.dupraz wrote: Tue Jun 23, 2026 11:57 amI have read your explanation, but can you explain why this only happens after a specific threshold of research speed?
For example research speed 2 (x1.5) does not trigger this issue (reliably so, and appears not to rely on floating points at all), which might be a hint for a potential fix.
Now you upgrade research speed to 1.2x. After 8 ticks you'll have researched .96 points of research. On the last tick, you consume 0.12 research points because that's the speed of research, so you complete your 1 research and .08 bottles of science slip away into the ether.
In practice, the amount of loss due to this single tick overspend is infinitesimal because labs are spending a lot fewer science bottles per tick, and you don't really need to worry about it. You haven't spent 11 science bottles instead of 10, you've spent 10.01 science bottles (leaving 89 unopened ones) instead of 10.

