[2.0.77] Calling set_recipe() and writing to crafting_progress of an assembling causes a single craft to ignore quality

User avatar
Thremtopod
Inserter
Inserter
Posts: 36
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

[2.0.77] Calling set_recipe() and writing to crafting_progress of an assembling causes a single craft to ignore quality

Post by Thremtopod »

Calling set_recipe() on an assembling machine LuaEntity, then writing (a non-zero value) to crafting_progress to it, causes the next craft to always be common quality, regardless of the recipe's actual quality. It's only for one craft, and the next one is always correct.

I've attached a scenario I made that demonstrates this:
set_recipe_bug.zip
Custom scenario
(2.34 MiB) Downloaded 10 times
Screenshots:
After script sets recipe and progress
After script sets recipe and progress
Screenshot_20260526_005352.png (68.6 KiB) Viewed 253 times
After finishing next craft
After finishing next craft
Screenshot_20260526_005410.png (68.38 KiB) Viewed 253 times
Attachments
factorio-current.log
(8.78 KiB) Downloaded 11 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4566
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.77] Calling set_recipe() and writing to crafting_progress of an assembling causes a single craft to ignore qual

Post by boskid »

Thanks for the report. I remember changing this behavior some time ago for 2.1, so it is already fixed for 2.1. By force starting the recipe by write to crafting_progress there is a shortcut that was not rolling result quality and as such this product was always of normal quality. You can workaround this issue by writing recipe's quality to https://lua-api.factorio.com/2.0.77/cla ... lt_quality after the crafting_progress was set. In 2.1 this workaround will not be needed because there will be a quality roll happening when crafting is force started this way even if no real ingredients were consumed.
Post Reply

Return to “Fixed for 2.1”