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

Post your bugs and problems so we can fix them.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2604
Joined: Tue Jul 12, 2016 9:03 am

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

Post by eradicator » Thu Nov 29, 2018 6:07 pm

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 5 times
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

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

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

Post by TruePikachu » Fri Nov 30, 2018 12:15 am

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: 2604
Joined: Tue Jul 12, 2016 9:03 am

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

Post by eradicator » Sat Dec 01, 2018 9:43 am

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: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

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

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

Post by Jap2.0 » Sat Dec 01, 2018 3:54 pm

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
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Tue Apr 25, 2017 2:53 pm

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

Post by cbhj1 » Sat Dec 01, 2018 6:29 pm

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: 7976
Joined: Wed Jun 11, 2014 5:23 am

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

Post by Rseding91 » 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.
If you want to get ahold of me I'm almost always on IRC and Discord.

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

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

Post by eradicator » Sun Dec 02, 2018 9:24 pm

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: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

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

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

Post by TruePikachu » Sun Dec 02, 2018 11:44 pm

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.

Post Reply

Return to “Bug Reports”