[0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by eradicator »

Reproduction:
  1. start an unmodded game
  2. build stuff
  3. save game
  4. install Over 9000!
  5. load game
  6. save game
  7. disable Over 9000!
  8. load game
  9. -> bug
Or load the demo savegame without any mods, open an assembler gui and see that it produces instantly.
If the assembler is destroyed and rebuilt by bots it behaves normally afterwards.


_bugtest_assemblers_too_fast_post9000.zip
(1.08 MiB) Downloaded 93 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by TruePikachu »

I'm assuming the version you released the other day? I poked into the Lua, doesn't look to be anything that would make this clearly NaB there (e.g. setting the force's crafting speed modifier). All the relevant code does is set `crafting_speed` on `assembling-machine`s and `furnace`s to 9001:

Code: Select all

for _,this in pairs(data.raw['assembling-machine']) do
  this .crafting_speed = 9001
  end

for _,this in pairs(data.raw['furnace']) do
  this .crafting_speed = 9001
  end

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by eradicator »

TruePikachu wrote:
Fri Nov 30, 2018 12:15 am
I'm assuming the version you released the other day?
The version is irrelevant. The bug happens when the mod is disabled. And there exist no force bonusses that could affect assemblers even if i wanted to.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by Jap2.0 »

Do assemblers save their crafting speed? If so, is this a bug? If so, should they save their crafting speed?
There are 10 types of people: those who get this joke and those who don't.

cbhj1
Fast Inserter
Fast Inserter
Posts: 166
Joined: Tue Apr 25, 2017 2:53 pm
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by cbhj1 »

Sounds like the entity state is saved, then only updated on changes from there. Bet it would update if you poked it with a module or changed the recipe.

edit: had a moment to test it, the crafting speed updates on load, but the issue sticks until the recipe is changed, that would indicate some cached precalculated craft time that stays with the entity outside the mod.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by Rseding91 »

Most likely the process is saved in the machine and when the mod is removed the total progress needed changes resulting in it having several crafts worth of progress already saved.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by eradicator »

Rseding91 wrote:
Sun Dec 02, 2018 7:20 pm
Most likely the process is saved in the machine and when the mod is removed the total progress needed changes resulting in it having several crafts worth of progress already saved.
I originally discovered the bug while testing circuit build layouts, which included running the layout for at least equivalent to one real time hour (using game.speed) after removing the mod, though i can't say how long the mod was active before that because i only had it activated accidentially.

TL;DR: "several" was quite large if that is how it happend.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by TruePikachu »

I loaded the save, paused it at tick 40817, and attached WinDbg to investigate the entity state. Unit number 149 (rightmost circuit assembler) had `extraEnergyForProduct` = 8816.795833; I believe that "energy" in this context refers to the equivalant amount of handcrafting time, so that particular assembler still had over two hours of handcrafting-green-circuits work stored inside. I'd need a dev to confirm my conjecture on the field's meaning, but this seems like it's NaB, or at least a minor issue.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by Rseding91 »

There's an underlying problem: when a crafting machine is so fast that it produces > 100% progress per tick it will accumulate "left-over" progress forever.

I can "fix" it 1 of 2 ways:

1. I cap the progress to 100% per tick.
2. I make crafting machines support producing multiple crafts per tick.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by Rseding91 »

I think for now I'm just going to do nothing and move this to minor issues.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.51] Assemblers remain fast even after removing faster-assemblers mod.

Post by eradicator »

Rseding91 wrote:
Sat Dec 22, 2018 6:17 am
2. I make crafting machines support producing multiple crafts per tick.
Just for the record, i would prefer this over capping.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Minor issues”