[0.10.2][kovarex] sience packs disappear

This subforum contains all the issues which we already resolved.
User avatar
HeilTec
Filter Inserter
Filter Inserter
Posts: 258
Joined: Tue Jul 08, 2014 1:14 pm
Contact:

Re: [0.10.2][kovarex] sience packs disappear

Post by HeilTec »

To anyone familiar with javascript this 'pseudo-code' express my thoughts as best I can:

Code: Select all


function findPoweredLabsWithPacks() {
  var lab, labs = findAllLabs();
  var ready = [];
  for (lab in labs) {
  	if (lab.hasPower() && lab.inventory.contains(currentResearch.packsNeeded))
  		ready.push(lab)
  }
  return ready;
}

function startNewResearch() {
  var labs = findPoweredLabsWithPacks();
  var needed = currentResearch.getNeededCount();
  var active = 0;
  for (lab in labs) {
    if active < needed {
      lab.startResearch()
      active += 1;
    }
  }
}

If this makes no sense please pardon my French. :P
Google is my friend. Searching the forum and the wiki is always a first.

Blackence
Fast Inserter
Fast Inserter
Posts: 109
Joined: Thu Jun 05, 2014 4:03 pm
Contact:

Re: [0.10.2][kovarex] sience packs disappear

Post by Blackence »

How about this: Instead of taking the science packs from the lab's inventory when a "lab processing period" starts, why not take them at the end of the period? As soon as a lab is placed and connected to energy, the bar in the lab GUI would start to fill up and stop right at 100%. At that point, the lab needs science packs as required for the currently active research, consumes them and awards research progress and possibly the researched technology atomically (well, as atomically as it can get), resetting the lab GUI bar to 0% so it can slowly progress towards 100% again. If there's no active research (e.g. because it has been completed 0.01ms ago by some other lab), the lab just stops at 100% and waits for new research to be started, even when it's full of science packs.

Of course, this would introduce another issue with research speed, because the current research (and therefore current research speed) may change during a research period. I don't think that's a problem anyone would care about though. The research speed for the first "lab processing period" would be wrong in some cases.


I prefer BurnHard's idea because it's continuous, but this might be easier to implement.

Is it just me or is the dark text on dark grey background in this textarea a little hard to read? Hm. I should probably find that forum theme thread. :-)

Lilrock
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu May 21, 2015 5:41 pm
Contact:

Re: [0.10.2][kovarex] sience packs disappear

Post by Lilrock »

I would like to have this issue fixed. Because of this, I won't be able to automate the science packs into the labs with assurance that I'm not losing any materials.

I have a nice setup too. I was reading a Reddit post about having troubles with the speed modules in the labs, but that was a while ago and assume that it was fixed.
Factorio_Lab_Placement.png
Factorio_Lab_Placement.png (2.28 MiB) Viewed 2719 times

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.2][kovarex] sience packs disappear

Post by kovarex »

Actually, this is solved for 0.12.
changelog 0.12 wrote: Lab research is now continuous. Science packs have progress bars of usage. This means that 20 labs doing research with 10 units will still be faster than 10 labs and the science packs aren't wasted.

Post Reply

Return to “Resolved Problems and Bugs”