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

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

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 865
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 » 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: 2725
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 » 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: 1934
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 » 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
Fast Inserter
Fast Inserter
Posts: 106
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 » 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: 9020
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 » 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 Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2725
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 » 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: 865
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 » 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9020
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 » Sat Dec 22, 2018 6:17 am

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: 9020
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 » Sun Jan 06, 2019 1:10 am

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: 2725
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 » Sat May 04, 2019 1:28 pm

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

Post Reply

Return to “Minor issues”

Who is online

Users browsing this forum: No registered users